text: !function(t){var e={};function n(g){if(e[g])return e[g].exports;var o=e[g]={i:g,l:!1,exports:{}};return t[g].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,g){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:g})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var g=Object.create(null);if(n.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(g,o,function(e){return t[e]}.bind(null,o));return g},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=93)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function g(t,e,n,g,o){t.digestTtl(20),n.debugEnabled("dev"===window.location.hostname.split(".").pop()),o.debugInfoEnabled(!1),e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",g.decorator("$rootScope",["$delegate",function(t){return Object.defineProperty(t.constructor.prototype,"_",{value:_,enumerable:!1}),t}])}n.d(e,"b",(function(){return s})),g.$inject=["$rootScopeProvider","$httpProvider","$logProvider","$provide","$compileProvider"];var o=n(14);function A(t,e,n,g){t.on("keydown",(function(t){var o=t.metaKey||t.ctrlKey,A=90===t.keyCode,r=27===t.keyCode,C=t.shiftKey;r&&n.stack?(t.preventDefault(),n.stack.close(),e.apply()):o&&A&&(C?g.redo():g.undo(),e.apply(),t.preventDefault())}))}A.$inject=["$document","app","store","history"];var r=n(0),C=n.n(r),i=n(2),I=n.n(i),a=n(3),s=new(function(){function t(){C()(this,t)}return I()(t,[{key:"controller",value:function(t,e){a.b.shortcodes.hasOwnProperty(t)&&(a.b.shortcodes[t].controller=e)}},{key:"on",value:function(t,e){a.b.$$events[t]=a.b.$$events[t]||[],a.b.$$events[t].push(e)}},{key:"addfilter",value:function(t,e){a.b.$$filters[t]=a.b.$$filters[t]||[],a.b.$$filters[t].push(e)}},{key:"addAction",value:function(t){a.b.actions.push(t)}}]),t}()),c=angular.module("uxBuilder",[]);e.a=c;c.config(g),c.run(o.a),c.run(A),c.factory("presetCache",["$cacheFactory",function(t){return t()}])},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var g=e[n];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}t.exports=function(t,e,g){return e&&n(t.prototype,e),g&&n(t,g),t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return g})),n.d(e,"a",(function(){return o})),o.$inject=["$parse"];var g=(window.parent||window).uxBuilderData;function o(t){return g.$set=function(e,n){return t(A(e)).assign(g,n)},g.$get=function(e,n){var o=t(A(e))(g);return!angular.isDefined(o)&&n?g.$set(e,n):o},g.$unset=function(e){var n;return e.indexOf("*")?(n=e.split("*")[0],t(A(n)).assign(g,null)):t(A(e)).assign(g,null)},g.$disable=function(){g.enabled=!1},g.$enable=function(){g.enabled=!0},g.$addAction=function(t,e){if(g.enabled){g.history.splice(0,g.history.length-49),g.currentAction<g.history.length-1&&g.history.splice(g.currentAction+1,g.history.length);var n=g.history.slice().pop();n&&n.payload.key===e.key?!1!==e.override&&(n.payload=e):g.currentAction=g.history.push({type:t,payload:e})-1}},g.$resetToAction=function(t){g.history.splice(t+1,g.history.length),g.currentAction=Math.min(t,g.currentAction)},g}function A(t){var e=[],n=t.split(".");return _.each(n,(function(t){e.push(jQuery.camelCase(t.replace(/:/g,"-")))})),e.join(".")}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";(function(t){function g(t){for(var e=t.ancestorsAndSelf,n=0;n<e.length;n++)if(e[n].data.resize)return e[n];return null}function o(t,e,n){angular.isDefined(t.$scope.$customCtrl)&&angular.isFunction(t.$scope.$customCtrl[e])&&t.$scope.$customCtrl[e](n)}function A(e){var n=t.HammerJS.DIRECTION_ALL;switch(e){case"top":n=t.HammerJS.DIRECTION_VERTICAL;break;case"right":n=t.HammerJS.DIRECTION_HORIZONTAL;break;case"bottom":n=t.HammerJS.DIRECTION_VERTICAL;break;case"left":n=t.HammerJS.DIRECTION_HORIZONTAL}return n}function r(t,e){for(var n in t)if(t[n].$element.get(0)===e)return n;return null}n.d(e,"c",(function(){return g})),n.d(e,"d",(function(){return o})),n.d(e,"b",(function(){return A})),n.d(e,"a",(function(){return r}))}).call(this,n(4))},,function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return A})),n.d(e,"c",(function(){return r}));var g=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1};function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,C=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document,i=A(C).top,I=t-i,a=i+I*o,s=t-a,c=0,l=20,u=function t(){r(a+s*g((c+=l)/e),C),c<e?window.requestAnimationFrame(t):n&&"function"==typeof n&&n()};u()}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=t.documentElement,n=(t.defaultView.pageYOffset||e.scrollTop)-(e.clientTop||0),g=(t.defaultView.pageXOffset||e.scrollLeft)-(e.clientLeft||0);return{top:n,left:g}}function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;e.documentElement.scrollTop=t,e.body.parentNode.scrollTop=t,e.body.scrollTop=t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));n(0),n(2);var g=(window.frameElement?window.parent:window).uxBuilderData},function(t,e,n){t.exports=n(63)},function(t,e,n){"use strict";n.r(e),e.default='<div class="uxb-move">\n  <div class="uxb-move-handle"\n    ng-if="$ctrl.shortcode"\n    ng-class="$ctrl.classNames($ctrl.shortcode)"\n    draggable-shortcode="$ctrl.shortcode">\n    <span class="uxb-move-icon dashicons dashicons-move"></span>\n  </div>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="uxb-resize uxb-resize-top"></div>\n<div class="uxb-resize uxb-resize-right"></div>\n<div class="uxb-resize uxb-resize-bottom"></div>\n<div class="uxb-resize uxb-resize-left"></div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="context-menu-menu" ng-click="$ctrl.hide()">\n  <shortcode-actions shortcode="$ctrl.shortcode"></shortcode-actions>\n</div>\n'},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o})),o.$inject=["$rootScope","$window","AppEvent"];var g=null;function o(t,e,n){var g=!0;t.$watch((function(){g&&e.postCustomMessage(n.APPLY)})),e.addEventListener(n.APPLY,(function(){g=!1,null===t.$$phase&&t.$apply(),g=!0}),!1),e.addEventListener(n.BROADCAST,(function(e){t.$broadcast(e.data.type,e.data.data)}),!1),e.addEventListener(n.EMIT,(function(e){t.$emit(e.data.type,e.data.data)}),!1)}t.postCustomMessage=function(t,e,n){g=g||(self===top?document.querySelectorAll(".iframe-frame")[0].contentWindow:window.parent),(n=new CustomEvent(t)).data=e,g.dispatchEvent(n)}}).call(this,n(4))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return A}));var g=n(0),o=n.n(g),A=function e(n,g,A,r,C,i,I,a,s,c){o()(this,e);var l={},u=(window.parent||window).angular.element("draggable-helper");return function(e,o,d){var p=this;d=angular.extend({cssProps:{},droppable:!0,broadcast:!0,start:angular.noop,move:angular.noop,end:angular.noop},d);var h=o||e.$element.get(0),f=new t.HammerJS(h,d);return f.get("pan").set({direction:t.HammerJS.DIRECTION_ALL,threshold:1}),angular.element(h).data("shortcode",e),angular.element(h).addClass("uxb-draggable"),f.on("hammer.input",(function(t){t.srcEvent.stopPropagation(),t.srcEvent.stopImmediatePropagation()})),f.on("panstart",m),f.on("pan",(function(t){l.shortcode||m(t);b(t),l.defaultPrevented||(u.addClass("active"),u.css({transform:"translate3d(".concat(l.global.x,"px, ").concat(l.global.y,"px, 0px)")}),u.find("h3 span").css({transform:"rotate(".concat(-25*l.originalEvent.velocityY,"deg)")}));if(l.target=null,l.addToShortcode=null,e.$recompile)return f.stop(!0),v(t);if(A.find(l.global.x,l.global.y).map((function(t){!l.target&&t.target&&t.target.allows(e)&&(l.target=t)})),l.target){var g=l.target.target===e.parent,o=g&&l.target.index===e.index,r=g&&l.target.index===e.index+1,C=t.srcEvent.altKey;!o&&!r||C||(l.target=null)}d.move(t),n("tools").showAddableSpot(l.target,t.srcEvent.altKey),n.outlineShortcode(l.target?l.target.target.parent:null),n.broadcast(c.PAN_MOVE,l),d.broadcast&&n.broadcast(c.MOVE,l);n("tools").apply(),e.$scope.$digest()})),f.on("panend",v),f;function m(t){u.find("h3 span").text(e.data.name),C.onkeydown=function(t){return n("tools").toggleAddableButton(t.altKey)},C.onkeyup=function(t){return n("tools").toggleAddableButton(t.altKey)},l.shortcode=e,l.iframeRect=a().get(0).getBoundingClientRect(),l.container=e.parent.$element,l.isSelected=n.states.selectedShortcode===e,l.defaultPrevented=!1,l.showHelper=!0,l.constrains=!1,l.initial={},b(t),l.initial={},l.initial.innerX=l.innerX,l.initial.innerY=l.innerY,l.initial.elementX=l.elementX,l.initial.elementY=l.elementY,e.$element.addClass("uxb-shortcode-dragging"),angular.element(i.parent.document.body).addClass("dragging"),angular.element("body").addClass("dragging"),d.start(t),e.states.dragging=!0,g.isDragging=!0,n.broadcast(c.PAN_START,l),d.broadcast&&n.broadcast(c.START,l),n("tools").apply(),e.$scope.$digest()}function v(t){if(b(t),u.find("h3 span").removeAttr("style"),u.removeClass("active"),e.states.dragging=!1,l.target&&!l.defaultPrevented){var o=t.srcEvent.altKey,A=l.target.target,a=l.target.index;l.addedShortode=o?A.addChild(e.copy(),a):r.move(e,A,a)}e.$element.removeClass("uxb-shortcode-dragging"),angular.element(i.parent.document.body).removeClass("dragging"),angular.element("body").removeClass("dragging"),d.end(t),n.broadcast(c.PAN_END,l),d.broadcast&&n.broadcast(c.END,l),C.onkeydown=null,C.onkeyup=null,l={},I((function(){return g.isDragging=!1}),0)}function b(t){l.originalEvent=t,l.global=s.getGlobalCoordinates(t.target.ownerDocument.defaultView,t.center.x,t.center.y),l.element=angular.element(h),l.draggable=p,l.main={},l.main.x=l.global.x,l.main.y=l.global.y,l.iframe={},l.iframe.x=l.global.x-l.iframeRect.left,l.iframe.y=l.global.y-l.iframeRect.top,l.virtual={},l.virtual.width=l.shortcode.$element.width(),l.virtual.height=l.shortcode.$element.height(),l.virtual.top=l.iframe.y-l.initial.elementY,l.virtual.right=l.iframe.x+l.virtual.width-l.initial.elementX,l.virtual.bottom=l.iframe.y+l.virtual.height-l.initial.elementY,l.virtual.left=l.iframe.x-l.initial.elementX,l.constrains&&function(){l.constrains=l.container.outerOffset(),l.innerX=l.iframe.x-l.constrains.left-l.initial.elementX,l.innerY=l.iframe.y-l.constrains.top-l.initial.elementY,l.virtual.top<l.constrains.top&&(l.innerY=0);l.virtual.right>l.constrains.right&&(l.innerX=l.constrains.width-l.virtual.width);l.virtual.bottom>l.constrains.bottom&&(l.innerY=l.constrains.height-l.virtual.height);l.virtual.left<l.constrains.left&&(l.innerX=0)}(),l.elementX=l.iframe.x-e.$element.offset().left,l.elementY=l.iframe.y-e.$element.offset().top+a().contents().scrollTop(),l.preventDefault=function(){l.defaultPrevented=!0},l.setContainment=function(t){l.constrains=t.outerOffset(),l.container=t}}}};A.$inject=["app","store","targets","Shortcode","$document","$window","$timeout","$iframe","utils","DragEvent"]}).call(this,n(4))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return A}));var g=n(0),o=n.n(g),A=function e(){return o()(this,e),function(e,n,g){return g?t.propagatingHammer(new t.HammerJS(e,n)):new t.HammerJS(e,n)}}}).call(this,n(4))},function(t,e,n){"use strict";(function(e){var g=n(38),o=n(39),A=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,C=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function i(t){return(t||"").toString().replace(C,"")}var I=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],a={hash:1,query:1};function s(t){var n,g=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},o={},r=typeof(t=t||g);if("blob:"===t.protocol)o=new l(unescape(t.pathname),{});else if("string"===r)for(n in o=new l(t,{}),a)delete o[n];else if("object"===r){for(n in t)n in a||(o[n]=t[n]);void 0===o.slashes&&(o.slashes=A.test(t.href))}return o}function c(t){t=i(t);var e=r.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function l(t,e,n){if(t=i(t),!(this instanceof l))return new l(t,e,n);var A,r,C,a,u,d,p=I.slice(),h=typeof e,f=this,m=0;for("object"!==h&&"string"!==h&&(n=e,e=null),n&&"function"!=typeof n&&(n=o.parse),e=s(e),A=!(r=c(t||"")).protocol&&!r.slashes,f.slashes=r.slashes||A&&e.slashes,f.protocol=r.protocol||e.protocol||"",t=r.rest,r.slashes||(p[3]=[/(.*)/,"pathname"]);m<p.length;m++)"function"!=typeof(a=p[m])?(C=a[0],d=a[1],C!=C?f[d]=t:"string"==typeof C?~(u=t.indexOf(C))&&("number"==typeof a[2]?(f[d]=t.slice(0,u),t=t.slice(u+a[2])):(f[d]=t.slice(u),t=t.slice(0,u))):(u=C.exec(t))&&(f[d]=u[1],t=t.slice(0,u.index)),f[d]=f[d]||A&&a[3]&&e[d]||"",a[4]&&(f[d]=f[d].toLowerCase())):t=a(t);n&&(f.query=n(f.query)),A&&e.slashes&&"/"!==f.pathname.charAt(0)&&(""!==f.pathname||""!==e.pathname)&&(f.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),g=n.length,o=n[g-1],A=!1,r=0;g--;)"."===n[g]?n.splice(g,1):".."===n[g]?(n.splice(g,1),r++):r&&(0===g&&(A=!0),n.splice(g,1),r--);return A&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(f.pathname,e.pathname)),g(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(a=f.auth.split(":"),f.username=a[0]||"",f.password=a[1]||""),f.origin=f.protocol&&f.host&&"file:"!==f.protocol?f.protocol+"//"+f.host:"null",f.href=f.toString()}l.prototype={set:function(t,e,n){var A=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||o.parse)(e)),A[t]=e;break;case"port":A[t]=e,g(e,A.protocol)?e&&(A.host=A.hostname+":"+e):(A.host=A.hostname,A[t]="");break;case"hostname":A[t]=e,A.port&&(e+=":"+A.port),A.host=e;break;case"host":A[t]=e,/:\d+$/.test(e)?(e=e.split(":"),A.port=e.pop(),A.hostname=e.join(":")):(A.hostname=e,A.port="");break;case"protocol":A.protocol=e.toLowerCase(),A.slashes=!n;break;case"pathname":case"hash":if(e){var r="pathname"===t?"/":"#";A[t]=e.charAt(0)!==r?r+e:e}else A[t]=e;break;default:A[t]=e}for(var C=0;C<I.length;C++){var i=I[C];i[4]&&(A[i[1]]=A[i[1]].toLowerCase())}return A.origin=A.protocol&&A.host&&"file:"!==A.protocol?A.protocol+"//"+A.host:"null",A.href=A.toString(),A},toString:function(t){t&&"function"==typeof t||(t=o.stringify);var e,n=this,g=n.protocol;g&&":"!==g.charAt(g.length-1)&&(g+=":");var A=g+(n.slashes?"//":"");return n.username&&(A+=n.username,n.password&&(A+=":"+n.password),A+="@"),A+=n.host+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(A+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(A+=n.hash),A}},l.extractProtocol=c,l.location=s,l.trimLeft=i,l.qs=o,t.exports=l}).call(this,n(4))},function(t,e,n){var g=n(40);t.exports=function(t,e){if(null==t)return{};var n,o,A=g(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(A[n]=t[n])}return A}},function(t,e){function n(t,e,n,g,o,A,r){try{var C=t[A](r),i=C.value}catch(t){return void n(t)}C.done?e(i):Promise.resolve(i).then(g,o)}t.exports=function(t){return function(){var e=this,g=arguments;return new Promise((function(o,A){var r=t.apply(e,g);function C(t){n(r,o,A,C,i,"next",t)}function i(t){n(r,o,A,C,i,"throw",t)}C(void 0)}))}}},function(t,e,n){"use strict";n.r(e),e.default='<p ng-if="$ctrl.errorMessage" class="error error-message">\n  {{ $ctrl.errorMessage }}\n</p>\n\n<div class="add-shortcode-selector">\n  <div class="add-shortcode-header">\n    <h2 class="title">Add Content</h2>\n    <nav class="add-shortcode-types">\n      <button type="button"\n        ng-click="$ctrl.showType(\'shortcodes\')"\n        ng-class="{ active: $ctrl.type === \'shortcodes\' }">\n        Elements\n      </button>\n      <button type="button"\n        ng-if="$ctrl.shortcode.isRoot"\n        ng-click="$ctrl.showType(\'import\')"\n        ng-class="{ active: $ctrl.type === \'import\' }">\n        Import\n      </button>\n    </nav>\n  </div>\n\n  <div class="add-shortcode-items" ng-if="$ctrl.type === \'shortcodes\'">\n\n    <div class="flatsome-studio-button" ng-if="$ctrl.flatsomeStudioIsActive">\n      <button type="button" class="wp-style alt button-large button-block"\n        ng-click="$ctrl.showFlatsomeStudio()">\n        <span class="dashicons dashicons-screenoptions"></span> Flatsome Studio\n      </button>\n      <hr />\n    </div>\n\n    <input class="filter-elements" type="text" placeholder="Search&hellip;" ng-model="$ctrl.filter.name">\n\n    <div class="add-shortcode-category"\n      ng-repeat="category in $ctrl.items"\n      ng-show="items.length">\n      <h3>{{:: category.name }}</h3>\n      <ul>\n        <li class="add-shortcode-box" ng-repeat="item in items = (category.items | filter: $ctrl.filter)">\n          <button class="add-shortcode-box-button" type="button" ng-class="{ \'is-loading\': $ctrl.isLoading === item.tag }" ng-click="$ctrl.add(item, 0)">\n            <img ng-if="item.thumbnail" ng-src="{{:: item.thumbnail }}" alt="{{:: item.name }}"/>\n            <div ng-if="$ctrl.isLoading === item.tag" class="add-shortcode-loading-spinner loading-spinner is-visible"></div>\n            <span class="title">{{:: item.name }}</span>\n          </button>\n        </li>\n      </ul>\n    </div>\n  </div>\n</div>\n\n<template-importer ng-if="$ctrl.type === \'import\'"></template-importer>\n\n<div class="add-shortcode-presets">\n  <h3>Presets</h3>\n  <ul ng-if="$ctrl.presets">\n    <li class="add-shortcode-box" ng-repeat="preset in $ctrl.presets">\n      <button type="button" class="add-shortcode-box-button"\n        title="{{:: preset.name }}"\n        ng-class="{ \'with-thumbnail\' : !!preset.thumbnail, \'active\' : $ctrl.currentPreset === $index }"\n        ng-click="$ctrl.usePreset(preset.content); $ctrl.currentPreset = $index">\n        <div ng-if="preset.custom" class="add-shortcode-icon">\n          <svg width="36" height="36" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.73009 2.41274L8.95709 3.63719L3.40181 9.18095L2.17482 7.95652L7.73009 2.41274ZM7.73009 0.242432L0 7.95652L3.40181 11.3513L11.1319 3.63719L7.73009 0.242432Z" fill="#007CBA"/> <path d="M7.8196 11.3114L8.95987 12.4493L7.8196 13.5873L6.67928 12.4493L7.8196 11.3114ZM7.8196 9.14111L4.50439 12.4492L7.8196 15.7575L11.1348 12.4492L7.8196 9.14087V9.14111Z" fill="#007CBA"/> <path d="M12.2322 6.90786L13.3725 8.0458L12.2322 9.18369L11.0921 8.04584L12.2323 6.90795L12.2322 6.90786ZM12.2323 4.73763L8.91699 8.04584L12.2322 11.3542L15.5474 8.04584L12.2322 4.73755L12.2323 4.73763Z" fill="#007CBA" fill-opacity="0.6"/> </svg>\n        </div>\n        <img ng-if="!preset.custom && preset.thumbnail" ng-src="{{:: preset.thumbnail }}" alt="{{:: preset.name }}">\n        <span class="title">{{:: preset.name }}</span>\n      </button>\n      <div ng-if="preset.custom === true" class="add-shortcode-actions">\n        <button class="blank" ng-click="$ctrl.templates.updatePreset(preset)">\n          <span class="dashicons dashicons-edit"></span>\n        </button>\n        <button class="blank" ng-click="$ctrl.removePreset(preset)">\n          <span class="dashicons dashicons-trash"></span>\n        </button>\n      </div>\n    </li>\n  </ul>\n  <button\n    type="button"\n    class="wp-style alt button-large button-block"\n    ng-click="$ctrl.stack.close()"\n    ng-if="$ctrl.presets">\n    Apply\n  </button>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<button\n  title="Undo"\n  type="button"\n  class="blank has-tooltip"\n  ng-click="$ctrl.undo()"\n  ng-disabled="$ctrl.canUndo() === false">\n  <span class="dashicons dashicons-undo"></span>\n  <div class="uxb-tooltip">Undo</div>\n</button>\n\n<button\n  title="Redo"\n  type="button"\n  class="blank has-tooltip"\n  ng-click="$ctrl.redo()"\n  ng-disabled="$ctrl.canRedo() === false">\n  <span class="dashicons dashicons-redo"></span>\n  <div class="uxb-tooltip">Redo</div>\n</button>\n\n<hr/>\n\n<button type="button"\n    class="blank has-tooltip"\n    title="{{:: breakpoint.title }}"\n    ng-click="$ctrl.setBreakpoint($index)"\n    ng-class="{ \'active\' : $ctrl.isActiveBreakpont($index) }"\n    ng-repeat="(name, breakpoint) in $ctrl.breakpoints.all track by breakpoint.width">\n    <span class="{{:: breakpoint.icon }}"></span>\n    <div class="uxb-tooltip">{{:: breakpoint.title }}</div>\n    <div class="has-breakpoint-values" ng-if="$ctrl.hasBreakpointValues($index)"></div>\n</button>\n\n<hr/>\n\n<button type="button"\n    class="blank has-tooltip"\n    title="{{:: action.tooltip }}"\n    ng-click="$ctrl.doAction(action)"\n    ng-repeat="action in $ctrl.actions">\n    <span class="{{:: action.icon }}"></span>\n    <div class="uxb-tooltip">{{:: action.tooltip }}</div>\n</button>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-main class="animate-{{ $ctrl.routeAnimation }}">\n\n  <div class="title-row sidebar-top">\n  \t<div class="title-row-icon">\n\t  \t<button type="button"\n        title="Exit Builder"\n        class="blank" ng-click="$ctrl.app.exit()"\n        ng-disabled="$ctrl.permissions.exit === false">\n\t   \t \t<span class="dashicons dashicons-no-alt"></span>\n\t\t  </button>\n  \t</div>\n  \t<div class="title-row-title">\n      {{ $ctrl.store.post.attributes.values.post_title }}\n    </div>\n  \t<div class="title-row-actions">\n  \t\t<button type="button" class="blank" ng-click="$ctrl.app.goto(\'/settings\')">\n\t      <span class="dashicons dashicons-admin-generic"></span>\n\t    </button>\n  \t</div>\n  </div>\x3c!-- Sidbar top --\x3e\n\n  <div ui-view></div>\n\n  <div class="app-sidebar-footer">\n    <button type="button" class="blank app-sidebar-toggle" ng-click="$ctrl.toggle()">\n      <span class="dashicons dashicons-arrow-left-alt2"\n        ng-if="$ctrl.store.showSidebar === true"\n      ></span>\n      <span class="dashicons dashicons-arrow-right-alt2"\n        ng-if="$ctrl.store.showSidebar === false"\n      ></span>\n    </button>\n  </div> \n\n</app-sidebar-main>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-outline-tool class="auto-size" shortcode="$ctrl.outlined"></app-outline-tool>\n<app-resize-tool class="auto-size" shortcode="$ctrl.outlined"></app-resize-tool>\n<app-move-tool class="auto-size" shortcode="$ctrl.outlined"></app-move-tool>\n<app-select-tool class="auto-size" shortcode="$ctrl.selected"></app-select-tool>\n<add-buttons></add-buttons>\n\n<div class="tools-addable">\n  <div class="line"></div>\n  <add-button\n    class="button"\n    index="$ctrl.index"\n    shortcode="$ctrl.addable">\n  </add-button>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="hierarchy-title" ng-class="{ \'active\' : $ctrl.isActive(), [\'open\'] : $ctrl.shortcode.states.open, [\'visibility-\'+$ctrl.shortcode.options.visibility] : $ctrl.shortcode.options.visibility }">\n\n    <button type="button" class="hierarchy-toggle"\n        ng-if="$ctrl.shortcode.children"\n        ng-click="$ctrl.toggleChildren()">\n    </button>\n\n    <div class="hierarchy-name"\n        ng-click="$ctrl.selectShortcode()"\n        ng-mouseover="$ctrl.outlineShortcode()"\n        ng-dblclick="$ctrl.configureShortcode()">\n\n        {{:: $ctrl.shortcode.data.name }}\n\n        <span class="hierarchy-info" ng-bind="$ctrl.getShortcodeInfo()"></span>\n    </div>\n\n    <div class="hierarchy-tools">\n      <button type="button blank" ng-click="$ctrl.showContextMenu($event)">\n        <span class="dashicons dashicons-admin-generic"></span>\n      </button>\n    </div>\n</div>\n\n<shortcode-hierarchy-list\n  ng-if="$ctrl.shortcode.states.open"\n  ng-class="{ \'open\': $ctrl.shortcode.states.open }"\n  shortcode="$ctrl.shortcode">\n</shortcode-hierarchy-list>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-view class="home-view">\n\n  <view-header>\n\n  </view-header>\n\n  <view-body>\n    <shortcode-hierarchy-list shortcode="$ctrl.store.postContent"></shortcode-hierarchy-list>\n  </view-body>\n\n  <view-footer>\n    <button id="app-draft-button" type="button"\n      class="wp-style button-large button-block"\n      ng-if="$ctrl.store.post.status === \'draft\' || $ctrl.store.post.status === \'auto-draft\'"\n      ng-class="{ \'loading\': $ctrl.store.isSaving === \'draft\' }"\n      ng-disabled="$ctrl.permissions.save === false"\n      ng-click="$ctrl.save(\'draft\')">\n      Save Draft\n    </button>\n    <button id="app-private-button" type="button"\n      class="wp-style button-large button-block"\n      ng-if="$ctrl.store.post.status === \'private\'"\n      ng-class="{ \'loading\': $ctrl.store.isSaving === \'private\' }"\n      ng-disabled="$ctrl.permissions.save === false"\n      ng-click="$ctrl.save(\'private\')">\n      Save Private\n    </button>\n    <button id="app-save-button" type="button"\n      class="wp-style alt button-large button-block"\n      ng-class="{ \'loading\': $ctrl.store.isSaving && $ctrl.store.isSaving !== \'draft\' && $ctrl.store.isSaving !== \'private\'}"\n      ng-disabled="$ctrl.permissions.save === false"\n      ng-click="$ctrl.save()">\n      {{ $ctrl.saveButtonText }}\n    </button>\n    <button id="app-save-button" type="button"\n      class="wp-style button-large button-block button-exit animate-fade-in-right"\n      ng-if="$ctrl.store.isSaved"\n      ng-click="$ctrl.app.exit()">\n      &times;\n    </button>\n  </view-footer>\n\n</app-sidebar-view>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-view class="settings-view">\n\n  <view-header>\n    <div class="title-row">\n      <div class="title-row-icon">\n          <button class="button-reset view-header-title" type="button" ng-click="$ctrl.   exit()">\n               <span class="dashicons dashicons-arrow-left-alt2"></span>\n          </button>\n      </div>\n      <div class="title-row-title"> Post settings </div>\n    </div>\n  </view-header>\n\n  <view-body>\n    <ux-options\n      options="$ctrl.post.attributes.options.tree"\n      model="$ctrl.post.attributes.values">\n    </ux-options>\n    <ux-options\n      options="$ctrl.post.meta.options.tree"\n      model="$ctrl.post.meta.values">\n    </ux-options>\n    <div class="box">\n      <h3 class="box-title">Actions</h3>\n      <div class="box-content">\n        <button class="wp-style button-block" ng-click="$ctrl.saveAsTemplate()">Save as template&hellip;</button>\n        <div style="padding: 5px 0;" />\n        <button class="wp-style danger button-block" ng-click="$ctrl.clearContent()">Clear content&hellip;</button>\n      </div>\n    </div>\n  </view-body>\n\n  <view-footer>\n    <button type="button" class="wp-style blank" ng-click="$ctrl.discard()">\n      <span class="dashicons dashicons-no-alt"></span>Discard\n    </button>\n    <button type="button" class="wp-style" ng-click="$ctrl.exit()">\n      <span class="dashicons dashicons-yes"></span>Apply\n    </button>\n  </view-footer>\n\n</app-sidebar-view>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-view class="shortcode-view">\n\n  <view-header>\n    <div class="title-row">\n      <div class="title-row-icon">\n         <button class="button-reset view-header-title" type="button" ng-click="$ctrl.exit(\'/\')">\n             <span class="dashicons dashicons-arrow-left-alt2"></span>\n         </button>\n      </div>\n      <div class="title-row-title"> {{ $ctrl.shortcode.data.name }} </div>\n      <div class="title-row-actions"></div>\n    </div>\n  </view-header>\n\n  <view-body>\n    <ux-options\n      options="$ctrl.options"\n      shortcode="$ctrl.shortcode"\n      responsive="$ctrl.responsiveValues"\n      model="$ctrl.shortcode.options">\n    </ux-options>\n  </view-body>\n\n  <view-footer>\n    <button type="button" class="wp-style outline" ng-click="$ctrl.discard()">\n      Discard\n    </button>\n    <button type="button" class="wp-style" ng-click="$ctrl.exit()">\n      Apply\n    </button>\n  </view-footer>\n\n</app-sidebar-view>\n'},function(t,e,n){"use strict";n(29),n(30)},function(t,e,n){(function(t){t.UX_EMPTY_VALUE="<none>"}).call(this,n(4))},function(t,e,n){(function(t){!function(){"use strict";t.isIframe=function(){return!!window.frameElement},t.camelCase=function(t,e){return t=e?t.charAt(0).toUpperCase()+t.slice(1):t,jQuery.camelCase(t.replace(/\_|\:/g,"-",!0))},t.snakeCase=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return t.replace(/[A-Z]/g,(function(t,n){return(n?e:"")+t.toLowerCase()}))},t.capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},t.round=function(t,e){return Math.round(t/e)*e}}()}).call(this,n(4))},function(t,e,n){"use strict";var g=n(1);g.a.constant("Event",{READY:"ready",CHANGE:"change",COMPLETE:"complete",ERROR:"error",SCROLL:"scroll",RESIZE:"resize"}),g.a.constant("AppEvent",{READY:"app-ready",APPLY:"app-apply",EMIT:"app-emit",BROADCAST:"app-broadcast"}),g.a.constant("IframeEvent",{READY:"iframe-ready",RELOAD:"iframe-reload",RESIZE:"iframe-resize",CHANGED:"iframe-changed",SCROLL:"iframe-scroll"}),g.a.constant("MouseEvent",{}),g.a.constant("TouchEvent",{}),g.a.constant("ShortcodeEvent",{CREATE:"shortcode-create",CREATED:"shortcode-created",ATTACHED:"shortcode-attached",CONFIGURE:"shortcode-configure",RECOMPILED:"shortcode-recompiled",ACTIVE:"shortcode-active",INACTIVE:"shortcode-inactive",CHANGED:"shortcode-changed",ADDED:"shortcode-added",MOVED:"shortcode-moved",DETACHED:"shortcode-detached",REMOVED:"shortcode-removed",MOUSEOVER:"shortocde-mouseover",MOUSEOUT:"shortocde-mouseout",CLICK:"shortcode-click",OUTLINED:"shortcode-outlined",SELECTED:"shortcode-selected",DUPLICATED:"shortcode-duplicated",DELETED:"shortcode-deleted"}),g.a.constant("ChildEvent",{ADDED:"child-added",REMOVED:"child-removed"}),g.a.constant("OptionsEvent",{SHOW:"options-show",CLEAR:"options-clear",HIDE:"options-hide"}),g.a.constant("MediaEvent",{CHANGED:"media-changed"}),g.a.constant("DragEvent",{PAN_START:"draggable-pan-start",PAN_MOVE:"draggable-pan-move",PAN_END:"draggable-pan-end",START:"draggable-start",MOVE:"draggable-move",END:"draggable-end"})},function(t,e,n){"use strict";n(33),n(34),n(35),n(36),n(37)},function(t,e,n){(function(t){t.jQuery.fn.cover=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return this;var g=t.jQuery(e),o=g.get(0).ownerDocument,A=o.defaultView,r=g.outerOffset(n),C=!!this.get(0).ownerDocument.defaultView.frameElement,i=!!g.get(0).ownerDocument.defaultView.frameElement;if(!C&&i){var I=A.frameElement.getBoundingClientRect();r.left+=I.left,r.top+=I.top}return C&&i&&(r.top+=o.documentElement.scrollTop||o.body.scrollTop),this.css({width:r.width.toFixed(2),height:r.height.toFixed(2),transform:"translateX(".concat(r.left.toFixed(),"px) translateY(").concat(r.top.toFixed(),"px)")})}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.isVisible=function(){return function(t){var e=!0;return t.map((function(t){var n=window.getComputedStyle(t);"none"===n.display&&(e=!1),"hidden"===n.visibility&&(e=!1),"0.0"===n.opacity&&(e=!1)})),e}([this.get(0)])}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.outerOffset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={width:0,height:0};return this.each((function(g,o){var A=t.jQuery(o),r=o.getBoundingClientRect(),C=r.right-(n.left?n.left:r.left),i=r.bottom-(n.top?n.top:r.top),I=A.css("display").search("inline")>-1;e.includeMargins&&(I?C=A.outerWidth(!0):i=A.outerHeight(!0)),n.top=(r.top>n.top?n.top:r.top)+0,n.left=(r.left>n.left?n.left:r.left)+0,n.width=C>n.width?C:n.width,n.height=i>n.height?i:n.height})),n.right=n.left+n.width,n.bottom=n.top+n.height,n}}).call(this,n(4))},function(t,e,n){"use strict";(function(t){var e=n(8);t.jQuery.fn.scrollToElement=function(n){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:450,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=t.jQuery(n),C=r.get(0).ownerDocument,i=C.defaultView,I=i.innerHeight,a=C.body.getBoundingClientRect(),s=r.get(0).getBoundingClientRect(),c=s.top-a.top+s.height/2+o;s.height<I?c-=I/2:s.height>I&&(c=s.top-a.top),Object(e.b)(c,g,A,o,C)}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.shortcode=function(){var e=this.parents(),n=null;return this.data("shortcode")?this.data("shortcode"):(e.each((function(e,g){t.jQuery(g).data("shortcode")&&!n&&(n=t.jQuery(g).data("shortcode"))})),n)}}).call(this,n(4))},function(t,e,n){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,n){"use strict";var g=Object.prototype.hasOwnProperty;function o(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function A(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var n,o,r=[];for(o in"string"!=typeof e&&(e="?"),t)if(g.call(t,o)){if((n=t[o])||null!=n&&!isNaN(n)||(n=""),o=A(o),n=A(n),null===o||null===n)continue;r.push(o+"="+n)}return r.length?e+r.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,g={};e=n.exec(t);){var A=o(e[1]),r=o(e[2]);null===A||null===r||A in g||(g[A]=r)}return g}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,g,o={},A=Object.keys(t);for(g=0;g<A.length;g++)n=A[g],e.indexOf(n)>=0||(o[n]=t[n]);return o}},function(t,e,n){"use strict";var g=n(1);function o(t){var e=n(42);angular.forEach(e.keys(),(function(n){var g=e(n);t.put(n.replace("./",""),g.default||g)}))}o.$inject=["$templateCache"],g.a.run(o)},function(t,e,n){var g={"./components/add-shortcode/add-shortcode.html":20,"./components/app-actions/app-actions.html":21,"./components/app-sidebar/app-sidebar.html":22,"./components/app-tools/app-move-tool/app-move-tool.template.html":11,"./components/app-tools/app-resize-tool/app-resize-tool.template.html":12,"./components/app-tools/app-tools.html":23,"./components/context-menu/context-menu.template.html":13,"./components/shortcode-hierarchy-list-item/shortcode-hierarchy-list-item.html":24,"./components/ux-option/types/checkbox.html":43,"./components/ux-option/types/col-slider.html":44,"./components/ux-option/types/colorpicker.html":45,"./components/ux-option/types/gallery.html":46,"./components/ux-option/types/group.html":47,"./components/ux-option/types/image.html":48,"./components/ux-option/types/margins.html":49,"./components/ux-option/types/radio-buttons.html":50,"./components/ux-option/types/radio-images.html":51,"./components/ux-option/types/scrubfield.html":52,"./components/ux-option/types/select.html":53,"./components/ux-option/types/slider.html":54,"./components/ux-option/types/text-editor.html":55,"./components/ux-option/types/textarea.html":56,"./components/ux-option/types/textfield.html":57,"./components/ux-option/types/title.html":58,"./components/ux-option/types/urlfield.html":59,"./routes/home/home.html":25,"./routes/settings/settings.html":26,"./routes/shortcode/shortcode.html":27,"./shortcodes/_loading.html":60};function o(t){var e=A(t);return n(e)}function A(t){if(!n.o(g,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return g[t]}o.keys=function(){return Object.keys(g)},o.resolve=A,t.exports=o,o.id=42},function(t,e,n){"use strict";n.r(e),e.default='<label>\n  <input type="checkbox"\n    ng-model="$ctrl.model"\n    ng-true-value="\'true\'"\n    ng-false-value="\'0\'">\n  <span></span>\n</label>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="col-slider-wrap col-slider-cols-{{ $ctrl.model }}">\n\n\t<table class="col-slider-table">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td ng-repeat="n in _.range($ctrl.option.min, $ctrl.option.max + 1) track by $index">{{:: n }}</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n\n\t<input type="range"\n\t\tclass="col-slider-input"\n    min="{{:: $ctrl.option.min }}"\n    max="{{:: $ctrl.option.max }}"\n    ng-model="$ctrl.model">\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-colorpicker\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-colorpicker>\n\n<div ng-if="$ctrl.option.helpers" class="option-helpers option-helpers-colors">\n  <a href="javascript:"\n    title="Remove"\n    ng-click="$ctrl.model = null">\n    <span class="dashicons dashicons-no-alt"></span>\n  </a>\n  <a href="javascript:"\n    title="{{:: value.title }}"\n    style="background-color: {{:: value.value }}"\n    ng-repeat="(key, value) in $ctrl.option.helpers"\n    ng-click="$ctrl.model = value.value">\n  </a>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-gallery\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-gallery>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-group\n  option="$ctrl.option"\n  shortcode="$ctrl.shortcode"\n  responsive="$ctrl.$optionsCtrl.responsive"\n  model="$ctrl.$optionsCtrl.model"\n></ux-option-group>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-image\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-image>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-margins\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-margins>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="option-button-group">\n\t<label ng-repeat="(value, data) in $ctrl.option.options"\n\t    ng-class="{ \'active\' : $ctrl.model === value }">\n\t    <input type="radio" value="{{:: value }}" ng-model="$ctrl.model"/>\n\t    <button type="button blank" title="{{:: data.title }}">\n\t    \t<span ng-if="data.icon" class="dashicons {{:: data.icon }}"></span>\n\t    \t<span ng-if="!data.icon"> {{:: data.title }}</span>\n\t    </button>\n\t</label>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<label ng-repeat="(key, value) in $ctrl.option.options"\n    ng-class="{ \'active\' : $ctrl.model === key }">\n    <input type="radio" value="{{:: key }}" ng-model="$ctrl.model">\n    <img src="{{:: value.image }}" alt="{{:: value.title }}" title="{{:: value.title }}">\n</label>\n'},function(t,e,n){"use strict";n.r(e),e.default='<input type="text"\n  class="scrubfield"\n\tscrubfield="$ctrl.option"\n\tng-model="$ctrl.model"\n\tplaceholder="{{:: $ctrl.option.default }}"\n\tng-model-options="{\n        \'updateOn\': \'blur default\',\n        \'debounce\': {\n            \'blur\' : 0,\n            \'default\': 10\n        }\n    }">\n<div ng-if="$ctrl.option.helpers" class="option-helpers">\n\t<a \tng-repeat="(key, value) in $ctrl.option.helpers" href="javascript:"\n\t\tng-click="$ctrl.model = value.value">\n\t\t{{:: value.title }}\n\t</a>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-select\n  option="$ctrl.option"\n  value="$ctrl.model"\n></ux-option-select>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="slider-wrap">\n\n  <input type="range"\n    ng-attr-min="{{:: $ctrl.option.min }}"\n    ng-attr-max="{{:: $ctrl.option.max }}"\n    ng-attr-step="{{:: $ctrl.option.step }}"\n    ng-attr-value="{{:: $ctrl.model }}"\n    ng-model="$ctrl.model">\n\n  <input type="number" to-number\n    ng-attr-min="{{:: $ctrl.option.min }}"\n    ng-attr-max="{{:: $ctrl.option.max }}"\n    ng-model="$ctrl.model">\n\n  <span class="slider-unit">{{:: $ctrl.option.unit }}</span>\n\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-editor\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-editor>\n'},function(t,e,n){"use strict";n.r(e),e.default='  <textarea\n    placeholder="{{::$ctrl.option.placeholder }}"\n    ng-model="$ctrl.model"\n    ng-model-options="{\n        updateOn: \'blur default\',\n        debounce: {\n            blur : 0,\n            default: 10\n        }\n    }"></textarea>\n'},function(t,e,n){"use strict";n.r(e),e.default='  <input type="text"\n    placeholder="{{::$ctrl.option.placeholder }}"\n    ng-model="$ctrl.model"\n    ng-model-options="{\n        updateOn: \'blur default\',\n        debounce: {\n            blur : 0,\n            default: 10\n        }\n    }">\n'},function(t,e,n){"use strict";n.r(e),e.default="{{:: $ctrl.option.heading }}\n"},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-urlfield option="$ctrl.option"></ux-option-urlfield>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="uxb-template-loading">Loading&hellip;</div>\n'},function(t,e,n){"use strict";var g=n(0),o=n.n(g),A=n(2),r=n.n(A),C=n(1),i=function(){function t(e,n,g){o()(this,t),this.app=e,this.$scope=n,g.toggleClass("with-label",!!this.label)}return t.$inject=["app","$scope","$element"],r()(t,[{key:"addShortcode",value:function(){this.app.outlineShortcode(null),this.app.selectShortcode(null),this.app.configureShortcode(null),this.app("stack").open('\n      <add-shortcode\n        shortcode="$ctrl.shortcode"\n        index="$ctrl.index"\n      ></add-shortcode>\n    ',this.$scope)}}]),t}();C.a.component("addButton",{controller:i,bindings:{shortcode:"<",label:"@",index:"<"},template:'\n    <button type="button" ng-click="$ctrl.addShortcode()">\n      <div class="wrapper">\n        <span class="icon">+</span>\n        <span class="label">{{:: $ctrl.label }}</span>\n      </div>\n    </button>\n  '})},function(t,e,n){"use strict";var g=n(10),o=n.n(g),A=n(19),r=n.n(A);n(1).a.component("templateSelector",{controller:["app","store","iframe","$scope","templates",function(t,e,n,g,A){var C=this;this.store=e,this.templates=A,this.activeTab="flatsome",this.presets=[],this.isLoading=!0,this.errorMessage="",this.setTemplate=function(g){e.loading=!0,jQuery.post(e.ajaxUrl,{action:"ux_builder_to_array",id:g}).done((function(o){var A=o.data;if(!o.success)return console.error("Failed to compile template ".concat(g));e.post.meta.values.hasOwnProperty("_wp_page_template")&&(e.post.meta.values._wp_page_template=e.templates[g].template||"default"),n.reload(A.content),t.apply()}))},this.useContentTemplate=function(g){e.loading=!0,jQuery.post(e.ajaxUrl,{action:"ux_builder_to_array",content:g.raw}).done((function(o){var A=o.data;if(!o.success)return console.error("Failed to compile template ".concat(g.id));e.post.meta.values.hasOwnProperty("_wp_page_template")&&(e.post.meta.values._wp_page_template=g.template||"default"),n.reload(A.content),t.apply()}))},this.removeTemplate=function(){var t=r()(o.a.mark((function t(e){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:C.templates.remove(e).catch((function(t){C.errorMessage=t.message}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.$onInit=function(){jQuery.get(e.ajaxUrl,{action:"ux_builder_parse_presets",tag:"_root"}).done((function(t){var e=t.data;t.success&&e&&Array.isArray(e.presets)?C.presets=e.presets.filter((function(t){return t.custom})):C.errorMessage=e?e.message:"Failed to load templates.",C.isLoading=!1,g.$apply()})).fail((function(t){C.errorMessage=t.statusText,C.isLoading=!1,g.$apply()}))};var i=function(t,e){"_root"===e.tag&&(C.presets=e.presets.filter((function(t){return t.custom})),g.$apply())};g.$on("template-saved",i),g.$on("template-removed",i)}],template:'\n    <h2 class="uxb-templates-title">Insert a template</h2>\n    <div class="uxb-tabs">\n      <button class="uxb-tab" ng-class="{ \'uxb-active\': $ctrl.activeTab === \'flatsome\' }" ng-click="$ctrl.activeTab = \'flatsome\'">Flatsome</button>\n      <button class="uxb-tab" ng-class="{ \'uxb-active\': $ctrl.activeTab === \'custom\' }" ng-click="$ctrl.activeTab = \'custom\'">Custom</button>\n    </div>\n    <div class="uxb-templates-custom" ng-if="$ctrl.activeTab === \'custom\'">\n      <div ng-if="$ctrl.isLoading" class="uxb-loading-spinner"></div>\n      <div ng-if="!$ctrl.isLoading && !$ctrl.errorMessage && $ctrl.presets.length === 0">No custom templates yet&hellip;</div>\n      <p ng-if="$ctrl.errorMessage" class="uxb-error">{{ $ctrl.errorMessage }}</p>\n      <div class="uxb-templates-list">\n        <div class="uxb-template" ng-repeat="template in $ctrl.presets">\n          <button class="uxb-template-button" ng-click="$ctrl.useContentTemplate(template)">\n            <div class="uxb-template-icon">\n              <svg width="42" height="42" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.73009 2.41274L8.95709 3.63719L3.40181 9.18095L2.17482 7.95652L7.73009 2.41274ZM7.73009 0.242432L0 7.95652L3.40181 11.3513L11.1319 3.63719L7.73009 0.242432Z" fill="#007CBA"/> <path d="M7.8196 11.3114L8.95987 12.4493L7.8196 13.5873L6.67928 12.4493L7.8196 11.3114ZM7.8196 9.14111L4.50439 12.4492L7.8196 15.7575L11.1348 12.4492L7.8196 9.14087V9.14111Z" fill="#007CBA"/> <path d="M12.2322 6.90786L13.3725 8.0458L12.2322 9.18369L11.0921 8.04584L12.2323 6.90795L12.2322 6.90786ZM12.2323 4.73763L8.91699 8.04584L12.2322 11.3542L15.5474 8.04584L12.2322 4.73755L12.2323 4.73763Z" fill="#007CBA" fill-opacity="0.6"/> </svg>\n            </div>\n            <div class="uxb-template-label">{{:: template.name }}</div>\n          </button>\n          <div class="uxb-template-actions">\n            <button ng-click="$ctrl.templates.editTemplate(template)">\n              <span class="dashicons dashicons-edit"></span>\n            </button>\n            <button ng-click="$ctrl.removeTemplate(template)">\n              <span class="dashicons dashicons-trash"></span>\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="uxb-templates-flatsome" ng-if="$ctrl.activeTab === \'flatsome\'">\n      <h4>*Images are not included.</h4>\n      <div class="uxb-templates-list">\n        <div class="uxb-template" ng-repeat="(id, template) in $ctrl.store.templates track by id">\n          <button type="button" class="uxb-template-button" ng-click="$ctrl.setTemplate(id)">\n            <img ng-attr-src="{{:: template.thumbnail }}">\n            <span class="">{{:: template.name }}</span>\n          </button>\n        </div>\n      </div>\n    </div>\n  '})},function(t,e,n){var g=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},o=g.iterator||"@@iterator",A=g.asyncIterator||"@@asyncIterator",r=g.toStringTag||"@@toStringTag";function C(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{C({},"")}catch(t){C=function(t,e,n){return t[e]=n}}function i(t,e,n,g){var o=e&&e.prototype instanceof s?e:s,A=Object.create(o.prototype),r=new y(g||[]);return A._invoke=function(t,e,n){var g="suspendedStart";return function(o,A){if("executing"===g)throw new Error("Generator is already running");if("completed"===g){if("throw"===o)throw A;return x()}for(n.method=o,n.arg=A;;){var r=n.delegate;if(r){var C=v(r,n);if(C){if(C===a)continue;return C}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===g)throw g="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);g="executing";var i=I(t,e,n);if("normal"===i.type){if(g=n.done?"completed":"suspendedYield",i.arg===a)continue;return{value:i.arg,done:n.done}}"throw"===i.type&&(g="completed",n.method="throw",n.arg=i.arg)}}}(t,n,r),A}function I(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=i;var a={};function s(){}function c(){}function l(){}var u={};u[o]=function(){return this};var d=Object.getPrototypeOf,p=d&&d(d(w([])));p&&p!==e&&n.call(p,o)&&(u=p);var h=l.prototype=s.prototype=Object.create(u);function f(t){["next","throw","return"].forEach((function(e){C(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var g;this._invoke=function(o,A){function r(){return new e((function(g,r){!function g(o,A,r,C){var i=I(t[o],t,A);if("throw"!==i.type){var a=i.arg,s=a.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){g("next",t,r,C)}),(function(t){g("throw",t,r,C)})):e.resolve(s).then((function(t){a.value=t,r(a)}),(function(t){return g("throw",t,r,C)}))}C(i.arg)}(o,A,g,r)}))}return g=g?g.then(r,r):r()}}function v(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return a;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return a}var g=I(n,t.iterator,e.arg);if("throw"===g.type)return e.method="throw",e.arg=g.arg,e.delegate=null,a;var o=g.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,a):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,a)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function $(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function y(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function w(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var g=-1,A=function e(){for(;++g<t.length;)if(n.call(t,g))return e.value=t[g],e.done=!1,e;return e.value=void 0,e.done=!0,e};return A.next=A}}return{next:x}}function x(){return{value:void 0,done:!0}}return c.prototype=h.constructor=l,l.constructor=c,c.displayName=C(l,r,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===c||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,C(t,r,"GeneratorFunction")),t.prototype=Object.create(h),t},t.awrap=function(t){return{__await:t}},f(m.prototype),m.prototype[A]=function(){return this},t.AsyncIterator=m,t.async=function(e,n,g,o,A){void 0===A&&(A=Promise);var r=new m(i(e,n,g,o),A);return t.isGeneratorFunction(n)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},f(h),C(h,r,"Generator"),h[o]=function(){return this},h.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var g=e.pop();if(g in t)return n.value=g,n.done=!1,n}return n.done=!0,n}},t.values=w,y.prototype={constructor:y,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach($),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function g(n,g){return r.type="throw",r.arg=t,e.next=n,g&&(e.method="next",e.arg=void 0),!!g}for(var o=this.tryEntries.length-1;o>=0;--o){var A=this.tryEntries[o],r=A.completion;if("root"===A.tryLoc)return g("end");if(A.tryLoc<=this.prev){var C=n.call(A,"catchLoc"),i=n.call(A,"finallyLoc");if(C&&i){if(this.prev<A.catchLoc)return g(A.catchLoc,!0);if(this.prev<A.finallyLoc)return g(A.finallyLoc)}else if(C){if(this.prev<A.catchLoc)return g(A.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return g(A.finallyLoc)}}}},abrupt:function(t,e){for(var g=this.tryEntries.length-1;g>=0;--g){var o=this.tryEntries[g];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var A=o;break}}A&&("break"===t||"continue"===t)&&A.tryLoc<=e&&e<=A.finallyLoc&&(A=null);var r=A?A.completion:{};return r.type=t,r.arg=e,A?(this.method="next",this.next=A.finallyLoc,a):this.complete(r)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),a},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),$(n),a}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var g=n.completion;if("throw"===g.type){var o=g.arg;$(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),a}},t}(t.exports);try{regeneratorRuntime=g}catch(t){Function("r","regeneratorRuntime = r")(g)}},function(t,e,n){"use strict";var g=n(0),o=n.n(g),A=function t(e){return o()(this,t),e.frameElement?e.parent.angular:angular};A.$inject=["$window"];var r=n(2),C=n.n(r),i=function(){function t(e){o()(this,t),this.store=e,this.store.states=this.store.states||{}}return t.$inject=["store"],C()(t,[{key:"outlineShortcode",value:function(t){this.store.states.outlinedShortcode=t}},{key:"selectShortcode",value:function(t){this.store.states.selectedShortcode=t}},{key:"configureShortcode",value:function(t){this.store.states.configuringShortcode=t}}]),t}(),I=function t(e,n,g,A,r,C,i,I){o()(this,t);var a=angular.copy(e.permissions);function s(t){return e.components[t]}return s.goto=function(t){(window.parent||window).location.hash=t},s.exit=function(){if(a.exit){var t="publish"===e.post.status?e.backUrl:e.editUrl;(e.isSaved||confirm("Exit? All changes since last save will be lost."))&&((window.parent||window).location.href=t)}},s.register=function(t,n){e.components=e.components||{},e.components[t]=n},s.remove=function(t){delete e.components[t]},s.apply=function(t){n.$apply(t)},s.broadcast=function(t,e){n.$broadcast(t,e),g.postCustomMessage(C.BROADCAST,{type:t,data:e})},s.emit=function(t,e){n.$emit(t,e),g.postCustomMessage(C.EMIT,{type:t,data:e})},s.trigger=function(t){for(var n=arguments.length,g=new Array(n>1?n-1:0),o=1;o<n;o++)g[o-1]=arguments[o];if(this.broadcast.apply(this,[t].concat(g)),e.$$events.hasOwnProperty(t))for(var A=0;A<e.$$events[t].length;A++){var r;(r=e.$$events[t][A]).call.apply(r,[this].concat(g))}},s.filter=function(t,n){if(e.$$filters.hasOwnProperty(t)){for(var g=arguments.length,o=new Array(g>2?g-2:0),A=2;A<g;A++)o[A-2]=arguments[A];for(var r=0;r<e.$$filters[t].length;r++){var C;n=(C=e.$$filters[t][r]).call.apply(C,[this,n].concat(o))}}return n},s.states=e.states,s.resetAll=function(){e.$$events={},e.$$filters={},this.resetState()},s.resetState=function(){for(var t in e.states)e.states[t]=null},s.freeze=function(t){e.states.freezed=t},s.outlineShortcode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&this.broadcast(i.OUTLINED,t),e.states.outlinedShortcode=!0!==e.states.freezed?t:null},s.selectShortcode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&this.broadcast(i.SELECTED,t),e.states.selectedShortcode=!0!==e.states.freezed?t:null},s.configureShortcode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?(this.selectShortcode(t),this.broadcast(i.CONFIGURE,t),this.goto("/shortcode/".concat(t.$id))):this.goto("/")},s.setBreakpoint=function(t){e.breakpoints.current=t,s.broadcast(I.CHANGED,t)},s};I.$inject=["store","$rootScope","$window","$timeout","$log","AppEvent","ShortcodeEvent","MediaEvent"];var a=function(){function t(e,n){o()(this,t),this.app=e,this.utils=n}return t.$inject=["app","utils"],C()(t,[{key:"attach",value:function(t){t.addEventListener&&t.addEventListener("contextmenu",this.onRightClick.bind(this),!1)}},{key:"onRightClick",value:function(t){var e=this.utils.getGlobalCoordinates(t.view,t.clientX,t.clientY),n=this.utils.shortcodeFromPoint(e.x,e.y);n.isRoot||(this.menu.open(n,t.target,t.clientX,t.clientY),this.app.apply(),t?t.preventDefault():window.event.returnValue=!1)}},{key:"menu",get:function(){return this.app("contextMenu")}}]),t}(),s=n(15),c=function t(e,n){return o()(this,t),{injectStyles:function(t){return g("styles",t,(function(t,e,n){return(n=document.createElement("link")).id="ux-builder-style-"+e,n.rel="stylesheet",n.type="text/css",n.media="all",n.href=t,n}))},injectScripts:function(t){return g("scripts",t,(function(t,e,n){return(n=document.createElement("script")).id="ux-builder-script-"+e,n.type="text/javascript",n.src=t,n}))}};function g(t,g,o){var A=n.defer(),r=0,C=0;return _.each(g,(function(n,o){!0===e.$get(t+"."+o+".loaded")?delete g[o]:r++})),0===_.size(g)?(A.resolve(),A.promise):(_.each(g,(function(n,g){var i=e.$get(t+"."+g)||o(n,g);if(angular.isDefined(i.loaded)&&!0!==i.loaded)return i.addEventListener("load",I);function I(){i.loaded=!0,++C===r&&A.resolve()}i.loaded=!1,i.addEventListener("load",I),e.$set(t+"."+g,i),document.getElementsByTagName("head")[0].appendChild(i)})),A.promise)}};c.$inject=["store","$q"];var l=function(){function t(e){o()(this,t),this.enabled=!0,this.store=e,this.store.editor=this.store.editor||{state:{}}}return t.$inject=["store"],C()(t,[{key:"disable",value:function(){this.enabled=!1,this.state={}}},{key:"enable",value:function(){this.enabled=!0}},{key:"update",value:function(){}},{key:"outline",value:function(t){this.state.outlined=this.enabled?t:null}},{key:"select",value:function(t){this.state.selected=this.enabled?t:null}},{key:"configure",value:function(t){this.state.configuring=this.enabled?t:null}},{key:"target",value:function(t){this.state.target=this.enabled?t:null}},{key:"state",get:function(){return this.store.editor.state}}]),t}(),u=n(16),d=function(){function t(e,n,g,A,r){o()(this,t),this.app=e,this.store=n,this.manager=g,this.ShortcodeEvent=A,this.$timeout=r}return t.$inject=["app","store","Shortcode","ShortcodeEvent","$timeout"],C()(t,[{key:"undo",value:function(){var t=this.store.history[this.store.currentAction];return this.doAction(t,-1)}},{key:"redo",value:function(){var t=this.store.history[this.store.currentAction+1];return this.doAction(t,0)}},{key:"doAction",value:function(t,e){var n=this;if(t){var g=t.type,o=t.payload,A=this.store.shortcode;switch(this.store.$disable(),this.store.currentAction=this.store.history.indexOf(t)+e,g){case"reorderChildren":var r=o.id,C=o.parentId,i=o.toIndex,I=o.fromIndex,a=I>i?I+1:I;this.manager.move(A[r],A[C],a,!1),o.fromIndex=i,o.toIndex=I;break;case"moveChild":var s=o.id,c=o.parentId,l=o.index,u=o.fromParentId,d=o.fromIndex;this.manager.move(A[s],A[u],d,!1),o.fromParentId=c,o.fromIndex=l,o.parentId=u,o.index=d;break;case"updateOption":var p=o.name,h=o.optionValue,f=o.responsiveValue,m=A[o.id];o.optionValue=angular.copy(m.optionValues[p]),o.responsiveValue=angular.copy(m.responsiveValues[p]),m.optionValues[p]=h,f&&(m.responsiveValues[p]=f);break;case"updateMultipleOptions":var v=o.mutations;for(var b in v){var $=A[b];for(var y in v[b]){var w=v[b][y],x=w.optionValue,E=w.responsiveValue;w.optionValue=angular.copy($.optionValues[y]),w.responsiveValue=angular.copy($.responsiveValues[y]),$.optionValues[y]=x,E&&($.responsiveValues[y]=E)}}break;case"clearResponsiveValue":var k=o.id,S=o.optionName,D=o.breakpointIndex,O=o.value,N=A[k].responsiveValues[S];N[D]?N[D]=null:N[D]=O;break;case"updateContent":var j=o.id,L=o.content,T=A[j];o.content=T.content,T.content=L;break;case"addChild":case"removeChild":if(A[o.id])this.manager.remove(A[o.id],!1);else{var M=A[o.parentId].addChild(o.data,o.index,!1);this.$timeout((function(){n.app.trigger(n.ShortcodeEvent.ATTACHED,M)}))}break;case"removeContent":Object.keys(A).length>1?this.manager.remove(this.store.postContent,!1):(o.content.forEach((function(t,e){n.store.postContent.addChild(t,e,!1)})),this.$timeout((function(){n.app.trigger(n.ShortcodeEvent.ATTACHED,n.store.postContent)})))}return this.store.$enable(),t}}}]),t}(),p=n(17),h=n.n(p),f=function(){function t(e,n,g,A,r,C){o()(this,t),this.app=e,this.store=n,this.targets=g,this.manager=A,this.$timeout=r,this.metaOptions=n.post.meta.options.flat,this.postMeta=n.post.meta.values,this.IframeEvent=C}return t.$inject=["app","store","targets","Shortcode","$timeout","IframeEvent"],C()(t,[{key:"reload",value:function(t){var e=this;if(!this.store.isReloading){this.store.loading=!0;var n=h()(this.store.iframeUrl);for(var g in this.metaOptions){var o=this.metaOptions[g];n.query+="&".concat(o.$orgName,"=").concat(this.postMeta[o.$name])}this.store.post.content=t||this.store.postContent.copy((function(t,e){t.$id=e.$id})),this.targets.remove(this.store.postContent),this.manager.remove(this.store.postContent,!1),this.app.resetAll(),this.store.isReloading=!!this.$timeout((function(){e.store.iframeUrl=n.toString(),delete e.store.isReloading}),0)}}}]),t}(),m=function(){function t(){o()(this,t)}return C()(t,[{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},g=jQuery("#".concat(t,"-modal"),parent.document),o=g.find(".app-modal-title"),A=g.find(".app-modal-error");return n.title&&o.html(n.title),g.addClass("is-visible"),{$el:g,hide:function(){return e.hide(t)},setError:function(t){A.html(t)},clearError:function(){A.empty()},onClose:function(t){g.one("modal:close",t)}}}},{key:"hide",value:function(t){var e=jQuery("#".concat(t,"-modal"),parent.document),n=e.find(".app-modal-error");e.trigger("modal:close"),e.removeClass("is-visible"),n.empty(),e.off()}}]),t}(),v=function t(e,n,g){return o()(this,t),{defaultBreakpoint:A,currentBreakpoint:r,getMediaValue:function(t,e){if((e=e||r())>A())return C(t,e);return I(t,e)},getMediaIndex:function(t,e){if((e=e||r())>A())return i(t,e);return a(t,e)},getLowerMediaValue:C,getLowerMediaIndex:i,getHigherMediaValue:I,getHigherMediaIndex:a,hasValueBetween:function(t,e,n){for(var g=e+1;g<n;g++)if(t[g])return!0;return!1}};function A(){return n.breakpoints.default}function r(){return n.breakpoints.current}function C(t,e){for(var n=e||r();n>=0;n--)if(t[n])return t[n];return null}function i(t,e){for(var n=e||r();n>=0;n--)if(t[n])return n;return 0}function I(t,e){for(var n=e||r();n<t.length;n++)if(t[n])return t[n];return null}function a(t,e){for(var n=e||r();n<t.length;n++)if(t[n])return n;return 0}};v.$inject=["app","store","utils"];var b=n(3);var $,y={},w=function(){function t(e,n,g){var A=this;o()(this,t),angular.merge(this,e),this.responsiveValues={},this.optionValues={},this.$isReady=!1;var r=this;for(var C in this.$id=g||e.$id||function(t,e){var n=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e?"".concat(t.tag,"-").concat(n):"root"}(e,n),this.$parentId=n?n.$id:e.$parentId||null,this.$textContent=e.content||"",this.data=angular.copy(b.b.shortcodes[this.tag]),n&&angular.extend(this.data,n.data.children),this.states={active:!1,dragging:!1,open:void 0},this.options={get $responsive(){return r.responsiveValues},set $responsive(t){r.responsiveValues=t}},e.options.$responsive){this.responsiveValues[C]=[];for(var i=0;i<e.options.$responsive[C].length;i++)this.responsiveValues[C][i]=x(e.options.$responsive[C][i],this.data.options.named[C])}var I=function(t){if("$"===t.charAt(0))return"continue";Object.defineProperty(A.options,t,{enumerable:!0,get:function(){return A.data.options.named[t].responsive?S(A.responsiveValues[t]):A.optionValues[t]},set:function(e){var n=A.data.options.named[t],g=x(e,n),o=b.b.breakpoints.current;(A.$isReady&&b.b.enabled&&(clearTimeout($),y[A.$id]||(y[A.$id]={}),y[A.$id][t]||(y[A.$id][t]={optionValue:angular.copy(A.optionValues[t]),responsiveValue:angular.copy(A.responsiveValues[t])}),$=setTimeout((function(){var e=Object.keys(y);1===e.length&&1===Object.keys(y[e[0]]).length?b.b.$addAction("updateOption",{id:A.$id,name:t,override:!1,optionValue:y[e[0]][t].optionValue,responsiveValue:y[e[0]][t].responsiveValue,key:"updateOption-".concat(e[0],"-").concat(t,"-").concat(o)}):e.length&&b.b.$addAction("updateMultipleOptions",{mutations:y,override:!1,key:"updateMultipleOptions-".concat(e.join("-"),"-").concat(o)}),y={},A.apply()}),250)),A.optionValues[t]=g,n.responsive)&&(g!==S(A.responsiveValues[t])&&(A.responsiveValues[t][o]=g))}}),A.options[t]=e.options[t]};for(var a in e.options)I(a);this.data.options.flat.forEach((function(t){null===A.options[t.$name]&&(A.options[t.$name]=t.default),t.$isValid(A.options,n)||(A.options[t.$name]=null,t.responsive&&A.options.$responsive[t.$name].map((function(){return null})))})),b.b.shortcode[this.$id]=this,e.hasOwnProperty("children")&&(this.children=e.children.map((function(e){return new t(e,A)}))),this.$isReady=!0}return C()(t,[{key:"apply",value:function(){this.$scope&&!this.$scope.$$phase&&this.$scope.$apply()}},{key:"addChild",value:function(e,n){var g,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e instanceof t)if(e.$parentId!==this.$id){var A=e.$parentId,r=e.index;g=new t(E(e.detatch(),(function(t,e){t.$id=e.$id})),this,e.$id),o&&b.b.$addAction("moveChild",{key:"moveChild-".concat(g.$id,"-").concat(A,"-").concat(r),id:g.$id,parentId:this.$id,index:n,fromIndex:r,fromParentId:A})}else{var C=e.index;n-=n>e.index?1:0,g=e.detatch(),o&&b.b.$addAction("reorderChildren",{key:"reorderChildren-".concat(e.$id,"-").concat(C,"-").concat(n),parentId:this.$id,id:e.$id,toIndex:n,fromIndex:C})}else g=new t(k(e),this),o&&b.b.$addAction("addChild",{key:"addChild-".concat(this.$id,"-").concat(g.$id),id:g.$id,parentId:this.$id,index:n,data:g.copy((function(t,e){t.$id=e.$id}))});if(!this.allows(g))throw Error("".concat(g.data.name," is not allowed in ").concat(this.data.name));var i=n>=0?n:this.children.length;return this.children.splice(i,0,g),g}},{key:"childAt",value:function(t){return this.isParent?this.children[t]:null}},{key:"removeChild",value:function(t){return this.isParent?this.children[t].remove():null}},{key:"replaceChild",value:function(e,n){return this.isParent?(this.children[n]=e instanceof t?e:new t(e,this),this.children[n]):null}},{key:"replaceWith",value:function(t){return this.isRoot?null:this.parent.replaceChild(t,this.index)}},{key:"is",value:function(t){return this.data.tag===t}},{key:"isChildOf",value:function(t){return this.parent===t}},{key:"isDescendantOf",value:function(t){return t.descendants.indexOf(this)>-1}},{key:"isSelfOrDescendantOf",value:function(t){return t.descendantsAndSelf.indexOf(this)>-1}},{key:"isAncestorOf",value:function(t){return this.descendants.indexOf(t)>-1}},{key:"isSelfOrAncestorOf",value:function(t){return this.descendantsAndSelf.indexOf(t)>-1}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};for(var n in this)_.isFunction(this[n])||"$"!==n.charAt(0)&&"optionValues"!==n&&"responsiveValues"!==n&&"children"!==n&&"data"!==n&&this.hasOwnProperty(n)&&(e[n]=angular.copy(this[n]));if(this.$textContent&&(e.content=this.$textContent),this.isParent){e.children=[];for(var g=0;g<this.children.length;g++)e.children.push(this.children[g].copy(t))}return t&&t(e,this),e}},{key:"duplicate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.copy((function(t,n){e&&(t.$id=n.$id)}));return this.parent.addChild(n,t||this.index+1)}},{key:"detatch",value:function(){return this.parent?this.parent.children.splice(this.index,1)[0]:null}},{key:"remove",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.descendants.forEach((function(t){delete b.b.shortcode[t.$id]})),this.parent&&(delete b.b.shortcode[this.$id],t&&b.b.$addAction("removeChild",{id:this.$id,index:this.index,parentId:this.parent.$id,key:"removeChild-".concat(this.$id),data:this.copy((function(t,e){t.$id=e.$id}))})),this.detatch()}},{key:"allows",value:function(t){return function(t,e){return!e.isSelfOrDescendantOf(t)&&(!t.descendants.filter((function(t){return!1===t.data.nested&&t.tag===e.tag})).length&&e.allowed.hasOwnProperty(t.tag))}(t,this)}},{key:"content",get:function(){return this.$textContent||""},set:function(t){t!==this.content&&this.$isReady&&b.b.enabled&&b.b.$addAction("updateContent",{id:this.$id,override:!1,content:this.content,key:"updateContent-".concat(this.$id)}),this.$textContent=t}},{key:"allowed",get:function(){return function(t){var e=t.ancestorsAndSelf,n={};if(t.data.allow.length)return t.data.allow.reduce((function(t,e){return b.b.shortcodes[e]&&(t[e]=b.b.shortcodes[e]),t}),{});var g=function(g){var o=b.b.shortcodes[g];return o.hidden||o.require.length&&-1===o.require.indexOf(t.tag)||!1===o.nested&&t.tag===o.tag||!1===o.nested&&e.filter((function(t){return t.tag===o.tag})).length?"continue":void(n[o.tag]=o)};for(var o in b.b.shortcodes)g(o);return n}(this)}},{key:"presets",get:function(){var t=this.parent.allowed,e=angular.copy(this.data.presets);return e.forEach((function(n,g){var o=function t(e){var n=[];e.children&&e.children.forEach((function(e){n.push(e),n.concat(t(e))}));return n}(n.content);if(o.unshift(n.content),!t.hasOwnProperty(n.content.tag))return e.splice(g,1);o.forEach((function(t){t.tag===parent.tag&&!0!==b.b.shortcodes[t.tag].nested&&e.splice(g,1)}))})),e}},{key:"isParent",get:function(){return!!this.children}},{key:"isChild",get:function(){return!!this.parent}},{key:"isEmpty",get:function(){return this.isParent&&0===this.children.length}},{key:"isRoot",get:function(){return"_root"===this.tag}},{key:"parent",get:function(){return this.$parentId?b.b.shortcode[this.$parentId]:null}},{key:"index",get:function(){return this.parent?this.parent.children.indexOf(this):0}},{key:"depth",get:function(){return this.ancestors.length}},{key:"ancestors",get:function(){var t=[];return this.parent&&(t.push(this.parent),t=t.concat(this.parent.ancestors)),t}},{key:"ancestorsAndSelf",get:function(){var t=this.ancestors;return t.unshift(this),t}},{key:"descendants",get:function(){var t=[];if(this.isParent)for(var e=0;e<this.children.length;e++)t.push(this.children[e]),t=t.concat(this.children[e].descendants);return t}},{key:"descendantsAndSelf",get:function(){var t=this.descendants;return t.unshift(this),t}},{key:"siblings",get:function(){var t=this;return this.parent?this.parent.children.filter((function(e){return e!==t})):[]}},{key:"nextSibling",get:function(){return this.parent&&this.parent.children[this.index+1]?this.parent.children[this.index+1]:null}},{key:"previousSibling",get:function(){return this.parent&&this.parent.children[this.index-1]?this.parent.children[this.index-1]:null}},{key:"siblingsAndSelf",get:function(){return this.parent?this.parent.children:[this]}}]),t}();function x(t,e){return null===t||"string"==typeof t&&""===t?t:isNaN(t)?angular.isUndefined(t)?e.default:(Array.isArray(t)&&(t=t.join(e.config?e.config.delimiter:",")),String(t)):"string"!=typeof t||!/^0\d/.test(t)&&"+"!==t.charAt(0)?Number(t):String(t)}function E(t,e){var n={};for(var g in t)"$"!==g.charAt(0)&&"children"!==g&&t.hasOwnProperty(g)&&(n[g]=angular.copy(t[g]));if(t.isParent){n.children=[];for(var o=0;o<t.children.length;o++)n.children.push(E(t.children[o],e))}return t.$textContent&&(n.content=t.$textContent),e&&e(n,t),n}function k(t){var e=null,n=angular.copy(t);if(angular.isDefined(n.children))for(var g in n.children)e=k(b.b.shortcodes[n.children[g].tag].presets[0].content),n.children[g].isparent&&!n.children[g].children.length&&(n.children[g]=angular.merge({},e,n.children[g])),n.children[g].content&&""===n.children[g].content&&(n.children[g].content=e.content);return n}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.b.breakpoints.current;return e>b.b.breakpoints.default?D(t,e):O(t,e)}function D(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.b.breakpoints.current,n=e;n>=0;n--)if(null!==t[n])return t[n];return null}function O(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.b.breakpoints.current,n=e;n<t.length;n++)if(null!==t[n])return t[n];return null}var N=function(){function t(e,n,g,A,r){o()(this,t),this.app=e,this.store=n,this.$timeout=g,this.$templateCache=A,this.ShortcodeEvent=r}return t.$inject=["app","store","$timeout","$templateCache","ShortcodeEvent"],C()(t,[{key:"instantiate",value:function(t,e,n){return new w(t,e,n)}},{key:"create",value:function(t,e,n){var g=this.instantiate(t,e,n);return g.$$new=!0,g}},{key:"move",value:function(t,e,n){var g=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=e.addChild(t,n,g);return o.$$moved=!0,t.$parentId!==o.$parentId&&(this.app.trigger(this.ShortcodeEvent.DETACHED,t),o.$$new=!!o.data.template||!!this.$templateCache.get(o.$id)),this.app.trigger(this.ShortcodeEvent.MOVED,o),o}},{key:"duplicate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=t.duplicate(e,n);return g.$$new=!0,g.data.template||this.$templateCache.put(g.$id,this.$templateCache.get(t.$id)),g}},{key:"remove",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.app.trigger(this.ShortcodeEvent.DETACHED,t),this.app.states.selectedShortcode&&this.app.states.selectedShortcode.isSelfOrDescendantOf(t)&&(this.app.outlineShortcode(null),this.app.selectShortcode(null),this.app.configureShortcode(null)),t.isRoot)for(var n=t.children.length-1;n>=0;n--)t.children[n].remove(e);else t.remove(e)}},{key:"copy",value:function(t){var e=this;return t.copy((function(t,n){var g=e.store.breakpoints.default,o=n.options.$responsive;for(var A in o)t.options[A]=o[A][g];for(var r in t.options)if("$responsive"!==r){var C=n.data.options.named[r];null===t.options[r]&&C.$isValid(n.options,n.parent)&&(t.options[r]=n.data.options.get(r).default)}}))}}]),t}(),j=n(5),L=n.n(j);function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);e&&(g=g.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,g)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){L()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var P=function(){function t(e,n,g,A,r){var C=this;o()(this,t),this.store=e,this.$iframe=n,this.$timeout=r,g.addEventListener("resize",(function(){return C.updateOffsets()}),!1),g.addEventListener("scroll",(function(){return C.updateOffsets()}),!1),this.updateOffsets(!0,0)}return t.$inject=["store","$iframe","$window","$document","$timeout"],C()(t,[{key:"add",value:function(t,e){var n=angular.extend({name:t,element:e.shortcode.$element,shortcode:e.shortcode,target:e.target||"center"===t?e.shortcode:e.shortcode.parent,droppable:!0,addable:!0,active:!0},e);n.offsets=n.element.outerOffset(),this.store.targets.push(n)}},{key:"enable",value:function(t){var e=this;if(angular.isArray(t))return t.forEach((function(t){return e.enable(t)}));for(var n=0;n<this.store.targets.length;n++)this.store.targets[n].target===t&&(this.store.targets[n].active=!0)}},{key:"disable",value:function(t){var e=this;if(angular.isArray(t))return t.forEach((function(t){return e.disable(t)}));for(var n=0;n<this.store.targets.length;n++)this.store.targets[n].target===t&&(this.store.targets[n].active=!1)}},{key:"remove",value:function(t){var e=t.descendantsAndSelf;this.store.targets=this.store.targets.reduce((function(t,n){return e.indexOf(n.shortcode)<0&&t.push(n),t}),[])}},{key:"removeElement",value:function(t){this.store.targets=this.store.targets.reduce((function(e,n){return n.element.get(0)!==t&&e.push(n),e}),[])}},{key:"enableElement",value:function(t){for(var e=this,n=0;n<this.store.targets.length;n++)this.store.targets[n].element.get(0)===t&&(this.store.targets[n].active=!0,this.store.targets[n].shortcode.descendants.forEach((function(t){t.$element&&e.enableElement(t.$element.get(0))})))}},{key:"disableElement",value:function(t){for(var e=this,n=0;n<this.store.targets.length;n++)this.store.targets[n].element.get(0)===t&&(this.store.targets[n].active=!1,this.store.targets[n].shortcode.descendants.forEach((function(t){t.$element&&e.disableElement(t.$element.get(0))})))}},{key:"find",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50,o=[],A=!!this.store.isDragging,r=0;r<this.store.targets.length;r++){var C=this.store.targets[r],i=C.element[0].ownerDocument.defaultView,I=C.shortcode.parent,a=t,s=e,c=void 0,l=void 0,u=void 0,d=void 0,p=void 0;if(C.active&&(("center"!==C.name||C.shortcode.isEmpty)&&(!A||C.droppable)&&(A||C.addable)&&(A||i.frameElement)))if(i){switch(i.frameElement&&angular.isDefined(this.frameOffsets)&&(a-=this.frameOffsets.left,s-=this.frameOffsets.top),I&&"ux_stack"===I.tag&&"col"===I.options.direction&&(C=M(M({},C),{},{name:"left"===C.name?"top":"bottom"})),C.name){case"top":p=C.shortcode.index,u=C.offsets.left+C.offsets.width/2,c=n?u:a,l=d=C.offsets.top;break;case"right":p=C.shortcode.index+1,u=C.offsets.right,d=C.offsets.top+C.offsets.height/2,c=C.offsets.right,l=n?d:s;break;case"bottom":p=C.shortcode.index+1,u=C.offsets.left+C.offsets.width/2,c=n?u:a,l=d=C.offsets.bottom;break;case"left":p=C.shortcode.index,u=C.offsets.left,d=C.offsets.top+C.offsets.height/2,c=u,l=n?d:s;break;case"center":p=0,u=u=C.offsets.left+C.offsets.width/2,d=d=C.offsets.top+C.offsets.height/2}var h={fromSide:Math.sqrt(Math.pow(Math.abs(c-a),2)+Math.pow(Math.abs(l-s),2)),fromCenter:Math.sqrt(Math.pow(Math.abs(u-a),2)+Math.pow(Math.abs(d-s),2))},f=C.shortcode.isEmpty,m=f?0:g,v=this.isInside(C,a,s,m),b=this.isInside(C,a,s),$=f?v:h.fromSide<m;v&&$&&o.push({target:C.target||("center"!==C.name?C.shortcode.parent:C.shortcode),insideLimit:v,insideElement:b,element:C.element,shortcode:C.shortcode,name:C.name,distance:h,index:p})}else this.removeElement(C.element.get(0))}return _.chain(o).sortBy((function(t){return-t.target.ancestors.length})).sortBy((function(t){return t.distance.fromCenter})).value()}},{key:"isInside",value:function(t,e,n){var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o={x:g,y:g},A=Math.min(t.offsets.left-o.x,t.offsets.right+o.x),r=Math.max(t.offsets.left-o.x,t.offsets.right+o.x),C=Math.min(t.offsets.top-o.y,t.offsets.bottom+o.y),i=Math.max(t.offsets.top-o.y,t.offsets.bottom+o.y);return A<=e&&e<=r&&C<=n&&n<=i}},{key:"updateOffsets",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;this.$timeout.cancel(this.store.__updateTargets),this.store.__updateTargets=this.$timeout((function(){t.frameOffsets=t.$iframe().get(0).getBoundingClientRect();for(var n=0;n<t.store.targets.length;n++){var g=t.store.targets[n];(e||g.active&&g.element[0].ownerDocument.defaultView===window)&&("center"===g.name&&g.shortcode.isEmpty&&g.shortcode.$content&&g.element[0].ownerDocument.defaultView.frameElement?g.offsets=g.shortcode.$content.outerOffset({includeMargins:!0}):g.element?g.offsets=g.element.outerOffset({includeMargins:!0}):t.store.remove(g.shortcode))}delete t.store.__updateTargets}),n,!1)}}]),t}(),R=n(18),Y=n.n(R);function G(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);e&&(g=g.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,g)}return n}function B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?G(Object(n),!0).forEach((function(e){L()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var V=function(){function t(e,n,g,A,r,C,i){o()(this,t),this.app=e,this.store=n,this.modal=g,this.presetCache=A,this.Shortcode=r,this.isSaving=!1,this.shortcode=!1,this.store.currentModal=null,this.store.templateName="",this.content=!1,this.$timeout=C,this.$q=i}return t.$inject=["app","store","modal","presetCache","Shortcode","$timeout","$q"],C()(t,[{key:"showModal",value:function(t){var e=this,n=t.title,g=t.name,o=Y()(t,["title","name"]);this.store.templateName=g||"",this.store.templateError="",this.store.templateData=o,this.store.currentModal=this.modal.show("custom-template-modal",{title:n}),this.store.currentModal.onClose((function(){e.store.templateName="",e.store.templateError="",e.store.templateData=null,e.store.currentModal=null})),this.$timeout((function(){e.store.currentModal&&e.store.currentModal.$el.find(".custom-template-modal__input").focus()}),75)}},{key:"savePreset",value:function(t){this.showModal({title:"Save ".concat(t.data.name," as preset"),tag:t.tag,content:this.Shortcode.copy(t)})}},{key:"updatePreset",value:function(t){this.showModal(B({title:"Edit ".concat(t.name," preset")},t))}},{key:"saveTemplate",value:function(t){this.showModal({title:"Save as template",tag:"_root",content:this.Shortcode.copy(t),template:this.store.post.meta.values._wp_page_template})}},{key:"editTemplate",value:function(t){this.showModal(B({title:"Edit ".concat(t.name," template")},t))}},{key:"save",value:function(){var t=this;if(!this.isSaving){var e=B(B({},this.store.templateData),{},{post_id:this.store.post.id,title:this.store.templateName,content:angular.toJson(this.store.templateData.content)});this.isSaving=!0,jQuery.post(this.store.ajaxUrl,{action:"ux_builder_save_custom_template",security:this.store.nonce,data:e}).done((function(e){var n=e.data;e.success?n&&(t.presetCache.remove(n.tag),t.app.broadcast("template-saved",n),t.store.currentModal&&t.store.currentModal.hide()):t.store.currentModal&&t.store.currentModal.setError(n?n.message:"Failed to save template."),t.isSaving=!1,t.app.apply()})).fail((function(e){t.store.currentModal&&t.store.currentModal.setError(e.statusText),t.isSaving=!1,t.app.apply()}))}}},{key:"remove",value:function(t){var e=this;return this.$q((function(n,g){if(confirm("Do you want to delete ".concat(t.name,"?")))return jQuery.post(e.store.ajaxUrl,{action:"ux_builder_delete_custom_template",post_id:e.store.post.id,security:e.store.nonce,id:t.id}).done((function(t){var o=t.data;t.success?o&&(e.app.broadcast("template-removed",o),n(!0)):g(new Error(o?o.message:"Failed to delete template.")),e.app.apply()})).fail((function(t){g(new Error(t.statusText))}));n()}))}}]),t}(),Q=function t(e,n,g,A){o()(this,t),this.arrayPrefix=function(t,e){return t.reduce((function(t,n){return t.push("".concat(e).concat(n)),t}),[])},this.isIframe=function(){return!!g.frameElement},this.getGlobalCoordinates=function(t,e,n){if(t.frameElement){var g=t.frameElement.getBoundingClientRect();e+=g.left,n+=g.top}return{x:e,y:n}},this.camelCase=function(t,e){return t=e?t.charAt(0).toUpperCase()+t.slice(1):t,jQuery.camelCase(t.replace(/\_|\:/g,"-",!0))},this.kebabCase=function(t){return t.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(function(t){return t.toLowerCase()}))},this.elementFromPoint=function(t,e){var n=g.parent||g,o=n.document,r=A().get(0).contentWindow,C=A().get(0).contentDocument,i=t,I=e,a=A().get(0).getBoundingClientRect(),s=t-a.left,c=e-a.top,l=n.angular.element(o.elementFromPoint(i,I)),u=r.angular.element(C.elementFromPoint(s,c));return u.length?u:l},this.shortcodeFromPoint=function(t,n){return this.elementFromPoint(t,n).shortcode()||e.postContent}};Q.$inject=["store","$document","$window","$iframe"];var Z=function(){function t(e,n,g){var A=this;o()(this,t),this.app=e,this.store=n,this.$editor=(window.parent||window).angular.element("wp-editor"),this.$iframe=this.$editor.find("iframe").get(0).contentWindow,g.addEventListener("message",(function(t){return A.onMessage(t)}),!1)}return t.$inject=["app","store","$window"],C()(t,[{key:"onMessage",value:function(t){if("uxBuilderWpEditor"===t.data.source)switch(t.data.type){case"change":this.updateContent(t.data.content);break;case"discard":this.discard();break;case"hide":this.close()}}},{key:"open",value:function(){this.store.$set("stack",this),this.$editor.addClass("is-visible"),this.originalContent=this.app.states.selectedShortcode.content,this.$iframe.postMessage({source:"uxbuilder",type:"setContent",content:this.originalContent},"*")}},{key:"updateContent",value:function(t){this.app.states.selectedShortcode.content=t,this.app.states.selectedShortcode.apply()}},{key:"discard",value:function(){this.updateContent(this.originalContent),this.originalContent="",this.close()}},{key:"close",value:function(){this.store.$set("stack",!1),this.$editor.removeClass("is-visible")}},{key:"editor",get:function(){return this.$iframe.wp.editor}}]),t}(),z=function(){function t(e){var n=this;o()(this,t),this.$media=(window.parent||window).angular.element("wp-media"),this.$iframe=this.$media.find("iframe").get(0).contentWindow,e.addEventListener("message",(function(t){return n.onMessage(t)}),!1)}return t.$inject=["$window"],C()(t,[{key:"onMessage",value:function(t){if("uxBuilderWpMedia"===t.data.source)switch(t.data.type){case"close":this.close();break;case"select":"function"==typeof this.cb&&this.cb(t.data.attachment)}}},{key:"open",value:function(t){this.$media.addClass("is-active")}},{key:"close",value:function(){this.$media.removeClass("is-active")}},{key:"media",get:function(){return this.$iframe.wp.media}}]),t}(),H=function t(e,n){return o()(this,t),function(){return e.element((n.parent.document||document).getElementsByTagName("iframe")[0])}};H.$inject=["$angular","$window"],angular.module("app.services",[]).service("$angular",A).service("actions",i).service("app",I).service("contextmenu",a).service("draggable",s.a).service("dependencies",c).service("editor",l).service("history",d).service("iframe",f).service("modal",m).service("hammer",u.a).service("ResponsiveHelper",v).service("Shortcode",N).service("utils",Q).service("store",b.a).service("targets",P).service("templates",V).service("$iframe",H).service("wpEditor",Z).service("wpMedia",z)},function(t,e,n){"use strict";function g(t){return function(e){return t.trustAsHtml(e)}}function o(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return t.trustAs(n,e)}}g.$inject=["$sce"],o.$inject=["$sce"],angular.module("app.filters",[]).filter("noDefault",(function(){return function(t,e){return t!==e.default&&t}})).filter("heightCheck",(function(){return function(t){return"100%"===t?"100vh":t}})).filter("html",g).filter("rgba",(function(){return function(t){var e=t;if(e.indexOf("#")>-1){e=(e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,n,g){return e+e+n+n+g+g}))).replace("#","");var n=parseInt(e.substring(0,2),16),g=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);e="rgba(".concat(n,",").concat(g,",").concat(o,",0.3)")}return e}})).filter("trusted",o)},function(t,e,n){"use strict";var g=n(1);function o(t){return{restrict:"A",controllerAs:"draggableShortcode",bindToController:{shortcode:"=draggableShortcode",options:"=draggableOptions",element:"=draggableElement"},controller:["$scope","$element","targets",function(e,n,g){var o=this,A=null;e.$watch("draggableShortcode.shortcode",(function(r){A&&A.destroy(),A=t(o.shortcode,o.element||n.get(0),o.options),o.options&&o.options.targets&&o.options.targets.map((function(t){angular.isObject(t)?(t.shortcode=o.shortcode,t.element=n,g.add(t.name,t)):g.add(t,{shortcode:o.shortcode,element:n})})),e.$on("$destroy",(function(){A.destroy(),g.removeElement(n.get(0))}))}))}]}}o.$inject=["draggable"];function A(t){return{restrict:"A",controllerAs:"attachment",bindToController:!0,scope:{id:"=wpAttachment",size:"=wpAttachmentSize",model:"=wpAttachmentModel",width:"@wpAttachmentWidth",height:"@wpAttachmentHeight"},controller:["app","store","$scope","$element",function(t,e,n,g){var o=this,A=!1;function r(){var t=n.attachment.id,g=n.attachment.size||"full",o=n.attachment.width||0,A=n.attachment.height||0,r=o||A?"w".concat(o,".h").concat(A):g,i="cache.attachment.".concat(r,".id").concat(t),I=e.$get(i);if(angular.isDefined(I))return C(I);jQuery.getJSON(e.ajaxUrl,{action:"ux_builder_get_attachment",attachment_id:t,attachment_size:g,attachment_width:o,attachment_height:A}).done((function(t){t.success?C(e.$set(i,t.data)):window.self===window.top&&n.attachment.model&&(I=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAEOCAIAAADe+FMwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAADhuaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzExMSA3OS4xNTgzMjUsIDIwMTUvMDkvMTAtMDE6MTA6MjAgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE2LTA5LTI3VDE3OjUzOjI2KzAyOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNi0wOS0yN1QxNzo1MzoyNiswMjowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTYtMDktMjdUMTc6NTM6MjYrMDI6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOmJjYTkzYTljLTRlZmQtNDQ0ZC05YjY1LTllNGQ0YWIzMWE3NzwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpiY2E5M2E5Yy00ZWZkLTQ0NGQtOWI2NS05ZTRkNGFiMzFhNzc8L3htcE1NOkRvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDpiY2E5M2E5Yy00ZWZkLTQ0NGQtOWI2NS05ZTRkNGFiMzFhNzc8L3htcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAgIDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jcmVhdGVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6YmNhOTNhOWMtNGVmZC00NDRkLTliNjUtOWU0ZDRhYjMxYTc3PC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE2LTA5LTI3VDE3OjUzOjI2KzAyOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8cGhvdG9zaG9wOkNvbG9yTW9kZT4zPC9waG90b3Nob3A6Q29sb3JNb2RlPgogICAgICAgICA8cGhvdG9zaG9wOklDQ1Byb2ZpbGU+c1JHQiBJRUM2MTk2Ni0yLjE8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj40ODA8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjcwPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4rLBj0AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAALzSURBVHja7NQxEQAwCACxUklMbPh3hQuOIZHww0dWPwDu+RIAGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQMYNAAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDYBBAxg0AAYNYNAAGDSAQQNg0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAYNIBBA2DQAAYNgEEDGDQABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg2AQQMYNAAGDWDQABg0gEEDYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAAGDSAQQNg0AAGDYBBAxg0AAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNgEEDGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQMYtAQABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQOwbQAAAP//AwDBvQLFJkQUdgAAAABJRU5ErkJggg==","480px","270px"]),I&&C(I)})).fail((function(e){console.error("Failed to load attachment",t)}))}function C(t){"IMG"===g[0].tagName?(g.addClass("processing"),g.on("load",(function(){g.off("load").removeClass("processing")})),g.attr("src",t[0]),g.attr("width",t[1]),g.attr("height",t[2])):g.css("background-image","url("+t[0]+")"),A=!0}g.on("load.wpAttachment",(function(){return t("tools").fixPositions()})),n.$watch((function(){return o.id}),(function(t){return t&&""!==t?"string"==typeof t&&t.indexOf("/")>-1?C([t]):void r():function(){"IMG"===g[0].tagName?(g.removeAttr("src"),g.removeAttr("width"),g.removeAttr("height")):g.css("background-image","");A=!1}()})),n.$watch((function(){return o.size}),(function(t,e){A&&t!==e&&r()})),n.$on("$destroy",(function(){g.off("load.wpAttachment")}))}]}}A.$inject=["app"],g.a.directive("draggableShortcode",o),g.a.directive("toNumber",(function(){return{require:"ngModel",link:function(t,e,n,g){g.$parsers.push((function(t){return""+t})),g.$formatters.push((function(t){return parseFloat(t,10)}))}}})),g.a.directive("wpAttachment",A)},,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return I}));var g=n(0),o=n.n(g),A=n(2),r=n.n(A),C=n(6),i={top:{},right:{},bottom:{},left:{}},I=function(){function e(n,g,A,r,I,a){var s=this;for(var c in o()(this,e),this.app=n,this.store=g,this.utils=A,this.$timeout=r,this.$element=a,this.shortcode=null,i)i[c].$element=a.find(".uxb-resize-".concat(c)),i[c].draggable=new t.HammerJS(i[c].$element.get(0),{edge:c}),i[c].draggable.get("pan").set({direction:Object(C.b)(c)}),i[c].draggable.on("hammer.input",this.onHammerInput.bind(this)),i[c].draggable.on("panstart",this.onPanStart.bind(this)),i[c].draggable.on("pan",this.onPanMove.bind(this)),i[c].draggable.on("panend",this.onPanEnd.bind(this));I.$watch((function(){return n.states.outlinedShortcode}),(function(t){if(!s.app.states.resizingShortcode){if(!t)return a.removeClass("uxb-is-active");var e=Object(C.c)(t),n=!!e&&!1!==e.data.resize;for(var g in i){var o=n&&angular.isArray(e.data.resize)&&e.data.resize.indexOf(g)>-1,A=n&&!0===e.data.resize;i[g].$element.toggleClass("uxb-is-active",o||A)}a.toggleClass("uxb-is-active",n),a.cover(n?e.$element:null),s.shortcode=e}})),I.$on(Event.CHANGE,(function(){s.shortcode&&a.cover(s.shortcode.$element)}))}return e.$inject=["app","store","utils","$timeout","$scope","$element"],r()(e,[{key:"onHammerInput",value:function(t){t.srcEvent.stopPropagation(),t.srcEvent.stopImmediatePropagation(),this.app.states.resizingShortcode=this.shortcode,this.store.isDragging=!0}},{key:"onPanStart",value:function(e){e.edge=Object(C.a)(i,e.target),angular.element("body").addClass("uxb-is-resizing-".concat(e.edge)),Object(C.d)(this.app.states.resizingShortcode,"onResize".concat(t.capitalize(e.edge),"Start"),e),Object(C.d)(this.app.states.resizingShortcode,"onResizeStart",e),this.app.outlineShortcode(null),this.app("tools").hideAddableSpot(),this.app("tools").apply(),this.app.states.resizingShortcode.$scope.$digest()}},{key:"onPanMove",value:function(e){e.edge=Object(C.a)(i,e.target),Object(C.d)(this.app.states.resizingShortcode,"onResize".concat(t.capitalize(e.edge),"Move"),e),Object(C.d)(this.app.states.resizingShortcode,"onResizeMove",e),this.app("tools").apply(),this.app.states.resizingShortcode.$scope.$digest(),this.$element.cover(this.app.states.resizingShortcode.$element)}},{key:"onPanEnd",value:function(e){var n=this;e.edge=Object(C.a)(i,e.target),angular.element("body").removeClass("uxb-is-resizing-".concat(e.edge)),Object(C.d)(this.app.states.resizingShortcode,"onResize".concat(t.capitalize(e.edge),"End"),e),Object(C.d)(this.app.states.resizingShortcode,"onResizeEnd",e),this.$timeout((function(){n.app.states.resizingShortcode=null,n.store.isDragging=!1}),0)}}]),e}()}).call(this,n(4))},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(94)},function(t,e,n){"use strict";n.r(e),function(t){n(95),n(28),n(31),n(66),n(65),n(32),n(64),n(110),n(41),n(61),n(96),n(103),n(97),n(111),n(98),n(99),n(112),n(100),n(62),n(113);var e=n(1),g=n(9);for(var o in t.UxBuilder=window.parent.UxBuilder,e.a.requires.push("app.filters"),e.a.requires.push("app.services"),g.a.modules.iframe)e.a.requires.push(g.a.modules.iframe[o]);e.a.config(["$controllerProvider",function(t){angular.forEach(g.a.shortcodes,(function(e,n){t.register("".concat(n,"__controller"),e.controller||angular.noop)}))}])}.call(this,n(4))},function(t,e){window.MutationObserver||(window.MutationObserver=function(t){function e(t){this.i=[],this.m=t}function n(e){var n,g={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(n in e)g[n]!==t&&e[n]!==t&&(g[n]=e[n]);return g}function g(e,g){var C=A(e,g);return function(I){var a=I.length;if(g.a&&3===e.nodeType&&e.nodeValue!==C.a&&I.push(new n({type:"characterData",target:e,oldValue:C.a})),g.b&&C.b&&o(I,e,C.b,g.f),g.c||g.g)var s=function(e,g,A,C){function I(t,g,A,r,i){var I,s,c,l=t.length-1;for(i=-~((l-i)/2);c=t.pop();)I=A[c.j],s=r[c.l],C.c&&i&&Math.abs(c.j-c.l)>=l&&(e.push(n({type:"childList",target:g,addedNodes:[I],removedNodes:[I],nextSibling:I.nextSibling,previousSibling:I.previousSibling})),i--),C.b&&s.b&&o(e,I,s.b,C.f),C.a&&3===I.nodeType&&I.nodeValue!==s.a&&e.push(n({type:"characterData",target:I,oldValue:s.a})),C.g&&a(I,s)}function a(g,A){for(var c,l,u,d,p,h=g.childNodes,f=A.c,m=h.length,v=f?f.length:0,b=0,$=0,y=0;$<m||y<v;)(d=h[$])===(p=(u=f[y])&&u.node)?(C.b&&u.b&&o(e,d,u.b,C.f),C.a&&u.a!==t&&d.nodeValue!==u.a&&e.push(n({type:"characterData",target:d,oldValue:u.a})),l&&I(l,g,h,f,b),C.g&&(d.childNodes.length||u.c&&u.c.length)&&a(d,u),$++,y++):(s=!0,c||(c={},l=[]),d&&(c[u=r(d)]||(c[u]=!0,-1===(u=i(f,d,y,"node"))?C.c&&(e.push(n({type:"childList",target:g,addedNodes:[d],nextSibling:d.nextSibling,previousSibling:d.previousSibling})),b++):l.push({j:$,l:u})),$++),p&&p!==h[$]&&(c[u=r(p)]||(c[u]=!0,-1===(u=i(h,p,$))?C.c&&(e.push(n({type:"childList",target:A.node,removedNodes:[p],nextSibling:f[y+1],previousSibling:f[y-1]})),b--):l.push({j:u,l:y})),y++));l&&I(l,g,h,f,b)}var s;return a(g,A),s}(I,e,C,g);(s||I.length!==a)&&(C=A(e,g))}}function o(e,g,o,A){for(var r,C,i={},I=g.attributes,s=I.length;s--;)C=(r=I[s]).name,A&&A[C]===t||(a(g,r)!==o[C]&&e.push(n({type:"attributes",target:g,attributeName:C,oldValue:o[C],attributeNamespace:r.namespaceURI})),i[C]=!0);for(C in o)i[C]||e.push(n({target:g,type:"attributes",attributeName:C,oldValue:o[C]}))}function A(t,e){var n=!0;return function t(g){var o={node:g};return!e.a||3!==g.nodeType&&8!==g.nodeType?(e.b&&n&&1===g.nodeType&&(o.b=C(g.attributes,(function(t,n){return e.f&&!e.f[n.name]||(t[n.name]=a(g,n)),t}),{})),n&&(e.c||e.a||e.b&&e.g)&&(o.c=function(t,e){for(var n=[],g=0;g<t.length;g++)n[g]=e(t[g],g,t);return n}(g.childNodes,t)),n=e.g):o.a=g.nodeValue,o}(t)}function r(t){try{return t.id||(t.mo_id=t.mo_id||s++)}catch(e){try{return t.nodeValue}catch(t){return s++}}}function C(t,e,n){for(var g=0;g<t.length;g++)n=e(n,t[g],g,t);return n}function i(t,e,n,g){for(;n<t.length;n++)if((g?t[n][g]:t[n])===e)return n;return-1}e._period=30,e.prototype={observe:function(t,n){for(var o={b:!!(n.attributes||n.attributeFilter||n.attributeOldValue),c:!!n.childList,g:!!n.subtree,a:!(!n.characterData&&!n.characterDataOldValue)},A=this.i,r=0;r<A.length;r++)A[r].s===t&&A.splice(r,1);n.attributeFilter&&(o.f=C(n.attributeFilter,(function(t,e){return t[e]=!0,t}),{})),A.push({s:t,o:g(t,o)}),this.h||function(t){!function n(){var g=t.takeRecords();g.length&&t.m(g,t),t.h=setTimeout(n,e._period)}()}(this)},takeRecords:function(){for(var t=[],e=this.i,n=0;n<e.length;n++)e[n].o(t);return t},disconnect:function(){this.i=[],clearTimeout(this.h),this.h=null}};var I=document.createElement("i");I.style.top=0;var a=(I="null"!=I.attributes.style.value)?function(t,e){return e.value}:function(t,e){return"style"!==e.name?e.value:t.style.cssText},s=1;return e}(void 0))},function(t,e,n){"use strict";var g=n(1),o=n(69),A=n(12);g.a.component("appResizeTool",{controller:o.a,template:A.default,bindings:{shortcode:"<"}})},function(t,e,n){"use strict";var g=n(0),o=n.n(g),A=n(2),r=n.n(A),C=n(1),i=function(){function t(e,n,g,A){var r=this;o()(this,t),this.buttons=[],this.shortcode=null,n.$watch((function(){return e.states.outlinedShortcode}),(function(t){if(!t)return g.removeClass("active");r.shortcode=r.getShortcodeWithButtons(t),g.toggleClass("active",!!r.shortcode),g.cover(r.shortcode?r.shortcode.$element:null)})),n.$on(A.CHANGE,(function(){r.shortcode&&g.cover(r.shortcode.$element)}))}return t.$inject=["app","$scope","$element","Event"],r()(t,[{key:"getShortcodeWithButtons",value:function(t){for(var e=t.ancestorsAndSelf,n=0;n<e.length;n++)if(e[n].data.addButtons)return e[n];return null}},{key:"getIndex",value:function(t){var e=0;return"right-center"!==t&&"bottom-right"!==t&&"bottom-center"!==t&&"bottom-left"!==t||(e=this.shortcode.children.length),e}}]),t}();C.a.component("addButtons",{controller:i,template:'\n    <div class="add-buttons">\n      <add-button\n        class="{{:: button }}"\n        shortcode="$ctrl.shortcode"\n        index="$ctrl.getIndex(button)"\n        data-tooltip="{{:: $ctrl.shortcode.data.message }}"\n        ng-repeat="button in $ctrl.shortcode.data.addButtons">\n      </add-button>\n    </div>\n  '})},function(t,e,n){"use strict";var g=n(0),o=n.n(g),A=n(1),r=function t(e,n,g,A){o()(this,t);var r=g.find(".name");n.$watch((function(){return e.states.outlinedShortcode}),(function(t){if(!t)return g.removeClass("active");r.text(t.data.name),g.toggleClass("active",t.$element.isVisible()),g.cover(t.$element)})),n.$on(A.CHANGE,(function(){e.states.outlinedShortcode&&g.cover(e.states.outlinedShortcode.$element)}))};r.$inject=["app","$scope","$element","Event"],r.$inject=["app","$scope","$element","Event"],A.a.component("appOutlineTool",{controller:r,template:'\n    <div class="wrapper">\n      <h3 class="name"></h3>\n    </div>\n  '})},function(t,e,n){"use strict";var g=n(0),o=n.n(g),A=n(2),r=n.n(A),C=n(1),i=function(){function t(e,n,g,A,r){var C=this;o()(this,t),this.app=g,this.shortcode=null,e.$watch((function(){return g.states.selectedShortcode}),(function(t){if(!t)return n.removeClass("active");C.shortcode=g.states.selectedShortcode,C.ancestors=g.states.selectedShortcode.ancestors.reverse(),C.ancestors.splice(0,1),n.cover(t.$element).addClass("active")})),e.$on(r.CHANGE,(function(){g.states.selectedShortcode&&n.cover(g.states.selectedShortcode.$element)}))}return t.$inject=["$scope","$element","app","store","Event"],r()(t,[{key:"configureShortcode",value:function(t){this.app.configureShortcode(t)}},{key:"outlineShortcode",value:function(t){this.app.outlineShortcode(t)}},{key:"hideOutline",value:function(){this.app.outlineShortcode(null)}},{key:"showContextMenu",value:function(t){this.app("contextMenu").open(this.shortcode,t.currentTarget)}}]),t}();C.a.component("appSelectTool",{controller:i,bindings:{shortcode:"<"},template:'\n    <div class="wrapper">\n      <div ng-if="$ctrl.ancestors.length > 0" class="ancestors">\n        <span class="dashicons dashicons-arrow-up-alt2"></span>\n        <ul>\n          <li ng-repeat="ancestor in $ctrl.ancestors">\n            <button type="button" class="name"\n              draggable-shortcode="ancestor"\n              ng-click="$ctrl.configureShortcode(ancestor); $event.stopPropagation();"\n              ng-mouseover="$ctrl.outlineShortcode(ancestor)"\n              ng-mouseout="$ctrl.hideOutline()">\n              {{:: ancestor.data.name }}\n            </button>\n          </li>\n        </ul>\n      </div>\n      <h3 class="name" draggable-shortcode="$ctrl.shortcode">\n        {{ $ctrl.shortcode.data.name }}\n      </h3>\n      <button class="options" ng-click="$ctrl.showContextMenu($event); $event.stopPropagation();">\n        <span class="dashicons dashicons-admin-generic"></span>\n      </button>\n    </div>\n  '})},function(t,e,n){"use strict";var g=n(0),o=n.n(g),A=n(2),r=n.n(A),C=n(1),i=angular.element("body"),I=function(){function t(e,n,g,A,r,C,i,I,a,s){var c=this;o()(this,t),this.app=e,this.store=n,this.utils=A,this.responsiveHelper=a;var l=performance.now();this.store.postContent.$element=C,this.store.postContent.$scope=r,this.store.postContent.data.addableSpots.map((function(t){g.add(t,{shortcode:c.store.postContent,target:c.store.postContent})})),this.onPostOptionsChanged(n.post.attributes.values,{},n.post.attributes.options),r.$watchCollection((function(){return n.post.attributes.values}),(function(t,e){c.onPostOptionsChanged(t,e,n.post.attributes.options)})),this.onPostOptionsChanged(n.post.meta.values,{},n.post.meta.options),r.$watchCollection((function(){return n.post.meta.values}),(function(t,e){c.onPostOptionsChanged(t,e,n.post.meta.options)})),r.$on(s.CHANGED,(function(){return g.updateOffsets()})),i((function(){I.debug("Elements compiled in ".concat(performance.now()-l,"ms"))}),0,!1)}return t.$inject=["app","store","targets","utils","$scope","$element","$timeout","$log","ResponsiveHelper","ShortcodeEvent"],r()(t,[{key:"onPostOptionsChanged",value:function(t,e,n){for(var g in t)if(t[g]!==e[g]){var o=n.get(g);o.onChange&&o.apply(i,t[g],e[g])}}},{key:"showTemplates",value:function(){return this.store.postContent.isEmpty&&Object.keys(this.store.templates).length}}]),t}();C.a.component("postContent",{controller:I,template:'\n    <content content="_root [root]" shortcode="$ctrl.store.postContent"></content>\n    <template-selector ng-if="$ctrl.showTemplates()"></template-selector>\n  '})},,,function(t,e,n){"use strict";var g=n(1),o=n(0),A=n.n(o),r=n(2),C=n.n(r);var i=function(){function t(e,n,g,o,r,C){var i=this;A()(this,t),this.app=e,this.store=n,this.utils=g,this.$timeout=o,this.$element=C,this.shortcode=null,r.$watch((function(){return e.states.outlinedShortcode}),(function(t){if(!t)return C.removeClass("uxb-is-active");var e=function(t){for(var e=t.ancestorsAndSelf,n=0;n<e.length;n++)if(e[n].data.move)return e[n];return null}(t),n=!!e&&!1!==e.data.move;C.toggleClass("uxb-is-active",n),C.cover(n?e.$element:null),i.shortcode=e})),r.$on(Event.CHANGE,(function(){i.shortcode&&C.cover(i.shortcode.$element)}))}return t.$inject=["app","store","utils","$timeout","$scope","$element"],C()(t,[{key:"classNames",value:function(t){return this.utils.arrayPrefix(angular.isArray(t.data.move)?t.data.move:[t.data.move],"uxb-is-")}}]),t}(),I=n(11);g.a.component("appMoveTool",{controller:i,template:I.default,bindings:{shortcode:"<"}})},,,,,,,function(t,e,n){"use strict";var g=n(1),o=n(0),A=n.n(o),r=n(2),C=n.n(r),i=function(){function t(e,n,g,o,r,C,i,I,a,s){var c=this;A()(this,t),this.app=e,this.store=n,this.shortcode=g,this.targets=o,this.$scope=C;var l=!!g.data.draggable&&r(g);if(g.data.addableSpots.map((function(t){o.add(t,{shortcode:g})})),i.find("img").attr("draggable","false"),i.on("click",(function(t){t.stopPropagation(),t.preventDefault(),n.isDragging||(e.configureShortcode(g),e.apply())})),this.onOptionsChanged(g.options,null,!0),C.$watchCollection((function(){return g.options}),(function(t,n){t!==n&&(c.store.isSaved=!1,c.app.trigger(s.CHANGED,{shortcode:g,options:t,oldOptions:n}),c.onOptionsChanged(t,n)),e.states.selectedShortcode===g&&c.app("tools").fixPositions()})),angular.isDefined(g.content)){var u=!1;C.$watch((function(){return g.content}),(function(t,n){t!==n&&(a.cancel(u),u=a((function(){e.trigger("shortcode-content-change",g)}),0,!1))}))}C.$watch((function(){return e.states.selectedShortcode}),(function(t){i.toggleClass("uxb-selected",t===g)})),e.states.selectedShortcode&&e.states.selectedShortcode.$id===g.$id&&e.selectShortcode(g),g.$$new&&a((function(){return e.trigger(s.ATTACHED,g)}),0,!1),g.$$new=!1,g.$$moved=!1,C.$on("$destroy",(function(){o.remove(g),i.off("click"),l&&l.element&&l.destroy()}))}return t.$inject=["app","store","shortcode","targets","draggable","$scope","$element","$iframe","$timeout","ShortcodeEvent"],C()(t,[{key:"onOptionsChanged",value:function(t,e,n){var g=!1;for(var o in t)if("$"!==o.charAt(0)){var A=this.shortcode.data.options.named[o],r=e?e[o]:"",C=null===t[o]&&r===A.default;if(n||!C&&t[o]!==r)if(A.onChange){var i=A.apply(this.shortcode.$element,t[o],r);g=g||!i}else g=!0}!this.shortcode.$noRecompile&&!this.shortcode.data.template&&g&&e&&e!==t&&this.$scope.$$recompile()}}]),t}();g.a.controller("ShortcodeController",i)},function(t,e,n){"use strict";var g=n(1),o=n(0),A=n.n(o),r=function t(e,n,g,o,r,C,i,I,a,s,c,l,u,d,p){A()(this,t);var h=this,f={},m=i.element("app").find(".tools-addable"),v=o.find(".tools-addable");h.target=null,h.$targetElement=null,h.addable=null,e.register("tools",h),_.each(n.tools,(function(t,e){var n=snakeCase(e,"-"),A="<".concat(n,' shortcode="shortcode"></').concat(n,">");C(A)(g,(function(e,n){I((function(){t.$element=e,t.$ctrl=n.$$childHead.$ctrl,o.append(e)}),0,!1)}))})),a().on(d.CHANGED,(function(){r.requestAnimationFrame(h.fixPositions)})),a().on(d.RESIZE,(function(){r.requestAnimationFrame(h.fixPositions)})),a().on(d.SCROLL,(function(){})),g.$on(p.CHANGED,(function(){return h.fixPositions()})),g.$on(p.DELETED,(function(){return h.hide()})),g.$on(d.RELOAD,(function(){return h.hide()})),g.$on(u.PAN_MOVE,(function(t,n){n.defaultPrevented?(e.outlineShortcode(null),h.hideAddableSpot()):e.outlineShortcode(n.isWithin?n.target.parent():null)})),g.$on(u.PAN_END,(function(){h.hideAddableSpot(),h.fixPositions()})),h.apply=function(){g.$digest()};var b=!1;h.fixPositions=function(){I.cancel(b),b=I((function(){for(var t in f)f[t].$tool.hasClass("active")&&f[t].$tool.cover(f[t].$element);h.$targetElement&&h.getAddableElement().cover(h.$targetElement),g.$broadcast(c.CHANGE)}),0)},h.addTool=function(t,e,n){f.hasOwnProperty(t)&&h.removeTool(t),f[t]={},f[t].$element=n,f[t].$scope=g.$new(),f[t].$tool=C(e)(f[t].$scope),o.append(f[t].$tool)},h.getTool=function(t){var e=f[t],n={element:function(){return e.$element},scope:function(){return e.$scope.$$childHead},tool:function(){return e.$tool}};return n},h.showTool=function(t){f[t].$tool.addClass("active"),f[t].$tool.cover(f[t].$element)},h.hideTool=function(t){f[t].$tool.removeClass("active")},h.removeTool=function(t){f[t].$element=null,f[t].$scope.$destroy(),f[t].$tool.remove(),f[t].$tool=null,delete f[t]},h.hide=function(){h.hideAddableSpot()},h.getAddableElement=function(){return h.$targetElement&&h.$targetElement.get(0).ownerDocument.defaultView.frameElement?(m.removeClass("active"),v):(v.removeClass("active"),m)},h.showAddableSpot=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t||e.states.freezed)return h.hideAddableSpot();h.toggleAddableButton(n),h.target=t,h.addable=t.target,h.index=t.index,h.$targetElement=h.target.shortcode.isEmpty&&h.target.element[0].ownerDocument.defaultView.frameElement&&"center"===h.target.name?h.target.shortcode.$content:h.target.element,h.getAddableElement().toggleClass("is-empty","center"===t.name),h.getAddableElement().toggleClass("is-left","left"===t.name),h.getAddableElement().toggleClass("is-right","right"===t.name),h.getAddableElement().toggleClass("is-top","top"===t.name),h.getAddableElement().toggleClass("is-bottom","bottom"===t.name),h.getAddableElement().toggleClass("is-deputy",h.target.element!==h.target.shortcode.$element),h.getAddableElement().cover(h.$targetElement,{includeMargins:!0}).addClass("active")},h.toggleAddableButton=function(t){h.getAddableElement().toggleClass("no-button",!1===t)},h.hideAddableSpot=function(){return h.getAddableElement().removeClass("active"),h.$targetElement=null,h.target=null,!1},h.addShortcode=function(){e("addables").open(h.addable,h.index),h.target=null,h.addable=null,h.index=null}};r.$inject=["app","store","$scope","$element","$window","$compile","$angular","$timeout","$iframe","utils","Event","AppEvent","DragEvent","IframeEvent","ShortcodeEvent"],g.a.component("appTools",{controller:r,template:n(23).default})},function(t,e,n){"use strict";var g=n(1),o=n(0),A=n.n(o),r=n(8),C=function t(e,n,g,o,C,I,c,l,u,d,p,h,f,m,v,b,$,y,w){A()(this,t),o.attach(document);var x,E,k=null,S=performance.now();function D(){var t,e=E,n=e.iframeRect,g=e.iframe,o=g.x,A=g.y,C=Object(r.a)().top,i=A,I=n.bottom-n.top-A;i<100?t=(n.top+i-(n.top+100))/5:I<100&&(t=(n.bottom+100-(n.bottom+I))/5),t&&o>=0&&o<=n.right-n.left&&Object(r.c)(C+t)}n.postContent=I.create(n.post.content),m.debug("Element instances created in ".concat(performance.now()-S,"ms")),angular.element("body").on("click",(function(t){t.preventDefault(),n.isDragging||n.isScrolling||(e.configureShortcode(null),e.apply())})),angular.element("body").on("mousemove",(function(t){n.isDragging||n.isScrolling||n.isReloading||h.requestAnimationFrame((function(){var n=C.getGlobalCoordinates(t.view,t.clientX,t.clientY),o=g.find(n.x,n.y),A=C.shortcodeFromPoint(n.x,n.y);e("tools").showAddableSpot(o.length?o[0]:null),A.isRoot||e.outlineShortcode(A),e("tools").apply()}))})),angular.element("body").on("mouseleave",(function(t){n.isDragging||n.isScrolling||n.isReloading||h.requestAnimationFrame((function(){e("tools").hideAddableSpot(),e.outlineShortcode(null),e("tools").apply()}))})),angular.element(h).on("scroll",(function(){d().trigger(w.SCROLL),n.isScrolling=!0,f.cancel(k),k=f((function(){return n.isScrolling=!1}),200,!1)})),l.$on(y.CHANGED,(function(){e.states.selectedShortcode?f((function(){return a(e.states.selectedShortcode.$element)}),0,!1):i(u)&&f((function(){return a(u)}),0,!1)})),c.$on(b.PAN_START,(function(t,e){E=e,x=setInterval(D,1e3/60)})),c.$on(b.PAN_MOVE,(function(t,e){E=e})),c.$on(b.PAN_END,(function(){clearInterval(x),x=E=null})),angular.element(h).on($.RESIZE,(function(){d().trigger(w.RESIZE)})),new MutationObserver((function(t){n.initialized&&g.updateOffsets(!0),d().trigger(w.CHANGED,t)})).observe(document.querySelector("post-content"),{attributes:!0,childList:!0,subtree:!0,characterData:!1}),f((function(){i(u)&&a(u,0),n.initialized=!0,n.loading=!1,e.broadcast(v.READY),s(document,"uxb_app_ready")}),0,!0)};function i(t){var e=t.offset(),n=t.height();return e.top+n<I()||e.top>I()+window.innerHeight}function I(){return document.documentElement.scrollTop||document.body.scrollTop}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;angular.element("html, body").scrollToElement(t,e)}function s(t,e){t.dispatchEvent(new Event(e))}C.$inject=["app","store","targets","contextmenu","utils","Shortcode","$rootScope","$scope","$element","$iframe","$compile","$window","$timeout","$log","AppEvent","DragEvent","Event","MediaEvent","IframeEvent"],g.a.component("postWrapper",{controller:C,template:"\n    <post-content></post-content>\n  "})},function(t,e,n){"use strict";var g=n(1),o=n(0),A=n.n(o),r=[],C=0,i=function t(e,n,g,o,i,I,a,s,c,l,u,d,p,h,f,m,v){var b=this;A()(this,t);var $,y=this;function w(t){var g,o=s.defer(),A=!0;if(t.data.template?g=t.data.template:t.$$new||(g=u.get(t.data.templateUrl||t.$id)),angular.isDefined(g))return a(E(t,g))(t.$scope,(function(e){e.data("shortcode",t),t.$element=e,o.resolve(t)})),o.promise;void 0===t.$element&&(g=E(t,u.get("shortcodes/_loading.html"),!0),t.$element=a(g)(t.$scope),t.$element.data("shortcode",t),A=!1),t.$element&&t.$element.addClass("processing");var i={url:n.postUrl,type:"POST",data:{ux_builder_action:"do_shortcode",ux_builder_shortcode:t.copy((function(t,e){t.$id=e.$id,t.depth=e.ancestors.length,t.nested=_.filter(e.ancestors,(function(t){return t.tag===e.tag})).length}))},beforeSend:function(e){t.$$xhr=e,C++},success:function(n){t.$scope&&(t.$$new=!0,u.put(t.$id,n),g=E(t,n),a(g)(t.$scope,(function(n){A&&e.trigger(m.DETACHED,t),t.children&&t.children.forEach((function(t){t.$element&&(t.$element.data("shortcode",null),t.$element.remove(),delete t.$element)})),n.data("shortcode",t),t.$element.removeClass("processing"),t.$element.replaceWith(n),t.$element=n,o.resolve(t)})))},complete:function(e,n){t.$$xhr=null,C--,"success"!==n&&o.reject(),r.length&&jQuery.ajax(r.shift())}};return C<5?jQuery.ajax(i):r.push(i),o.promise}function x(t){var e={$scope:t.$scope,$element:t.$element,tools:n.tools?n.tools["custom".concat(capitalize(t.tag),"Tools")]:null,shortcode:t};s.all([o.injectStyles(t.data.styles),o.injectScripts(t.data.scripts)]).finally((function(){h("ShortcodeController as $ctrl",e),t.data.controller&&h("".concat(t.tag,"__controller as $customCtrl"),e)}))}function E(t,e,n){if(e=(e=(e=e.replace("<content",'<content content="'+t.tag+" ["+t.$id+']" shortcode="shortcode"')).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")).replace(/<!--[\s\S]*?-->/g,""),t.data.wrap||n){var g=["uxb-wrapper","uxb-wrapper--".concat(t.tag)];t.data.inline&&g.push("uxb-wrapper-inline"),t.data.overlay&&(e+='<div class="uxb-overlay"></div>'),e='\n                  <div class="'.concat(g.join(" "),'">\n                    ').concat(e,"\n                  </div>\n                ")}return e}i.$watchCollection((function(){return b.shortcode.children}),(function(t,n){var g=[],o=[];_.each(t,(function(n,o){n.$element||(g.push(n),n.$scope=i.$new(),function(t){var n=t.index,g=t.siblings;t.$scope.shortcode=t,t.$scope.$index=n,t.$scope.$first=0===n,t.$scope.$last=n===g.length-1,t.$scope.$middle=!(t.$scope.$first||t.$scope.$last),t.$scope.$odd=!(t.$scope.$even=0==(1&n)),t.$scope.$$recompile=function(){return function(t){t.$$xhr&&t.$$xhr.abort();p.cancel(t.$recompile),t.$recompile=p((function(){u.remove(t.$id),w(t).then((function(t){var n=t.copy((function(t,e){t.$id=e.$id})),g=t.replaceWith(n);g.$$new=!0,e.broadcast(m.RECOMPILED,g)})).catch((function(){})),f.debug("x recompiling",t.tag),delete t.$recompile}),250,!1)}(t)},t.$scope.$on("$destroy",(function(){delete t.$scope.shortcode,delete t.$scope.$$recompile}))}(n),w(n).then(x),d.move(n.$element,null,0===o?I:t[o-1].$element))})),_.each(n,(function(e,n){t.indexOf(e)>-1||(e.originalIndex=n,o.push(e))})),n&&n.length===t.length&&_.each(t,(function(t,e){d.move(t.$element,null,0===e?I:y.shortcode.children[e-1].$element)}));_.each(o,(function(t){return i.$parent.$broadcast(v.REMOVED,t)})),_.each(g,(function(t){return i.$parent.$broadcast(v.ADDED,t)})),_.each(o,(function(t){d.leave(t.$element),t.$scope.$destroy(),t.$element.data("shortcode",null),t.$element.remove(),t.$element=null,t.$content=null,t.$scope=null})),c((function(e,n){$||0!==t.length?y.shortcode.$content&&($.$destroy(),d.leave(y.shortcode.$content),y.shortcode.$content.data("shortcode",null),y.shortcode.$content.remove(),y.shortcode.$content=null,$=null):($=n,e.html('\n                        <div class="uxb-empty-message">\n                            '.concat(y.shortcode.data.message,"\n                        </div>\n                    ")),e.data("shortcode",y.shortcode),y.shortcode.$content=e,d.enter(y.shortcode.$content,I.parent(),I))}))}))};i.$inject=["app","store","utils","dependencies","$scope","$element","$compile","$q","$transclude","$injector","$templateCache","$animate","$timeout","$controller","$log","ShortcodeEvent","ChildEvent"],g.a.component("content",{controller:i,transclude:"element",bindings:{shortcode:"<"}})}]);