define("lq/main",["domready!","module","require","underscore","jquery"],(function(t,e,i,n,a){var o=e.config(),r=null,s=function(){return o.tenantName},A=function(){return o.tenantApplicationName},l=/chrom(e|ium)/.test(navigator.userAgent.toLowerCase());return{init:function(t){o.ravenFrontEndDsn?i(["raven"],(function(e){e.setUserContext({id:o.userId}),e.config(o.ravenFrontEndDsn,{tags:{location:"front end",environment:o.ravenEnvironment,tenant:o.tenantName||"",application:o.tenantApplicationName||"",component:o.componentName||""},dataCallback:function(t){return t.fingerprint=["{{ default }}",o.tenantName,o.tenantApplicationName],t}}).install(),e.context((function(){r=e,t()}))})):t(),a(window).on("unload",(function(){}))},getNotificationIcon:function(){return o.notificationIcon},areWebNotificationsEnabled:function(){return o.areWebNotificationsEnabled&&window.navigator.serviceWorker},getFirebaseApiKey:function(){return o.firebaseApiKey},getFirebaseAppId:function(){return o.firebaseAppId},getFirebaseProjectId:function(){return o.firebaseProjectId},getFirebaseSenderId:function(){return o.firebaseSenderId},getFirebaseWPCert:function(){return o.firebaseWPCert},getNotificationsEntryPage:function(){return o.notificationsEntryPage},isScriptDebuggingEnabled:function(){return o.scriptDebuggingEnabled},getStylesVersion:function(){return o.stylesVersion},getTenantName:s,getTenantApplicationName:A,getBaseUrl:function(t){return o.baseUrl+t},getCdnUrl:function(t){return o.cdnUrl+t},getTenantUrl:function(t){return o.tenantUrl+t},getTenantCdnUrl:function(t){return o.tenantCdnUrl+t},getRuntimeUrl:function(t){return o.runtimeUrl+t},getRuntimeBaseUrl:function(t){return o.runtimeBaseUrl+t},getUserId:function(){return o.userId},getDesignerId:function(){return o.designerId},getDesignerUrl:function(t){return o.designerUrl+t},getDesignerBaseUrl:function(t){return o.designerBaseUrl+t},getTenantUploads:function(t){return o.tenantUploads+t},getFrontEndUrl:function(t){return o.frontEndUrl+t},getPortalUrl:function(t){return o.designerBaseUrl+"plumbing/tenant/"+o.tenantName+"/application/"+o.tenantApplicationName+"/"+t},getFullUrl:function(t){return t&&0===t.indexOf("/")&&(t=t.slice(1)),(window.location.origin?window.location.origin+"/":window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""))+t},getNameOfComponent:function(){return o.componentName},getRavenLogger:function(){return r},getLanguageIsoCode:function(){return o.languageISOCode},getMockCookieName:function(){return`mock-mode-${s()}-${A()}`},setRavenLogger:function(t){r=t},browser:{isChrome:function(){return l}}}})),define("lq",["lq/main"],(function(t){return t})),define("lq/oop",[],(function(){"use strict";var t=function(e,i){var n=function(){};n.prototype=(i=i||this).prototype,e.prototype=new n,e.prototype.constructor=e,e.extend=t,i.prototype.constructor===Object.prototype.constructor&&(i.prototype.constructor=i)};return{extend:t,makeExtendable:function(e){e.extend=t}}})),define("lq/observable",["underscore"],(function(t){"use strict";function e(e,i){this.obj=e,this.eventListeners={},this.events=i?t.flatten([i]):null}return e.prototype.addListener=function(t,e){return this.checkEvent(t),this.eventListeners[t].push(e),this.obj},e.prototype.addOnceListener=function(t,e){var i=this,n=function(){e.apply(this,arguments),i.removeListener(t,n)};return n.wrappedListener=e,this.addListener(t,n),this.obj},e.prototype.removeListener=function(e,i){this.checkEvent(e);var n=t.find(this.eventListeners[e],(function(t){return t===i||t.wrappedListener===i}));if(n){var a=this.eventListeners[e].indexOf(n);this.eventListeners[e].splice(a,1)}return this.obj},e.prototype.informListeners=function(e){this.checkEvent(e);var i=t.drop(arguments,1);return t.forEach(this.eventListeners[e].slice(),(function(t){t.apply(this,i)})),this.obj},e.prototype.getListeners=function(t){return this.checkEvent(t),this.eventListeners[t].slice()},e.prototype.checkEvent=function(e){if(this.events&&!t.contains(this.events,e))throw new RangeError("Tried to use missing event: "+e);this.eventListeners[e]||(this.eventListeners[e]=[])},e.prototype.addObservableEvents=function(){if(this.events){arguments.length&&arguments[0]||(this.events=null);var e=this;return t.chain(arguments).flatten().compact().each((function(t){e.events.push(t)})),this.obj}},{makeObservable:function(i,n){if(i.addObservableEvents)i.addObservableEvents(n);else{var a=new e(i,n);i.addListener=t.bind(a.addListener,a),i.addOnceListener=t.bind(a.addOnceListener,a),i.informListeners=t.bind(a.informListeners,a),i.removeListener=t.bind(a.removeListener,a),i.getListeners=t.bind(a.getListeners,a),i.addObservableEvents=t.bind(a.addObservableEvents,a)}}}})),define("lq/validations",["when"],(function(t){"use strict";return{runValidation:function(e,i,n,a){return e&&0!==e.rules.length?t.reduce(e.rules,(function(t,e){return i.conditions.getConditionEvaluator(e.condition).evaluate(i,!0,null,a).then((function(i){if(i.conditionResult){var a=e.eventing.validated;return a.enabled&&n(a.raisedEventName),t}var o=e.eventing.invalidated;return o.enabled&&n(o.raisedEventName),!1}))}),!0):t(!0)}}})),define("lq/drop",["underscore","jquery","when","lq","lq/oop","lq/observable","lq/validations"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{positioning:"absolute",position:{x:0,y:0},size:{x:100,y:20},zIndex:1,locked:!1,isHidden:!1,formatting:{dateFormat:"dd-MM-yyyy",groupSeperator:"",decimalSeperator:"",decimalPrecision:""},eventing:{},initialVisibility:!0,initialVisibilityOption:"Hard Coded",centered:!1,toPage:!1},childDrops:[],editable:!1,renderInBackground:!1},A=function(t,i,n){e.extend(!0,this,s,i,n),this.type=this.data.type,this.$element=t.addClass("drop-element").css("visibility","inherit"),this.parent=null,this.pool=[],this.otherVisuals=[],this.eventHandlers=[],o.makeObservable(this,["ChildAdded","DatasourceApplied"]),this.applyLayouts(),"function"==typeof A.constructing&&A.constructing(this),A.informListeners("Constructing",this)};return A.prototype.defaultEventArg=void 0,A.prototype.isHidden=!1,A.prototype.supportsManyToManyData=function(){return!1},a.makeExtendable(A),o.makeObservable(A,"Constructing"),A.prototype.$=function(t){return this.$element.find(t)},A.prototype.autoPositionAt=function(t){this.$element.css({left:null===t.left?"auto":t.left+"px",top:null===t.top?"auto":t.top+"px",right:null===t.right?"auto":t.right+"px",bottom:null===t.bottom?"auto":t.bottom+"px"}).appendTo(e("body"))},A.prototype.createAndRenderDrops=function(t){var e=this;return i(e.preRender()).then((function(){if(!e.removed){e.$element.appendTo(t);var n=e.piping.dropFactory.createDrops(e.childDrops);return i.all(e.createRenderPromisesForChildren(n))}})).then((function(){return e.postRender()}))},A.prototype.isRenderedInBackground=function(){return!0===this.renderInBackground||!!this.parent&&this.parent.isRenderedInBackground()},A.prototype.createRenderPromiseForChild=function(t){return t.data.toBrowser?t.render(this.piping.$actionWrapper):t.renderInBackground&&this.rootDrop.$masterPage?t.render(this.rootDrop.$masterPage):t.data.toPage&&this.rootDrop.$pageAnchored?t.render(this.rootDrop.$pageAnchored):t.render(this.$element)},A.prototype.createRenderPromisesForChildren=function(e){var i=this,n=[];return t.each(e,(function(t){i.addDrop(t),n.push(i.createRenderPromiseForChild(t))})),n},A.prototype.render=function(e){var n=this;return i(n.preRender()).then((function(){if(!n.removed){n.$element.appendTo(e);var a=[];return t.forEach(n.pool,(function(t){a.push(n.createRenderPromiseForChild(t))})),i.all(a)}})).then((function(){return n.postRender()}))},A.prototype.preRender=e.noop,A.prototype.postRender=e.noop,A.prototype.resize=function(){this.postWindowResize(),t.forEach(this.pool,(function(t){t.resize()}))},A.prototype.postWindowResize=e.noop,A.prototype.error=function(e){this.onError(e),t.forEach(this.pool,(function(t){t.error(e)}))},A.prototype.onError=function(t){},A.prototype.isVisible=function(){return!this.isHidden&&(!this.parent||this.parent.isVisible())},A.prototype.showWithoutAnimation=function(){this.getElementForVisibility().removeClass("drop-hidden"),this.isHidden=!1,this.shown()},A.prototype.show=function(){var t=this,i=this.data.showAnimation;"none"!==i&&null!=i?(this.data.showAnimationTime&&e(this.getElementForVisibility()).css({animationDuration:this.data.showAnimationTime.delay+this.data.showAnimationTime.unit}),this.getElementForVisibility().removeClass("drop-hidden"),this.getElementForVisibility().addClass("animated "+i),this.getElementForVisibility().one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){t.getElementForVisibility().removeClass("animated "+i),t.isHidden=!1,t.shown()}))):this.showWithoutAnimation()},A.prototype.hideWithoutAnimation=function(){this.getElementForVisibility().addClass("drop-hidden"),this.isHidden=!0,this.hidden()},A.prototype.hide=function(){var t=this,i=this.data.hideAnimation;"none"!==i&&null!=i?(this.data.hideAnimationTime&&e(this.getElementForVisibility()).css({animationDuration:this.data.hideAnimationTime.delay+this.data.hideAnimationTime.unit}),this.getElementForVisibility().addClass("animated "+i),this.getElementForVisibility().one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){t.getElementForVisibility().removeClass("animated "+i),t.getElementForVisibility().addClass("drop-hidden"),t.isHidden=!0,t.hidden()}))):this.hideWithoutAnimation()},A.prototype.getElementForVisibility=function(){return null!=this.parent?this.parent.getChildElementForVisibility(this):this.$element},A.prototype.getChildElementForVisibility=function(t){return t.$element},A.prototype.toggle=function(t){0===arguments.length&&(t=!this.isVisible()),t?this.show():this.hide()},A.prototype.shown=function(){this.isVisible()&&(this.afterShown(),t.forEach(this.pool,(function(t){t.shown()})))},A.prototype.afterShown=e.noop,A.prototype.hidden=function(){this.isVisible()||(this.afterHidden(),t.forEach(this.pool,(function(t){t.hidden()})))},A.prototype.afterHidden=e.noop,A.prototype.getEventDataFor=function(t){return this.data&&this.data.eventing&&this.data.eventing[t]||{}},A.prototype.applyEventTrigger=function(t,e,i,n){var a=this;i=i||a.$element;var o=this.getEventDataFor(t),r=e+".licquidEventTrigger-"+t;i.off(r),o.enabled&&this.subscribeEventHandler(i,r,(function(){return a.triggerEvent(o.raisedEventName,n,void 0,void 0,a.isBackgroundEvent(t)),!a.insideList()}))},A.prototype.insideList=function(){return!!this.parent&&("List"===this.parent.type||this.parent.insideList())},A.prototype.triggerEventIfEnabled=function(t,e,i,n){var a=this.getEventDataFor(t);if(a.enabled){var o=this.isBackgroundEvent(t);this.triggerEvent(a.raisedEventName,e,i,n,o)}},A.prototype.isBackgroundEvent=function(t){return"mouseEnter"===t||"mouseLeave"===t},A.prototype.isEventEnabled=function(t){return this.getEventDataFor(t).enabled},A.prototype.triggerEvent=function(t,i,n,a,o,r){if(this.piping){void 0===i&&(i=this.getDefaultEventArg());var s,A=n||this.$element;A instanceof e&&(A=A.get(0)),a&&(s={clientX:a.clientX,clientY:a.clientY,offsetX:a.offsetX,offsetY:a.offsetY,pageX:a.pageX,pageY:a.pageY,screenX:a.screenX,screenY:a.screenY});var l={drop:this,element:A,activeArea:A.getBoundingClientRect(),eventPosition:s,isBackgroundEvent:!!o};this.piping.eventing.publish(t,l,i,null,r)}},A.prototype.getDefaultEventArg=function(){return void 0!==this.defaultEventArg?this.defaultEventArg:this.parent?this.parent.getDefaultEventArg():void 0},A.prototype.updateRequiredIndicator=function(){this.isValid()?this.$element.addClass("hasValidValue"):this.$element.removeClass("hasValidValue")},A.prototype.isValid=function(){return!this.requiredData||this.hasValue()},A.prototype.triggerValidationEvent=function(t,e){this.triggerEvent(e,null,null,null,null,t)},A.prototype.performValidation=function(t){return r.runValidation(this.data.validation,this.piping,this.triggerValidationEvent.bind(this,t),this.getValue())},A.prototype.hasValue=function(){var t=this.getValue();return null!=t&&!1!==t&&0!==t.length},A.prototype.makesItGrow=function(){return this.rootDrop&&this.rootDrop.doesThisMakeMeGrow(this)},A.prototype.applyPosition=function(){if(this.canGrow()||this.makesItGrow()){var t={position:"relative",display:"block",zIndex:this.getZIndex()};this.data.minHeight&&(t.minHeight=this.data.minHeight+"px"),!0===this.data.centered?(t.width=this.data.size.x+"px",t.margin="0 auto"):null!=this.data.right&&null==this.data.left?(t.marginLeft="auto",t.marginRight=this.data.right+"px",t.width=this.data.size.x+"px"):null!=this.data.right&&null!=this.data.left?(t.marginLeft=this.data.left+"px",t.marginRight=this.data.right+"px",t.width="calc(100% - "+this.data.left+"px"-this.data.right+"px)"):(t.marginLeft=(null!=this.data.left?this.data.left:this.data.position.x)+"px",t.width=this.data.size.x+"px"),this.$element.css(t);var e={paddingTop:(null!=this.data.top?this.data.top:this.data.position.y)+"px"};null!=this.data.bottom&&(e.paddingBottom=this.data.bottom+"px"),this===this.rootDrop?this.piping.$actionView.css(e):this.parent.$element.css(e)}else if(null==this.parent||null!=this.parent.parent||this.isRenderedInBackground())null!=this.parent?this.parent.applyPositionForChild(this):this.$element.css(this.getPositionCss(this.data));else{var i=this.rootDrop.$element[0];if(this.$element[0]!==i){var n=this.$element.parent()[0];if((this.data.toPage||this.data.toBrowser)&&this.rootDrop.$pageAnchored){var a=this.rootDrop.$pageAnchored[0];n!==a&&this.$element.appendTo(a)}else this.data.toPage||this.data.toBrowser||n!==i&&this.$element.appendTo(i)}this.parent.applyPositionForChild(this)}this.data.parallax&&this.data.parallax.enabled&&this.piping.$actionWrapper.on("scroll",this.updateParallaxPosition.bind(this))},A.prototype.doesThisMakeMeGrow=function(t){return!1},A.prototype.canGrow=function(t){return!1},A.prototype.updateParallaxPosition=function(){var t=this.piping.$actionWrapper.scrollTop();this.$element.css("top",this.data.position.y+t-t*this.data.parallax.factor+"px")},A.prototype.applyPositionForChild=function(t){var e=t.getZIndex(),i=this.getPositionCss(t.data,e);t.$element.css(i)},A.prototype.getZIndex=function(){return this.renderInBackground||this.parent!==this.rootDrop||this.designData?this.data.zIndex:this.data.zIndex+3e3},A.prototype.getPositionCss=function(t,e){var i=void 0!==e?e:t.zIndex;if(!0===t.dynamicHeight)return{position:"relative",top:t.position.y+"px",left:t.position.x+"px",width:t.size.x,zIndex:i,height:"auto"};var n={zIndex:i,position:t.positioning};return t.useFullScreen?(n.left="0px",n.right="0px",n.top="0px",n.bottom="0px",n.height="auto",n.width="auto",n):(null!=t.bottom&&null==t.top?(n.top="auto",n.bottom=t.bottom+"px",n.height=t.size.y):null!=t.bottom&&null!=t.top?(n.top=t.top+"px",n.bottom=t.bottom+"px",n.height="auto"):(n.top=(null!=t.top?t.top:t.position.y)+"px",n.bottom="auto",n.height=t.size.y),null!=t.right&&null==t.left?(n.left="auto",n.right=t.right+"px",n.width=t.size.x):null!=t.right&&null!=t.left?(n.left=t.left+"px",n.right=t.right+"px",n.width="auto"):(n.left=(null!=t.left?t.left:t.position.x)+"px",n.right="auto",n.width=t.size.x),!0===t.centered&&(n.left="0",n.right="0",n.marginLeft="auto",n.marginRight="auto"),(t.autoHeight||t.useDynamicHeight&&t.isDynamiclySizedContainer)&&(n.height="auto"),(t.autoWidth||t.useDynamicWidth&&t.isDynamiclySizedContainer)&&(n.width="auto"),t.fitContent&&(n.width="fit-content"),n)},A.prototype.getPosition=function(){var t={};return null!==this.data.left&&(t.left=this.data.left),null!==this.data.top&&(t.top=this.data.top),null!==this.data.right&&(t.right=this.data.right),null!==this.data.bottom&&(t.bottom=this.data.bottom),t},A.prototype.addDrop=function(t){return this.pool.push(t),t.parent=this,t.rootDrop=this.rootDrop,t.piping=this.piping,this.informListeners("ChildAdded",t),delete t.removed,this},A.prototype.removeDrop=function(t){t.beforeRemove(),"Query"===t.type&&this.piping.datasources.unregisterDatasource(t.data);var e=this.pool.indexOf(t);return this.pool.splice(e,1),t.parent=null,t.rootDrop=null,t.piping=null,t.removed=!0,this},A.prototype.beforeRemove=function(){t.each(this.pool,(function(t){t.beforeRemove()}))},A.prototype.removeAllDrops=function(){var e=this;t.each(this.pool.slice(0),(function(t){e.removeDrop(t)}))},A.prototype.subscribeEventHandler=function(t,e,i){if("string"==typeof arguments[0])return this.subscribeEventHandler(this.$element,arguments[0],arguments[1]);this.eventHandlers.push({$element:t,event:e,handler:i}),t.on(e,i)},A.prototype.unsubscribeEventHandlers=e.noop,A.prototype.unsubscribeEventHandlersRecursive=function(){t.each(this.pool,(function(t){t.unsubscribeEventHandlersRecursive()})),this.unsubscribeEventHandlers(),this.removeClicks&&this.removeClicks();var e=this;t.each(this.eventHandlers,(function(t){t.$element?t.$element.off(t.event,t.handler):t.source&&e.unsubscribe(t.source,t.events)})),this.parent=null,this.rootDrop=null,this.piping=null,this.$element.remove()},A.prototype.getRootDrop=function(){return this.parent?this.parent.getRootDrop():this},A.prototype.isChildDropOfRecursive=function(t){return!!this.parent&&(this.parent===t||this.parent.isChildDropOfRecursive(t))},A.prototype.events=function(e,i,n){t.each(t.keys(i),(function(t){var n=i[t];e["withOn"+t](n)})),!0!==n&&this.eventHandlers.push({source:e,events:i})},A.prototype.unsubscribe=function(e,i){t.each(t.keys(i),(function(t){var n=i[t];e["withoutOn"+t](n)}))},A.prototype.descendantOf=function(t){return!!this.parent&&(this.parent.type===t||this.parent.descendantOf(t))},A.prototype.getFirstParentOfType=function(t){if(this.parent)return this.parent.type===t?this.parent:this.parent.getFirstParentOfType(t)},A.prototype.getNestingContext=function(){if(this.parent)return this.parent.nestingContext?this.parent.nestingContext:this.parent.getNestingContext()},A.prototype.applyLayouts=function(){this.data.appliedLayouts&&this.data.appliedLayouts.length>0&&this.$element.addClass("layout-specific").addClass(t.map(this.data.appliedLayouts,(function(t){return"supports-layout-"+t})))},A})),define("lq/enum",["underscore"],(function(t){"use strict";var e=function(t){Object.freeze&&Object.freeze(t)},i=function(i,n,a,o){var r=this;r.enum=i,r.enumName=n,r.name=a,t.extend(r,o),e(r)};i.prototype.toString=function(){return"EnumItem "+this.enumName+" "+this.name},Object.create&&(i.prototype=Object.create(null));var n=function(n,a,o){var r=this;a=a.slice(),e(a),r.keys=function(){return a},t.each(a,(function(t){r[t]=new i(r,n,t,o)})),e(r)};return n.prototype.values=function(){return t.values(this)},n})),define("lq/constants",["lq/enum"],(function(t){"use strict";var e=function(){return this.enum.keys().indexOf(this.name)},i={licquidDateFormat:"S",valueTypes:{uniqueIdentifier:"System.Guid",dateTime:"System.DateTime",decimal:"System.Decimal",integer:"System.Int32",string:"System.String",boolean:"System.Boolean",document:"LicquidDocumentVersionDetail"},layoutTypes:new t("LayoutTypes",["Desktop","TabletPortrait","TabletLandscape","PhonePortrait","PhoneLandscape"],{getIndex:e}),deviceTypes:new t("DeviceTypes",["Desktop","Tablet","Phone"],{getIndex:e}),orientations:new t("Orientations",["Portrait","Landscape"],{getIndex:e}),mappingTypes:new t("Mapping types",["Parameter","DataSource","ViewModel","FixedValue","QueryString","NullValue"]),valueTypeLabels:{}};return i.valueTypeLabels[i.valueTypes.string]="String",i.valueTypeLabels[i.valueTypes.integer]="Natural Number",i.valueTypeLabels[i.valueTypes.decimal]="Decimal",i.valueTypeLabels[i.valueTypes.dateTime]="DateTime",i.valueTypeLabels[i.valueTypes.boolean]="Boolean",i.valueTypeLabels[i.valueTypes.uniqueIdentifier]="Unique identifier",i.valueTypeSelection=[{key:i.valueTypes.string,value:i.valueTypeLabels[i.valueTypes.string]},{key:i.valueTypes.integer,value:i.valueTypeLabels[i.valueTypes.integer]},{key:i.valueTypes.decimal,value:i.valueTypeLabels[i.valueTypes.decimal]},{key:i.valueTypes.dateTime,value:i.valueTypeLabels[i.valueTypes.dateTime]},{key:i.valueTypes.boolean,value:i.valueTypeLabels[i.valueTypes.boolean]},{key:i.valueTypes.uniqueIdentifier,value:i.valueTypeLabels[i.valueTypes.uniqueIdentifier]}],Object.freeze&&(Object.freeze(i.valueTypes),Object.freeze(i.valueTypeLabels),Object.freeze(i)),i})),define("lq/util",["underscore"],(function(t){"use strict";var e=function(t,i){if(!(t instanceof Array)||0===t.length)return t;for(var n={},a=0;a<t.length;a++){var o=t[a],r=void 0!==o.value?o.value:o.Value,s=void 0!==o.key?o.key:o.Key;i&&-1!==i.indexOf(s)?n[s]=r:n[s]=e(r)}return n},i=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),n=function(t){var e=t.match(i);if(e)return{scheme:e[2],authority:e[4],path:e[5],query:e[7],fragment:e[9],toString:function(){return(this.scheme?this.scheme+":":"")+(this.authority?"//"+this.authority:"")+this.path+(this.query?"?"+this.query:"")+(this.fragment?"#"+this.fragment:"")}}},a=function(e){return t.map(e,(function(t,e){return e+"="+t})).join("&")},o=function(e){return t.chain(e.split("&")).compact().map((function(t){var e=t.split("="),i=e.slice(1).join("=");return[e[0],i]})).object().value()},r=function(t,e,i){var n=o(t||"");return n[e]=i,a(n)},s=function(e,i){var n=e;return t.each(i,(function(e){n=t.isObject(n)?n[e]:void 0})),n};return{cloneData:function(t){return void 0===t?void 0:JSON.parse(JSON.stringify(t))},parseUri:n,addOrSetQueryParameter:r,addOrSetQueryParameterInUrl:function(t,e,i){var a=n(t);return a.query=r(a.query,e,i),a.toString()},parseUriQuery:o,formatUriQuery:a,convertRelativeHyperlinkToHostName:function(t){var e=n(t);return"/"===e.path[0]||e.authority?t:(e.authority=e.path,e.path="",e.toString())},getPropertyByPath:function(t,e){return s(t,"number"==typeof e?[e]:e.split("."))},setPropertyByPath:function(e,i,n){var a="number"==typeof i?[i]:i.split("."),o=a.pop();if(t.isObject(e)){var r=function(e,i){var n=e;return t.each(i,(function(e){t.isObject(n[e])||(n[e]={}),n=n[e]})),n}(e,a);r[o]=n}},removePropertyByPath:function(e,i){var n="number"==typeof i?[i]:i.split("."),a=n.pop();if(t.isObject(e)){var o=s(e,n);t.isObject(o)&&delete o[a]}},autoFormatNumber:function(e){if(null==e)return e;if(!t.isFinite(e)||"string"==typeof e)return e.toString();var i=Math.abs(e),n=Math.log(i)/Math.LN10;if(!t.isFinite(n))return e.toString();if(n>7||n<-6)return e.toExponential(2);var a=2-Math.floor(n);if(a<=0)return e.toFixed(0);for(var o=e.toFixed(a);"0"==o.charAt(o.length-1);)o=o.substring(0,o.length-1);return"."==o.charAt(o.length-1)&&(o=o.substring(0,o.length-1)),o},convertListOfKeyValuesToObject:e}})),define("lq/responsive",["jquery","underscore","lq/constants","lq/drop","lq/util"],(function(t,e,i,n,a){"use strict";var o=i.orientations,r=i.deviceTypes,s=i.layoutTypes,A=["position","size","margin","top","right","bottom","left","centered","toPage","styles","initialVisibilityOption","initialVisibility","dataSourceForVisibility","dataSourceOutputForVisibility","parameterForVisibility","parameterForVisibility","conditionForVisibility"],l=["top","right","bottom","left","centered"],d={List:["childPositionX","childPositionY","childSizeX","childSizeY"],Gauge:["indicatorScale"],Image:["cropPositionX","cropPositionY","cropImageWidth","cropImageHeight","selectedResizeOption","backgroundRepeat"],Text:["applyBestFontFit"]},c=function(){var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))?r.Phone:/android|ipad|playbook|silk/i.test(t)?r.Tablet:r.Desktop},u=function(t,i,n){d[t]&&e.each(d[t],(function(t){e.isUndefined(i[t])||(n[t]=i[t])})),e.each(A,(function(t){e.isUndefined(i[t])?-1!==e.indexOf(l,t)&&delete n[t]:n[t]=i[t]}))},h=function(t,i){e.each(t.childDrops,(function(t){var n=e.findWhere(t.data.layouts,{layoutId:i.id});n&&u(t.data.type,n,t.data),h(t,i)})),e.each(t.backgroundDrops,(function(t){var n=e.findWhere(t.data.layouts,{layoutId:i.id});n&&u(t.data.type,n,t.data),h(t,i)}))};return{orientations:i.orientations,deviceTypes:i.deviceTypes,layoutTypes:i.layoutTypes,getDeviceType:c,isPhoneDevice:function(){return c()===r.Phone},isPWA:function(){return window.matchMedia("(display-mode: standalone)").matches},getOrientation:function(){if(window.screen&&window.screen.orientation)return-1!==window.screen.orientation.type.indexOf("landscape")?o.Landscape:o.Portrait;var e=t(window);return(window.outerWidth||e.width())/(window.outerHeight||e.height())>1.3?o.Landscape:o.Portrait},getBrowserLayout:function(){var t=this.getDeviceType(),e=this.getOrientation();return{layoutType:this.getLayoutType(t,e),deviceType:t,orientation:e}},getBrowserLayoutType:function(){return this.getBrowserLayout().layoutType.getIndex()},getBrowserResolution:function(){var t=window,e=document,i=e.documentElement,n=e.getElementsByTagName("body")[0];return{x:t.innerWidth||i.clientWidth||n.clientWidth,y:t.innerHeight||i.clientHeight||n.clientHeight}},getLayoutType:function(t,e){return t===r.Desktop?s.Desktop:s[t.name+e.name]},getLayoutIdFromUri:function(){var t=window.location.hash||"#";return a.parseUriQuery(t.substr(1)).layoutId},getLayoutTypeFromUri:function(){var t=window.location.hash||"#",e=a.parseUriQuery(t.substr(1));return parseInt(e.layoutType,10)},getDefaultLayoutType:function(t){return(t.defaultLayout||{layoutType:0,id:"default"}).layoutType},isDefaultLayout:function(){var t=this.getCurrentLayout();return!t||t.isDefault},getCurrentLayout:function(t){var i=this.getLayoutIdFromUri(),n=i&&e.findWhere(t.allLayouts,{id:i});if(n)return n;var a=this.getCurrentLayoutType(t),o=e.chain(t.allLayouts).where({layoutType:a}).sortBy("resolutionX").value(),r=this.getBrowserResolution(),s=e.filter(o,(function(t){return t.resolutionX<=r.x&&t.resolutionY<=r.y}));if(s.length>0)return e.last(s);if(o.length>0){if(1===o.length)return o[0];var A=e.first(o);return A.resolutionX>r.x||A.resolutionY>r.y?A:e.last(o)}return t.data.appliedLayouts&&t.data.appliedLayouts.length>0&&-1===e.indexOf(t.data.appliedLayouts,t.defaultLayout.id)?e.findWhere(t.allLayouts,{id:t.data.appliedLayouts[0]}):t.defaultLayout},getCurrentLayoutType:function(t){var e=this.getLayoutTypeFromUri();return e>=0?e:("function"==typeof t.getInitialLayoutType&&(e=t.getInitialLayoutType()),e>=0?e:this.getBrowserLayoutType())},copyDropLayout:u,applyLayoutRecursive:function(t,i){var n=e.findWhere(t.data.layouts,{layoutId:i.id});n?this.copyDropLayout(t.type,n,t.data):i.isDefault||this.copyDropLayout(t.type,{size:{x:i.resolutionX,y:i.resolutionY},position:{x:0,y:0},top:null,left:null,bottom:null,right:null,centered:!1},t.data),h(t,i)}}})),
/*!
 * ASP.NET SignalR JavaScript Library 2.4.3
 * http://signalr.net/
 *
 * Copyright (c) .NET Foundation. All rights reserved.
 * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 *
 */
function(t,e,i){var n={nojQuery:"jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.",noTransportOnInit:"No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.",errorOnNegotiate:"Error during negotiation request.",stoppedWhileLoading:"The connection was stopped during page load.",stoppedWhileNegotiating:"The connection was stopped during the negotiate request.",errorParsingNegotiateResponse:"Error parsing negotiate response.",errorRedirectionExceedsLimit:"Negotiate redirection limit exceeded.",errorDuringStartRequest:"Error during start request. Stopping the connection.",errorFromServer:"Error message received from the server: '{0}'.",stoppedDuringStartRequest:"The connection was stopped during the start request.",errorParsingStartResponse:"Error parsing start response: '{0}'. Stopping the connection.",invalidStartResponse:"Invalid start response: '{0}'. Stopping the connection.",protocolIncompatible:"You are using a version of the client that isn't compatible with the server. Client version {0}, server version {1}.",aspnetCoreSignalrServer:"Detected a connection attempt to an ASP.NET Core SignalR Server. This client only supports connecting to an ASP.NET SignalR Server. See https://aka.ms/signalr-core-differences for details.",sendFailed:"Send failed.",parseFailed:"Failed at parsing response: {0}",longPollFailed:"Long polling request failed.",eventSourceFailedToConnect:"EventSource failed to connect.",eventSourceError:"Error raised by EventSource",webSocketClosed:"WebSocket closed.",pingServerFailedInvalidResponse:"Invalid ping response when pinging server: '{0}'.",pingServerFailed:"Failed to ping server.",pingServerFailedStatusCode:"Failed to ping server.  Server responded with status code {0}, stopping the connection.",pingServerFailedParse:"Failed to parse ping server response, stopping the connection.",noConnectionTransport:"Connection is in an invalid state, there is no transport active.",webSocketsInvalidState:"The Web Socket transport is in an invalid state, transitioning into reconnecting.",reconnectTimeout:"Couldn't reconnect within the configured timeout of {0} ms, disconnecting.",reconnectWindowTimeout:"The client has been inactive since {0} and it has exceeded the inactivity timeout of {1} ms. Stopping the connection.",jsonpNotSupportedWithAccessToken:"The JSONP protocol does not support connections that require a Bearer token to connect, such as the Azure SignalR Service."};if("function"!=typeof t)throw new Error(n.nojQuery);var a,o,r,s,A="complete"===e.document.readyState,l=t(e),d="__Negotiate Aborted__",c={onStart:"onStart",onStarting:"onStarting",onReceived:"onReceived",onError:"onError",onConnectionSlow:"onConnectionSlow",onReconnecting:"onReconnecting",onReconnect:"onReconnect",onStateChanged:"onStateChanged",onDisconnect:"onDisconnect"},u=function(e,i,n){return i===e.state&&(e.state=n,t(e).triggerHandler(c.onStateChanged,[{oldState:i,newState:n}]),!0)},h=function(t){return t._.keepAliveData.activated&&t.transport.supportsKeepAlive(t)};function p(t,e){return e.match(/:\d+$/)?e:e+":"+function(t){return"http:"===t?80:"https:"===t?443:void 0}(t)}function g(e,i){var n=this,a=[];n.tryBuffer=function(i){return e.state===t.signalR.connectionState.connecting&&(a.push(i),!0)},n.drain=function(){if(e.state===t.signalR.connectionState.connected)for(;a.length>0;)i(a.shift())},n.clear=function(){a=[]}}(a=function(t,e,i){return new a.fn.init(t,e,i)})._={defaultContentType:"application/x-www-form-urlencoded; charset=UTF-8",ieVersion:("Microsoft Internet Explorer"===e.navigator.appName&&(s=/MSIE ([0-9]+\.[0-9]+)/.exec(e.navigator.userAgent))&&(r=e.parseFloat(s[1])),r),error:function(t,e,i){var n=new Error(t);return n.source=e,void 0!==i&&(n.context=i),n},transportError:function(t,e,i,n){var a=this.error(t,i,n);return a.transport=e?e.name:undefined,a},format:function(){for(var t=arguments[0],e=0;e<arguments.length-1;e++)t=t.replace("{"+e+"}",arguments[e+1]);return t},firefoxMajorVersion:function(t){var e=t.match(/Firefox\/(\d+)/);return!e||!e.length||e.length<2?0:parseInt(e[1],10)},configurePingInterval:function(i){var n=i._.config,o=function(e){t(i).triggerHandler(c.onError,[e])};n&&!i._.pingIntervalId&&n.pingInterval&&(i._.pingIntervalId=e.setInterval((function(){a.transports._logic.pingServer(i).fail(o)}),n.pingInterval))}},a.events=c,a.resources=n,a.ajaxDefaults={processData:!0,timeout:null,async:!0,global:!1,cache:!1},a.changeState=u,a.isDisconnecting=function(t){return t.state===a.connectionState.disconnected},a.connectionState={connecting:0,connected:1,reconnecting:2,disconnected:4},a.hub={start:function(){throw new Error("SignalR: Error loading hubs. Ensure your hubs reference is correct, e.g. <script src='/signalr/js'><\/script>.")}},"function"==typeof l.on?l.on("load",(function(){A=!0})):l.load((function(){A=!0})),a.fn=a.prototype={init:function(e,i,n){var a=t(this);this.url=e,this.qs=i,this.lastError=null,this._={keepAliveData:{},connectingMessageBuffer:new g(this,(function(t){a.triggerHandler(c.onReceived,[t])})),lastMessageAt:(new Date).getTime(),lastActiveAt:(new Date).getTime(),beatInterval:5e3,beatHandle:null,totalTransportConnectTimeout:0,redirectQs:null},"boolean"==typeof n&&(this.logging=n)},_parseResponse:function(t){return t&&"string"==typeof t?this.json.parse(t):t},_originalJson:e.JSON,json:e.JSON,isCrossDomain:function(i,n){var a;return i=t.trim(i),n=n||e.location,0===i.indexOf("http")&&((a=e.document.createElement("a")).href=i,a.protocol+p(a.protocol,a.host)!==n.protocol+p(n.protocol,n.host))},ajaxDataType:"text",contentType:"application/json; charset=UTF-8",logging:!1,state:a.connectionState.disconnected,clientProtocol:"2.1",supportedProtocols:["1.5","2.0","2.1"],negotiateRedirectSupportedProtocols:["2.0","2.1"],reconnectDelay:2e3,transportConnectTimeout:0,disconnectTimeout:3e4,reconnectWindow:3e4,keepAliveWarnAt:2/3,start:function(i,o){var r,s=this,p={pingInterval:3e5,waitForPageLoad:!0,transport:"auto",jsonp:!1},g=s._deferral||t.Deferred(),f=e.document.createElement("a"),m=function(i,n){i.url===n&&i.baseUrl||(i.url=n,f.href=i.url,f.protocol&&":"!==f.protocol?(i.protocol=f.protocol,i.host=f.host):(i.protocol=e.document.location.protocol,i.host=f.host||e.document.location.host),i.baseUrl=i.protocol+"//"+i.host,i.wsProtocol="https:"===i.protocol?"wss://":"ws://",0===i.url.indexOf("//")&&(i.url=e.location.protocol+i.url,i.log("Protocol relative URL detected, normalizing it to '"+i.url+"'.")),i.isCrossDomain(i.url)&&(i.log("Auto detected cross domain url."),"auto"===p.transport&&(p.transport=["webSockets","serverSentEvents","longPolling"]),void 0===i.withCredentials&&(i.withCredentials=!0),t.support.cors||(i.ajaxDataType="jsonp",i.log("Using jsonp because this browser doesn't support CORS.")),i.contentType=a._.defaultContentType))};if(s.lastError=null,s._deferral=g,!s.json)throw new Error("SignalR: No JSON parser found. Please ensure json2.js is referenced before the SignalR.js file if you need to support clients without native JSON parsing support, e.g. IE<8.");if("function"===t.type(i)?o=i:"object"===t.type(i)&&(t.extend(p,i),"function"===t.type(p.callback)&&(o=p.callback)),p.transport=function(e,i){if(t.isArray(e)){for(var n=e.length-1;n>=0;n--){var o=e[n];"string"===t.type(o)&&a.transports[o]||(i.log("Invalid transport: "+o+", removing it from the transports list."),e.splice(n,1))}0===e.length&&(i.log("No transports remain within the specified transport array."),e=null)}else if(a.transports[e]||"auto"===e){if("auto"===e&&a._.ieVersion<=8)return["longPolling"]}else i.log("Invalid transport: "+e.toString()+"."),e=null;return e}(p.transport,s),!p.transport)throw new Error("SignalR: Invalid transport(s) specified, aborting start.");if(s._.config=p,!A&&!0===p.waitForPageLoad)return s._.deferredStartHandler=function(){s.start(i,o)},l.bind("load",s._.deferredStartHandler),g.promise();if(s.state===a.connectionState.connecting)return g.promise();if(!1===u(s,a.connectionState.disconnected,a.connectionState.connecting))return g.resolve(s),g.promise();!function(i){var n,o;i._.configuredStopReconnectingTimeout||(o=function(e){var i=a._.format(a.resources.reconnectTimeout,e.disconnectTimeout);e.log(i),t(e).triggerHandler(c.onError,[a._.error(i,"TimeoutException")]),e.stop(!1,!1)},i.reconnecting((function(){var t=this;t.state===a.connectionState.reconnecting&&(n=e.setTimeout((function(){o(t)}),t.disconnectTimeout))})),i.stateChanged((function(t){t.oldState===a.connectionState.reconnecting&&e.clearTimeout(n)})),i._.configuredStopReconnectingTimeout=!0)}(s),"auto"===p.transport&&!0===p.jsonp&&(p.transport="longPolling"),s.withCredentials=p.withCredentials,s._originalUrl=s.url,s.ajaxDataType=p.jsonp?"jsonp":"text",m(s,s.url),t(s).bind(c.onStart,(function(e,i){"function"===t.type(o)&&o.call(s),g.resolve(s)})),s._.initHandler=a.transports._logic.initHandler(s),r=function(i,o){var A=a._.error(n.noTransportOnInit);if((o=o||0)>=i.length)return 0===o?s.log("No transports supported by the server were selected."):1===o?s.log("No fallback transports were selected."):s.log("Fallback transports exhausted."),t(s).triggerHandler(c.onError,[A]),g.reject(A),void s.stop();if(s.state!==a.connectionState.disconnected){var d=i[o],p=a.transports[d],f=function(){r(i,o+1)};s.transport=p;try{s._.initHandler.start(p,(function(){var i=a._.firefoxMajorVersion(e.navigator.userAgent)>=11,n=!0;s.log("The start request succeeded. Transitioning to the connected state."),h(s)&&a.transports._logic.monitorKeepAlive(s),s._.keepAliveData.activated&&a.transports._logic.startHeartbeat(s),a._.configurePingInterval(s),u(s,a.connectionState.connecting,a.connectionState.connected)||s.log("WARNING! The connection was not in the connecting state."),s._.connectingMessageBuffer.drain(),t(s).triggerHandler(c.onStart),l.bind("unload",(function(){s.log("Window unloading, stopping the connection."),s.stop(n)})),i&&l.bind("beforeunload",(function(){e.setTimeout((function(){s.stop(n)}),0)}))}),f)}catch(t){s.log(p.name+" transport threw '"+t.message+"' when attempting to start."),f()}}};var v=s.url+"/negotiate",y=function(e,i){var o=a._.error(n.errorOnNegotiate,e,i._.negotiateRequest);t(i).triggerHandler(c.onError,o),g.reject(o),i.stop()};return t(s).triggerHandler(c.onStarting),v=a.transports._logic.prepareQueryString(s,v),s.log("Negotiating with '"+v+"'."),s._.negotiateRequest=function(){var e,i,o,A=0,l=[],u=[],h=function(t,e){var i=a.transports._logic.prepareQueryString(t,t.url+"/negotiate");t.log("Negotiating with '"+i+"'.");var o={url:i,error:function(e,i){i!==d?y(e,t):g.reject(a._.error(n.stoppedWhileNegotiating,null,t._.negotiateRequest))},success:e};return t.accessToken&&(o.headers={Authorization:"Bearer "+t.accessToken}),a.transports._logic.ajax(t,o)},f=function(d){try{e=s._parseResponse(d)}catch(t){return void y(a._.error(n.errorParsingNegotiateResponse,t),s)}if(e.availableTransports)return o=a._.error(n.aspnetCoreSignalrServer),t(s).triggerHandler(c.onError,[o]),void g.reject(o);if(!e.ProtocolVersion||-1===s.supportedProtocols.indexOf(e.ProtocolVersion))return o=a._.error(a._.format(n.protocolIncompatible,s.clientProtocol,e.ProtocolVersion)),t(s).triggerHandler(c.onError,[o]),void g.reject(o);if(-1!==s.negotiateRedirectSupportedProtocols.indexOf(e.ProtocolVersion)){if(e.Error)return o=a._.error(a._.format(n.errorFromServer,e.Error)),t(s).triggerHandler(c.onError,[o]),void g.reject(o);if(e.RedirectUrl){if(100===A)return void y(a._.error(n.errorRedirectionExceedsLimit),s);"auto"===p.transport&&(p.transport=["webSockets","serverSentEvents","longPolling"]),s.log("Received redirect to: "+e.RedirectUrl),s.accessToken=e.AccessToken;var v=e.RedirectUrl.split("?",2);return m(s,v[0]),s._.redirectQs=2===v.length?v[1]:null,"jsonp"===s.ajaxDataType&&s.accessToken?void y(a._.error(n.jsonpNotSupportedWithAccessToken),s):(A++,void h(s,f))}}i=s._.keepAliveData,s.appRelativeUrl=e.Url,s.id=e.ConnectionId,s.token=e.ConnectionToken,s.webSocketServerUrl=e.WebSocketServerUrl,s._.pollTimeout=1e3*e.ConnectionTimeout+1e4,s.disconnectTimeout=1e3*e.DisconnectTimeout,s._.totalTransportConnectTimeout=s.transportConnectTimeout+1e3*e.TransportConnectTimeout,e.KeepAliveTimeout?(i.activated=!0,i.timeout=1e3*e.KeepAliveTimeout,i.timeoutWarning=i.timeout*s.keepAliveWarnAt,s._.beatInterval=(i.timeout-i.timeoutWarning)/3):i.activated=!1,s.reconnectWindow=s.disconnectTimeout+(i.timeout||0),t.each(a.transports,(function(t){if(0===t.indexOf("_")||"webSockets"===t&&!e.TryWebSockets)return!0;u.push(t)})),t.isArray(p.transport)?t.each(p.transport,(function(e,i){t.inArray(i,u)>=0&&l.push(i)})):"auto"===p.transport?l=u:t.inArray(p.transport,u)>=0&&l.push(p.transport),r(l)};return h(s,f)}(),g.promise()},starting:function(e){var i=this;return t(i).bind(c.onStarting,(function(t,n){e.call(i)})),i},send:function(t){var e=this;if(e.state===a.connectionState.disconnected)throw new Error("SignalR: Connection must be started before data can be sent. Call .start() before .send()");if(e.state===a.connectionState.connecting)throw new Error("SignalR: Connection has not been fully initialized. Use .start().done() or .start().fail() to run logic after the connection has started.");return e.transport.send(e,t),e},received:function(e){var i=this;return t(i).bind(c.onReceived,(function(t,n){e.call(i,n)})),i},stateChanged:function(e){var i=this;return t(i).bind(c.onStateChanged,(function(t,n){e.call(i,n)})),i},error:function(e){var i=this;return t(i).bind(c.onError,(function(t,n,a){i.lastError=n,e.call(i,n,a)})),i},disconnected:function(e){var i=this;return t(i).bind(c.onDisconnect,(function(t,n){e.call(i)})),i},connectionSlow:function(e){var i=this;return t(i).bind(c.onConnectionSlow,(function(t,n){e.call(i)})),i},reconnecting:function(e){var i=this;return t(i).bind(c.onReconnecting,(function(t,n){e.call(i)})),i},reconnected:function(e){var i=this;return t(i).bind(c.onReconnect,(function(t,n){e.call(i)})),i},stop:function(i,o){var r=this,s=r._deferral;return r._.deferredStartHandler&&l.unbind("load",r._.deferredStartHandler),delete r._.config,delete r._.deferredStartHandler,A||r._.config&&!0!==r._.config.waitForPageLoad?r.state!==a.connectionState.disconnected?(r.log("Stopping connection."),e.clearTimeout(r._.beatHandle),e.clearInterval(r._.pingIntervalId),r.transport&&(r.transport.stop(r),!1!==o&&r.transport.abort(r,i),h(r)&&a.transports._logic.stopMonitoringKeepAlive(r),r.transport=null),r._.negotiateRequest&&(r._.negotiateRequest.abort(d),delete r._.negotiateRequest),r._.initHandler&&r._.initHandler.stop(),delete r._deferral,delete r.messageId,delete r.groupsToken,delete r.id,delete r._.pingIntervalId,delete r._.lastMessageAt,delete r._.lastActiveAt,r._.connectingMessageBuffer.clear(),t(r).unbind(c.onStart),delete r.accessToken,delete r.protocol,delete r.host,delete r.baseUrl,delete r.wsProtocol,delete r.contentType,r.url=r._originalUrl,r._.redirectQs=null,u(r,r.state,a.connectionState.disconnected),t(r).triggerHandler(c.onDisconnect),r):void 0:(r.log("Stopping connection prior to negotiate."),void(s&&s.reject(a._.error(n.stoppedWhileLoading))))},log:function(t){!function(t,i){var n;!1!==i&&void 0!==e.console&&(n="["+(new Date).toTimeString()+"] SignalR: "+t,e.console.debug?e.console.debug(n):e.console.log&&e.console.log(n))}(t,this.logging)}},a.fn.init.prototype=a.fn,a.noConflict=function(){return t.connection===a&&(t.connection=o),a},t.connection&&(o=t.connection),t.connection=t.signalR=a}(window.jQuery,window),function(t,e,i){var n,a=t.signalR,o=t.signalR.events,r=t.signalR.changeState,s="__Start Aborted__";function A(i){i._.keepAliveData.monitoring&&function(e){var i,n=e._.keepAliveData;e.state===a.connectionState.connected&&((i=(new Date).getTime()-e._.lastMessageAt)>=n.timeout?(e.log("Keep alive timed out.  Notifying transport that connection has been lost."),e.transport.lostConnection(e)):i>=n.timeoutWarning?n.userNotified||(e.log("Keep alive has been missed, connection may be dead/slow."),t(e).triggerHandler(o.onConnectionSlow),n.userNotified=!0):n.userNotified=!1)}(i),n.markActive(i)&&(i._.beatHandle=e.setTimeout((function(){A(i)}),i._.beatInterval))}function l(t,e){var i=t.url+e;return t.transport&&(i+="?transport="+t.transport.name),n.prepareQueryString(t,i)}function d(t){this.connection=t,this.startRequested=!1,this.startCompleted=!1,this.connectionStopped=!1}a.transports={},d.prototype={start:function(t,i,n){var a=this,o=a.connection,r=!1;a.startRequested||a.connectionStopped?o.log("WARNING! "+t.name+" transport cannot be started. Initialization ongoing or completed."):(o.log(t.name+" transport starting."),t.start(o,(function(){r||a.initReceived(t,i)}),(function(e){return r||(r=!0,a.transportFailed(t,e,n)),!a.startCompleted||a.connectionStopped})),a.transportTimeoutHandle=e.setTimeout((function(){r||(r=!0,o.log(t.name+" transport timed out when trying to connect."),a.transportFailed(t,undefined,n))}),o._.totalTransportConnectTimeout))},stop:function(){this.connectionStopped=!0,e.clearTimeout(this.transportTimeoutHandle),a.transports._logic.tryAbortStartRequest(this.connection)},initReceived:function(t,i){var n=this,o=n.connection;n.startRequested?o.log("WARNING! The client received multiple init messages."):n.connectionStopped||(n.startRequested=!0,e.clearTimeout(n.transportTimeoutHandle),o.log(t.name+" transport connected. Initiating start request."),a.transports._logic.ajaxStart(o,(function(){n.startCompleted=!0,i()})))},transportFailed:function(i,n,r){var s,A=this.connection,l=A._deferral;this.connectionStopped||(e.clearTimeout(this.transportTimeoutHandle),this.startRequested?this.startCompleted||(s=a._.error(a.resources.errorDuringStartRequest,n),A.log(i.name+" transport failed during the start request. Stopping the connection."),t(A).triggerHandler(o.onError,[s]),l&&l.reject(s),A.stop()):(i.stop(A),A.log(i.name+" transport failed to connect. Attempting to fall back."),r()))}},n=a.transports._logic={ajax:function(e,i){return t.ajax(t.extend(!0,{},t.signalR.ajaxDefaults,{type:"GET",data:{},xhrFields:{withCredentials:e.withCredentials},contentType:e.contentType,dataType:e.ajaxDataType},i))},pingServer:function(e){var i,o,r=t.Deferred();return e.transport?(i=e.url+"/ping",i=n.addQs(i,e.qs),o=n.ajax(e,{url:i,headers:e.accessToken?{Authorization:"Bearer "+e.accessToken}:{},success:function(t){var i;try{i=e._parseResponse(t)}catch(t){return r.reject(a._.transportError(a.resources.pingServerFailedParse,e.transport,t,o)),void e.stop()}"pong"===i.Response?r.resolve():r.reject(a._.transportError(a._.format(a.resources.pingServerFailedInvalidResponse,t),e.transport,null,o))},error:function(t){401===t.status||403===t.status?(r.reject(a._.transportError(a._.format(a.resources.pingServerFailedStatusCode,t.status),e.transport,t,o)),e.stop()):r.reject(a._.transportError(a.resources.pingServerFailed,e.transport,t,o))}})):r.reject(a._.transportError(a.resources.noConnectionTransport,e.transport)),r.promise()},prepareQueryString:function(t,i){var a;return a=n.addQs(i,"clientProtocol="+t.clientProtocol),a="string"==typeof t._.redirectQs?n.addQs(a,t._.redirectQs):n.addQs(a,t.qs),t.token&&(a+="&connectionToken="+e.encodeURIComponent(t.token)),t.data&&(a+="&connectionData="+e.encodeURIComponent(t.data)),a},addQs:function(e,i){var n,a=-1!==e.indexOf("?")?"&":"?";if(!i)return e;if("object"==typeof i)return e+a+t.param(i);if("string"==typeof i)return"?"!==(n=i.charAt(0))&&"&"!==n||(a=""),e+a+i;throw new Error("Query string property must be either a string or object.")},getUrl:function(t,i,a,o,r){var s=("webSockets"===i?"":t.baseUrl)+t.appRelativeUrl,A="transport="+i;return!r&&t.groupsToken&&(A+="&groupsToken="+e.encodeURIComponent(t.groupsToken)),a?(s+=o?"/poll":"/reconnect",!r&&t.messageId&&(A+="&messageId="+e.encodeURIComponent(t.messageId))):s+="/connect",s+="?"+A,s=n.prepareQueryString(t,s),t.transport&&t.accessToken&&("serverSentEvents"!==t.transport.name&&"webSockets"!==t.transport.name||(s+="&access_token="+e.encodeURIComponent(t.accessToken))),r||(s+="&tid="+Math.floor(11*Math.random())),s},maximizePersistentResponse:function(t){return{MessageId:t.C,Messages:t.M,Initialized:void 0!==t.S,ShouldReconnect:void 0!==t.T,LongPollDelay:t.L,GroupsToken:t.G,Error:t.E}},updateGroups:function(t,e){e&&(t.groupsToken=e)},stringifySend:function(t,e){return"string"==typeof e||null==e?e:t.json.stringify(e)},ajaxSend:function(e,i){var r,s=n.stringifySend(e,i),A=l(e,"/send"),d=function(e,n){t(n).triggerHandler(o.onError,[a._.transportError(a.resources.sendFailed,n.transport,e,r),i])};return r=n.ajax(e,{url:A,type:"jsonp"===e.ajaxDataType?"GET":"POST",contentType:a._.defaultContentType,headers:e.accessToken?{Authorization:"Bearer "+e.accessToken}:{},data:{data:s},success:function(t){var i;if(t){try{i=e._parseResponse(t)}catch(t){return d(t,e),void e.stop()}n.triggerReceived(e,i)}},error:function(t,i){"abort"!==i&&"parsererror"!==i&&d(t,e)}})},ajaxAbort:function(t,i){if(void 0!==t.transport){i=void 0===i||i;var a=l(t,"/abort"),o=t.accessToken?{Authorization:"Bearer "+t.accessToken}:{};e.fetch?e.fetch(a,{method:"POST",keepalive:!0,headers:o,credentials:!0===t.withCredentials?"include":"same-origin"}):n.ajax(t,{url:a,async:i,timeout:1e3,type:"POST",headers:o,dataType:"text"}),t.log("Fired ajax abort async = "+i+".")}},ajaxStart:function(e,i){var r=function(t){var i=e._deferral;i&&i.reject(t)},A=function(i){e.log("The start request failed. Stopping the connection."),t(e).triggerHandler(o.onError,[i]),r(i),e.stop()};e._.startRequest=n.ajax(e,{url:l(e,"/start"),headers:e.accessToken?{Authorization:"Bearer "+e.accessToken}:{},success:function(t,n,o){var r;try{r=e._parseResponse(t)}catch(e){return void A(a._.error(a._.format(a.resources.errorParsingStartResponse,t),e,o))}"started"===r.Response?i():A(a._.error(a._.format(a.resources.invalidStartResponse,t),null,o))},error:function(t,i,n){i!==s?A(a._.error(a.resources.errorDuringStartRequest,n,t)):(e.log("The start request aborted because connection.stop() was called."),r(a._.error(a.resources.stoppedDuringStartRequest,null,t)))}})},tryAbortStartRequest:function(t){t._.startRequest&&(t._.startRequest.abort(s),delete t._.startRequest)},tryInitialize:function(t,e,i){e.Initialized&&i?i():e.Initialized&&t.log("WARNING! The client received an init message after reconnecting.")},triggerReceived:function(e,i){e._.connectingMessageBuffer.tryBuffer(i)||t(e).triggerHandler(o.onReceived,[i])},processMessages:function(e,i,o){var r;if(i&&void 0!==i.I)n.triggerReceived(e,i);else if(n.markLastMessage(e),i){if((r=n.maximizePersistentResponse(i)).Error)return e.log("Received an error message from the server: "+i.E),t(e).triggerHandler(a.events.onError,[a._.error(i.E,"ServerError")]),void e.stop(!1,!1);n.updateGroups(e,r.GroupsToken),r.MessageId&&(e.messageId=r.MessageId),r.Messages&&(t.each(r.Messages,(function(t,i){n.triggerReceived(e,i)})),n.tryInitialize(e,r,o))}},monitorKeepAlive:function(e){var i=e._.keepAliveData;i.monitoring?e.log("Tried to monitor keep alive but it's already being monitored."):(i.monitoring=!0,n.markLastMessage(e),e._.keepAliveData.reconnectKeepAliveUpdate=function(){n.markLastMessage(e)},t(e).bind(o.onReconnect,e._.keepAliveData.reconnectKeepAliveUpdate),e.log("Now monitoring keep alive with a warning timeout of "+i.timeoutWarning+", keep alive timeout of "+i.timeout+" and disconnecting timeout of "+e.disconnectTimeout))},stopMonitoringKeepAlive:function(e){var i=e._.keepAliveData;i.monitoring&&(i.monitoring=!1,t(e).unbind(o.onReconnect,e._.keepAliveData.reconnectKeepAliveUpdate),e._.keepAliveData={},e.log("Stopping the monitoring of the keep alive."))},startHeartbeat:function(t){t._.lastActiveAt=(new Date).getTime(),A(t)},markLastMessage:function(t){t._.lastMessageAt=(new Date).getTime(),t._.lastActiveAt=t._.lastMessageAt},markActive:function(t){return!!n.verifyLastActive(t)&&(t._.lastActiveAt=(new Date).getTime(),!0)},isConnectedOrReconnecting:function(t){return t.state===a.connectionState.connected||t.state===a.connectionState.reconnecting},ensureReconnectingState:function(e){return!0===r(e,a.connectionState.connected,a.connectionState.reconnecting)&&t(e).triggerHandler(o.onReconnecting),e.state===a.connectionState.reconnecting},clearReconnectTimeout:function(t){t&&t._.reconnectTimeout&&(e.clearTimeout(t._.reconnectTimeout),delete t._.reconnectTimeout)},verifyLastActive:function(e){if(!e._.keepAliveData.activated||(new Date).getTime()-e._.lastActiveAt<e.reconnectWindow)return!0;var i=a._.format(a.resources.reconnectWindowTimeout,new Date(e._.lastActiveAt),e.reconnectWindow);return e.log(i),t(e).triggerHandler(o.onError,[a._.error(i,"TimeoutException")]),e.stop(!1,!1),!1},reconnect:function(t,i){var o=a.transports[i];if(n.isConnectedOrReconnecting(t)&&!t._.reconnectTimeout){if(!n.verifyLastActive(t))return;t._.reconnectTimeout=e.setTimeout((function(){n.verifyLastActive(t)&&(o.stop(t),n.ensureReconnectingState(t)&&(t.log(i+" reconnecting."),o.start(t)))}),t.reconnectDelay)}},handleParseFailure:function(e,i,n,r,s){var A=a._.transportError(a._.format(a.resources.parseFailed,i),e.transport,n,s);r&&r(A)?e.log("Failed to parse server response while attempting to connect."):(t(e).triggerHandler(o.onError,[A]),e.stop())},initHandler:function(t){return new d(t)},foreverFrame:{count:0,connections:{}}}}(window.jQuery,window),function(t,e,i){var n=t.signalR,a=t.signalR.events,o=t.signalR.changeState,r=n.transports._logic;n.transports.webSockets={name:"webSockets",supportsKeepAlive:function(){return!0},send:function(e,i){var o=r.stringifySend(e,i);try{e.socket.send(o)}catch(o){t(e).triggerHandler(a.onError,[n._.transportError(n.resources.webSocketsInvalidState,e.transport,o,e.socket),i])}},start:function(i,s,A){var l,d=!1,c=this,u=!s,h=t(i);e.WebSocket?i.socket||(l=i.webSocketServerUrl?i.webSocketServerUrl:i.wsProtocol+i.host,l+=r.getUrl(i,this.name,u),i.log("Connecting to websocket endpoint '"+l+"'."),i.socket=new e.WebSocket(l),i.socket.onopen=function(){d=!0,i.log("Websocket opened."),r.clearReconnectTimeout(i),!0===o(i,n.connectionState.reconnecting,n.connectionState.connected)&&h.triggerHandler(a.onReconnect)},i.socket.onclose=function(e){var o;this===i.socket&&(d&&void 0!==e.wasClean&&!1===e.wasClean?(o=n._.transportError(n.resources.webSocketClosed,i.transport,e),i.log("Unclean disconnect from websocket: "+(e.reason||"[no reason given]."))):i.log("Websocket closed."),A&&A(o)||(o&&t(i).triggerHandler(a.onError,[o]),c.reconnect(i)))},i.socket.onmessage=function(t){var e;try{e=i._parseResponse(t.data)}catch(e){return void r.handleParseFailure(i,t.data,e,A,t)}e&&r.processMessages(i,e,s)}):A()},reconnect:function(t){r.reconnect(t,this.name)},lostConnection:function(t){this.reconnect(t)},stop:function(t){r.clearReconnectTimeout(t),t.socket&&(t.log("Closing the Websocket."),t.socket.close(),t.socket=null)},abort:function(t,e){r.ajaxAbort(t,e)}}}(window.jQuery,window),function(t,e,i){var n=t.signalR,a=t.signalR.events,o=t.signalR.changeState,r=n.transports._logic,s=function(t){e.clearTimeout(t._.reconnectAttemptTimeoutHandle),delete t._.reconnectAttemptTimeoutHandle};n.transports.serverSentEvents={name:"serverSentEvents",supportsKeepAlive:function(){return!0},timeOut:3e3,start:function(i,A,l){var d,c=this,u=!1,h=t(i),p=!A;if(i.eventSource&&(i.log("The connection already has an event source. Stopping it."),i.stop()),e.EventSource){d=r.getUrl(i,this.name,p);try{i.log("Attempting to connect to SSE endpoint '"+d+"'."),i.eventSource=new e.EventSource(d,{withCredentials:i.withCredentials})}catch(t){return i.log("EventSource failed trying to connect with error "+t.Message+"."),void(l?l():(h.triggerHandler(a.onError,[n._.transportError(n.resources.eventSourceFailedToConnect,i.transport,t)]),p&&c.reconnect(i)))}p&&(i._.reconnectAttemptTimeoutHandle=e.setTimeout((function(){!1===u&&i.eventSource.readyState!==e.EventSource.OPEN&&c.reconnect(i)}),c.timeOut)),i.eventSource.addEventListener("open",(function(t){i.log("EventSource connected."),s(i),r.clearReconnectTimeout(i),!1===u&&(u=!0,!0===o(i,n.connectionState.reconnecting,n.connectionState.connected)&&h.triggerHandler(a.onReconnect))}),!1),i.eventSource.addEventListener("message",(function(t){var e;if("initialized"!==t.data){try{e=i._parseResponse(t.data)}catch(e){return void r.handleParseFailure(i,t.data,e,l,t)}r.processMessages(i,e,A)}}),!1),i.eventSource.addEventListener("error",(function(t){var o=n._.transportError(n.resources.eventSourceError,i.transport,t);this===i.eventSource&&(l&&l(o)||(i.log("EventSource readyState: "+i.eventSource.readyState+"."),t.eventPhase===e.EventSource.CLOSED?(i.log("EventSource reconnecting due to the server connection ending."),c.reconnect(i)):(i.log("EventSource error."),h.triggerHandler(a.onError,[o]))))}),!1)}else l&&(i.log("This browser doesn't support SSE."),l())},reconnect:function(t){r.reconnect(t,this.name)},lostConnection:function(t){this.reconnect(t)},send:function(t,e){r.ajaxSend(t,e)},stop:function(t){s(t),r.clearReconnectTimeout(t),t&&t.eventSource&&(t.log("EventSource calling close()."),t.eventSource.close(),t.eventSource=null,delete t.eventSource)},abort:function(t,e){r.ajaxAbort(t,e)}}}(window.jQuery,window),function(t,e,i){var n,a,o=t.signalR,r=t.signalR.events,s=t.signalR.changeState,A=o.transports._logic,l=function(){var t=e.document.createElement("iframe");return t.setAttribute("style","position:absolute;top:0;left:0;width:0;height:0;visibility:hidden;"),t},d=(n=null,a=0,{prevent:function(){o._.ieVersion<=8&&(0===a&&(n=e.setInterval((function(){var t=l();e.document.body.appendChild(t),e.document.body.removeChild(t),t=null}),1e3)),a++)},cancel:function(){1===a&&e.clearInterval(n),a>0&&a--}});o.transports.foreverFrame={name:"foreverFrame",supportsKeepAlive:function(){return!0},iframeClearThreshold:50,start:function(t,i,n){if(t.accessToken)n&&(t.log("Forever Frame does not support connections that require a Bearer token to connect, such as the Azure SignalR Service."),n());else{var a,o=this,r=A.foreverFrame.count+=1,s=l(),c=function(){t.log("Forever frame iframe finished loading and is no longer receiving messages."),n&&n()||o.reconnect(t)};e.EventSource?n&&(t.log("Forever Frame is not supported by SignalR on browsers with SSE support."),n()):(s.setAttribute("data-signalr-connection-id",t.id),d.prevent(),a=A.getUrl(t,this.name),a+="&frameId="+r,e.document.documentElement.appendChild(s),t.log("Binding to iframe's load event."),s.addEventListener?s.addEventListener("load",c,!1):s.attachEvent&&s.attachEvent("onload",c),s.src=a,A.foreverFrame.connections[r]=t,t.frame=s,t.frameId=r,i&&(t.onSuccess=function(){t.log("Iframe transport started."),i()}))}},reconnect:function(t){var i=this;A.isConnectedOrReconnecting(t)&&A.verifyLastActive(t)&&e.setTimeout((function(){if(A.verifyLastActive(t)&&t.frame&&A.ensureReconnectingState(t)){var e=t.frame,n=A.getUrl(t,i.name,!0)+"&frameId="+t.frameId;t.log("Updating iframe src to '"+n+"'."),e.src=n}}),t.reconnectDelay)},lostConnection:function(t){this.reconnect(t)},send:function(t,e){A.ajaxSend(t,e)},receive:function(e,i){var n,a,r;if(e.json!==e._originalJson&&(i=e._originalJson.stringify(i)),r=e._parseResponse(i),A.processMessages(e,r,e.onSuccess),e.state===t.signalR.connectionState.connected&&(e.frameMessageCount=(e.frameMessageCount||0)+1,e.frameMessageCount>o.transports.foreverFrame.iframeClearThreshold&&(e.frameMessageCount=0,(n=e.frame.contentWindow||e.frame.contentDocument)&&n.document&&n.document.body)))for(a=n.document.body;a.firstChild;)a.removeChild(a.firstChild)},stop:function(t){var i=null;if(d.cancel(),t.frame){if(t.frame.stop)t.frame.stop();else try{(i=t.frame.contentWindow||t.frame.contentDocument).document&&i.document.execCommand&&i.document.execCommand("Stop")}catch(e){t.log("Error occurred when stopping foreverFrame transport. Message = "+e.message+".")}t.frame.parentNode===e.document.documentElement&&e.document.documentElement.removeChild(t.frame),delete A.foreverFrame.connections[t.frameId],t.frame=null,t.frameId=null,delete t.frame,delete t.frameId,delete t.onSuccess,delete t.frameMessageCount,t.log("Stopping forever frame.")}},abort:function(t,e){A.ajaxAbort(t,e)},getConnection:function(t){return A.foreverFrame.connections[t]},started:function(e){!0===s(e,o.connectionState.reconnecting,o.connectionState.connected)&&t(e).triggerHandler(r.onReconnect)}}}(window.jQuery,window),function(t,e,i){var n=t.signalR,a=t.signalR.events,o=t.signalR.changeState,r=t.signalR.isDisconnecting,s=n.transports._logic;n.transports.longPolling={name:"longPolling",supportsKeepAlive:function(){return!1},reconnectDelay:3e3,start:function(i,A,l){var d=this,c=function(){c=t.noop,i.log("LongPolling connected."),A?A():i.log("WARNING! The client received an init message after reconnecting.")},u=function(t){return!!l(t)&&(i.log("LongPolling failed to connect."),!0)},h=i._,p=0,g=function(i){e.clearTimeout(h.reconnectTimeoutId),h.reconnectTimeoutId=null,!0===o(i,n.connectionState.reconnecting,n.connectionState.connected)&&(i.log("Raising the reconnect event"),t(i).triggerHandler(a.onReconnect))};i.pollXhr&&(i.log("Polling xhr requests already exists, aborting."),i.stop()),i.messageId=null,h.reconnectTimeoutId=null,h.pollTimeoutId=e.setTimeout((function(){!function o(A,l){var f=!(null===A.messageId),m=!l,v=s.getUrl(A,d.name,f,m,!0),y={};A.messageId&&(y.messageId=A.messageId),A.groupsToken&&(y.groupsToken=A.groupsToken),!0!==r(A)&&(i.log("Opening long polling request to '"+v+"'."),A.pollXhr=s.ajax(i,{xhrFields:{onprogress:function(){s.markLastMessage(i)}},url:v,type:"POST",contentType:n._.defaultContentType,data:y,timeout:i._.pollTimeout,headers:i.accessToken?{Authorization:"Bearer "+i.accessToken}:{},success:function(n){var a,l,d,f=0;i.log("Long poll complete."),p=0;try{a=i._parseResponse(n)}catch(t){return void s.handleParseFailure(A,n,t,u,A.pollXhr)}null!==h.reconnectTimeoutId&&g(A),a&&(l=s.maximizePersistentResponse(a)),s.processMessages(A,a,c),l&&"number"===t.type(l.LongPollDelay)&&(f=l.LongPollDelay),!0!==r(A)&&((d=l&&l.ShouldReconnect)&&!s.ensureReconnectingState(A)||(f>0?h.pollTimeoutId=e.setTimeout((function(){o(A,d)}),f):o(A,d)))},error:function(r,l){var c=n._.transportError(n.resources.longPollFailed,i.transport,r,A.pollXhr);if(e.clearTimeout(h.reconnectTimeoutId),h.reconnectTimeoutId=null,"abort"!==l){if(!u(c)){if(p++,i.state!==n.connectionState.reconnecting&&(i.log("An error occurred using longPolling. Status = "+l+".  Response = "+r.responseText+"."),t(A).triggerHandler(a.onError,[c])),(i.state===n.connectionState.connected||i.state===n.connectionState.reconnecting)&&!s.verifyLastActive(i))return;if(!s.ensureReconnectingState(A))return;h.pollTimeoutId=e.setTimeout((function(){o(A,!0)}),d.reconnectDelay)}}else i.log("Aborted xhr request.")}}),f&&!0===l&&(h.reconnectTimeoutId=e.setTimeout((function(){g(A)}),Math.min(1e3*(Math.pow(2,p)-1),36e5))))}(i)}),250)},lostConnection:function(t){t.pollXhr&&t.pollXhr.abort("lostConnection")},send:function(t,e){s.ajaxSend(t,e)},stop:function(t){e.clearTimeout(t._.pollTimeoutId),e.clearTimeout(t._.reconnectTimeoutId),delete t._.pollTimeoutId,delete t._.reconnectTimeoutId,t.pollXhr&&(t.pollXhr.abort(),t.pollXhr=null,delete t.pollXhr)},abort:function(t,e){s.ajaxAbort(t,e)}}}(window.jQuery,window),function(t,e,i){var n=0,a=t.signalR;function o(t){return t+".hubProxy"}function r(e){return t.isFunction(e)||"undefined"===t.type(e)?null:e}function s(t){for(var e in t)if(t.hasOwnProperty(e))return!0;return!1}function A(t,e){var i,n=t._.invocationCallbacks;for(var a in s(n)&&t.log("Clearing hub invocation callbacks with error: "+e+"."),t._.invocationCallbackId=0,delete t._.invocationCallbacks,t._.invocationCallbacks={},n)(i=n[a]).method.call(i.scope,{E:e})}function l(e){return t.isFunction(e)&&e.toString().slice(0,256).indexOf("// Call the client hub method")>=0}function d(t,e){return new d.fn.init(t,e)}function c(e,i){var n={qs:null,logging:!1,useDefaultPath:!0};return t.extend(n,i),e&&!n.useDefaultPath||(e=(e||"")+"/signalr"),new c.fn.init(e,n)}d.fn=d.prototype={init:function(t,e){this.state={},this.connection=t,this.hubName=e,this._={callbackMap:{}}},constructor:d,hasSubscriptions:function(){return s(this._.callbackMap)},on:function(e,i,a){var r=this,s=r._.callbackMap,A=!a&&l(i);(a=a||i)._signalRGuid||(a._signalRGuid=n++);var d,c=s[e=e.toLowerCase()];c||(c=[],s[e]=c);for(var u=0;u<c.length;u++)(c[u].guid===a._signalRGuid||A&&c[u].isFromOldGeneratedHubProxy)&&(d=c[u]);d||(d={guid:a._signalRGuid,eventHandlers:[],isFromOldGeneratedHubProxy:A},s[e].push(d));var h=function(t,e){i.apply(r,e)};return d.eventHandlers.push(h),t(r).bind(o(e),h),r},off:function(e,i,n){var a,r=this,s=r._.callbackMap,A=!n&&l(i);if(n=n||i,a=s[e=e.toLowerCase()])if(i){for(var d,c=0;c<a.length;c++)(a[c].guid===n._signalRGuid||A&&a[c].isFromOldGeneratedHubProxy)&&(d=a[c]);if(d){for(var u=0;u<d.eventHandlers.length;u++)t(r).unbind(o(e),d.eventHandlers[u]);a.splice(c,1),0===a.length&&delete s[e]}}else i||(t(r).unbind(o(e)),delete s[e]);return r},invoke:function(e){var i=this,n=i.connection,o=function(t,e,i){var n,a=t.length,o=[];for(n=0;n<a;n+=1)t.hasOwnProperty(n)&&(o[n]=e.call(i,t[n],n,t));return o}(t.makeArray(arguments).slice(1),r),s={H:i.hubName,M:e,A:o,I:n._.invocationCallbackId},A=t.Deferred();return n._.invocationCallbacks[n._.invocationCallbackId.toString()]={scope:i,method:function(o){var r,s,l=i._maximizeHubResponse(o);t.extend(i.state,l.State),l.Progress?A.notifyWith?A.notifyWith(i,[l.Progress.Data]):n._.progressjQueryVersionLogged||(n.log("A hub method invocation progress update was received but the version of jQuery in use ("+t.prototype.jquery+") does not support progress updates. Upgrade to jQuery 1.7+ to receive progress notifications."),n._.progressjQueryVersionLogged=!0):l.Error?(l.StackTrace&&n.log(l.Error+"\n"+l.StackTrace+"."),r=l.IsHubException?"HubException":"Exception",(s=a._.error(l.Error,r)).data=l.ErrorData,n.log(i.hubName+"."+e+" failed to execute. Error: "+s.message),A.rejectWith(i,[s])):(n.log("Invoked "+i.hubName+"."+e),A.resolveWith(i,[l.Result]))}},n._.invocationCallbackId+=1,t.isEmptyObject(i.state)||(s.S=i.state),n.log("Invoking "+i.hubName+"."+e),n.send(s),A.promise()},_maximizeHubResponse:function(t){return{State:t.S,Result:t.R,Progress:t.P?{Id:t.P.I,Data:t.P.D}:null,Id:t.I,IsHubException:t.H,Error:t.E,StackTrace:t.T,ErrorData:t.D}}},d.fn.init.prototype=d.fn,c.fn=c.prototype=t.connection(),c.fn.init=function(e,i){var n={qs:null,logging:!1,useDefaultPath:!0},a=this;t.extend(n,i),t.signalR.fn.init.call(a,e,n.qs,n.logging),a.proxies={},a._.invocationCallbackId=0,a._.invocationCallbacks={},a.received((function(e){var i,n,r,s,A,l;e&&(void 0!==e.P?(r=e.P.I.toString(),(s=a._.invocationCallbacks[r])&&s.method.call(s.scope,e)):void 0!==e.I?(r=e.I.toString(),(s=a._.invocationCallbacks[r])&&(a._.invocationCallbacks[r]=null,delete a._.invocationCallbacks[r],s.method.call(s.scope,e))):(i=this._maximizeClientHubInvocation(e),a.log("Triggering client hub event '"+i.Method+"' on hub '"+i.Hub+"'."),A=i.Hub.toLowerCase(),l=i.Method.toLowerCase(),n=this.proxies[A],t.extend(n.state,i.State),t(n).triggerHandler(o(l),[i.Args])))})),a.error((function(t,e){var i,n;e&&(i=e.I,(n=a._.invocationCallbacks[i])&&(a._.invocationCallbacks[i]=null,delete a._.invocationCallbacks[i],n.method.call(n.scope,{E:t})))})),a.reconnecting((function(){a.transport&&"webSockets"===a.transport.name&&A(a,"Connection started reconnecting before invocation result was received.")})),a.disconnected((function(){A(a,"Connection was disconnected before invocation result was received.")}))},c.fn._maximizeClientHubInvocation=function(t){return{Hub:t.H,Method:t.M,Args:t.A,State:t.S}},c.fn._registerSubscribedHubs=function(){var e=this;e._subscribedToHubs||(e._subscribedToHubs=!0,e.starting((function(){var i=[];t.each(e.proxies,(function(t){this.hasSubscriptions()&&(i.push({name:t}),e.log("Client subscribed to hub '"+t+"'."))})),0===i.length&&e.log("No hubs have been subscribed to.  The client will not receive data from hubs.  To fix, declare at least one client side function prior to connection start for each hub you wish to subscribe to."),e.data=e.json.stringify(i)})))},c.fn.createHubProxy=function(t){t=t.toLowerCase();var e=this.proxies[t];return e||(e=d(this,t),this.proxies[t]=e),this._registerSubscribedHubs(),e},c.fn.init.prototype=c.fn,t.hubConnection=c}(window.jQuery,window),window.jQuery.signalR.version="2.4.3",define("signalr",(function(){})),define("lq/asyncSubcriptions",["underscore","lq","when","signalr","signalr.hubs"],(function(t,e,i,n){"use strict";var a=null,o={},r=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)},s=function(e,i,n,a){return e().then((function(r){o[r]||(o[r]={subscribers:[]}),!!t.findWhere(o[r].subscribers,{actionInstanceId:i,receiverIdentifier:n})||o[r].subscribers.push({actionInstanceId:i,receiverIdentifier:n,callback:a,register:e})}))},A=function(e,i){t.each(o[e].subscribers,(function(t){t.callback.apply(null,i)}))},l=function(s){var l=i.defer();if($.connection)require(["signalr.hubs"],(function(){$.connection.hub.state==$.connection.connectionState.connected?s().then((function(){l.resolve()})):($.connection.asyncHub.client.receiveResults=function(t){A(t.groupName,["receiveResults",t.results])},$.connection.asyncHub.client.deleteResult=function(t){A(t.groupName,["deleteResult",t.id])},$.connection.asyncHub.client.receiveEvent=function(t){A(t.groupName,["receiveEvent",t.eventName,t.argument])},$.connection.hub.disconnected((function(){var e=r(200,2e3);setTimeout((function(){$.connection.hub.start().then((function(){t.each(t.keys(o),(function(e){t.each(o[e].subscribers,(function(t){t.register()}))}))}))}),e)})),$.connection.hub.logging=!0,$.connection.hub.start().then((function(){return s()})).then((function(){l.resolve()})))}));else{(a=(new n.HubConnectionBuilder).withUrl("/RuntimeHub").build()).on("ReceiveResults",(function(t){var e={outputs:t.results.outputs,results:t.results.results,totalResults:t.results.totalResults};A(t.groupName,["receiveResults",e])})),a.on("DeleteResult",(function(t){A(t.groupName,["deleteResult",t.id])})),a.on("ReceiveEvent",(function(t){A(t.groupName,["receiveEvent",t.eventName,t.argument])})),a.connection.onclose((function(){var e=r(200,2e3);setTimeout((function(){a.start().then((function(){t.each(t.keys(o),(function(e){t.each(o[e].subscribers,(function(t){t.register()}))}))}))}),e)}));a.start().then((function(){try{a.invoke("OnConnected",e.getTenantName()+"/"+e.getTenantApplicationName()).then((function(){s().then((function(){l.resolve()}))}))}catch(t){console.error(t)}}))}return l.promise};return{addDatasourceSubscription:function(t,i,n,o){n=t.parameters.replace(n);var r=function(){return $.connection?$.connection.asyncHub.server.addDatasourceListener(e.getTenantName(),e.getTenantApplicationName(),t.actionId,i,n):a.invoke("AddDatasourceListener",e.getTenantName(),e.getTenantApplicationName(),t.actionId,i,n)};return l((function(){return s(r,t.actionInstanceId,i,o)}))},addEventSubscription:function(t,i,n,o){n=t.parameters.replace(n);var r=function(){return $.connection?$.connection.asyncHub.server.addEventListener(e.getTenantName(),e.getTenantApplicationName(),t.actionId,i,n):a.invoke("AddEventListener",e.getTenantName(),e.getTenantApplicationName(),t.actionId,i,n)};return l((function(){return s(r,t.actionInstanceId,i,o)}))},unsubscribeActionInstance:function(e){t.each(t.keys(o),(function(i){o[i].subscribers=t.filter(o[i].subscribers,(function(t){return t.actionInstanceId!==e}))}));var i,n=t.filter(t.keys(o),(function(t){return 0===o[t].subscribers.length}));n.length>0&&(i=n,$.connection?$.connection.asyncHub.server.unsubscribe(i):a.invoke("Unsubscribe",i)).then((function(){t.each(n,(function(t){delete o[t]}))}))}}})),define("lq/typesProvider",["underscore"],(function(t){"use strict";var e=function(e){this.types=t.reduce(e,(function(t,e){var i=e.typeName;i||(i=Object.getPrototypeOf(e.prototype).constructor.typeName);if(!i)throw new Error("Type does not have a name.");if(t[i])throw new Error("More than 1 type found with name "+i+".");return t[i]=e,t}),{})};return e.prototype.get=function(t){var e=this.types[t];if(!e)throw new Error("Type "+t+" was not found.");return e},e})),define("lq/services/action/pasteCommand",["jquery","underscore"],(function(t,e){"use strict";var i="filePasted",n="textPasted";function a(t,e){this.data=t,this.rootDrop=e,this.onPaste=this.handlePaste.bind(this)}return a.typeName="PasteCommand",a.prototype.initialize=function(){this.shouldListenForPaste()&&this.addEventHandlers()},a.prototype.shouldListenForPaste=function(){return this.shouldListenFor(i)||this.shouldListenFor(n)},a.prototype.shouldListenFor=function(t){return this.data.eventing&&this.data.eventing[t]&&this.data.eventing[t].enabled},a.prototype.addEventHandlers=function(){document.addEventListener("paste",this.onPaste)},a.prototype.handlePaste=function(t){if(this.rootDrop.piping){var a=(t.clipboardData||t.originalEvent.clipboardData).items,o=e.find(a,(function(t){return"file"===t.kind}));if(o)this.shouldListenFor(i)&&this.rootDrop.piping.eventing.publish(this.data.eventing[i].raisedEventName,null,o.getAsFile(),null,s.eventActionId);else if(this.shouldListenFor(n)){var r=e.find(a,(function(t){return"string"===t.kind}));if(r){var s=this;r.getAsString((function(t){s.rootDrop.piping.eventing.publish(s.data.eventing[n].raisedEventName,null,t,null,s.eventActionId)}))}}}},a.prototype.dispose=function(){document.removeEventListener("paste",this.onPaste),this.rootDrop=void 0},a})),define("lq/services/action/addToHomeScreenCommand",["lq/responsive"],(function(t){"use strict";function e(t,e){this.data=t,this.rootDrop=e}return e.typeName="AddToHomeScreenCommand",e.deferredPrompt=null,e.prototype.initialize=function(){if(t.isPWA()){var i=this,n="alreadyAdded";setTimeout((function(){i.rootDrop.piping.eventing&&i.data.eventing[n]&&i.data.eventing[n].enabled&&i.rootDrop.piping.eventing.publish(i.data.eventing[n].raisedEventName,null,null,null,i.eventActionId)}))}else e.deferredPrompt=this.rootDrop.piping.deferredPrompt},e.prototype.dispose=function(){this.rootDrop=void 0},e})),define("lq/services/action/actionServiceFactory",["lq/typesProvider","./pasteCommand","./addToHomeScreenCommand"],(function(t){"use strict";var e=new t(Array.prototype.slice.call(arguments,1));return{createService:function(t,i){return new(e.get(t.serviceType))(t.data,i)}}})),define("lq/cookie",[],(function(){var t=function(t,e,i){var n=new Date;n.setDate(n.getDate()+(i||7300)),document.cookie=t+"="+e+";path=/;expires="+n.toUTCString()};return{get:function(t){for(var e=t+"=",i=document.cookie.split(";"),n=0;n<i.length;n++){for(var a=i[n];" "===a.charAt(0);)a=a.substring(1);if(0===a.indexOf(e))return a.substring(e.length,a.length)}return null},set:t,remove:function(e){t(e,"",-1)}}})),define("lq/style",["jquery","underscore","lq","lq/util","lq/cookie"],(function(t,e,i,n,a){"use strict";var o=["Arial,Arial,Helvetica,sans-serif","Arial Black,Arial Black,Gadget,sans-serif","Comic Sans MS,Comic Sans MS,cursive","Courier New,Courier New,Courier,monospace","Georgia,Georgia,serif","Impact,Charcoal,sans-serif","Lucida Console,Monaco,monospace","Lucida Sans Unicode,Lucida Grande,sans-serif","Palatino Linotype,Book Antiqua,Palatino,serif","Tahoma,Geneva,sans-serif","Times New Roman,Times,serif","Trebuchet MS,Helvetica,sans-serif","Verdana,Geneva,sans-serif","Gill Sans MT,Gill Sans,Geneva,sans-serif","TheSans Light Plain, sans-serif","TheSans Light Italic, sans-serif","TheSans Plain, sans-serif","TheSans Italic, sans-serif","TheSans Bold Plain, sans-serif","TheSans Bold Italic, sans-serif","Abril Fatface, cursive","Asap Bold, sans-serif","Asap Regular, sans-serif","Audi Type Extended Bold","Audi Type Extended Normal","Audi Type Screen Bold","Audi Type Screen Normal","Audi Type Screen Light","Autour One, cursive","Avenir Black, sans-serif","Avenir Book, sans-serif","Avenir Heavy, sans-serif","Avenir Light, sans-serif","Avenir Medium, sans-serif","Avenir Roman, sans-serif","Average Sans, sans-serif","Bad Script, cursive","Bellerose, sans-serif","BNPP Sans, sans-serif","BNPP Sans Light, sans-serif","BNPP Sans Condensed, sans-serif","BNPP Rounded, sans-serif","Cabin Bold, sans-serif","Cabin Bold Italic, sans-serif","Cabin Italic, sans-serif","Cabin Medium, sans-serif","Cabin Medium Italic, sans-serif","Cabin Regular, sans-serif","Cabin SemiBold, sans-serif","Cabin SemiBold Italic, sans-serif","Cambo, serif","CantoraOne, sans-serif","Carrois Gothic SC, sans-serif","Chela One, cursive","Chewy, cursive","Combo, cursive","Days One, sans-serif","Didact Gothic, sans-serif","Droid Sans Normal, sans-serif","Droid Sans Bold, sans-serif","Fascinate, cursive","Faster One, cursive",'"HelveticaNeueLT Std Extended", sans-serif','"HelveticaNeueLT Std Ext", sans-serif','"HelveticaNeueLT Std Lt Ext", sans-serif',"Hind Bold, sans-serif","Hind Light, sans-serif","Hind Regular, sans-serif","Hind Semibold, sans-serif","FontAwesome, cursive","Gravity Bold, sans-serif","Gravity Light, sans-serif","Iceland, cursive","Kavoon, cursive","Market Deco, sans-serif","Meie Script, cursive","Merriweather Sans, sans-serif","Microsoft YaHei, sans-serif","Noto Serif CJK SC Black, serif","Noto Serif CJK SC Bold, serif","Noto Serif CJK SC Extra Light, serif","Noto Serif CJK SC Light, serif","Noto Serif CJK SC Medium, serif","Noto Serif CJK SC Regular, serif","Noto Serif CJK SC Semi Bold, serif","Noto Sans CJK SC Regular, sans-serif","Noto Sans CJK SC Black, sans-serif","Noto Sans CJK SC Bold, sans-serif","Noto Sans CJK SC Demi Light, sans-serif","Noto Sans CJK SC Light, sans-serif","Noto Sans CJK SC Medium, sans-serif","Noto Sans CJK SC Thin, sans-serif","Nunito, sans-serif","Oleo Script Swash Caps, cursive","Open Sans, sans-serif","Open Sans Condensed, sans-serif","Patrick Hand SC, cursive","Paulistana Deco, sans-serif","PT Sans Bold, sans-serif","PT Sans Bold Italic, sans-serif","PT Sans Italic, sans-serif","PT Sans Regular, sans-serif","Quando, serif","Quicksand, sans-serif","Raleway Black, sans-serif","Raleway Black Italic, sans-serif","Raleway Bold, sans-serif","Raleway Bold Italic, sans-serif","Raleway Extra Bold, sans-serif","Raleway Extra Bold Italic, sans-serif","Raleway Extra Light, sans-serif","Raleway Extra Light Italic, sans-serif","Raleway Italic, sans-serif","Raleway Light, sans-serif","Raleway Light Italic, sans-serif","Raleway Medium, sans-serif","Raleway Medium Italic, sans-serif","Raleway Regular, sans-serif","Raleway Semi Bold, sans-serif","Raleway Semi Bold Italic, sans-serif","Raleway Thin, sans-serif","Raleway Thin Italic, sans-serif","Roboto Bold, sans-serif","Roboto Bold Italic, sans-serif","Roboto Italic, sans-serif","Roboto Regular, sans-serif","Roboto Slab, serif","Shojumaru, cursive","Sofadi One, cursive","Strong Glasgow, sans-serif","Swanky and Moo Moo, cursive",'"Swiss 721 Extended Bold", sans-serif','"Swiss 721 Extended Light", sans-serif','"Swiss 721 Extended Roman", sans-serif',"Titillium Web, sans-serif","Unkempt, cursive"],r=["left","center","right"],s=["normal","bold","bolder","lighter","inherit"],A=["none","capitalize","uppercase","lowercase"],l=["left","center","right"],d=["top","center","bottom"],c={enabled:!1,border:{top:!1,right:!1,bottom:!1,left:!1,style:"solid",color:"rgba(0, 0, 0, 1)",width:1},font:{size:14,fontFamily:o[0],color:"rgba(0, 0, 0, 1)",inheritColor:!1,weight:s[0],italic:!1,underline:!1},text:{align:r[0],verticalAlign:"top",lineHeight:"",textTransform:A[0]},background:{enabled:!1,color:"rgba(255, 255, 255, 1)"},padding:{left:0,right:0,top:0,bottom:0},boxShadow:{enabled:!1,x:4,y:4,blur:5,spread:0,color:"rgba(0, 0, 0, 1)"},textShadow:{enabled:!1,x:4,y:4,blur:5,color:"rgba(0, 0, 0, 1)"},textStroke:{enabled:!1,color:"rgba(0, 0, 0, 1)",size:0},opacity:100,roundedCorners:{enabled:!1,leftTopRadius:0,rightTopRadius:0,rightBottomRadius:0,leftBottomRadius:0},heading:{enabled:!1,level:1,numberingStyle:"numeric"},rotate:0,runtime:!1},u=e.has(document.createElement("div").style,"transform"),h=Math.PI/180,p=e.template("progid:DXImageTransform.Microsoft.Matrix(M11=<%= data.cos %>, M12=<%= data.sin %>, M21=<%= -data.sin %>, M22=<%= data.cos %>, SizingMethod='auto expand')",void 0,{variable:"data"}),g=function(){};g.prototype.defaultStyles=[],g.prototype.mockMode=!!a.get(i.getMockCookieName());var f=["dragTarget","dragHover","selected","active","normal"];return g.prototype.renderStyles=function(t,e,i,n,a,o){i||(i=t.$element),n||(n=t.data.styles);var r=e||"userstyle-";if(!n||this.mockMode){var s=this.getDefaultStyleIdByDropType(t);s&&i.addClass(this.getClassNameFromStyleId(r,s))}else if("string"==typeof n){var A=this.getClassNameFromStyleId(r,n);i.addClass(A),i.removeClass(f.join(" ")),a&&i.addClass(a),t.$element.addClass(A+"-required-indicator")}else this.renderCustomStyle(t,i,n,a,o)},g.prototype.renderSavedStyles=function(t,e,i,n,a){if(n||(n=t.data.styles),i||(i=t.$element),"string"==typeof n){var o=e||"userstyle-",r=this.getClassNameFromStyleId(o,n);i.addClass(r),i.removeClass(f.join(" ")),a&&i.addClass(a),t.$element.addClass(r+"-required-indicator")}else i.removeClass((function(t,e){return(e.match(/(^|\s)userstyle-\S+/g)||[]).join(" ")}))},g.prototype.getDefaultStyleIdByDropType=function(t){var e=t.data.type.substring(0,1).toLowerCase()+t.data.type.substring(1);return t.data.role&&this.defaultStyles[e+"_"+t.data.role]||this.defaultStyles[e]},g.prototype.renderStyle=function(t,e,i){i||(i=e.$element),this.renderCss(t,e,i)},g.prototype.getClassNameFromStyleId=function(t,e){var i=e;return e.indexOf("/")>-1&&(i=e.split("/")[1]),t+i},g.prototype.renderCustomStyle=function(e,i,a,o,r){if(a instanceof Array)var s=n.convertListOfKeyValuesToObject(a);else s=a;var A=s[o||"normal"];A&&A.enabled&&this.renderCss(A,e,i),o&&(i.removeClass(f.join(" ")),i.addClass(o)),i.off(".licquid-style-hover");var l=this,d=s[r||"hover"];d&&d.enabled&&i.on("mouseenter.licquid-style-hover",(function(){l.renderCss(d,e,t(this))})).on("mouseleave.licquid-style-hover",(function(){"selected"===o&&s.selected&&s.selected.enabled?l.renderCss(s.selected,e,t(this)):l.renderCss(A,e,t(this))}))},g.prototype.removeStyleClass=function(t,e,i){if("string"==typeof t.data.styles){i||(i=t.$element);var n=e||"userstyle-",a=this.getClassNameFromStyleId(n,t.data.styles);i.removeClass(a)}},g.prototype.renderCss=function(e,i,n){e=t.extend(!0,{},c,i.defaultStyleSettings,e),g.prototype.resetCss(i,n),n.css({borderStyle:e.border.style,borderColor:e.border.color,borderTopWidth:e.border.top?e.border.width+"px":0,borderBottomWidth:e.border.bottom?e.border.width+"px":0,borderRightWidth:e.border.right?e.border.width+"px":0,borderLeftWidth:e.border.left?e.border.width+"px":0,fontSize:e.font.size+"px",fontFamily:e.font.fontFamily,fontWeight:e.font.weight,color:e.font.inheritColor?"inherit":e.font.color,fontStyle:e.font.italic?"italic":"",textDecoration:e.font.underline?"underline":"",textAlign:e.text.align,textTransform:e.text.transform,lineHeight:e.text.lineHeight?e.text.lineHeight+"px":"normal",background:e.background.enabled?e.background.color:"transparent",outline:"none",paddingLeft:e.padding.left+"px",paddingRight:e.padding.right+"px",paddingTop:e.padding.top+"px",paddingBottom:e.padding.bottom+"px",boxShadow:e.boxShadow.enabled?e.boxShadow.x+"px "+e.boxShadow.y+"px "+e.boxShadow.blur+"px "+e.boxShadow.spread+"px "+e.boxShadow.color:null,textShadow:(e.textShadow.enabled?e.textShadow.x+"px "+e.textShadow.y+"px "+e.textShadow.blur+"px "+e.textShadow.color:"")+(e.textStroke.enabled?(e.textShadow.enabled?", ":"")+e.textStroke.color+" "+e.textStroke.size+"px "+e.textStroke.size+"px, "+e.textStroke.color+" "+-e.textStroke.size+"px "+-e.textStroke.size+"px, "+e.textStroke.color+" "+-e.textStroke.size+"px "+e.textStroke.size+"px, "+e.textStroke.color+" "+e.textStroke.size+"px "+-e.textStroke.size+"px ":""),transform:e.rotate?"rotate("+e.rotate+"deg)":"",borderTopLeftRadius:e.roundedCorners.enabled?e.roundedCorners.leftTopRadius+"px":null,borderTopRightRadius:e.roundedCorners.enabled?e.roundedCorners.rightTopRadius+"px":null,borderBottomLeftRadius:e.roundedCorners.enabled?e.roundedCorners.leftBottomRadius+"px":null,borderBottomRightRadius:e.roundedCorners.enabled?e.roundedCorners.rightBottomRadius+"px":null});var a=this.getDropTextContent(n);if("column"===a.css("flex-direction")?a.css({justifyContent:this.convertAlignmentValue(e.text.verticalAlign),alignItems:this.convertAlignmentValue(e.text.align)}):a.css({justifyContent:this.convertAlignmentValue(e.text.align),alignItems:this.convertAlignmentValue(e.text.verticalAlign)}),e.rotate&&!window.MSInputMethodContext&&document.documentMode&&!u){var o=e.rotate*h;n.css({"-ms-transform":"",filter:p({sin:Math.sin(o),cos:Math.cos(o)})})}100!==e.opacity&&n.css({opacity:(e.opacity||100)/100})},g.prototype.getDropTextContent=function(t){return t.hasClass("drop-text-container")?t.find(".drop-text-content"):t.children().addBack().filter(".drop-text-content")},g.prototype.convertAlignmentValue=function(t){switch(t){case"top":case"left":return"start";case"middle":case"center":return"center";case"bottom":case"right":return"end";default:return t}},g.prototype.resetCss=function(t,e){e.css({borderStyle:"",borderColor:"",borderTopWidth:"",borderBottomWidth:"",borderRightWidth:"",borderLeftWidth:"",fontSize:"",fontFamily:"",fontWeight:"",color:"",fontStyle:"",textDecoration:"",textAlign:"",textTransform:"",lineHeight:"",background:"",paddingLeft:"",paddingRight:"",paddingTop:"",paddingBottom:"",boxShadow:"",textShadow:"",opacity:"",transform:"",filter:"",borderTopLeftRadius:"",borderTopRightRadius:"",borderBottomLeftRadius:"",borderBottomRightRadius:""}),e.children(".drop-text-content").css({verticalAlign:""})},g.prototype.supportedFontFamilies=o,g.prototype.getSupportedFontFamilies=function(){return e.sortBy(this.supportedFontFamilies,(function(t){return t.replace('"',"")})).slice(0)},g.prototype.getSupportedTextTransforms=function(){return A.slice(0)},g.prototype.getSupportedTextAligns=function(){return r.slice(0)},g.prototype.getSupportedFontWeights=function(){return s.slice(0)},g.prototype.getSupportedHorizontalPositions=function(){return l.slice(0)},g.prototype.getSupportedVerticalPositions=function(){return d.slice(0)},g.prototype.getDefaults=function(){return t.extend(!0,{},c)},g.prototype.bestFontSize=function(t,e){var i=0,n=500;for(e.css("line-height","normal");i<n-1;){var a=Math.floor((i+n)/2);e.css("font-size",a),t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth?n=a:i=a}e.css("font-size",i)},g.prototype.applyCustomTextAlignment=function(t,e){var i=this.getDropTextContent(e);t.data.textAlignHorizontal&&("column"===i.css("flex-direction")?i.css({alignItems:this.convertAlignmentValue(t.data.textAlignHorizontal)}):i.css({justifyContent:this.convertAlignmentValue(t.data.textAlignHorizontal)})),t.data.textAlignVertical&&("column"===i.css("flex-direction")?i.css({justifyContent:this.convertAlignmentValue(t.data.textAlignVertical)}):i.css({alignItems:this.convertAlignmentValue(t.data.textAlignVertical)}))},new g})),define("drops/action/action",["jquery","underscore","lq/drop","lq/responsive","lq/asyncSubcriptions","lq/services/action/actionServiceFactory","lq/style"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{type:"Action",masterPageId:null,contentRegionActionId:null,embeddable:!1,appliedLayouts:[]}},A=function(e){8!==e.which||t(e.target).is("input, textarea, div[contenteditable=true]")||e.preventDefault()},l=0;function d(e,n){i.call(this,t('<div class="licquid-drops-pool" style="overflow:hidden;"></div>'),s,e),this.instanceId=d.nextInstanceId(),this.data.makeItGrow||this.$element.html("&nbsp;"),this.insideAnIFrame=window.top.location!==window.location,this.options=n,this.rootDrop=this,this.data.useScroll&&this.$element.css("overflow","visible"),this.$masterPage=t('<div class="licquid-drops-pool-master-page" />'),this.$pageAnchored=t('<div class="licquid-drops-pool-page-anchored" />'),this.options.disableBackspaceNavigation&&this.subscribeEventHandler(t(document),"keydown",A),this.addSwipeEvents()}i.extend(d,i),d.nextInstanceId=function(){return l++};var c=null,u=null,h=null,p=null;return d.prototype.addSwipeEvents=function(){(this.isEventEnabled("swipeLeft")||this.isEventEnabled("swipeRight"))&&(document.addEventListener("touchstart",this.handleTouchStart.bind(this),!1),document.addEventListener("touchmove",this.handleTouchMove.bind(this),!1))},d.prototype.getTouches=function(t){return t.touches||t.originalEvent.touches},d.prototype.handleTouchStart=function(t){var e=this.getTouches(t)[0];c=e.clientX,u=e.clientY},d.prototype.handleTouchMove=function(t){if(c&&u&&this.piping){var e=this.getTouches(t)[0];h=e.clientX,p=e.clientY;var i=c-h,n=u-p;Math.abs(i)>Math.abs(n)&&c>20&&(i>0?this.triggerEventIfEnabled("swipeLeft"):this.triggerEventIfEnabled("swipeRight"))}},d.prototype.scrollEventHandler=function(){this.data.verScrollGt&&(this.verScrollLimitGt?this.data.verScrollGt>=this.piping.$actionWrapper[0].scrollTop&&(this.verScrollLimitGt=!1):this.data.verScrollGt<this.piping.$actionWrapper[0].scrollTop&&(this.triggerEventIfEnabled("verticalScrollGreaterThan"),this.verScrollLimitGt=!0)),this.data.horScrollGt&&(this.horScrollLimitGt?this.data.horScrollGt>=this.piping.$actionWrapper[0].scrollLeft&&(this.horScrollLimitGt=!1):this.data.horScrollGt<this.piping.$actionWrapper[0].scrollLeft&&(this.triggerEventIfEnabled("horizontalScrollGreaterThan"),this.horScrollLimitGt=!0)),this.data.verScrollLt&&(this.verScrollLimitLt?this.data.verScrollLt<=this.piping.$actionWrapper[0].scrollTop&&(this.verScrollLimitLt=!1):this.data.verScrollLt>this.piping.$actionWrapper[0].scrollTop&&(this.triggerEventIfEnabled("verticalScrollSmallerThan"),this.verScrollLimitLt=!0)),this.data.horScrollLt&&(this.horScrollLimitLt?this.data.horScrollLt<=this.piping.$actionWrapper[0].scrollLeft&&(this.horScrollLimitLt=!1):this.data.horScrollLt>this.piping.$actionWrapper[0].scrollLeft&&(this.triggerEventIfEnabled("horizontalScrollSmallerThan"),this.horScrollLimitLt=!0))},d.prototype.unsubscribeEventHandlers=function(){this.$masterPage.remove(),this.$pageAnchored.remove(),e.forEach(this.services,(function(t){t.dispose()})),a.unsubscribeActionInstance(this.actionInstanceId)},d.prototype.applyLayout=function(t){t&&(this.piping.parameters.systems.setValue("CurrentLayoutName",t.name),n.applyLayoutRecursive(this,t)),this.layout=t,this.updateBackgroundSize(this.data)},d.prototype.runningOnHandheldDevice=function(){return!!this.layout&&("Phone"===this.layout.deviceTypeName||"Tablet"===this.layout.deviceTypeName)},d.prototype.preRender=function(){if(this.applyPosition(),this.canGrow()){if(this.piping.$actionView.addClass("relative-positioning"),!t.isNumeric(this.data.left)||!t.isNumeric(this.data.right)){var i=this.data.size.x;t.isNumeric(this.data.left)&&(i+=this.data.left),t.isNumeric(this.data.right)&&(i+=this.data.right),this.piping.$actionView.css({minWidth:i+"px"})}}else this.piping.$actionView.addClass("absolute-positioning");e.forEach(this.services,(function(t){t.initialize()})),r.renderSavedStyles(this,null,this.piping.$actionWrapper)},d.prototype.doesThisMakeMeGrow=function(t){return this.canGrow()&&this.data.growingDrop===t.data.name},d.prototype.canGrow=function(){return!!this.data.makeItGrow},d.prototype.createAndRenderDrops=function(i){this.piping.$actionView.removeClass("relative-positioning absolute-positioning").removeAttr("style"),this.resizeViewport(i),this.$masterPage.appendTo(this.piping.$actionView),this.$pageAnchored.appendTo(this.piping.$actionView),t.each(this.backgroundDrops,(function(t,e){e.renderInBackground=!0}));var n=this.childDrops.concat(this.backgroundDrops),a=this.piping.dropFactory.createDrops(n),o=this;return e.each(a,(function(t){o.addDrop(t)})),o.piping.eventing.bindEvents(),o.render(this.piping.$actionView).then((function(){return o.piping.eventing.triggerPageLoadEvent()}))},d.prototype.postRender=function(){new PointerEventsPolyfill({selector:".licquid-drops-pool"}),this.data.scrollEventEnabled&&(this.verScrollLimitGt=!1,this.horScrollLimitGt=!1,this.verScrollLimitLt=!1,this.horScrollLimitLt=!1,this.subscribeEventHandler(this.piping.$actionWrapper,"scroll",this.scrollEventHandler.bind(this)))},d.prototype.updateBackgroundSize=function(t){var e={};t=t||this.data,this.canGrow()?(e.height="100%",e.width="100%"):(null!=t.top&&null!=t.bottom?(e.top=0,e.bottom=0):t.bottom&&t.bottom<0?e.bottom=t.bottom:this.insideAnIFrame||(null!=this.options.windowMinHeight&&this.options.windowMinHeight>t.size.y?e.minHeight=this.options.windowMinHeight:e.minHeight=t.size.y,t.top?e.minHeight+=t.top:e.minHeight+=t.position.y),null!=t.right&&null!=t.left?(e.right=0,e.left=0):t.right&&t.right<0?e.right=t.right:e.minWidth=t.size.x),this.$masterPage.css(e),this.$pageAnchored.css(e)},d.prototype.resizeViewport=function(e){if(0!==e.length)if(this.runningOnHandheldDevice())e.attr("content","width="+this.data.size.x+", user-scalable=yes");else{var i,n=t(window).width(),a="device-width",o=1,r=1;if(this.options.viewportScaleForWidth&&(null!==this.data.left||null!==this.data.right||!0===this.data.centered)){var s=!0===this.data.centered?this.data.size.x:(this.data.left||this.data.position.x)+this.data.size.x+(this.data.right||0);if(!this.options.viewportScaleForHeight){a=this.layout&&this.data.size.x>this.layout.windowMinWidth?this.layout.windowMinWidth:this.data.size.x;return void e.attr("content","width="+a+", user-scalable=yes")}n<s&&(o=n/s)}if(this.options.viewportScaleForHeight&&(null!==this.data.top||null!==this.data.bottom)){var A=t(window).height(),l=this.data.size.y+(this.data.top||0)+(this.data.bottom||0);A<l&&(r=A/l),(n<768||A<=390)&&(r=1)}i=Math.min(o,r),e.attr("content","width=device-width, initial-scale="+i+", user-scalable=no"),this.insideAnIFrame||(this.layout&&null!==this.layout.windowMinWidth&&void 0!==this.layout.windowMinWidth?this.piping.$actionView.css("min-width",this.layout.windowMinWidth):this.options.windowMinWidth&&this.piping.$actionView.css("min-width",this.options.windowMinWidth),this.layout&&null!==this.layout.windowMinHeight&&void 0!==this.layout.windowMinHeight&&!this.canGrow()?this.piping.$actionView.css("min-height",this.layout.windowMinHeight):this.options.windowMinHeight&&!this.canGrow()&&this.piping.$actionView.css("min-height",this.options.windowMinHeight))}},d.prototype.setContent=function(t,i,n){if(0!==t.length){var a=e.findWhere(this.piping.dropFactory.getAllDrops(),{type:"ContentRegion"});if(!a)throw Error("No content region found");a.setContent(t,i,n)}},d.prototype.loadData=function(t){this.backgroundDrops=t.backgroundDrops,this.allLayouts=t.allLayouts,this.defaultLayout=t.defaultLayout;var i=this;this.services=e.map(t.services,(function(t){return o.createService(t,i)}))},d.prototype.isActive=function(){return!!this.piping},d})),define("lq/events/processEventActionsUrl",[],(function(){"use strict";var t=function(t){return t=t.replace(/[^a-zA-Z0-9 ]+/g,"").trim(),encodeURIComponent(t)};return{get:function(e,i,n){var a="LicquidAction/ProcessEventActions/"+e.actionId;a+="/"+t(i),n&&(a+="/"+t(n));var o={r:Math.floor(1e6*Math.random())};return e.url.prepare(a,o)}}})),define("lq/queryDispatcher",["jquery","underscore","lq/events/processEventActionsUrl"],(function(t,e,i){"use strict";var n=function(t){this.piping=t};return n.getDefaultQueryParams=function(){return{}},n.prototype.getDefaultQueryParams=function(){return n.getDefaultQueryParams()},n.prototype.getQueryRequest=function(t){var i=this;return{actionId:this.piping.actionId,globalParameters:this.piping.parameters.globals.getAll(),localParameters:this.piping.parameters.locals.getAll(),requests:e.map(t,(function(t){var e=i.getDefaultQueryParams();return"function"==typeof t.decorateDataFunc&&t.decorateDataFunc(e),{eventActionType:"ExecuteQuery",queryObjectName:t.queryName,queries:[{listeners:[],params:e}],eventActionId:0}}))}},n.prototype.dispatchBatch=function(t){var n=this.getQueryRequest(t);this.piping.dispatcher.dispatch(i.get(this.piping,"Queries"),n,(function(i){e.each(i.responses,(function(e,i){(0,t[i].handler)(e.results[0].result)}))}),null,(function(){e.each(t,(function(){t.errorHandler&&t.errorHandler()}))}))},n.prototype.dispatch=function(t,e,i,n){this.dispatchBatch([{queryName:t,handler:e,decorateDataFunc:i,errorHandler:n}])},n.prototype.backgroundDispatch=function(e,n,a,o){var r=this.getQueryRequest([{queryName:e,decorateDataFunc:a}]);this.piping.dispatcher.backgroundDispatch(i.get(this.piping,"Queries"),r,(function(t){n(t.responses[0].results[0].result)}),null,o||t.noop).catch((function(){}))},n})),define("drops/actionSlideshow/actionSlide",["jquery","underscore","lq"],(function(t,e,i){var n=function(e){this.url=this.getActionUrl(e),this.delay=e.delay,this.$element=t('<iframe frameBorder="0" />').attr("src",this.url).css({visibility:"hidden"})};return n.prototype.getActionUrl=function(t){var e=i.getTenantUrl("LicquidAction/Get/"+t.actionId);return e+="?embedded=true&parameters="+encodeURIComponent(JSON.stringify(t.parameters))},n.prototype.init=function(e){var i=t.Deferred(),n=this;return this.listenForMessage((function(t){t.source===n.$element.get(0).contentWindow&&("string"==typeof t.data&&"LicquidLoaded"===JSON.parse(t.data).eventName&&i.resolve())})),e.append(this.$element),i.promise()},n.prototype.listenForMessage=function(t){var e=window.addEventListener?"addEventListener":"attachEvent",i=window.addEventListener?"message":"onmessage";window[e](i,(function(e){t(e)}),!1)},n.prototype.show=function(){this.$element.css({visibility:"inherit"})},n.prototype.remove=function(){this.$element.remove()},n.prototype.timeout=function(){var i=t.Deferred();return e.delay((function(){i.resolve()}),1e3*this.delay),i.promise()},n.prototype.hide=function(){this.$element.fadeOut()},n})),define("drops/actionSlideshow/actionSlideshow",["jquery","underscore","lq","lq/drop","drops/actionSlideshow/actionSlide"],(function(t,e,i,n,a){var o=function(e){n.call(this,t("<div/>"),e),this.slides=[],this.$element.addClass("boxToBorderSize action-slideshow"),this.$slides=t("<div/>").addClass("action-slideshow-slides").appendTo(this.$element)};return n.extend(o,n),o.typeName="ActionSlideshow",o.prototype.onError=function(t){t.handled=!0},o.prototype.preRender=function(){this.applyPosition()},o.prototype.postRender=function(){this.performInitialLoad()},o.prototype.performInitialLoad=function(){var i=this;t.contains(document.body,this.$element[0])&&this.loadSlides().done((function(){0===i.slides.length?e.delay((function(){i.performInitialLoad()}),5e3):i.showSlide(0)})).fail((function(){e.delay((function(){i.performInitialLoad()}),5e3)}))},o.prototype.loadSlides=function(){var n=t.Deferred(),o=this;return t.ajax({url:i.getTenantUrl("ActionSlideshow/GetSlides"),type:"POST",cache:!1,data:JSON.stringify({locals:this.piping.parameters.locals.getAll(),globals:this.piping.parameters.globals.getAll(),actionId:this.piping.actionId,actionSlideshowId:this.data.id}),dataType:"json",contentType:"application/json; charset=utf-8"}).done((function(i){var r=e.map(i.slides,(function(t){return new a(t)})),s=e.map(r,(function(t){return t.init(o.$slides)}));e.delay((function(){n&&(e.each(r,(function(t){t.remove()})),n.resolve(),n=null)}),15e3),t.when.apply(t,s).done((function(){n&&(e.each(o.slides,(function(t){t.remove()})),o.slides=r,n.resolve(),n=null)}))})).fail((function(){n.reject()})),n.promise()},o.prototype.showSlide=function(t){var i=this,n=this.slides[t];n.show(),n.timeout().done((function(){var a=t+1;i.slides.length<=a?i.loadSlides().done((function(){n.hide(),0===i.slides.length?e.delay((function(){i.performInitialLoad()}),5e3):i.showSlide(0)})).fail((function(){n.hide(),i.showSlide(0)})):(n.hide(),i.showSlide(a))}))},o})),window.HtmlSanitizer=new function(){const t={A:!0,ABBR:!0,B:!0,BLOCKQUOTE:!0,BODY:!0,BR:!0,CENTER:!0,CODE:!0,DD:!0,DIV:!0,DL:!0,DT:!0,EM:!0,FONT:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,HR:!0,I:!0,IMG:!0,LABEL:!0,LI:!0,OL:!0,P:!0,PRE:!0,SMALL:!0,SOURCE:!0,SPAN:!0,STRONG:!0,SUB:!0,SUP:!0,TABLE:!0,TBODY:!0,TR:!0,TD:!0,TH:!0,THEAD:!0,UL:!0,U:!0,VIDEO:!0,CAPTION:!0},e={FORM:!0,"GOOGLE-SHEETS-HTML-ORIGIN":!0},i={border:!0,cellspacing:!0,cellpadding:!0,colspan:!0,rowspan:!0,rel:!0,scope:!0,align:!0,color:!0,controls:!0,height:!0,href:!0,id:!0,src:!0,style:!0,target:!0,title:!0,type:!0,width:!0},n={"background-color":!0,color:!0,"font-size":!0,"font-weight":!0,"text-align":!0,"text-decoration":!0,width:!0,"text-decoration-line":!0,"text-decoration-thickness":!0,"text-decoration-style":!0,"text-decoration-color":!0,"font-family":!0,"line-height":!0,"border-collapse":!0,height:!0,"border-top-color":!0,"border-right-color":!0,"border-bottom-color":!0,"border-left-color":!0,"border-top-style":!0,"border-right-style":!0,"border-bottom-style":!0,"border-left-style":!0,"margin-top":!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,border:!0,float:!0,"vertical-align":!0,"border-top-width":!0,"border-right-width":!0,"border-bottom-width":!0,"border-left-width":!0,"border-image-source":!0,"border-image-slice":!0,"border-image-width":!0,"border-image-repeat":!0,"border-image-outset":!0,"border-image-position":!0,"border-image":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,"padding-bottom":!0,"border-radius":!0,display:!0,"align-items":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-bottom-right-radius":!0,"border-bottom-left-radius":!0,"object-fit":!0,"table-layout":!0,"white-space":!0,"word-break":!0,"word-wrap":!0,"white-space-collapse":!0,"text-wrap":!0,"text-wrap-mode":!0,"overflow-wrap":!0},a=["http:","https:","data:","m-files:","file:","ftp:","mailto:","pw:"],o={href:!0,action:!0},r=new DOMParser;function s(t,e){for(let i=0;i<e.length;i++)if(0==t.indexOf(e[i]))return!0;return!1}this.SanitizeHtml=function(A,l){if(""==(A=A.trim()))return"";if("<br>"==A)return"";-1==A.indexOf("<body")&&(A="<body>"+A+"</body>");let d=r.parseFromString(A,"text/html");"BODY"!==d.body.tagName&&d.body.remove(),"function"!=typeof d.createElement&&d.createElement.remove();let c=function r(A){let c;if(A.nodeType==Node.TEXT_NODE)c=A.cloneNode(!0);else if(A.nodeType==Node.ELEMENT_NODE&&(t[A.tagName]||e[A.tagName]||l&&A.matches(l))){e[A.tagName]?(console.log(A.tagName),c=d.createElement("DIV")):c=d.createElement(A.tagName);for(let t=0;t<A.attributes.length;t++){let e=A.attributes[t];if(i[e.name])if("style"==e.name)for(let t=0;t<A.style.length;t++){let e=A.style[t];n[e]?c.style.setProperty(e,A.style.getPropertyValue(e)):console.log(`'${e}': true,`,"csswhitelist")}else{if(o[e.name]&&e.value.indexOf(":")>-1&&!s(e.value,a))continue;c.setAttribute(e.name,e.value)}else console.log(`'${e.name}': true,`,"attrWhitelist")}for(let t=0;t<A.childNodes.length;t++){let e=r(A.childNodes[t]);c.appendChild(e,!1)}if(("SPAN"==c.tagName||"B"==c.tagName||"I"==c.tagName||"U"==c.tagName)&&""==c.innerHTML.trim())return d.createDocumentFragment()}else console.log(A.tagName),c=d.createDocumentFragment();return c}(d.body);return c.innerHTML},this.AllowedTags=t,this.AllowedAttributes=i,this.AllowedCssStyles=n,this.AllowedSchemas=a},define("HtmlSanitizer",function(t){return function(){return t.HtmlSanitizer}}(this)),define("lq/html",["jquery","HtmlSanitizer"],(function(t,e){var i=t("<div />");return{escape:function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/\u00A0/g,"&#160;").replace(/>/g,"&gt;")},unescape:function(t){return String(t).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#27;/g,"'").replace(/&#160;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">")},strip:function(t){return t?i.html(t).text():t},sanitize:function(t){return t?e.SanitizeHtml(t):t}}})),define("lq/tooltip",["lq/html"],(function(t){function e(i,n,a){if(this.drop=i,this.tooltipData=n,this.$element=a,n.option===e.queryParent){var o=n.parentDatasourceOutput;i.addOnceListener("DatasourceApplied",(function(e){var i=e[o];a.attr("title",t.strip(i))}))}}return e.isEnabled=function(t){return!(!t||"Hardcoded"===t.option&&!t.hardcodedTooltip)},e.hardcoded="Hardcoded",e.parameter="Parameter",e.query="Query",e.queryParent="QueryParent",e.prototype.update=function(i){if(void 0!==i)this.$element.attr("title",t.strip(i));else if(this.tooltipData){var n=this.$element;if(this.tooltipData.option===e.hardcoded&&n.attr("title",t.strip(this.tooltipData.hardcodedTooltip)),this.tooltipData.option===e.parameter&&n.attr("title",t.strip(this.drop.piping.parameters.getValue(this.tooltipData.parameter))),this.tooltipData.option===e.query){var a=this.tooltipData.datasourceOutput;this.drop.piping.datasources.registerDatasourceListener(this.tooltipData.datasource,(function(e){var i=e.results.length&&e.results[0][a];n.attr("title",t.strip(i))}))}}},e})),define("lq/required",["jquery","underscore"],(function(t,e){"use strict";var i=function(){};return i.prototype.apply=function(t,e){t.data.required.isRequired?(this.fromQuery(t)?(t.requiredData=!!t.data.required.initialVisibility,t.piping.datasources.registerDatasourceListener(t.data.required.datasource,(function(i){!0===(i.results.length&&i.results[0][t.data.required.datasourceOutput])?(t.$element.addClass("isRequiredField"),t.requiredData=!0):(t.$element.removeClass("isRequiredField"),t.requiredData=!1),t.updateRequiredIndicator(),"function"==typeof e&&e(t.requiredData)}))):this.fromParameter(t)?this.valueFromParameterIsTrue(t)?(t.$element.addClass("isRequiredField"),t.requiredData=!0):(t.$element.removeClass("isRequiredField"),t.requiredData=!1):t.requiredData=!0,t.data.defaultValue&&setTimeout((function(){t.updateRequiredIndicator()}))):t.requiredData=!1,"function"==typeof e&&e(t.requiredData)},i.prototype.valueFromParameterIsTrue=function(e){var i=e.piping.parameters.getValue(e.data.required.parameter);return"boolean"===t.type(i)?!0===i:"string"===t.type(i)?"true"===i.toLowerCase():!!e.data.required.initialVisibility},i.prototype.addRemoveRequiredIndicator=function(t){this.fromParameter(t)||(t.data.required.isRequired&&(this.fromHardcoded(t)||t.designData||t.data.required.initialVisibility)?t.$element.addClass("isRequiredField"):t.$element.removeClass("isRequiredField"))},i.prototype.fromQuery=function(t){return"query"===t.data.required.valueSource&&t.data.required.datasource},i.prototype.fromParameter=function(t){return"parameter"===t.data.required.valueSource},i.prototype.fromHardcoded=function(t){return"hardcoded"===t.data.required.valueSource},i})),define("drops/modals",[],(function(){"use strict";var t=6e5;return{getZIndexForPopups:function(){return t+1e4},getNextZIndex:function(){return t++}}})),define("drops/autoComplete/autoComplete",["jquery","lq/drop","lq/style","lq/util","lq/constants","lq","underscore","lq/tooltip","lq/html","lq/required","drops/modals"],(function(t,e,i,n,a,o,r,s,A,l,d){"use strict";var c={data:{filterParameterName:"",keyOutputName:"Id",behaviour:"dropdown",onlyShowSelectedItem:!0,title:{option:s.hardcoded},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function u(i){e.call(this,t("<div />"),c,i),this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.typeOfCurrentValue=a.valueTypes.string,this.focused=!1,this.selectedItem=null,this.selectedId=null,this.selectedText=null,this.results=null,this.outputs=null,this.afterUpdate=null,this.hasSearch="dropdown-with-search"===this.data.behaviour,this.$element.css({whiteSpace:"pre-wrap"}),this.$list=t("<div />").addClass("auto-complete-popup").hide(),this.currentPage=0,this.fetchingPage=!1,this.lastPageReached=!0,this.blockInfiniteScroll=!0,this.totalNumberOfResults=null,this.numberOfLoadedResults=null,this.$inputWrapper=t('<div id="IPW"/>').addClass("auto-complete-input boxToBorderSize").appendTo(this.hasSearch?this.$list:this.$element),this.$inputField=t('<input autocomplete="off" />').addClass("inherit-all").attr("name",(this.data.name||"")+"_"+function(t){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<t;n++)e+=i.charAt(Math.floor(62*Math.random()));return e}(10)).appendTo(this.$inputWrapper),this.$scrollContainer=t('<div class="list-of-results" />').attr("id",this.data.id).appendTo(this.$list),this.$listTable=t("<table />").attr("id",this.data.id).appendTo(this.$scrollContainer),this.$listFooter=t('<div class="list-footer pagerText" />').appendTo(this.$list),this.tooltip=new s(this,this.data.title,this.$inputField),this.data.infiniteScroll&&(this.onScroll=this.fetchNextPageIfNeeded.bind(this),this.$scrollContainer.on("scroll",this.onScroll)),this.$img=t("<div />").toggle(this.isDropDown()).addClass("auto-complete-toggle").appendTo(this.$element),this.hasSearch?(this.$displayField=t("<div />").addClass("auto-complete-label auto-complete-label-placeholder").text(this.data.watermark).css({display:"table-cell",verticalAlign:"middle"}),this.$clearButton=t('<div class="auto-complete-clear-button"></div>').on("click",this.clearValue.bind(this)),this.$element.prepend(t("<div />").css({display:"table",height:"100%",width:"100%"}).append(this.$displayField).append(this.$clearButton).append(this.$img))):(this.$displayField=this.$inputField,this.$inputField.attr("placeholder",this.data.watermark),this.$img.appendTo(this.$element)),this.$displayField.attr("tabindex",this.data.tabIndex),this.renderStyles(),this.data.dataSource||this.designData||this.$displayField.addClass("query-error").prop("placeholder","Query error!"),this.newSearchDebounced=r.debounce(this.newSearch.bind(this),400),this.onScroll=r.debounce(this.newSearch.bind(this),400)}return e.extend(u,e),u.typeName="AutoComplete",u.prototype.fetchNextPageIfNeeded=function(){if(!(this.lastPageReached||this.fetchingPage||this.blockInfiniteScroll)&&this.$scrollContainer.scrollTop()+this.$scrollContainer.height()>=this.$scrollContainer[0].scrollHeight-30){this.currentPage++,this.fetchingPage=!0;var t=this;this.piping.queryDispatcher.dispatch(this.data.dataSource,(function(e){t.fetchingPage=!1,t.update(e,!1)}),(function(e){t.decorateQuery(e)}))}},u.prototype.isDropDown=function(){return"dropdown"===this.data.behaviour||"dropdown-with-search"===this.data.behaviour},u.prototype.clearFilterParameter=function(){this.data.filterParameterName&&this.piping.parameters.locals.setValue(this.data.filterParameterName,"")},u.prototype.renderStyles=function(){this.hasSearch?(i.renderStyles(this,null,this.$displayField),i.renderStyles(this,null,this.$inputWrapper,null,"header")):i.renderStyles(this,null,this.$inputWrapper);var t=this.data.styles,e=this.data.type;this.data.styles=this.data.gridStyleId,this.data.type="Grid",i.renderStyles(this,"gridstyle-",this.$list),i.renderStyles(this,"gridstyle-",this.$listFooter),this.data.styles=t,this.data.type=e},u.prototype.preRender=function(){this.tooltip.update(),this.piping.visibility.apply(this),this.piping.required.apply(this),l.prototype.addRemoveRequiredIndicator(this),this.$list.appendTo(this.piping.$app),this.subscribeEventHandler(this.piping.$actionWrapper,"scroll",this.closeItemList.bind(this)),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.clearFilterParameter(),this.applyPosition();var t=this;this.data.dataSource&&this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e,!0)}),(function(e){t.decorateQuery(e)})),this.initialize()},u.prototype.decorateQuery=function(t){t.doNotExecuteCountQuery=!!this.data.hideTotal,t.page=this.currentPage,t.pageSize=this.getPageSize()},u.prototype.getPageSize=function(){return this.data.pageSize||128},u.prototype.initialize=function(){var t=this,e=this.getEventDataFor("enterPressed");this.$inputField.on("click",(function(){t.hasSearch||t.$inputField.val().length&&t.openItemList()})).on("focus",(function(){t.focused=!0})).on("keydown",(function(i){40===i.which?t.nextItem():38===i.which?t.previousItem():13===i.which?e.enabled?t.itemListIsOpen()&&t.hasFocusedItem()?t.selectCurrentItem():t.triggerEvent(e.raisedEventName):t.itemListIsOpen()&&t.selectCurrentItem():9===i.which&&(null!==t.selectedId&&void 0!==t.selectedId||t.handleFocusLost(),t.itemListIsOpen()&&r.defer((function(){t.getFocusedItem().trigger("mousedown"),t.closeItemList()})))})).on("blur",(function(){t.keepFocus||(t.focused=!1),setTimeout((function(){t.focused||t.closeItemList()})),t.selectedText!==t.$inputField.val()&&t.handleFocusLost()})).on("keyup",(function(e){40!==e.which&&38!==e.which&&13!==e.which&&9!==e.which?(t.data.filterParameterName&&t.piping.parameters.locals.setValue(t.data.filterParameterName,t.$inputField.val()),t.newSearchDebounced(),t.hasSearch||(t.$inputField.val().length?t.openItemList():(t.closeItemList(),t.clearValue())),t.updateRequiredIndicator()):e.preventDefault()}));var i=function(){t.itemListIsOpen()?t.closeItemList():null===t.numberOfLoadedResults?t.selectedItem&&t.data.onlyShowSelectedItem?(t.update({results:[t.selectedItem],outputs:t.outputs,totalNumberOfResults:1},!0),t.openItemList()):t.piping.queryDispatcher.dispatch(t.data.dataSource,(function(e){t.update(e,!0),t.openItemList()}),(function(e){t.currentPage=0,t.decorateQuery(e)})):t.openItemList()};this.$img.on("mousedown",i).on("focus",(function(){t.focused=!0})).on("blur",(function(){t.focused=!1})),this.hasSearch&&(this.$displayField.on("mousedown",i).on("focus",i).on("focus",(function(){t.$displayField.attr("tabindex",-1),t.$inputField.attr("tabindex",t.data.tabIndex)})),this.$inputField.on("blur",(function(){t.$inputField.attr("tabindex",-1),t.$displayField.attr("tabindex",t.data.tabIndex),t.closeItemList()}))),this.$list.on("focus",(function(){t.focused=!0})).on("blur",(function(){t.focused=!1,setTimeout((function(){t.focused||(t.closeItemList(),t.selectedText!==t.$inputField.val()&&t.clearValue())}))})).on("mousedown",(function(){t.keepFocus=!0}))},u.prototype.handleFocusLost=function(){"dropdown"===this.data.behaviour?this.clearValue():"input"===this.data.behaviour&&this.clearValue(!0),"dropdown-with-search"!==this.data.behaviour&&(this.results=null,this.numberOfLoadedResults=null)},u.prototype.newSearch=function(){if(this.data.dataSource){var t=this.queryId=r.uniqueId("autocomplete_"),e=this;this.piping.queryDispatcher.dispatch(this.data.dataSource,(function(i){e.queryId===t&&e.update(i,!0,!0)}),(function(t){e.currentPage=0,e.decorateQuery(t)}))}},u.prototype.focus=function(){this.$inputField.trigger("focus")},u.prototype.clearValue=function(t){t||(this.$inputField.val(""),this.clearFilterParameter()),this.selectedId&&(this.selectedId=null,this.selectedItem=null,this.selectedText=null,this.results=null,this.numberOfLoadedResults=null,this.hasSearch&&this.$displayField.text(this.data.watermark||"").addClass("auto-complete-label-placeholder"),this.updateRequiredIndicator(),this.triggerEventIfEnabled("deselected"),this.triggerEventIfEnabled("changed"))},u.prototype.setValue=function(t){if(void 0!==t.value&&null!==t.value&&""!==t.value){var e=this.findMatchingRowById(t.value);if(e)this.selectItem(e);else{this.selectedId=t.value;var i=this;if(i.data.useSecondDataSource)i.piping.parameters.locals.setValue(i.data.secondParameter,t.value),i.piping.queryDispatcher.dispatch(i.data.secondDataSource,(function(e){i.outputs=e.outputs,i.checkForResults(e,t)}));else{var n={actionId:this.piping.actionId,dataSource:this.data.dataSource,parameters:this.piping.parameters.getNonSystemParameters(),filterValues:[{outputAlias:this.data.keyOutputName,value:t.value}]};i.piping.dispatcher.dispatch("Query/Find",n,(function(e){i.outputs=e.outputs,i.checkForResults(e,t)}))}}}else this.clearValue()},u.prototype.findMatchingRowById=function(t){if(this.results&&0!==this.results.length){var e=this;return r.find(this.results,(function(i){return i[e.data.keyOutputName]===t}))}return null},u.prototype.selectItem=function(t){this.selectedItem=t,this.selectedText=(t[this.data.outputName]||"").toString(),this.selectedId=t[this.data.keyOutputName],this.hasSearch?this.$displayField.removeClass("auto-complete-label-placeholder").text(this.selectedText):this.$inputField.val(A.strip(this.selectedText)),this.updateRequiredIndicator()},u.prototype.checkForResults=function(t,e){var i=this;if(t.results.length>0){var n=t.results[0];i.selectItem(n)}else i.selectedId=e.value,i.$inputField.val(""),i.hasSearch&&i.$displayField.empty()},u.prototype.update=function(t,e){null!=t&&(this.outputs=t.outputs,this.updateAutoCompleteList(e,t.results,t.totalNumberOfResults),this.afterUpdate&&(this.afterUpdate(),this.afterUpdate=null),this.fetchNextPageIfNeeded())},u.prototype.isValid=function(){return!(this.requiredData&&!this.hasValue())||"input"===this.data.behaviour&&!!this.$inputField.val()},u.prototype.getValue=function(){return this.selectedId},u.prototype.clearFocusedItem=function(){this.getFocusedItem().removeClass("focusedItem")},u.prototype.setFocusedItem=function(t){this.clearFocusedItem(),this.getAllItems().eq(t).addClass("focusedItem")},u.prototype.hasFocusedItem=function(){return!!this.$listTable.find(".focusedItem").length},u.prototype.getFocusedItem=function(){return this.$listTable.find(".focusedItem")},u.prototype.getFocusedIndex=function(){var t=this.getFocusedItem();return this.getAllItems().index(t)},u.prototype.getAllItems=function(){return this.$listTable.find("tr.item")},u.prototype.nextItem=function(){var t=this.getFocusedIndex()+1;if(t>=this.getAllItems().length&&(t=0),this.setFocusedItem(t),0===t)this.$scrollContainer.scrollTop(0);else{var e=this.$scrollContainer.scrollTop(),i=this.$scrollContainer.outerHeight(),n=e+i,a=this.getFocusedItem(),o=a.position().top+a.outerHeight()+25;o>e+i&&this.$scrollContainer.scrollTop(e+(o-n))}},u.prototype.previousItem=function(){var t=this.getFocusedIndex()-1,e=t<0;if(e&&(t=this.getAllItems().length-1),this.setFocusedItem(t),e)this.$scrollContainer.scrollTop(this.$scrollContainer.innerHeight());else{var i=this.$scrollContainer.scrollTop(),n=this.getFocusedItem().position().top-10;n<i&&this.$scrollContainer.scrollTop(i-(i-n))}},u.prototype.selectCurrentItem=function(){this.getFocusedItem().trigger("mousedown"),this.closeItemList()},u.prototype.updateAutoCompleteList=function(e,i,n){this.totalNumberOfResults=n,this.data.infiniteScroll&&(this.lastPageReached=i.length<this.getPageSize());var a={},o=this;if(r.each(this.outputs,(function(t,e){"Id"===e&&e===o.data.keyOutputName||r.contains(o.data.hiddenColumns,e)||(a[e]=t)})),e){this.$listTable.empty();var s=r.keys(a);if(!this.data.hideHeaders&&0!==s.length){var l=t("<tr />").addClass("headers").appendTo(this.$listTable);r.each(s,(function(e){l.append(t("<th />").text(e))}))}if(this.numberOfLoadedResults=i.length,this.selectedItem)r.every(i,(function(t){return t[o.data.keyOutputName]!==o.selectedId}))&&(i.unshift(this.selectedItem),this.numberOfLoadedResults++)}else if(this.numberOfLoadedResults+=i.length,this.selectedItem){var d=r.find(i,(function(t){return t[o.data.keyOutputName]===o.selectedId}));if(d){var c=i.indexOf(d);i.splice(c,1),this.numberOfLoadedResults--}}if(r.each(i,(function(n){var s=t('<tr class="item" />').on("mousedown",(function(){o.selectItem(n),o.closeItemList(),o.$listTable.find(".selectedItem").removeClass("selectedItem"),s.addClass("selectedItem"),o.triggerEventIfEnabled("selected",o.selectedId),o.triggerEventIfEnabled("changed",o.selectedId),o.data.onlyShowSelectedItem&&(i=null)})).appendTo(o.$listTable);e&&n[o.data.keyOutputName]===o.selectedId&&s.addClass("selectedItem"),r.each(a,(function(e,i){var a=n[i];null==a&&(a="");var r=A.strip(o.formatter.convertFromLicquidFormat(e,a));s.append(t("<td />").on("mouseenter",(function(){o.$listTable.find("tr").removeClass("focusedItem"),s.addClass("focusedItem")})).text(r))}))})),!this.data.hideTotal&&t.isNumeric(this.totalNumberOfResults)?this.$listFooter.text("Loaded "+this.numberOfLoadedResults+" out of "+this.totalNumberOfResults):this.$listFooter.text(""),this.itemListIsOpen())if("input"===this.data.behaviour){var u=o.$inputField.val(),h=r.find(i,(function(t){return t[o.data.outputName]===u}));if(h){var p=r.indexOf(i,h);this.setFocusedItem(p)}}else this.hasFocusedItem()||this.setFocusedItem(0)},u.prototype.itemListIsOpen=function(){return this.$list.is(":visible")},u.prototype.openItemList=function(){var t=this.$element.offset().left-this.piping.$app.offset().left,e=this.$element.offset().top-this.piping.$app.offset().top+this.$element.height(),i=this.data.popupHasWidth?this.data.popupWidth:this.$element.outerWidth(),n=this.piping.$app.width()-t;i>n&&(t-=i-n),this.$list.css({top:e,left:t,width:i,zIndex:d.getZIndexForPopups()}).show();var a=this.piping.$app.height()-e;if(a>400&&(a=400),this.hasSearch&&(a-=this.$inputField.outerHeight()),this.$scrollContainer.css("maxHeight",a),this.$displayField.addClass("auto-complete-open"),this.$inputWrapper.addClass("auto-complete-open"),"dropdown"===this.data.behaviour||"dropdown-with-search"===this.data.behaviour){var o=this.$list.find(".selectedItem");0===o.length?(this.setFocusedItem(0),this.$scrollContainer.scrollTop(0)):(o.addClass("focusedItem"),this.$scrollContainer.scrollTop(o.position().top))}var r=this;setTimeout((function(){r.blockInfiniteScroll=!1,r.fetchNextPageIfNeeded(),r.$inputField.trigger("focus")}),0),this.keepFocus=!1},u.prototype.closeItemList=function(){this.itemListIsOpen()&&(this.$list.hide(),this.$displayField.removeClass("auto-complete-open"),this.$inputWrapper.removeClass("auto-complete-open"),this.blockInfiniteScroll=!0)},u.prototype.unsubscribeEventHandlers=function(){this.$list.remove(),this.data.infiniteScroll&&this.$scrollContainer.off("scroll",this.onScroll)},u})),define("drops/baiduMaps/baiduMaps",["jquery","underscore","lq/drop","lq/style"],(function(t,e,i,n){"use strict";var a="notReady",o="loading",r=a,s=[],A=function(t){s.push(t)},l={data:{mapType:"BMAP_NORMAL_MAP",size:{x:500,y:500},showMapTypeButtons:!1,locationType:"city",city:"北京",defaultZoom:10}};function d(e){i.call(this,t("<div/>"),l,e),this.$element.addClass("boxToBorderSize"),this.$map=t("<div />").css({width:"100%",height:"100%"}).appendTo(this.$element),n.renderStyles(this),this.usable=!1}return i.extend(d,i),d.typeName="BaiduMaps",d.prototype.preRender=function(){this.applyPosition()},d.prototype.postRender=function(){this.renderMap()},d.prototype.renderMap=function(){this.data.apiKey&&(r===a?function(i,n){A(n),window.baiduMapsReady=function(){e.each(s.splice(0,s.length),(function(t){t()}))};var a="https://api.map.baidu.com/api?v=2.0&s=1&callback=baiduMapsReady&ak="+i;t.getScript(a),r=o}(this.data.apiKey,this.onReady.bind(this)):r===o?A(this.onReady.bind(this)):this.onReady(),this.usable=!0)},d.prototype.onReady=function(){this.map=new window.BMap.Map(this.$map[0],{mapType:this.getMapType()}),this.map.enableScrollWheelZoom(!0),this.map.enablePinchToZoom(),this.toggleMapTypeControl(),this.toggleNavigationControl(),this.updateLocation()},d.prototype.updateLocation=function(){"city"===this.data.locationType&&this.data.showDefaultCity?this.openCity(this.data.city):"address"===this.data.locationType&&this.data.showDefaultAddress?this.openAddress(this.data.address):"gpsCoordinates"===this.data.locationType&&this.data.showDefaultGpsLocation?this.openGpsCoordinates(this.data.gpsLongitude,this.data.gpsLatitude):"bd09Coordinates"===this.data.locationType&&this.data.showDefaultBd09Location?this.openBaiduCoordinates(this.data.bd09Longitude,this.data.bd09Latitude):"userCoordinates"===this.data.locationType?this.openLocationOfUser():"userCity"===this.data.locationType&&this.openCityOfUser()},d.prototype.toggleMapTypeControl=function(){this.data.showMapTypeButtons?(this.mapTypeControl||(this.mapTypeControl=new window.BMap.MapTypeControl),this.map.addControl(this.mapTypeControl)):this.mapTypeControl&&this.map.removeControl(this.mapTypeControl)},d.prototype.toggleNavigationControl=function(){this.data.showNavigationControl?(this.navigationControl||(this.navigationControl=new window.BMap.NavigationControl),this.map.addControl(this.navigationControl)):this.navigationControl&&this.map.removeControl(this.navigationControl)},d.prototype.openCity=function(t){this.map.setCurrentCity(t),this.map.centerAndZoom(t,this.data.defaultZoom)},d.prototype.openAddress=function(t){var e=new window.BMap.Geocoder,i=this;e.getPoint(t,(function(t){t&&i.map.centerAndZoom(t,i.data.defaultZoom)}))},d.prototype.openBaiduCoordinates=function(t,e){var i=new window.BMap.Point(t,e);this.map.centerAndZoom(i,this.data.defaultZoom)},d.prototype.openGpsCoordinates=function(t,e){var i=[new window.BMap.Point(t,e)],n=new window.BMap.Convertor,a=this;n.translate(i,1,5,this.data.apiKey,(function(t){0===t.status&&a.map.centerAndZoom(t.points[0],a.data.defaultZoom)}))},d.prototype.openLocationOfUser=function(){var t=new window.BMap.Geolocation,e=this;t.getCurrentPosition((function(t){this.getStatus()===window.BMAP_STATUS_SUCCESS&&e.map.centerAndZoom(t.point,e.data.defaultZoom)}),{enableHighAccuracy:!0})},d.prototype.openCityOfUser=function(){var t=new window.BMap.LocalCity,e=this;t.get((function(t){e.map.setCurrentCity(t.name),e.map.centerAndZoom(t.name,e.data.defaultZoom)}))},d.prototype.clearValue=t.noop,d.prototype.setValue=function(t){switch(this.data.locationType){case"city":this.openCity(t.value);break;case"address":this.openAddress(t.value);break;case"gpsCoordinates":var e=t.value.split(",");this.openGpsCoordinates(e[0],e[1]);break;case"bd09Coordinates":var i=t.value.split(",");this.openBaiduCoordinates(i[0],i[1])}},d.prototype.getMapType=function(){return window[this.data.mapType]},d})),define("drops/barCode/barCode",["jquery","lq/drop","lq/style","lq/util","lq","lq/tooltip"],(function(t,e,i,n,a,o){"use strict";var r={title:{option:o.hardcoded}};function s(n){e.call(this,t("<div />"),r,n);var a=this;return a.$image=t("<img />").on("load",(function(){a.$image.show()})).hide().appendTo(a.$element),a.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),this.tooltip=new o(this,this.data.title,this.$element),i.renderStyles(a),a.setValue(null),a}return e.extend(s,e),s.typeName="Barcode",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.tooltip.update()},s.prototype.clearValue=function(){this.$image.attr("src","")},s.prototype.rgba2hex=function(t){var e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return e&&4===e.length?("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"FFFFFF"},s.prototype.setValue=function(t){var e=this,i=null===t?e.data.value:n.convertListOfKeyValuesToObject(t.value);if(i){var o=a.getTenantUrl("GeneratedContent/Barcode/?code="+i+"&height="+(e.data.size.y-e.data.styles.normal.padding.top-e.data.styles.normal.padding.bottom-2*e.data.styles.normal.border.width)+"&width="+(e.data.size.x-e.data.styles.normal.padding.left-e.data.styles.normal.padding.right-2*e.data.styles.normal.border.width)+"&type="+e.data.selectedType+"&barcodeColor="+e.rgba2hex(e.data.styles.normal.font.color)+"&backgroundColor="+e.rgba2hex(e.data.styles.normal.background.color)+"&fontFamily="+e.data.styles.normal.font.fontFamily.split(",")[0].replace(/'/g,"")+"&fontSize="+e.data.styles.normal.font.size,NaN+e.rgba2hex(e.data.styles.normal.font.color)+"&hideLabel="+e.data.hideLabel);e.$image.hide().attr("src",o),e.$image[0].complete&&e.$image.trigger("load")}else e.$image.hide()},s})),define("drops/boolImageInput/boolImageInput",["jquery","lq/drop","lq/style","lq","lq/util","lq/constants","lq/required","lq/tooltip"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{size:{x:50,y:50},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},isTriStateEnabled:!1,title:{option:s.hardcoded}}};function l(i){e.call(this,t("<div/>"),A,i),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing),this.value=!1,this.$img=t("<div />").attr("tabindex",this.data.tabIndex).addClass("bool-input-image").addClass(!0===this.data.value?"bool-input-true":!1===this.data.value?"bool-input-false":"bool-input-null").appendTo(this.$element),this.changeValueTo(this.data.defaultValue||!1),this.tooltip=new s(this,this.data.title,this.$img),this.data.readOnly||this.designData||this.$img.css({cursor:"pointer"}).on("click",this.handleClickAndTriggerEvents.bind(this)),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),this.data.readOnly&&this.$img.prop("readonly",!0)}return e.extend(l,e),l.typeName="BoolImageInput",l.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this),r.prototype.addRemoveRequiredIndicator(this),this.renderStyles(),this.applyPosition(),this.tooltip.update()},l.prototype.postRender=function(){var e=this;t("label[for='"+this.rootDrop.instanceId+"_"+this.data.id+"']").each((function(){t(this).on("click",e.handleClickAndTriggerEvents.bind(e))}))},l.prototype.getValue=function(){return this.value},l.prototype.handleClick=function(){this.data.isTriStateEnabled?this.value?this.changeValueTo(!this.value):!1===this.value?this.changeValueTo(null):this.changeValueTo(!0):this.changeValueTo(!this.value),this.updateRequiredIndicator()},l.prototype.clearValue=function(){this.changeValueTo(!1),this.updateRequiredIndicator()},l.prototype.setValue=function(t){var e=this.isTrue(t);this.changeValueTo(e),this.updateRequiredIndicator()},l.prototype.getNullImageUrl=function(){return this.data.nullImage?n.getTenantUploads(this.data.nullImage):n.getCdnUrl("Drops/BoolImageInput/Defaults/null.png")},l.prototype.getFalseImageUrl=function(){return this.data.falseImage?n.getTenantUploads(this.data.falseImage):n.getCdnUrl(this.data.defaultFalseImage)},l.prototype.getTrueImageUrl=function(){return this.data.trueImage?n.getTenantUploads(this.data.trueImage):n.getCdnUrl(this.data.defaultTrueImage)},l.prototype.changeValueTo=function(t){var e;!0===t?(e=this.getTrueImageUrl(),this.$img.removeClass("bool-input-false bool-input-null").addClass("bool-input-true")):!1===t?(e=this.getFalseImageUrl(),this.$img.removeClass("bool-input-true bool-input-null").addClass("bool-input-false")):(e=this.getNullImageUrl(),this.$img.removeClass("bool-input-true bool-input-false").addClass("bool-input-null")),!0===t&&this.data.trueImage||!1===t&&this.data.falseImage||null==t&&this.data.nullImage?(this.$img[0].style.removeProperty("background-image"),this.$img[0].style.setProperty("background-image",`url(${e})`,"important")):this.$img[0].style.removeProperty("background-image"),this.value=t},l.prototype.renderStyles=function(){i.renderStyles(this)},l.prototype.isTrue=function(t){return this.data.isTriStateEnabled?!!(!0===t.value||t.type===o.valueTypes.string&&t.value&&"true"===t.value.toString().toLowerCase())||!(!1===t.value||t.type===o.valueTypes.string&&t.value&&"false"===t.value.toString().toLowerCase())&&null:!0===t.value||t.type===o.valueTypes.string&&t.value&&"true"===t.value.toString().toLowerCase()},l.prototype.handleClickAndTriggerEvents=function(){this.handleClick();var t=this.value;this.triggerEventIfEnabled("toggled",t),!0===t?this.triggerEventIfEnabled("checked"):!1===t?this.triggerEventIfEnabled("unchecked"):this.triggerEventIfEnabled("nullchecked")},l})),define("drops/boolInput/boolInput",["jquery","lq/drop","lq/style","lq/util","lq/constants","lq/required","lq/tooltip"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{useBuiltInStyle:!0,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},title:{option:r.hardcoded}}};function A(i){e.call(this,t("<div/>"),s,i),this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.$element.css({lineHeight:"1"}).addClass("boxToBorderSize"),this.tooltip=new r(this,this.data.title,this.$element)}return e.extend(A,e),A.typeName="BoolInput",A.prototype.renderCheckbox=function(){this.$checkbox=t('<input type = "checkbox" />').prop("checked",this.data.defaultValue).attr("name",this.data.name).attr("id",this.rootDrop.instanceId+"_"+this.data.id).attr("tabindex",this.data.tabIndex).css({margin:"0"}),this.data.useBuiltInStyle?this.$checkbox.appendTo(this.$element):(this.$wrapper=t('<label class="customCheckState" />').append(this.$checkbox).append(t('<div class="drop-text-content customCheckState-tick"></div>').append(t("<div>&#x2714</div>"))).appendTo(this.$element),i.renderStyles(this,null,this.$wrapper));var e=this;this.$checkbox.on("change",(function(){var t=e.$checkbox.is(":checked");e.triggerEventIfEnabled("toggled",t),e.triggerEventIfEnabled(t?"checked":"unchecked"),e.updateRequiredIndicator()}))},A.prototype.preRender=function(){this.renderCheckbox(),this.piping.visibility.apply(this),this.piping.required.apply(this),o.prototype.addRemoveRequiredIndicator(this),this.applyPosition(),this.initialize(),this.tooltip.update()},A.prototype.initialize=function(){this.data.readOnly&&this.$checkbox.prop("disabled",!0),this.updateRequiredIndicator()},A.prototype.getValue=function(){return this.$checkbox.is(":checked")},A.prototype.clearValue=function(){this.$checkbox.prop("checked",!1)},A.prototype.setValue=function(t){this.$checkbox.prop("checked",this.isTrue(t))},A.prototype.isTrue=function(t){return!0===t.value||t.type===a.valueTypes.string&&t.value&&"true"===t.value.toString().toLowerCase()},A})),define("drops/businessProcess/businessProcess",["jquery","underscore","lq/drop"],(function(t,e,i){"use strict";var n={data:{type:"BusinessProcess"}};function a(e){i.call(this,t('<div class="licquid-drops-pool" style="overflow:hidden;" >&nbsp;</div>'),n,e),i.rootDrop=this,this.applyPosition(),this.$element.css({zIndex:"5999"})}return i.extend(a,i),a.typeName="BusinessProcess",a})),define("lq/dropFactory",["underscore"],(function(t){"use strict";var e={dynamic:!1},i=function(t,e){this.typesProvider=t,this.keepTrackOfDrops=e,this.createdDropsById={},this.createdDropsByName={},this.createdDrops=[],this.createdDropsByViewModelKey={}};return i.prototype.clearCache=function(){this.createdDropsById={},this.createdDropsByName={},this.createdDrops=[],this.createdDropsByViewModelKey={}},i.prototype.createDrop=function(t,i){i=i||e;var n=new(this.typesProvider.get(t.data.type))(t);return this.keepTrackOfDrops&&!i.dynamic&&(this.createdDrops.push(n),this.createdDropsById[t.data.id]=n,t.data.name&&(this.createdDropsByName[t.data.name]=n),t.data.viewModelKey&&(this.createdDropsByViewModelKey[t.data.viewModelKey]=n)),n},i.prototype.createDrops=function(e,i){var n=this;return t.map(e,(function(t){return n.createDrop(t,i)}))},i.prototype.getAllChildMorphs=function(e,i){var n=i||[],a=this;return t.each(e,(function(t){n.push(t),a.getAllChildMorphs(t.childDrops,n)})),n},i.prototype.findDropById=function(t){return this.createdDropsById[t]},i.prototype.findDropByName=function(t){return this.createdDropsByName[t]},i.prototype.findDropByViewModelKey=function(t){return this.createdDropsByViewModelKey[t]},i.prototype.getAllDrops=function(){return this.createdDrops},i})),define("drops/drawings/businessprocessEvents",["jquery","underscore"],(function(t,e){"use strict";function i(){this.eventRegistrations={}}return i.prototype.addListener=function(t,e,i){this.eventRegistrations[t]||(this.eventRegistrations[t]=[]),this.eventRegistrations[t].push({listener:e,owner:i})},i.prototype.removeListener=function(t,i){var n=this.eventRegistrations[t],a=e.findWhere(n,{owner:i});if(a){var o=n.indexOf(a);n.splice(o,1)}},i.prototype.informListeners=function(t){if(this.eventRegistrations[t]){var i=Array.prototype.slice.call(arguments,1);e.forEach(this.eventRegistrations[t],(function(t){t.listener.apply(null,i)}))}},new i})),define("lq/point",["lq/drop"],(function(t){"use strict";var e=function(t,e){this.x=t||0,this.y=e||0};return e.prototype.fromPosition=function(t){return this.x=t.left,this.y=t.top,this},e.prototype.fromPositionToZoomPosition=function(e){return this.x=e.left*(1/t.zoomlevel),this.y=e.top*(1/t.zoomlevel),this},e.prototype.fromPositionXAndY=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.x=null,e.prototype.y=null,e.prototype.toPositionXAndY=function(){return{x:this.x,y:this.y}},e.prototype.toPosition=function(){return{left:this.x,top:this.y}},e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.multiply=function(t){return new e(this.x*t,this.y*t)},e.prototype.divide=function(t){return new e(this.x/t,this.y/t)},e.prototype.abs=function(){return new e(Math.abs(this.x),Math.abs(this.y))},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.distance=function(t){var e=this.subtract(t);return Math.sqrt(e.multiplyScalar(e))},e.prototype.multiplyScalar=function(t){return this.x*t.x+this.y*t.y},e.prototype.rot90=function(){return new e(-this.y,this.x)},e.prototype.rot270=function(){return new e(this.y,-this.x)},e})),define("lq/design/jqueryExtensions",["jquery"],(function(t){"use strict";t.fn.extend({positionWithoutTransform:function(){var t=this.css("transform");this.css("transform","");var e={top:this[0].offsetTop,left:this[0].offsetLeft};return t&&this.css("transform",t),e},enterKey:function(e){return this.each((function(){t(this).on("keypress",(function(t){13===(t.keyCode?t.keyCode:t.which)&&e.call(this,t)}))}))}}),t.fn.naturalDimensions=function(){return this.map((function(){if(void 0!==this.naturalWidth)return{width:this.naturalWidth,height:this.naturalHeight};var e=new Image;return e.src=t(this).attr("src"),{width:e.width,height:e.height}}))}})),define("lq/design/editors/dropExtensionsClicks",["jquery","underscore","lq/drop","lq/point","lq/util","lq/style","lq/design/jqueryExtensions"],(function(t,e,i,n,a,o){"use strict";i.prototype.getOverlappingDrops=function(t){var i=this.data.position.x,n=this.data.position.y,a=this.data.position.x+this.data.size.x,o=this.data.position.y+this.data.size.y;return e.filter(t,(function(t){return e=i,r=n,s=a,A=o,l=t.data.position.x,d=t.data.position.y,c=t.data.position.x+t.data.size.x,u=t.data.position.y+t.data.size.y,!(e>c||l>s||r>u||d>A);var e,r,s,A,l,d,c,u}))},i.prototype.animateBackToStart=function(){var t=this;t.initialPosition&&t.$element.animate({left:t.initialPosition.x,top:t.initialPosition.y},{duration:"slow",queue:!1,complete:function(){t.dragToPosition(t.initialPosition)}})},i.prototype.getCurrentPosition=function(){if(!this.data.centered)return(new n).fromPositionToZoomPosition(this.$element.position());var t=(this.$element.parent().innerWidth()-this.$element.width())/2;return new n(t,this.$element.position().top)},i.prototype.setZoomLevel=function(t){i.zoomlevel=t},i.prototype.getZoomLevel=function(){return i.zoomlevel},i.prototype.getCurrentSize=function(){return new n(this.$element.width(),this.$element.height())},i.prototype.dragToPosition=function(t){var e=this.data.centered,i=this.data.position.x,a=t.x,o=this.data.position.y,r=t.y;a<this.offsetLeft&&(a=this.offsetLeft),a+this.$element[0].offsetWidth>this.poolWidth+this.offsetLeft&&(a=this.poolWidth-this.$element[0].offsetWidth+this.offsetLeft),r<this.offsetTop&&(r=this.offsetTop),r+this.$element[0].offsetHeight>this.poolHeight+this.offsetTop&&(r=this.poolHeight-this.$element[0].offsetHeight+this.offsetTop),this.data.position=new n(e?0:a,r),null!==this.data.top&&void 0!==this.data.top&&(this.data.top=r),null!==this.data.bottom&&void 0!==this.data.bottom&&(this.data.bottom=this.data.bottom-(r-o)),e||(null!==this.data.left&&void 0!==this.data.left&&(this.data.left=a),null!==this.data.right&&void 0!==this.data.right&&(this.data.right=this.data.right-(a-i))),this.anchor&&(this.anchor.top=this.data.top,this.anchor.bottom=this.data.bottom,this.anchor.left=this.data.left,this.anchor.right=this.data.right),this.applyPosition(),this.updatePositionIndicator&&this.updatePositionIndicator(),this.triggerDropMoved&&this.triggerDropMoved()};var r={start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"};i.prototype.removeClicks=function(){var t=this.$element,e=this.clickHandlers;e&&(t.each((function(t,i){i.removeEventListener(r.start,e.touchStartHandler,!1)})),t.off("mousedown",e.startHandler),t.removeClass("draggable"),delete this.clickHandlers)},i.prototype.clicks=function(s){var A,l,d,c,u,h=0,p=!1,g=null,f=0,m=this,v=m,y=t.extend({$target:null,drag:!1,revertWhenDroppedOffTarget:!1,getDropTargets:function(){return[]},dropToDrag:null,ignoreChildren:!1,beforeDrag:function(){this.saveTargets(),this.dropToDrag.$element.addClass("dragging")},afterDrag:function(){this.dropToDrag.$element.removeClass("dragging"),this.highlightTargets(!1);var t=this.dropToDrag.getOverlappingDrops(this.targets);t.length?this.droppedOnTarget(t[0]):this.droppedOffTarget()},dragFunc:function(t,e,i,n,a){this.highlightTargets(!0),e.dragToPosition(t)},saveTargets:function(){this.targets=this.getDropTargets()},highlightTargets:function(t){var i=t?"dragTarget":null;e.each(this.targets,(function(t){o.renderStyles(t,null,null,null,i)}));var n=this.dropToDrag.getOverlappingDrops(this.targets);t&&n.length&&o.renderStyles(n[0],null,null,null,"dragHover")},droppedOnTarget:function(t){},droppedOffTarget:function(){this.revertWhenDroppedOffTarget&&this.dropToDrag.animateBackToStart()},dragIgnoreOffset:!1,click:t.noop,doubleClick:t.noop,snapGridSize:null},s);m.removeClicks(),m.clickHandlers=y,c=s.$target||m.$element,u=c,y.drag&&(c.addClass("draggable"),y.dropToDrag?(v=y.dropToDrag,u=y.dropToDrag.$element):y.dropToDrag=m),y.touchStartHandler=function(e){t(x(e)).is(":input")||T(y,e)||e.preventDefault()},c.each((function(t,e){e.addEventListener(r.start,y.touchStartHandler,!1)})),y.startHandler=function(t){T(y,t)},c.on("mousedown",y.startHandler);var w=function(t){t.preventDefault(),I(y,t)};function b(t){return t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches.length?t.originalEvent.changedTouches[0]:t.pageX?t:t.originalEvent}function B(t){var e=b(t),a=i.zoomlevel||1;return new n(Math.round(e.pageX/a),Math.round(e.pageY/a))}function C(t){var e=b(t),a=i.zoomlevel||1;return new n(Math.round(e.clientX/a),Math.round(e.clientX/a))}function x(t){return(t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t).target}var D=function(){return!1};function T(e,i){if(2===i.which||3===i.which)return!0;if(d=x(i),y.ignoreChildren&&d!==c[0])return!0;if(["input","select","textarea","button"].includes(document.activeElement.tagName)?setTimeout((function(){m.triggerClick()}),1):f++,2===f&&window.clearTimeout(g),document.documentMode||(document.onselectstart=function(){return!1}),l=B(i),c.on(r.end+" "+r.cancel,S),c.on("mouseup",S),t(document).on(r.end+" "+r.cancel,E),t(document).on("mouseup",E),i.stopPropagation(),e.drag){v.initialPosition=a.cloneData(v.data.position);var o=(new n).fromPosition(u.positionWithoutTransform());return A=o.subtract(l),document.body.addEventListener(r.move,w),t(document).on("mousemove.lq-drop-extensions-clicks",(function(t){I(y,t)})),document.body.focus(),c.on("dragstart",D),!1}}function I(t,e){var i=B(e),a=i.x-l.x,o=i.y-l.y;if(!p&&Math.abs(a)+Math.abs(o)>5&&(t.beforeDrag(l),p=!0,f=0,clearTimeout(g),h=u.css("z-index"),u.css("z-index",1e4)),p){var r=new n(i.x,i.y),s=l;t.dragIgnoreOffset||(r=r.add(A),s=l.add(A)),"function"==typeof t.snapFunc&&(r=t.snapFunc(r,s)),t.dragFunc(r,v,d,s,{offset:A,xMove:a,yMove:o,clientPos:C(e)})}}function E(){c.off("mouseup",S),c.off(r.end,S),t(document).off(r.end+" "+r.cancel,E),t(document).off("mouseup",E),y.drag&&(p&&(p=!1,u.css("z-index",h),y.afterDrag()),t(document).off("mousemove.lq-drop-extensions-clicks"),document.body.removeEventListener(r.move,w),document.onselectstart=null,c.off("dragstart",D))}function S(e){if(1===f){var i=e.type===r.end,n=i?400:200;g=window.setTimeout((function(){if((f=0,!p)&&(y.click(l,d,e)&&i)){var n=t(d);n.trigger("mousedown"),n.trigger("mouseup"),n.trigger("click")}}),n)}2===f&&(f=0,c.off("mouseup",S),c.off(r.end,S),t(document).off(r.end+" "+r.cancel,E),t(document).off("mouseup",E),t(document).off("mousemove.lq-drop-extensions-clicks"),document.body.removeEventListener(r.move,w),p||y.doubleClick(l,d))}return m.triggerClick=function(){var e=c.positionWithoutTransform(),i=(new n).fromPosition(e);y.click(i,c[0],new t.Event("click"))},this}})),define("drops/drawings/businessprocessElement",["jquery","lq/drop","lq/oop","lq/point","./businessprocessEvents","lq/design/editors/dropExtensionsClicks"],(function(t,e,i,n,a,o){"use strict";function r(t,i,n){e.call(this,t,i,n)}return e.extend(r,e),i.makeExtendable(r),r.prototype.preRender=function(){this.applyPosition()},r.prototype.acceptsFlowConnections=!0,r.prototype.getAnchoringPoints=function(){return[new n(Math.round(this.data.position.x),Math.round(this.data.position.y+this.data.size.y/2)),new n(Math.round(this.data.position.x+this.data.size.x/2),Math.round(this.data.position.y)),new n(Math.round(this.data.position.x+this.data.size.x),Math.round(this.data.position.y+this.data.size.y/2)),new n(Math.round(this.data.position.x+this.data.size.x/2),Math.round(this.data.position.y+this.data.size.y))]},r.prototype.informPositionChanged=function(){a.informListeners("bp_element_moved_"+this.data.id,this)},r.prototype.onResizing=function(){a.informListeners("bp_element_moved_"+this.data.id,this)},r})),define("drops/drawings/flow/segment",["jquery","lq/drop"],(function(t,e){"use strict";function i(){var i=this;e.call(this,t("<div/>"),{}),i.$arrow=t("<div/>").addClass("bp-flow-arrow").hide(),i.$text=t("<div/>").text("").addClass("bp-flow-text").hide(),i.$textContainer=t("<div/>").addClass("bp-flow-textcontainer").append(i.$text),i.$line=t("<div/>").addClass("bp-flow").append(i.$arrow),i.$element.append(i.$line).append(i.$textContainer)}return e.extend(i,e),i.prototype.showArrow=function(){this.$arrow.show()},i.prototype.showText=function(t){this.$text.text(t).show()},i.prototype.setTextPosition=function(t){this.$textContainer.css("top",t.y+"px").css("left",t.x+"px")},i.prototype.draw=function(){var t,e,i,n,a,o,r=this;t=r.startPoint.x,e=r.startPoint.y,i=r.endPoint.x,n=r.endPoint.y,a=180*Math.atan2(t-i,n-e)/Math.PI,o=Math.sqrt((t-i)*(t-i)+(e-n)*(e-n)),r.$line.css("height",o+"px").css("transform","rotate("+a+"deg)").css("-ms-transform","rotate("+a+"deg)").css("transform-origin","50% 0%").css("-moz-transform","rotate("+a+"deg)").css("-moz-transform-origin","50% 0%").css("-webkit-transform","rotate("+a+"deg)").css("-webkit-transform-origin","50% 0%").css("-o-transform","rotate("+a+"deg)").css("-o-transform-origin","50% 0%"),r.$element.css("position","absolute").css("top",e+"px").css("left",t+"px")},i})),define("drops/drawings/flow/flow",["jquery","drops/drawings/businessprocessElement","drops/drawings/businessprocessEvents","drops/drawings/flow/segment"],(function(t,e,i,n){"use strict";var a={data:{outId:null,inId:null,size:{x:100,y:100},text:"",textTop:-10,textLeft:10,joints:[],linkToApplication:!1}};function o(i){e.call(this,t("<div/>"),a,i);var n=this;n.outDrop=null,n.inDrop=null,n.$element.addClass("bp-flow-root"),n.createAllSegments(),n.listenToConnectedDropMovements()}return e.extend(o,e),o.typeName="Flow",o.prototype.applyPosition=t.noop,o.prototype.acceptsFlowConnections=!1,o.prototype.createSegment=function(){return new n},o.prototype.createAllSegments=function(){var t=this;t.segments=[],t.segments.push(t.createSegment()),_.forEach(t.data.joints,(function(){t.segments.push(t.createSegment())})),t.segments.pop(),t.segments.push(t.createSegment()),_.forEach(t.segments,(function(e){t.$element.prepend(e.$element)}))},o.prototype.listenToConnectedDropMovements=function(){var t=this;null!=t.data.outId&&(i.removeListener("bp_element_moved_"+t.data.outId,t),i.addListener("bp_element_moved_"+t.data.outId,(function(e){t.outDrop=e,t.data.position=e.getAnchoringPoints()[0],t.drawSegments()}),t)),null!=t.data.inId&&(i.removeListener("bp_element_moved_"+t.data.inId,t),i.addListener("bp_element_moved_"+t.data.inId,(function(e){t.inDrop=e,t.data.size=e.getAnchoringPoints()[0],t.drawSegments()}),t))},o.prototype.drawSegments=function(){for(var t=this,e=t.getAllSegmentCoordinates(),i=0;i<t.segments.length;i++)t.segments[i].startPoint=e[i][0],t.segments[i].endPoint=e[i][1],t.segments[i].draw();0!==t.segments.length&&(t.segments[0].showText(t.data.text),t.segments[0].setTextPosition({x:t.data.textLeft,y:t.data.textTop}),t.segments[t.segments.length-1].showArrow())},o.prototype.getAllSegmentCoordinates=function(){var t=function(t,e){return null!=t?t.getAnchoringPoints():[e]},e=[];e.push(t(this.outDrop,this.data.position)),_.forEach(this.data.joints,(function(t){e.push([t])})),e.push(t(this.inDrop,this.data.size));for(var i=[],n=0;n<e.length-1;n++)i.push(this.getClosestPoints(e[n],e[n+1]));return i},o.prototype.getClosestPoints=function(t,e){var i=null,n=[];return _.each(t,(function(t){_.each(e,(function(e){var a,o,r=(a=t,o=e,Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)));(null===i||i>r)&&(i=r,n=[t,e])}))})),n},o.prototype.preRender=function(){this.drawSegments()},o})),define("drops/drawings/gateway/gateway",["jquery","drops/drawings/businessprocessElement"],(function(t,e){"use strict";n.EXLUSIVE="exclusive",n.PARALLEL="parallel";var i={data:{size:{x:40,y:40},text:"",gateType:n.EXLUSIVE,textPosition:"Right",linkToApplication:!1}};function n(a){e.call(this,t("<div/>"),i,a);var o=this;o.$text=o.createTextElement(),o.$textCell=t("<div/>").append(o.$text).addClass("bp-textcell"),o.$textContainer=t("<div/>").append(o.$textCell).addClass("bp-textcontainer"),o.$text.addClass("bp-text-"+o.data.textPosition),o.$textCell.addClass("bp-textcell-"+o.data.textPosition),o.$textContainer.addClass("bp-textcontainer-"+o.data.textPosition);var r=t("<div/>").addClass("bp-gateway-diamond").addClass("bp-element");o.$plusSign=t("<div/>").addClass("bp-gateway-plus").hide(),o.$element.addClass("boxToBorderSize").addClass("bp-gateway").append(r).append(o.$textContainer).append(o.$plusSign),o.data.gateType===n.PARALLEL&&o.$plusSign.show()}return e.extend(n,e),n.typeName="Gateway",n.prototype.preRender=function(){if(!this.editable&&this.data.entityId){var t=this;this.$element.css("cursor","pointer").on("click",(function(){t.triggerEvent("drawingClicked",t.data.entityId)}))}this.applyPosition()},n.prototype.createTextElement=function(){return t("<div/>").text(this.data.text).addClass("bp-text")},n})),define("drops/drawings/milestone/milestone",["jquery","drops/drawings/businessprocessElement"],(function(t,e){"use strict";var i={data:{text:"New Milestone",size:{x:200,y:150}}};function n(n){e.call(this,t("<div/>"),i,n),this.$text=this.createTextElement(),this.$element.addClass("boxToBorderSize").addClass("bp-milestone").append(this.$text)}return e.extend(n,e),n.typeName="Milestone",n.prototype.acceptsFlowConnections=!1,n.prototype.createTextElement=function(){return t("<div/>").text(this.data.text)},n.prototype.preRender=function(){if(!this.editable&&this.data.entityId){var t=this;this.$element.css("cursor","pointer").on("click",(function(){t.triggerEvent("milestoneClicked",t.data.entityId)}))}this.applyPosition()},n})),define("drops/drawings/start/start",["jquery","drops/drawings/businessprocessElement"],(function(t,e){"use strict";var i={data:{size:{x:40,y:40},text:"",textPosition:"Right",linkToApplication:!1}};function n(n){e.call(this,t("<div/>"),i,n);var a=this;a.$text=a.createTextElement(),a.$textCell=t("<div/>").append(a.$text).addClass("bp-textcell"),a.$textContainer=t("<div/>").append(a.$textCell).addClass("bp-textcontainer"),a.$text.addClass("bp-text-"+a.data.textPosition),a.$textCell.addClass("bp-textcell-"+a.data.textPosition),a.$textContainer.addClass("bp-textcontainer-"+a.data.textPosition);var o=t("<div/>").addClass("bp-start").addClass("bp-element");a.$element.addClass("boxToBorderSize").append(a.$textContainer).append(o)}return e.extend(n,e),n.typeName="Start",n.prototype.createTextElement=function(){return t("<div/>").text(this.data.text).addClass("bp-text")},n.prototype.preRender=function(){if(!this.editable&&this.data.entityId){var t=this;this.$element.css("cursor","pointer").on("click",(function(){t.triggerEvent("drawingClicked",t.data.entityId)}))}this.applyPosition()},n})),define("drops/drawings/stop/stop",["jquery","drops/drawings/businessprocessElement"],(function(t,e){"use strict";var i={data:{size:{x:40,y:40},text:"",textPosition:"Right",linkToApplication:!1}};function n(n){e.call(this,t("<div/>"),i,n);var a=this;a.$text=a.createTextElement(),a.$textCell=t("<div/>").append(a.$text).addClass("bp-textcell"),a.$textContainer=t("<div/>").append(a.$textCell).addClass("bp-textcontainer"),a.$text.addClass("bp-text-"+a.data.textPosition),a.$textCell.addClass("bp-textcell-"+a.data.textPosition),a.$textContainer.addClass("bp-textcontainer-"+a.data.textPosition);var o=t("<div/>").addClass("bp-stop").addClass("bp-element");a.$element.addClass("boxToBorderSize").append(a.$textContainer).append(o)}return e.extend(n,e),n.typeName="Stop",n.prototype.createTextElement=function(){return t("<div/>").text(this.data.text).addClass("bp-text")},n.prototype.preRender=function(){if(!this.editable&&this.data.entityId){var t=this;this.$element.css("cursor","pointer").on("click",(function(){t.triggerEvent("drawingClicked",t.data.entityId)}))}this.applyPosition()},n})),define("drops/drawings/task/task",["jquery","drops/drawings/businessprocessElement"],(function(t,e){"use strict";var i={data:{text:"New Task",size:{x:100,y:40},linkToApplication:!1}};function n(n){e.call(this,t("<div/>"),i,n),this.$text=this.createTextElement(),this.$element.addClass("boxToBorderSize").addClass("bp-element").addClass("bp-task").append(this.$text)}return e.extend(n,e),n.typeName="Task",n.prototype.createTextElement=function(){return t("<div/>").text(this.data.text).css({height:"100%"})},n.prototype.preRender=function(){if(!this.editable&&this.data.entityId){var t=this;this.$element.css("cursor","pointer").on("click",(function(){t.triggerEvent("drawingClicked",t.data.entityId)}))}this.applyPosition()},n})),define("drops/drawings/runtimeTypesProvider",["lq/typesProvider","./flow/flow","./gateway/gateway","./milestone/milestone","./start/start","./stop/stop","./task/task"],(function(t){"use strict";return new t(Array.prototype.slice.call(arguments,1))})),function(t){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),define("detectmobilebrowser",(function(){})),define("lq/onlongpress",["underscore","jquery","detectmobilebrowser"],(function(t,e){"use strict";var i=null,n=!1,a=!1,o=function(t){return t.isEventEnabled("selected")||t.isEventEnabled("deselected")||t.isEventEnabled("itemSelected")||t.isEventEnabled("itemDeselected")};function r(){}return r.prototype.applyLongPressOnElement=function(t,r,s,A,l,d,c){this.drop&&(r=this.drop),r.$element&&r.isEventEnabled("onLongPress")&&r.$element.addClass("prevent-selection"),l=l||"onLongPress";var u=this;d&&d.on("touchmove",(function(){a=!0,i=null,clearTimeout(u.pressTimer)}));var h=r.data.longPressDelay?r.data.longPressDelay:1e3,p=r.getEventDataFor(l),g=r.getEventDataFor("clicked"),f=function(t){c&&c(t),n?w(r.parent)||(n=!1):a||(null===i&&(o(r)?i={callback:A?function(){A(t)}:null}:r.isEventEnabled("clicked")&&(i={name:r.data.name,drop:r,event:"clicked",eventName:g.raisedEventName,eventArg:s,callback:A?function(){A(t)}:null})),w(r.parent)||u.triggerTheCorrectEvent(t)),clearTimeout(u.pressTimer)};if(e.browser.mobile){t.on("touchend",(function(){clearTimeout(u.pressTimer)}));l="clicked";var m=r.getEventDataFor(l),v="click.licquidEventTrigger-"+l;t.off(v),(m.enabled||o(r))&&r.subscribeEventHandler(t,v,f)}else t.on("click",f);var y=function(t){n=!1,a=!1,u.pressTimer=window.setTimeout((function(){r.piping&&(r.isEventEnabled("onLongPress")&&null===i&&(i={name:r.data.name,drop:r,event:"onLongPress",eventName:p.raisedEventName,eventArg:s}),w(r.parent)||(r.piping.$app.addClass("prevent-selection"),u.triggerTheCorrectEvent(t),setTimeout((function(){r.piping&&r.piping.$app.removeClass("prevent-selection")}),10)))}),h)};e.browser.mobile?t.on("touchstart",y):t.on("mousedown",y);var w=function(t){return!(!t||"CalendarWeekView"===t.type||"CalendarDayView"===t.type)&&(!!(t.isEventEnabled("onLongPress")||t.isEventEnabled("clicked")||o(t))||!(!t.parent||!w(t.parent)))}},r.prototype.triggerTheCorrectEvent=function(t){if(null!==i){if(i.callback)i.callback();else if(null===i.eventArg||void 0===i.eventArg)i.drop.triggerEvent(i.eventName);else if("function"==typeof i.eventArg){var e=i.eventArg(t);i.drop.triggerEvent(i.eventName,e)}else i.drop.triggerEvent(i.eventName,i.eventArg);n="onLongPress"===i.event,i=null}},r})),
/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("html2canvas",e):(t="undefined"!=typeof globalThis?globalThis:t||self).html2canvas=e()}(this,(function(){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};function e(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},i.apply(this,arguments)};function n(t,e,i,n){return new(i||(i=Promise))((function(a,o){function r(t){try{A(n.next(t))}catch(t){o(t)}}function s(t){try{A(n.throw(t))}catch(t){o(t)}}function A(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,s)}A((n=n.apply(t,e||[])).next())}))}function a(t,e){var i,n,a,o,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(a=r.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){r=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(6===o[0]&&r.label<a[1]){r.label=a[1],a=o;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(o);break}a[2]&&r.ops.pop(),r.trys.pop();continue}o=e.call(t,r)}catch(t){o=[6,t],n=0}finally{i=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function o(t,e,i){if(i||2===arguments.length)for(var n,a=0,o=e.length;a<o;a++)!n&&a in e||(n||(n=Array.prototype.slice.call(e,0,a)),n[a]=e[a]);return t.concat(n||e)}for(var r=function(){function t(t,e,i,n){this.left=t,this.top=e,this.width=i,this.height=n}return t.prototype.add=function(e,i,n,a){return new t(this.left+e,this.top+i,this.width+n,this.height+a)},t.fromClientRect=function(e,i){return new t(i.left+e.windowBounds.left,i.top+e.windowBounds.top,i.width,i.height)},t.fromDOMRectList=function(e,i){var n=Array.from(i).find((function(t){return 0!==t.width}));return n?new t(n.left+e.windowBounds.left,n.top+e.windowBounds.top,n.width,n.height):t.EMPTY},t.EMPTY=new t(0,0,0,0),t}(),s=function(t,e){return r.fromClientRect(t,e.getBoundingClientRect())},A=function(t){for(var e=[],i=0,n=t.length;i<n;){var a=t.charCodeAt(i++);if(a>=55296&&a<=56319&&i<n){var o=t.charCodeAt(i++);56320==(64512&o)?e.push(((1023&a)<<10)+(1023&o)+65536):(e.push(a),i--)}else e.push(a)}return e},l=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var i=t.length;if(!i)return"";for(var n=[],a=-1,o="";++a<i;){var r=t[a];r<=65535?n.push(r):(r-=65536,n.push(55296+(r>>10),r%1024+56320)),(a+1===i||n.length>16384)&&(o+=String.fromCharCode.apply(String,n),n.length=0)}return o},d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),u=0;u<64;u++)c[d.charCodeAt(u)]=u;for(var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p="undefined"==typeof Uint8Array?[]:new Uint8Array(256),g=0;g<64;g++)p[h.charCodeAt(g)]=g;for(var f=function(t,e,i){return t.slice?t.slice(e,i):new Uint16Array(Array.prototype.slice.call(t,e,i))},m=function(){function t(t,e,i,n,a,o){this.initialValue=t,this.errorValue=e,this.highStart=i,this.highValueIndex=n,this.index=a,this.data=o}return t.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=((e=this.index[t>>5])<<2)+(31&t),this.data[e];if(t<=65535)return e=((e=this.index[2048+(t-55296>>5)])<<2)+(31&t),this.data[e];if(t<this.highStart)return e=2080+(t>>11),e=this.index[e],e+=t>>5&63,e=((e=this.index[e])<<2)+(31&t),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="undefined"==typeof Uint8Array?[]:new Uint8Array(256),w=0;w<64;w++)y[v.charCodeAt(w)]=w;var b=10,B=13,C=15,x=17,D=18,T=19,I=20,E=21,S=22,F=24,k=25,_=26,U=27,Q=28,P=30,L=32,H=33,O=34,M=35,N=37,R=38,$=39,q=40,V=42,z=[9001,65288],K="×",W="÷",G=function(t){var e,i,n,a=function(t){var e,i,n,a,o,r=.75*t.length,s=t.length,A=0;"="===t[t.length-1]&&(r--,"="===t[t.length-2]&&r--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(r):new Array(r),d=Array.isArray(l)?l:new Uint8Array(l);for(e=0;e<s;e+=4)i=p[t.charCodeAt(e)],n=p[t.charCodeAt(e+1)],a=p[t.charCodeAt(e+2)],o=p[t.charCodeAt(e+3)],d[A++]=i<<2|n>>4,d[A++]=(15&n)<<4|a>>2,d[A++]=(3&a)<<6|63&o;return l}(t),o=Array.isArray(a)?function(t){for(var e=t.length,i=[],n=0;n<e;n+=4)i.push(t[n+3]<<24|t[n+2]<<16|t[n+1]<<8|t[n]);return i}(a):new Uint32Array(a),r=Array.isArray(a)?function(t){for(var e=t.length,i=[],n=0;n<e;n+=2)i.push(t[n+1]<<8|t[n]);return i}(a):new Uint16Array(a),s=f(r,12,o[4]/2),A=2===o[5]?f(r,(24+o[4])/2):(e=o,i=Math.ceil((24+o[4])/4),e.slice?e.slice(i,n):new Uint32Array(Array.prototype.slice.call(e,i,n)));return new m(o[0],o[1],o[2],o[3],s,A)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),Y=[P,36],j=[1,2,3,5],X=[b,8],J=[U,_],Z=j.concat(X),tt=[R,$,q,O,M],et=[C,B],it=function(t,e,i,n){var a=n[i];if(Array.isArray(t)?-1!==t.indexOf(a):t===a)for(var o=i;o<=n.length;){if((A=n[++o])===e)return!0;if(A!==b)break}if(a===b)for(o=i;o>0;){var r=n[--o];if(Array.isArray(t)?-1!==t.indexOf(r):t===r)for(var s=i;s<=n.length;){var A;if((A=n[++s])===e)return!0;if(A!==b)break}if(r!==b)break}return!1},nt=function(t,e){for(var i=t;i>=0;){var n=e[i];if(n!==b)return n;i--}return 0},at=function(t,e,i,n,a){if(0===i[n])return K;var o=n-1;if(Array.isArray(a)&&!0===a[o])return K;var r=o-1,s=o+1,A=e[o],l=r>=0?e[r]:0,d=e[s];if(2===A&&3===d)return K;if(-1!==j.indexOf(A))return"!";if(-1!==j.indexOf(d))return K;if(-1!==X.indexOf(d))return K;if(8===nt(o,e))return W;if(11===G.get(t[o]))return K;if((A===L||A===H)&&11===G.get(t[s]))return K;if(7===A||7===d)return K;if(9===A)return K;if(-1===[b,B,C].indexOf(A)&&9===d)return K;if(-1!==[x,D,T,F,Q].indexOf(d))return K;if(nt(o,e)===S)return K;if(it(23,S,o,e))return K;if(it([x,D],E,o,e))return K;if(it(12,12,o,e))return K;if(A===b)return W;if(23===A||23===d)return K;if(16===d||16===A)return W;if(-1!==[B,C,E].indexOf(d)||14===A)return K;if(36===l&&-1!==et.indexOf(A))return K;if(A===Q&&36===d)return K;if(d===I)return K;if(-1!==Y.indexOf(d)&&A===k||-1!==Y.indexOf(A)&&d===k)return K;if(A===U&&-1!==[N,L,H].indexOf(d)||-1!==[N,L,H].indexOf(A)&&d===_)return K;if(-1!==Y.indexOf(A)&&-1!==J.indexOf(d)||-1!==J.indexOf(A)&&-1!==Y.indexOf(d))return K;if(-1!==[U,_].indexOf(A)&&(d===k||-1!==[S,C].indexOf(d)&&e[s+1]===k)||-1!==[S,C].indexOf(A)&&d===k||A===k&&-1!==[k,Q,F].indexOf(d))return K;if(-1!==[k,Q,F,x,D].indexOf(d))for(var c=o;c>=0;){if((u=e[c])===k)return K;if(-1===[Q,F].indexOf(u))break;c--}if(-1!==[U,_].indexOf(d))for(c=-1!==[x,D].indexOf(A)?r:o;c>=0;){var u;if((u=e[c])===k)return K;if(-1===[Q,F].indexOf(u))break;c--}if(R===A&&-1!==[R,$,O,M].indexOf(d)||-1!==[$,O].indexOf(A)&&-1!==[$,q].indexOf(d)||-1!==[q,M].indexOf(A)&&d===q)return K;if(-1!==tt.indexOf(A)&&-1!==[I,_].indexOf(d)||-1!==tt.indexOf(d)&&A===U)return K;if(-1!==Y.indexOf(A)&&-1!==Y.indexOf(d))return K;if(A===F&&-1!==Y.indexOf(d))return K;if(-1!==Y.concat(k).indexOf(A)&&d===S&&-1===z.indexOf(t[s])||-1!==Y.concat(k).indexOf(d)&&A===D)return K;if(41===A&&41===d){for(var h=i[o],p=1;h>0&&41===e[--h];)p++;if(p%2!=0)return K}return A===L&&d===H?K:W},ot=function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var i=function(t,e){void 0===e&&(e="strict");var i=[],n=[],a=[];return t.forEach((function(t,o){var r=G.get(t);if(r>50?(a.push(!0),r-=50):a.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(t))return n.push(o),i.push(16);if(4===r||11===r){if(0===o)return n.push(o),i.push(P);var s=i[o-1];return-1===Z.indexOf(s)?(n.push(n[o-1]),i.push(s)):(n.push(o),i.push(P))}return n.push(o),31===r?i.push("strict"===e?E:N):r===V||29===r?i.push(P):43===r?t>=131072&&t<=196605||t>=196608&&t<=262141?i.push(N):i.push(P):void i.push(r)})),[n,i,a]}(t,e.lineBreak),n=i[0],a=i[1],o=i[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(a=a.map((function(t){return-1!==[k,P,V].indexOf(t)?N:t})));var r="keep-all"===e.wordBreak?o.map((function(e,i){return e&&t[i]>=19968&&t[i]<=40959})):void 0;return[n,a,r]},rt=function(){function t(t,e,i,n){this.codePoints=t,this.required="!"===e,this.start=i,this.end=n}return t.prototype.slice=function(){return l.apply(void 0,this.codePoints.slice(this.start,this.end))},t}(),st=45,At=43,lt=-1,dt=function(t){return t>=48&&t<=57},ct=function(t){return dt(t)||t>=65&&t<=70||t>=97&&t<=102},ut=function(t){return 10===t||9===t||32===t},ht=function(t){return function(t){return function(t){return t>=97&&t<=122}(t)||function(t){return t>=65&&t<=90}(t)}(t)||function(t){return t>=128}(t)||95===t},pt=function(t){return ht(t)||dt(t)||t===st},gt=function(t){return t>=0&&t<=8||11===t||t>=14&&t<=31||127===t},ft=function(t,e){return 92===t&&10!==e},mt=function(t,e,i){return t===st?ht(e)||ft(e,i):!!ht(t)||!(92!==t||!ft(t,e))},vt=function(t,e,i){return t===At||t===st?!!dt(e)||46===e&&dt(i):dt(46===t?e:t)},yt=function(t){var e=0,i=1;t[e]!==At&&t[e]!==st||(t[e]===st&&(i=-1),e++);for(var n=[];dt(t[e]);)n.push(t[e++]);var a=n.length?parseInt(l.apply(void 0,n),10):0;46===t[e]&&e++;for(var o=[];dt(t[e]);)o.push(t[e++]);var r=o.length,s=r?parseInt(l.apply(void 0,o),10):0;69!==t[e]&&101!==t[e]||e++;var A=1;t[e]!==At&&t[e]!==st||(t[e]===st&&(A=-1),e++);for(var d=[];dt(t[e]);)d.push(t[e++]);var c=d.length?parseInt(l.apply(void 0,d),10):0;return i*(a+s*Math.pow(10,-r))*Math.pow(10,A*c)},wt={type:2},bt={type:3},Bt={type:4},Ct={type:13},xt={type:8},Dt={type:21},Tt={type:9},It={type:10},Et={type:11},St={type:12},Ft={type:14},kt={type:23},_t={type:1},Ut={type:25},Qt={type:24},Pt={type:26},Lt={type:27},Ht={type:28},Ot={type:29},Mt={type:31},Nt={type:32},Rt=function(){function t(){this._value=[]}return t.prototype.write=function(t){this._value=this._value.concat(A(t))},t.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==Nt;)t.push(e),e=this.consumeToken();return t},t.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),i=this.peekCodePoint(1),n=this.peekCodePoint(2);if(pt(e)||ft(i,n)){var a=mt(e,i,n)?2:1;return{type:5,value:this.consumeName(),flags:a}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ct;break;case 39:return this.consumeStringToken(39);case 40:return wt;case 41:return bt;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ft;break;case At:if(vt(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 44:return Bt;case st:var o=t,r=this.peekCodePoint(0),s=this.peekCodePoint(1);if(vt(o,r,s))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(mt(o,r,s))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(r===st&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),Qt;break;case 46:if(vt(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var A=this.consumeCodePoint();if(42===A&&47===(A=this.consumeCodePoint()))return this.consumeToken();if(A===lt)return this.consumeToken()}break;case 58:return Pt;case 59:return Lt;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===st&&this.peekCodePoint(2)===st)return this.consumeCodePoint(),this.consumeCodePoint(),Ut;break;case 64:var d=this.peekCodePoint(0),c=this.peekCodePoint(1),u=this.peekCodePoint(2);if(mt(d,c,u))return{type:7,value:this.consumeName()};break;case 91:return Ht;case 92:if(ft(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case 93:return Ot;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),xt;break;case 123:return Et;case 125:return St;case 117:case 85:var h=this.peekCodePoint(0),p=this.peekCodePoint(1);return h!==At||!ct(p)&&63!==p||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Tt;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Dt;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),It;break;case lt:return Nt}return ut(t)?(this.consumeWhiteSpace(),Mt):dt(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):ht(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:l(t)}},t.prototype.consumeCodePoint=function(){var t=this._value.shift();return void 0===t?-1:t},t.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},t.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},t.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();ct(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var i=!1;63===e&&t.length<6;)t.push(e),e=this.consumeCodePoint(),i=!0;if(i)return{type:30,start:parseInt(l.apply(void 0,t.map((function(t){return 63===t?48:t}))),16),end:parseInt(l.apply(void 0,t.map((function(t){return 63===t?70:t}))),16)};var n=parseInt(l.apply(void 0,t),16);if(this.peekCodePoint(0)===st&&ct(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var a=[];ct(e)&&a.length<6;)a.push(e),e=this.consumeCodePoint();return{type:30,start:n,end:parseInt(l.apply(void 0,a),16)}}return{type:30,start:n,end:n}},t.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return"url"===t.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},t.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===lt)return{type:22,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var i=this.consumeStringToken(this.consumeCodePoint());return 0===i.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===lt||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),kt)}for(;;){var n=this.consumeCodePoint();if(n===lt||41===n)return{type:22,value:l.apply(void 0,t)};if(ut(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===lt||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:l.apply(void 0,t)}):(this.consumeBadUrlRemnants(),kt);if(34===n||39===n||40===n||gt(n))return this.consumeBadUrlRemnants(),kt;if(92===n){if(!ft(n,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),kt;t.push(this.consumeEscapedCodePoint())}else t.push(n)}},t.prototype.consumeWhiteSpace=function(){for(;ut(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(41===t||t===lt)return;ft(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(t){for(var e="";t>0;){var i=Math.min(5e4,t);e+=l.apply(void 0,this._value.splice(0,i)),t-=i}return this._value.shift(),e},t.prototype.consumeStringToken=function(t){for(var e="",i=0;;){var n=this._value[i];if(n===lt||void 0===n||n===t)return{type:0,value:e+=this.consumeStringSlice(i)};if(10===n)return this._value.splice(0,i),_t;if(92===n){var a=this._value[i+1];a!==lt&&void 0!==a&&(10===a?(e+=this.consumeStringSlice(i),i=-1,this._value.shift()):ft(n,a)&&(e+=this.consumeStringSlice(i),e+=l(this.consumeEscapedCodePoint()),i=-1))}i++}},t.prototype.consumeNumber=function(){var t=[],e=4,i=this.peekCodePoint(0);for(i!==At&&i!==st||t.push(this.consumeCodePoint());dt(this.peekCodePoint(0));)t.push(this.consumeCodePoint());i=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(46===i&&dt(n))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;dt(this.peekCodePoint(0));)t.push(this.consumeCodePoint());i=this.peekCodePoint(0),n=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((69===i||101===i)&&((n===At||n===st)&&dt(a)||dt(n)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;dt(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[yt(t),e]},t.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],i=t[1],n=this.peekCodePoint(0),a=this.peekCodePoint(1),o=this.peekCodePoint(2);return mt(n,a,o)?{type:15,number:e,flags:i,unit:this.consumeName()}:37===n?(this.consumeCodePoint(),{type:16,number:e,flags:i}):{type:17,number:e,flags:i}},t.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(ct(t)){for(var e=l(t);ct(this.peekCodePoint(0))&&e.length<6;)e+=l(this.consumeCodePoint());ut(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(e,16);return 0===i||function(t){return t>=55296&&t<=57343}(i)||i>1114111?65533:i}return t===lt?65533:t},t.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(pt(e))t+=l(e);else{if(!ft(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),t;t+=l(this.consumeEscapedCodePoint())}}},t}(),$t=function(){function t(t){this._tokens=t}return t.create=function(e){var i=new Rt;return i.write(e),new t(i.read())},t.parseValue=function(e){return t.create(e).parseComponentValue()},t.parseValues=function(e){return t.create(e).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var t=this.consumeToken();31===t.type;)t=this.consumeToken();if(32===t.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do{t=this.consumeToken()}while(31===t.type);if(32===t.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(32===e.type)return t;t.push(e),t.push()}},t.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},t.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},i=this.consumeToken();;){if(32===i.type||Xt(i,t))return e;this.reconsumeToken(i),e.values.push(this.consumeComponentValue()),i=this.consumeToken()}},t.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var i=this.consumeToken();if(32===i.type||3===i.type)return e;this.reconsumeToken(i),e.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var t=this._tokens.shift();return void 0===t?Nt:t},t.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},t}(),qt=function(t){return 15===t.type},Vt=function(t){return 17===t.type},zt=function(t){return 20===t.type},Kt=function(t){return 0===t.type},Wt=function(t,e){return zt(t)&&t.value===e},Gt=function(t){return 31!==t.type},Yt=function(t){return 31!==t.type&&4!==t.type},jt=function(t){var e=[],i=[];return t.forEach((function(t){if(4===t.type){if(0===i.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(i),void(i=[])}31!==t.type&&i.push(t)})),i.length&&e.push(i),e},Xt=function(t,e){return 11===e&&12===t.type||(28===e&&29===t.type||2===e&&3===t.type)},Jt=function(t){return 17===t.type||15===t.type},Zt=function(t){return 16===t.type||Jt(t)},te=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},ee={type:17,number:0,flags:4},ie={type:16,number:50,flags:4},ne={type:16,number:100,flags:4},ae=function(t,e,i){var n=t[0],a=t[1];return[oe(n,e),oe(void 0!==a?a:n,i)]},oe=function(t,e){if(16===t.type)return t.number/100*e;if(qt(t))switch(t.unit){case"rem":case"em":return 16*t.number;default:return t.number}return t.number},re="grad",se="turn",Ae=function(t,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case re:return Math.PI/200*e.number;case"rad":return e.number;case se:return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},le=function(t){return 15===t.type&&("deg"===t.unit||t.unit===re||"rad"===t.unit||t.unit===se)},de=function(t){switch(t.filter(zt).map((function(t){return t.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ee,ee];case"to top":case"bottom":return ce(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ee,ne];case"to right":case"left":return ce(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ne,ne];case"to bottom":case"top":return ce(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ne,ee];case"to left":case"right":return ce(270)}return 0},ce=function(t){return Math.PI*t/180},ue=function(t,e){if(18===e.type){var i=we[e.name];if(void 0===i)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return i(t,e.values)}if(5===e.type){if(3===e.value.length){var n=e.value.substring(0,1),a=e.value.substring(1,2),o=e.value.substring(2,3);return ge(parseInt(n+n,16),parseInt(a+a,16),parseInt(o+o,16),1)}if(4===e.value.length){n=e.value.substring(0,1),a=e.value.substring(1,2),o=e.value.substring(2,3);var r=e.value.substring(3,4);return ge(parseInt(n+n,16),parseInt(a+a,16),parseInt(o+o,16),parseInt(r+r,16)/255)}if(6===e.value.length){n=e.value.substring(0,2),a=e.value.substring(2,4),o=e.value.substring(4,6);return ge(parseInt(n,16),parseInt(a,16),parseInt(o,16),1)}if(8===e.value.length){n=e.value.substring(0,2),a=e.value.substring(2,4),o=e.value.substring(4,6),r=e.value.substring(6,8);return ge(parseInt(n,16),parseInt(a,16),parseInt(o,16),parseInt(r,16)/255)}}if(20===e.type){var s=Be[e.value.toUpperCase()];if(void 0!==s)return s}return Be.TRANSPARENT},he=function(t){return!(255&t)},pe=function(t){var e=255&t,i=255&t>>8,n=255&t>>16,a=255&t>>24;return e<255?"rgba("+a+","+n+","+i+","+e/255+")":"rgb("+a+","+n+","+i+")"},ge=function(t,e,i,n){return(t<<24|e<<16|i<<8|Math.round(255*n))>>>0},fe=function(t,e){if(17===t.type)return t.number;if(16===t.type){var i=3===e?1:255;return 3===e?t.number/100*i:Math.round(t.number/100*i)}return 0},me=function(t,e){var i=e.filter(Yt);if(3===i.length){var n=i.map(fe),a=n[0],o=n[1],r=n[2];return ge(a,o,r,1)}if(4===i.length){var s=i.map(fe),A=(a=s[0],o=s[1],r=s[2],s[3]);return ge(a,o,r,A)}return 0};function ve(t,e,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(e-t)*i*6+t:i<.5?e:i<2/3?6*(e-t)*(2/3-i)+t:t}var ye=function(t,e){var i=e.filter(Yt),n=i[0],a=i[1],o=i[2],r=i[3],s=(17===n.type?ce(n.number):Ae(t,n))/(2*Math.PI),A=Zt(a)?a.number/100:0,l=Zt(o)?o.number/100:0,d=void 0!==r&&Zt(r)?oe(r,1):1;if(0===A)return ge(255*l,255*l,255*l,1);var c=l<=.5?l*(A+1):l+A-l*A,u=2*l-c,h=ve(u,c,s+1/3),p=ve(u,c,s),g=ve(u,c,s-1/3);return ge(255*h,255*p,255*g,d)},we={hsl:ye,hsla:ye,rgb:me,rgba:me},be=function(t,e){return ue(t,$t.create(e).parseComponentValue())},Be={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ce={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map((function(t){if(zt(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},xe={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},De=function(t,e){var i=ue(t,e[0]),n=e[1];return n&&Zt(n)?{color:i,stop:n}:{color:i,stop:null}},Te=function(t,e){var i=t[0],n=t[t.length-1];null===i.stop&&(i.stop=ee),null===n.stop&&(n.stop=ne);for(var a=[],o=0,r=0;r<t.length;r++){var s=t[r].stop;if(null!==s){var A=oe(s,e);A>o?a.push(A):a.push(o),o=A}else a.push(null)}var l=null;for(r=0;r<a.length;r++){var d=a[r];if(null===d)null===l&&(l=r);else if(null!==l){for(var c=r-l,u=(d-a[l-1])/(c+1),h=1;h<=c;h++)a[l+h-1]=u*h;l=null}}return t.map((function(t,i){return{color:t.color,stop:Math.max(Math.min(1,a[i]/e),0)}}))},Ie=function(t,e,i){var n="number"==typeof t?t:function(t,e,i){var n=e/2,a=i/2,o=oe(t[0],e)-n,r=a-oe(t[1],i);return(Math.atan2(r,o)+2*Math.PI)%(2*Math.PI)}(t,e,i),a=Math.abs(e*Math.sin(n))+Math.abs(i*Math.cos(n)),o=e/2,r=i/2,s=a/2,A=Math.sin(n-Math.PI/2)*s,l=Math.cos(n-Math.PI/2)*s;return[a,o-l,o+l,r-A,r+A]},Ee=function(t,e){return Math.sqrt(t*t+e*e)},Se=function(t,e,i,n,a){return[[0,0],[0,e],[t,0],[t,e]].reduce((function(t,e){var o=e[0],r=e[1],s=Ee(i-o,n-r);return(a?s<t.optimumDistance:s>t.optimumDistance)?{optimumCorner:e,optimumDistance:s}:t}),{optimumDistance:a?1/0:-1/0,optimumCorner:null}).optimumCorner},Fe=function(t,e){var i=ce(180),n=[];return jt(e).forEach((function(e,a){if(0===a){var o=e[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(i=de(e));if(le(o))return void(i=(Ae(t,o)+ce(270))%ce(360))}var r=De(t,e);n.push(r)})),{angle:i,stops:n,type:1}},ke="closest-side",_e="farthest-side",Ue="closest-corner",Qe="farthest-corner",Pe="circle",Le="ellipse",He="cover",Oe="contain",Me=function(t,e){var i=0,n=3,a=[],o=[];return jt(e).forEach((function(e,r){var s=!0;if(0===r?s=e.reduce((function(t,e){if(zt(e))switch(e.value){case"center":return o.push(ie),!1;case"top":case"left":return o.push(ee),!1;case"right":case"bottom":return o.push(ne),!1}else if(Zt(e)||Jt(e))return o.push(e),!1;return t}),s):1===r&&(s=e.reduce((function(t,e){if(zt(e))switch(e.value){case Pe:return i=0,!1;case Le:return i=1,!1;case Oe:case ke:return n=0,!1;case _e:return n=1,!1;case Ue:return n=2,!1;case He:case Qe:return n=3,!1}else if(Jt(e)||Zt(e))return Array.isArray(n)||(n=[]),n.push(e),!1;return t}),s)),s){var A=De(t,e);a.push(A)}})),{size:n,shape:i,stops:a,position:o,type:2}},Ne=function(t,e){if(22===e.type){var i={url:e.value,type:0};return t.cache.addImage(e.value),i}if(18===e.type){var n=$e[e.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(t,e.values)}throw new Error("Unsupported image type "+e.type)};var Re,$e={"linear-gradient":function(t,e){var i=ce(180),n=[];return jt(e).forEach((function(e,a){if(0===a){var o=e[0];if(20===o.type&&"to"===o.value)return void(i=de(e));if(le(o))return void(i=Ae(t,o))}var r=De(t,e);n.push(r)})),{angle:i,stops:n,type:1}},"-moz-linear-gradient":Fe,"-ms-linear-gradient":Fe,"-o-linear-gradient":Fe,"-webkit-linear-gradient":Fe,"radial-gradient":function(t,e){var i=0,n=3,a=[],o=[];return jt(e).forEach((function(e,r){var s=!0;if(0===r){var A=!1;s=e.reduce((function(t,e){if(A)if(zt(e))switch(e.value){case"center":return o.push(ie),t;case"top":case"left":return o.push(ee),t;case"right":case"bottom":return o.push(ne),t}else(Zt(e)||Jt(e))&&o.push(e);else if(zt(e))switch(e.value){case Pe:return i=0,!1;case Le:return i=1,!1;case"at":return A=!0,!1;case ke:return n=0,!1;case He:case _e:return n=1,!1;case Oe:case Ue:return n=2,!1;case Qe:return n=3,!1}else if(Jt(e)||Zt(e))return Array.isArray(n)||(n=[]),n.push(e),!1;return t}),s)}if(s){var l=De(t,e);a.push(l)}})),{size:n,shape:i,stops:a,position:o,type:2}},"-moz-radial-gradient":Me,"-ms-radial-gradient":Me,"-o-radial-gradient":Me,"-webkit-radial-gradient":Me,"-webkit-gradient":function(t,e){var i=ce(180),n=[],a=1;return jt(e).forEach((function(e,i){var o=e[0];if(0===i){if(zt(o)&&"linear"===o.value)return void(a=1);if(zt(o)&&"radial"===o.value)return void(a=2)}if(18===o.type)if("from"===o.name){var r=ue(t,o.values[0]);n.push({stop:ee,color:r})}else if("to"===o.name){r=ue(t,o.values[0]);n.push({stop:ne,color:r})}else if("color-stop"===o.name){var s=o.values.filter(Yt);if(2===s.length){r=ue(t,s[1]);var A=s[0];Vt(A)&&n.push({stop:{type:16,number:100*A.number,flags:A.flags},color:r})}}})),1===a?{angle:(i+ce(180))%ce(360),stops:n,type:a}:{size:3,shape:0,stops:n,position:[],type:a}}},qe={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(0===e.length)return[];var i=e[0];return 20===i.type&&"none"===i.value?[]:e.filter((function(t){return Yt(t)&&function(t){return!(20===t.type&&"none"===t.value||18===t.type&&!$e[t.name])}(t)})).map((function(e){return Ne(t,e)}))}},Ve={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map((function(t){if(zt(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},ze={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,e){return jt(e).map((function(t){return t.filter(Zt)})).map(te)}},Ke={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,e){return jt(e).map((function(t){return t.filter(zt).map((function(t){return t.value})).join(" ")})).map(We)}},We=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"}(Re||(Re={}));var Ge,Ye={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,e){return jt(e).map((function(t){return t.filter(je)}))}},je=function(t){return zt(t)||Zt(t)},Xe=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Je=Xe("top"),Ze=Xe("right"),ti=Xe("bottom"),ei=Xe("left"),ii=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return te(e.filter(Zt))}}},ni=ii("top-left"),ai=ii("top-right"),oi=ii("bottom-right"),ri=ii("bottom-left"),si=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Ai=si("top"),li=si("right"),di=si("bottom"),ci=si("left"),ui=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return qt(e)?e.number:0}}},hi=ui("top"),pi=ui("right"),gi=ui("bottom"),fi=ui("left"),mi={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},vi={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,e){return"rtl"===e?1:0}},yi={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,e){return e.filter(zt).reduce((function(t,e){return t|wi(e.value)}),0)}},wi=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},bi={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Bi={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};!function(t){t.NORMAL="normal",t.STRICT="strict"}(Ge||(Ge={}));var Ci,xi={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return"strict"===e?Ge.STRICT:Ge.NORMAL}},Di={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ti=function(t,e){return zt(t)&&"normal"===t.value?1.2*e:17===t.type?e*t.number:Zt(t)?oe(t,e):e},Ii={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,e){return 20===e.type&&"none"===e.value?null:Ne(t,e)}},Ei={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,e){return"inside"===e?0:1}},Si={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Fi=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},ki=Fi("top"),_i=Fi("right"),Ui=Fi("bottom"),Qi=Fi("left"),Pi={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,e){return e.filter(zt).map((function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},Li={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return"break-word"===e?"break-word":"normal"}},Hi=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Oi=Hi("top"),Mi=Hi("right"),Ni=Hi("bottom"),Ri=Hi("left"),$i={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},qi={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Vi={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return 1===e.length&&Wt(e[0],"none")?[]:jt(e).map((function(e){for(var i={color:Be.TRANSPARENT,offsetX:ee,offsetY:ee,blur:ee},n=0,a=0;a<e.length;a++){var o=e[a];Jt(o)?(0===n?i.offsetX=o:1===n?i.offsetY=o:i.blur=o,n++):i.color=ue(t,o)}return i}))}},zi={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Ki={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(t,e){if(20===e.type&&"none"===e.value)return null;if(18===e.type){var i=Wi[e.name];if(void 0===i)throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return i(e.values)}return null}},Wi={matrix:function(t){var e=t.filter((function(t){return 17===t.type})).map((function(t){return t.number}));return 6===e.length?e:null},matrix3d:function(t){var e=t.filter((function(t){return 17===t.type})).map((function(t){return t.number})),i=e[0],n=e[1];e[2],e[3];var a=e[4],o=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var r=e[12],s=e[13];return e[14],e[15],16===e.length?[i,n,a,o,r,s]:null}},Gi={type:16,number:50,flags:4},Yi=[Gi,Gi],ji={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(t,e){var i=e.filter(Zt);return 2!==i.length?Yi:[i[0],i[1]]}},Xi={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(t){t.NORMAL="normal",t.BREAK_ALL="break-all",t.KEEP_ALL="keep-all"}(Ci||(Ci={}));for(var Ji={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"break-all":return Ci.BREAK_ALL;case"keep-all":return Ci.KEEP_ALL;default:return Ci.NORMAL}}},Zi={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(t,e){if(20===e.type)return{auto:!0,order:0};if(Vt(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},tn=function(t,e){if(15===e.type)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")},en={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(t,e){return Vt(e)?e.number:1}},nn={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},an={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(t,e){return e.filter(zt).map((function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(t){return 0!==t}))}},on={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(t,e){var i=[],n=[];return e.forEach((function(t){switch(t.type){case 20:case 0:i.push(t.value);break;case 17:i.push(t.number.toString());break;case 4:n.push(i.join(" ")),i.length=0}})),i.length&&n.push(i.join(" ")),n.map((function(t){return-1===t.indexOf(" ")?t:"'"+t+"'"}))}},rn={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},sn={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(t,e){return Vt(e)?e.number:zt(e)&&"bold"===e.value?700:400}},An={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.filter(zt).map((function(t){return t.value}))}},ln={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},dn=function(t,e){return!!(t&e)},cn={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(0===e.length)return[];var i=e[0];return 20===i.type&&"none"===i.value?[]:e}},un={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(0===e.length)return null;var i=e[0];if(20===i.type&&"none"===i.value)return null;for(var n=[],a=e.filter(Gt),o=0;o<a.length;o++){var r=a[o],s=a[o+1];if(20===r.type){var A=s&&Vt(s)?s.number:1;n.push({counter:r.value,increment:A})}}return n}},hn={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(0===e.length)return[];for(var i=[],n=e.filter(Gt),a=0;a<n.length;a++){var o=n[a],r=n[a+1];if(zt(o)&&"none"!==o.value){var s=r&&Vt(r)?r.number:0;i.push({counter:o.value,reset:s})}}return i}},pn={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(t,e){return e.filter(qt).map((function(e){return tn(t,e)}))}},gn={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(0===e.length)return null;var i=e[0];if(20===i.type&&"none"===i.value)return null;var n=[],a=e.filter(Kt);if(a.length%2!=0)return null;for(var o=0;o<a.length;o+=2){var r=a[o].value,s=a[o+1].value;n.push({open:r,close:s})}return n}},fn=function(t,e,i){if(!t)return"";var n=t[Math.min(e,t.length-1)];return n?i?n.open:n.close:""},mn={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return 1===e.length&&Wt(e[0],"none")?[]:jt(e).map((function(e){for(var i={color:255,offsetX:ee,offsetY:ee,blur:ee,spread:ee,inset:!1},n=0,a=0;a<e.length;a++){var o=e[a];Wt(o,"inset")?i.inset=!0:Jt(o)?(0===n?i.offsetX=o:1===n?i.offsetY=o:2===n?i.blur=o:i.spread=o,n++):i.color=ue(t,o)}return i}))}},vn={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(t,e){var i=[];return e.filter(zt).forEach((function(t){switch(t.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2)}})),[0,1,2].forEach((function(t){-1===i.indexOf(t)&&i.push(t)})),i}},yn={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},wn={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return qt(e)?e.number:0}},bn=function(){function t(t,e){var i,n;this.animationDuration=xn(t,pn,e.animationDuration),this.backgroundClip=xn(t,Ce,e.backgroundClip),this.backgroundColor=xn(t,xe,e.backgroundColor),this.backgroundImage=xn(t,qe,e.backgroundImage),this.backgroundOrigin=xn(t,Ve,e.backgroundOrigin),this.backgroundPosition=xn(t,ze,e.backgroundPosition),this.backgroundRepeat=xn(t,Ke,e.backgroundRepeat),this.backgroundSize=xn(t,Ye,e.backgroundSize),this.borderTopColor=xn(t,Je,e.borderTopColor),this.borderRightColor=xn(t,Ze,e.borderRightColor),this.borderBottomColor=xn(t,ti,e.borderBottomColor),this.borderLeftColor=xn(t,ei,e.borderLeftColor),this.borderTopLeftRadius=xn(t,ni,e.borderTopLeftRadius),this.borderTopRightRadius=xn(t,ai,e.borderTopRightRadius),this.borderBottomRightRadius=xn(t,oi,e.borderBottomRightRadius),this.borderBottomLeftRadius=xn(t,ri,e.borderBottomLeftRadius),this.borderTopStyle=xn(t,Ai,e.borderTopStyle),this.borderRightStyle=xn(t,li,e.borderRightStyle),this.borderBottomStyle=xn(t,di,e.borderBottomStyle),this.borderLeftStyle=xn(t,ci,e.borderLeftStyle),this.borderTopWidth=xn(t,hi,e.borderTopWidth),this.borderRightWidth=xn(t,pi,e.borderRightWidth),this.borderBottomWidth=xn(t,gi,e.borderBottomWidth),this.borderLeftWidth=xn(t,fi,e.borderLeftWidth),this.boxShadow=xn(t,mn,e.boxShadow),this.color=xn(t,mi,e.color),this.direction=xn(t,vi,e.direction),this.display=xn(t,yi,e.display),this.float=xn(t,bi,e.cssFloat),this.fontFamily=xn(t,on,e.fontFamily),this.fontSize=xn(t,rn,e.fontSize),this.fontStyle=xn(t,ln,e.fontStyle),this.fontVariant=xn(t,An,e.fontVariant),this.fontWeight=xn(t,sn,e.fontWeight),this.letterSpacing=xn(t,Bi,e.letterSpacing),this.lineBreak=xn(t,xi,e.lineBreak),this.lineHeight=xn(t,Di,e.lineHeight),this.listStyleImage=xn(t,Ii,e.listStyleImage),this.listStylePosition=xn(t,Ei,e.listStylePosition),this.listStyleType=xn(t,Si,e.listStyleType),this.marginTop=xn(t,ki,e.marginTop),this.marginRight=xn(t,_i,e.marginRight),this.marginBottom=xn(t,Ui,e.marginBottom),this.marginLeft=xn(t,Qi,e.marginLeft),this.opacity=xn(t,en,e.opacity);var a=xn(t,Pi,e.overflow);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0],this.overflowWrap=xn(t,Li,e.overflowWrap),this.paddingTop=xn(t,Oi,e.paddingTop),this.paddingRight=xn(t,Mi,e.paddingRight),this.paddingBottom=xn(t,Ni,e.paddingBottom),this.paddingLeft=xn(t,Ri,e.paddingLeft),this.paintOrder=xn(t,vn,e.paintOrder),this.position=xn(t,qi,e.position),this.textAlign=xn(t,$i,e.textAlign),this.textDecorationColor=xn(t,nn,null!==(i=e.textDecorationColor)&&void 0!==i?i:e.color),this.textDecorationLine=xn(t,an,null!==(n=e.textDecorationLine)&&void 0!==n?n:e.textDecoration),this.textShadow=xn(t,Vi,e.textShadow),this.textTransform=xn(t,zi,e.textTransform),this.transform=xn(t,Ki,e.transform),this.transformOrigin=xn(t,ji,e.transformOrigin),this.visibility=xn(t,Xi,e.visibility),this.webkitTextStrokeColor=xn(t,yn,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=xn(t,wn,e.webkitTextStrokeWidth),this.wordBreak=xn(t,Ji,e.wordBreak),this.zIndex=xn(t,Zi,e.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},t.prototype.isTransparent=function(){return he(this.backgroundColor)},t.prototype.isTransformed=function(){return null!==this.transform},t.prototype.isPositioned=function(){return 0!==this.position},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return 0!==this.float},t.prototype.isInlineLevel=function(){return dn(this.display,4)||dn(this.display,33554432)||dn(this.display,268435456)||dn(this.display,536870912)||dn(this.display,67108864)||dn(this.display,134217728)},t}(),Bn=function(t,e){this.content=xn(t,cn,e.content),this.quotes=xn(t,gn,e.quotes)},Cn=function(t,e){this.counterIncrement=xn(t,un,e.counterIncrement),this.counterReset=xn(t,hn,e.counterReset)},xn=function(t,e,i){var n=new Rt,a=null!=i?i.toString():e.initialValue;n.write(a);var o=new $t(n.read());switch(e.type){case 2:var r=o.parseComponentValue();return e.parse(t,zt(r)?r.value:e.initialValue);case 0:return e.parse(t,o.parseComponentValue());case 1:return e.parse(t,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(e.format){case"angle":return Ae(t,o.parseComponentValue());case"color":return ue(t,o.parseComponentValue());case"image":return Ne(t,o.parseComponentValue());case"length":var s=o.parseComponentValue();return Jt(s)?s:ee;case"length-percentage":var A=o.parseComponentValue();return Zt(A)?A:ee;case"time":return tn(t,o.parseComponentValue())}}},Dn=function(t,e){var i=function(t){switch(t.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(t);return 1===i||e===i},Tn=function(t,e){this.context=t,this.textNodes=[],this.elements=[],this.flags=0,Dn(e,3),this.styles=new bn(t,window.getComputedStyle(e,null)),Fa(e)&&(this.styles.animationDuration.some((function(t){return t>0}))&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=s(this.context,e),Dn(e,4)&&(this.flags|=16)},In="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",En="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Sn=0;Sn<64;Sn++)En[In.charCodeAt(Sn)]=Sn;for(var Fn=function(t,e,i){return t.slice?t.slice(e,i):new Uint16Array(Array.prototype.slice.call(t,e,i))},kn=function(){function t(t,e,i,n,a,o){this.initialValue=t,this.errorValue=e,this.highStart=i,this.highValueIndex=n,this.index=a,this.data=o}return t.prototype.get=function(t){var e;if(t>=0){if(t<55296||t>56319&&t<=65535)return e=((e=this.index[t>>5])<<2)+(31&t),this.data[e];if(t<=65535)return e=((e=this.index[2048+(t-55296>>5)])<<2)+(31&t),this.data[e];if(t<this.highStart)return e=2080+(t>>11),e=this.index[e],e+=t>>5&63,e=((e=this.index[e])<<2)+(31&t),this.data[e];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),_n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Un="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Qn=0;Qn<64;Qn++)Un[_n.charCodeAt(Qn)]=Qn;var Pn,Ln=8,Hn=9,On=11,Mn=12,Nn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var i=t.length;if(!i)return"";for(var n=[],a=-1,o="";++a<i;){var r=t[a];r<=65535?n.push(r):(r-=65536,n.push(55296+(r>>10),r%1024+56320)),(a+1===i||n.length>16384)&&(o+=String.fromCharCode.apply(String,n),n.length=0)}return o},Rn=function(t){var e,i,n,a=function(t){var e,i,n,a,o,r=.75*t.length,s=t.length,A=0;"="===t[t.length-1]&&(r--,"="===t[t.length-2]&&r--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(r):new Array(r),d=Array.isArray(l)?l:new Uint8Array(l);for(e=0;e<s;e+=4)i=En[t.charCodeAt(e)],n=En[t.charCodeAt(e+1)],a=En[t.charCodeAt(e+2)],o=En[t.charCodeAt(e+3)],d[A++]=i<<2|n>>4,d[A++]=(15&n)<<4|a>>2,d[A++]=(3&a)<<6|63&o;return l}(t),o=Array.isArray(a)?function(t){for(var e=t.length,i=[],n=0;n<e;n+=4)i.push(t[n+3]<<24|t[n+2]<<16|t[n+1]<<8|t[n]);return i}(a):new Uint32Array(a),r=Array.isArray(a)?function(t){for(var e=t.length,i=[],n=0;n<e;n+=2)i.push(t[n+1]<<8|t[n]);return i}(a):new Uint16Array(a),s=Fn(r,12,o[4]/2),A=2===o[5]?Fn(r,(24+o[4])/2):(e=o,i=Math.ceil((24+o[4])/4),e.slice?e.slice(i,n):new Uint32Array(Array.prototype.slice.call(e,i,n)));return new kn(o[0],o[1],o[2],o[3],s,A)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),$n="×",qn=function(t){return Rn.get(t)},Vn=function(t,e,i){var n=i-2,a=e[n],o=e[i-1],r=e[i];if(2===o&&3===r)return $n;if(2===o||3===o||4===o)return"÷";if(2===r||3===r||4===r)return"÷";if(o===Ln&&-1!==[Ln,Hn,On,Mn].indexOf(r))return $n;if(!(o!==On&&o!==Hn||r!==Hn&&10!==r))return $n;if((o===Mn||10===o)&&10===r)return $n;if(13===r||5===r)return $n;if(7===r)return $n;if(1===o)return $n;if(13===o&&14===r){for(;5===a;)a=e[--n];if(14===a)return $n}if(15===o&&15===r){for(var s=0;15===a;)s++,a=e[--n];if(s%2==0)return $n}return"÷"},zn=function(t){var e=function(t){for(var e=[],i=0,n=t.length;i<n;){var a=t.charCodeAt(i++);if(a>=55296&&a<=56319&&i<n){var o=t.charCodeAt(i++);56320==(64512&o)?e.push(((1023&a)<<10)+(1023&o)+65536):(e.push(a),i--)}else e.push(a)}return e}(t),i=e.length,n=0,a=0,o=e.map(qn);return{next:function(){if(n>=i)return{done:!0,value:null};for(var t=$n;n<i&&(t=Vn(0,o,++n))===$n;);if(t!==$n||n===i){var r=Nn.apply(null,e.slice(a,n));return a=n,{value:r,done:!1}}return{done:!0,value:null}}}},Kn=function(t){return 0===t[0]&&255===t[1]&&0===t[2]&&255===t[3]},Wn=function(t,e,i,n,a){var o="http://www.w3.org/2000/svg",r=document.createElementNS(o,"svg"),s=document.createElementNS(o,"foreignObject");return r.setAttributeNS(null,"width",t.toString()),r.setAttributeNS(null,"height",e.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",i.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),r.appendChild(s),s.appendChild(a),r},Gn=function(t){return new Promise((function(e,i){var n=new Image;n.onload=function(){return e(n)},n.onerror=i,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(t))}))},Yn={get SUPPORT_RANGE_BOUNDS(){var t=function(t){if(t.createRange){var e=t.createRange();if(e.getBoundingClientRect){var i=t.createElement("boundtest");i.style.height="123px",i.style.display="block",t.body.appendChild(i),e.selectNode(i);var n=e.getBoundingClientRect(),a=Math.round(n.height);if(t.body.removeChild(i),123===a)return!0}}return!1}(document);return Object.defineProperty(Yn,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_WORD_BREAKING(){var t=Yn.SUPPORT_RANGE_BOUNDS&&function(t){var e=t.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",t.body.appendChild(e);var i=t.createRange();e.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var n=e.firstChild,a=A(n.data).map((function(t){return l(t)})),o=0,r={},s=a.every((function(t,e){i.setStart(n,o),i.setEnd(n,o+t.length);var a=i.getBoundingClientRect();o+=t.length;var s=a.x>r.x||a.y>r.y;return r=a,0===e||s}));return t.body.removeChild(e),s}(document);return Object.defineProperty(Yn,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=function(t){var e=new Image,i=t.createElement("canvas"),n=i.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(e,0,0),i.toDataURL()}catch(t){return!1}return!0}(document);return Object.defineProperty(Yn,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t="function"==typeof Array.from&&"function"==typeof window.fetch?function(t){var e=t.createElement("canvas"),i=100;e.width=i,e.height=i;var n=e.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,i,i);var a=new Image,o=e.toDataURL();a.src=o;var r=Wn(i,i,0,0,a);return n.fillStyle="red",n.fillRect(0,0,i,i),Gn(r).then((function(e){n.drawImage(e,0,0);var a=n.getImageData(0,0,i,i).data;n.fillStyle="red",n.fillRect(0,0,i,i);var r=t.createElement("div");return r.style.backgroundImage="url("+o+")",r.style.height=i+"px",Kn(a)?Gn(Wn(i,i,0,0,r)):Promise.reject(!1)})).then((function(t){return n.drawImage(t,0,0),Kn(n.getImageData(0,0,i,i).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Yn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=void 0!==(new Image).crossOrigin;return Object.defineProperty(Yn,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Yn,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Yn,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Yn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},jn=function(t,e){this.text=t,this.bounds=e},Xn=function(t,e){var i=e.ownerDocument;if(i){var n=i.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var a=e.parentNode;if(a){a.replaceChild(n,e);var o=s(t,n);return n.firstChild&&a.replaceChild(n.firstChild,n),o}}return r.EMPTY},Jn=function(t,e,i){var n=t.ownerDocument;if(!n)throw new Error("Node has no owner document");var a=n.createRange();return a.setStart(t,e),a.setEnd(t,e+i),a},Zn=function(t){if(Yn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t)).map((function(t){return t.segment}))}return function(t){for(var e,i=zn(t),n=[];!(e=i.next()).done;)e.value&&n.push(e.value.slice());return n}(t)},ta=function(t,e){return 0!==e.letterSpacing?Zn(t):function(t,e){if(Yn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(t)).map((function(t){return t.segment}))}return ia(t,e)}(t,e)},ea=[32,160,4961,65792,65793,4153,4241],ia=function(t,e){for(var i,n=function(t,e){var i=A(t),n=ot(i,e),a=n[0],o=n[1],r=n[2],s=i.length,l=0,d=0;return{next:function(){if(d>=s)return{done:!0,value:null};for(var t=K;d<s&&(t=at(i,o,a,++d,r))===K;);if(t!==K||d===s){var e=new rt(i,t,l,d);return l=d,{value:e,done:!1}}return{done:!0,value:null}}}}(t,{lineBreak:e.lineBreak,wordBreak:"break-word"===e.overflowWrap?"break-word":e.wordBreak}),a=[],o=function(){if(i.value){var t=i.value.slice(),e=A(t),n="";e.forEach((function(t){-1===ea.indexOf(t)?n+=l(t):(n.length&&a.push(n),a.push(l(t)),n="")})),n.length&&a.push(n)}};!(i=n.next()).done;)o();return a},na=function(t,e,i){this.text=aa(e.data,i.textTransform),this.textBounds=function(t,e,i,n){var a=ta(e,i),o=[],s=0;return a.forEach((function(e){if(i.textDecorationLine.length||e.trim().length>0)if(Yn.SUPPORT_RANGE_BOUNDS){var a=Jn(n,s,e.length).getClientRects();if(a.length>1){var A=Zn(e),l=0;A.forEach((function(e){o.push(new jn(e,r.fromDOMRectList(t,Jn(n,l+s,e.length).getClientRects()))),l+=e.length}))}else o.push(new jn(e,r.fromDOMRectList(t,a)))}else{var d=n.splitText(e.length);o.push(new jn(e,Xn(t,n))),n=d}else Yn.SUPPORT_RANGE_BOUNDS||(n=n.splitText(e.length));s+=e.length})),o}(t,this.text,i,e)},aa=function(t,e){switch(e){case 1:return t.toLowerCase();case 3:return t.replace(oa,ra);case 2:return t.toUpperCase();default:return t}},oa=/(^|\s|:|-|\(|\))([a-z])/g,ra=function(t,e,i){return t.length>0?e+i.toUpperCase():t},sa=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.src=i.currentSrc||i.src,n.intrinsicWidth=i.naturalWidth,n.intrinsicHeight=i.naturalHeight,n.context.cache.addImage(n.src),n}return e(i,t),i}(Tn),Aa=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.canvas=i,n.intrinsicWidth=i.width,n.intrinsicHeight=i.height,n}return e(i,t),i}(Tn),la=function(t){function i(e,i){var n=t.call(this,e,i)||this,a=new XMLSerializer,o=s(e,i);return i.setAttribute("width",o.width+"px"),i.setAttribute("height",o.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(a.serializeToString(i)),n.intrinsicWidth=i.width.baseVal.value,n.intrinsicHeight=i.height.baseVal.value,n.context.cache.addImage(n.svg),n}return e(i,t),i}(Tn),da=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.value=i.value,n}return e(i,t),i}(Tn),ca=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.start=i.start,n.reversed="boolean"==typeof i.reversed&&!0===i.reversed,n}return e(i,t),i}(Tn),ua=[{type:15,flags:0,unit:"px",number:3}],ha=[{type:16,flags:0,number:50}],pa="checkbox",ga="radio",fa="password",ma=707406591,va=function(t){function i(e,i){var n,a,o,s=t.call(this,e,i)||this;switch(s.type=i.type.toLowerCase(),s.checked=i.checked,s.value=0===(a=(n=i).type===fa?new Array(n.value.length+1).join("•"):n.value).length?n.placeholder||"":a,s.type!==pa&&s.type!==ga||(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=1,s.styles.backgroundClip=[0],s.styles.backgroundOrigin=[0],s.bounds=(o=s.bounds).width>o.height?new r(o.left+(o.width-o.height)/2,o.top,o.height,o.height):o.width<o.height?new r(o.left,o.top+(o.height-o.width)/2,o.width,o.width):o),s.type){case pa:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=ua;break;case ga:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=ha}return s}return e(i,t),i}(Tn),ya=function(t){function i(e,i){var n=t.call(this,e,i)||this,a=i.options[i.selectedIndex||0];return n.value=a&&a.text||"",n}return e(i,t),i}(Tn),wa=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.value=i.value,n}return e(i,t),i}(Tn),ba=function(t){function i(e,i){var n=t.call(this,e,i)||this;n.src=i.src,n.width=parseInt(i.width,10)||0,n.height=parseInt(i.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){n.tree=Da(e,i.contentWindow.document.documentElement);var a=i.contentWindow.document.documentElement?be(e,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):Be.TRANSPARENT,o=i.contentWindow.document.body?be(e,getComputedStyle(i.contentWindow.document.body).backgroundColor):Be.TRANSPARENT;n.backgroundColor=he(a)?he(o)?n.styles.backgroundColor:o:a}}catch(t){}return n}return e(i,t),i}(Tn),Ba=["OL","UL","MENU"],Ca=function(t,e,i,n){for(var a=e.firstChild,o=void 0;a;a=o)if(o=a.nextSibling,Ea(a)&&a.data.trim().length>0)i.textNodes.push(new na(t,a,i.styles));else if(Sa(a))if(Va(a)&&a.assignedNodes)a.assignedNodes().forEach((function(e){return Ca(t,e,i,n)}));else{var r=xa(t,a);r.styles.isVisible()&&(Ta(a,r,n)?r.flags|=4:Ia(r.styles)&&(r.flags|=2),-1!==Ba.indexOf(a.tagName)&&(r.flags|=8),i.elements.push(r),a.slot,a.shadowRoot?Ca(t,a.shadowRoot,r,n):$a(a)||Pa(a)||qa(a)||Ca(t,a,r,n))}},xa=function(t,e){return Ma(e)?new sa(t,e):Ha(e)?new Aa(t,e):Pa(e)?new la(t,e):_a(e)?new da(t,e):Ua(e)?new ca(t,e):Qa(e)?new va(t,e):qa(e)?new ya(t,e):$a(e)?new wa(t,e):Na(e)?new ba(t,e):new Tn(t,e)},Da=function(t,e){var i=xa(t,e);return i.flags|=4,Ca(t,e,i,i),i},Ta=function(t,e,i){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||La(t)&&i.styles.isTransparent()},Ia=function(t){return t.isPositioned()||t.isFloating()},Ea=function(t){return t.nodeType===Node.TEXT_NODE},Sa=function(t){return t.nodeType===Node.ELEMENT_NODE},Fa=function(t){return Sa(t)&&void 0!==t.style&&!ka(t)},ka=function(t){return"object"==typeof t.className},_a=function(t){return"LI"===t.tagName},Ua=function(t){return"OL"===t.tagName},Qa=function(t){return"INPUT"===t.tagName},Pa=function(t){return"svg"===t.tagName},La=function(t){return"BODY"===t.tagName},Ha=function(t){return"CANVAS"===t.tagName},Oa=function(t){return"VIDEO"===t.tagName},Ma=function(t){return"IMG"===t.tagName},Na=function(t){return"IFRAME"===t.tagName},Ra=function(t){return"STYLE"===t.tagName},$a=function(t){return"TEXTAREA"===t.tagName},qa=function(t){return"SELECT"===t.tagName},Va=function(t){return"SLOT"===t.tagName},za=function(t){return t.tagName.indexOf("-")>0},Ka=function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},t.prototype.getCounterValues=function(t){var e=this.counters[t];return e||[]},t.prototype.pop=function(t){var e=this;t.forEach((function(t){return e.counters[t].pop()}))},t.prototype.parse=function(t){var e=this,i=t.counterIncrement,n=t.counterReset,a=!0;null!==i&&i.forEach((function(t){var i=e.counters[t.counter];i&&0!==t.increment&&(a=!1,i.length||i.push(1),i[Math.max(0,i.length-1)]+=t.increment)}));var o=[];return a&&n.forEach((function(t){var i=e.counters[t.counter];o.push(t.counter),i||(i=e.counters[t.counter]=[]),i.push(t.reset)})),o},t}(),Wa={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Ga={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Ya={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},ja={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Xa=function(t,e,i,n,a,o){return t<e||t>i?ro(t,a,o.length>0):n.integers.reduce((function(e,i,a){for(;t>=i;)t-=i,e+=n.values[a];return e}),"")+o},Ja=function(t,e,i,n){var a="";do{i||t--,a=n(t)+a,t/=e}while(t*e>=e);return a},Za=function(t,e,i,n,a){var o=i-e+1;return(t<0?"-":"")+(Ja(Math.abs(t),o,n,(function(t){return l(Math.floor(t%o)+e)}))+a)},to=function(t,e,i){void 0===i&&(i=". ");var n=e.length;return Ja(Math.abs(t),n,!1,(function(t){return e[Math.floor(t%n)]}))+i},eo=function(t,e,i,n,a,o){if(t<-9999||t>9999)return ro(t,4,a.length>0);var r=Math.abs(t),s=a;if(0===r)return e[0]+s;for(var A=0;r>0&&A<=4;A++){var l=r%10;0===l&&dn(o,1)&&""!==s?s=e[l]+s:l>1||1===l&&0===A||1===l&&1===A&&dn(o,2)||1===l&&1===A&&dn(o,4)&&t>100||1===l&&A>1&&dn(o,8)?s=e[l]+(A>0?i[A-1]:"")+s:1===l&&A>0&&(s=i[A-1]+s),r=Math.floor(r/10)}return(t<0?n:"")+s},io="十百千萬",no="拾佰仟萬",ao="マイナス",oo="마이너스",ro=function(t,e,i){var n=i?". ":"",a=i?"、":"",o=i?", ":"",r=i?" ":"";switch(e){case 0:return"•"+r;case 1:return"◦"+r;case 2:return"◾"+r;case 5:var s=Za(t,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return to(t,"〇一二三四五六七八九",a);case 6:return Xa(t,1,3999,Wa,3,n).toLowerCase();case 7:return Xa(t,1,3999,Wa,3,n);case 8:return Za(t,945,969,!1,n);case 9:return Za(t,97,122,!1,n);case 10:return Za(t,65,90,!1,n);case 11:return Za(t,1632,1641,!0,n);case 12:case 49:return Xa(t,1,9999,Ga,3,n);case 35:return Xa(t,1,9999,Ga,3,n).toLowerCase();case 13:return Za(t,2534,2543,!0,n);case 14:case 30:return Za(t,6112,6121,!0,n);case 15:return to(t,"子丑寅卯辰巳午未申酉戌亥",a);case 16:return to(t,"甲乙丙丁戊己庚辛壬癸",a);case 17:case 48:return eo(t,"零一二三四五六七八九",io,"負",a,14);case 47:return eo(t,"零壹貳參肆伍陸柒捌玖",no,"負",a,15);case 42:return eo(t,"零一二三四五六七八九",io,"负",a,14);case 41:return eo(t,"零壹贰叁肆伍陆柒捌玖",no,"负",a,15);case 26:return eo(t,"〇一二三四五六七八九","十百千万",ao,a,0);case 25:return eo(t,"零壱弐参四伍六七八九","拾百千万",ao,a,7);case 31:return eo(t,"영일이삼사오육칠팔구","십백천만",oo,o,7);case 33:return eo(t,"零一二三四五六七八九","十百千萬",oo,o,0);case 32:return eo(t,"零壹貳參四五六七八九","拾百千",oo,o,7);case 18:return Za(t,2406,2415,!0,n);case 20:return Xa(t,1,19999,ja,3,n);case 21:return Za(t,2790,2799,!0,n);case 22:return Za(t,2662,2671,!0,n);case 22:return Xa(t,1,10999,Ya,3,n);case 23:return to(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return to(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Za(t,3302,3311,!0,n);case 28:return to(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",a);case 29:return to(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",a);case 34:return Za(t,3792,3801,!0,n);case 37:return Za(t,6160,6169,!0,n);case 38:return Za(t,4160,4169,!0,n);case 39:return Za(t,2918,2927,!0,n);case 40:return Za(t,1776,1785,!0,n);case 43:return Za(t,3046,3055,!0,n);case 44:return Za(t,3174,3183,!0,n);case 45:return Za(t,3664,3673,!0,n);case 46:return Za(t,3872,3881,!0,n);default:return Za(t,48,57,!0,n)}},so="data-html2canvas-ignore",Ao=function(){function t(t,e,i){if(this.context=t,this.options=i,this.scrolledElements=[],this.referenceElement=e,this.counters=new Ka,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(t,e){var i=this,o=co(t,e);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var r=t.defaultView.pageXOffset,s=t.defaultView.pageYOffset,A=o.contentWindow,l=A.document,d=po(o).then((function(){return n(i,void 0,void 0,(function(){var t,i;return a(this,(function(n){switch(n.label){case 0:return this.scrolledElements.forEach(yo),A&&(A.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||A.scrollY===e.top&&A.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(A.scrollX-e.left,A.scrollY-e.top,0,0))),t=this.options.onclone,void 0===(i=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,ho(l)]:[3,4];case 3:n.sent(),n.label=4;case 4:return"function"==typeof t?[2,Promise.resolve().then((function(){return t(l,i)})).then((function(){return o}))]:[2,o]}}))}))}));return l.open(),l.write(mo(document.doctype)+"<html></html>"),vo(this.referenceElement.ownerDocument,r,s),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),d},t.prototype.createElementClone=function(t){if(Dn(t,2),Ha(t))return this.createCanvasClone(t);if(Oa(t))return this.createVideoClone(t);if(Ra(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return Ma(e)&&(Ma(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),za(e)?this.createCustomElementClone(e):e},t.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return fo(t.style,e),e},t.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var i=[].slice.call(e.cssRules,0).reduce((function(t,e){return e&&"string"==typeof e.cssText?t+e.cssText:t}),""),n=t.cloneNode(!1);return n.textContent=i,n}}catch(t){if(this.context.logger.error("Unable to access cssRules property",t),"SecurityError"!==t.name)throw t}return t.cloneNode(!1)},t.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var i=t.ownerDocument.createElement("img");try{return i.src=t.toDataURL(),i}catch(e){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var n=t.cloneNode(!1);try{n.width=t.width,n.height=t.height;var a=t.getContext("2d"),o=n.getContext("2d");if(o)if(!this.options.allowTaint&&a)o.putImageData(a.getImageData(0,0,t.width,t.height),0,0);else{var r=null!==(e=t.getContext("webgl2"))&&void 0!==e?e:t.getContext("webgl");if(r){var s=r.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}o.drawImage(t,0,0)}return n}catch(e){this.context.logger.info("Unable to clone canvas as it is tainted",t)}return n},t.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var i=e.getContext("2d");try{return i&&(i.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||i.getImageData(0,0,e.width,e.height)),e}catch(e){this.context.logger.info("Unable to clone video as it is tainted",t)}var n=t.ownerDocument.createElement("canvas");return n.width=t.offsetWidth,n.height=t.offsetHeight,n},t.prototype.appendChildNode=function(t,e,i){Sa(e)&&("SCRIPT"===e.tagName||e.hasAttribute(so)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&Sa(e)&&Ra(e)||t.appendChild(this.cloneNode(e,i))},t.prototype.cloneChildNodes=function(t,e,i){for(var n=this,a=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;a;a=a.nextSibling)if(Sa(a)&&Va(a)&&"function"==typeof a.assignedNodes){var o=a.assignedNodes();o.length&&o.forEach((function(t){return n.appendChildNode(e,t,i)}))}else this.appendChildNode(e,a,i)},t.prototype.cloneNode=function(t,e){if(Ea(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var i=t.ownerDocument.defaultView;if(i&&Sa(t)&&(Fa(t)||ka(t))){var n=this.createElementClone(t);n.style.transitionProperty="none";var a=i.getComputedStyle(t),o=i.getComputedStyle(t,":before"),r=i.getComputedStyle(t,":after");this.referenceElement===t&&Fa(n)&&(this.clonedReferenceElement=n),La(n)&&Co(n);var s=this.counters.parse(new Cn(this.context,a)),A=this.resolvePseudoContent(t,n,o,Pn.BEFORE);za(t)&&(e=!0),Oa(t)||this.cloneChildNodes(t,n,e),A&&n.insertBefore(A,n.firstChild);var l=this.resolvePseudoContent(t,n,r,Pn.AFTER);return l&&n.appendChild(l),this.counters.pop(s),(a&&(this.options.copyStyles||ka(t))&&!Na(t)||e)&&fo(a,n),0===t.scrollTop&&0===t.scrollLeft||this.scrolledElements.push([n,t.scrollLeft,t.scrollTop]),($a(t)||qa(t))&&($a(n)||qa(n))&&(n.value=t.value),n}return t.cloneNode(!1)},t.prototype.resolvePseudoContent=function(t,e,i,n){var a=this;if(i){var o=i.content,r=e.ownerDocument;if(r&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==i.display){this.counters.parse(new Cn(this.context,i));var s=new Bn(this.context,i),A=r.createElement("html2canvaspseudoelement");fo(i,A),s.content.forEach((function(e){if(0===e.type)A.appendChild(r.createTextNode(e.value));else if(22===e.type){var i=r.createElement("img");i.src=e.value,i.style.opacity="1",A.appendChild(i)}else if(18===e.type){if("attr"===e.name){var n=e.values.filter(zt);n.length&&A.appendChild(r.createTextNode(t.getAttribute(n[0].value)||""))}else if("counter"===e.name){var o=e.values.filter(Yt),l=o[0],d=o[1];if(l&&zt(l)){var c=a.counters.getCounterValue(l.value),u=d&&zt(d)?Si.parse(a.context,d.value):3;A.appendChild(r.createTextNode(ro(c,u,!1)))}}else if("counters"===e.name){var h=e.values.filter(Yt),p=(l=h[0],h[1]);d=h[2];if(l&&zt(l)){var g=a.counters.getCounterValues(l.value),f=d&&zt(d)?Si.parse(a.context,d.value):3,m=p&&0===p.type?p.value:"",v=g.map((function(t){return ro(t,f,!1)})).join(m);A.appendChild(r.createTextNode(v))}}}else if(20===e.type)switch(e.value){case"open-quote":A.appendChild(r.createTextNode(fn(s.quotes,a.quoteDepth++,!0)));break;case"close-quote":A.appendChild(r.createTextNode(fn(s.quotes,--a.quoteDepth,!1)));break;default:A.appendChild(r.createTextNode(e.value))}})),A.className=wo+" "+bo;var l=n===Pn.BEFORE?" "+wo:" "+bo;return ka(e)?e.className.baseValue+=l:e.className+=l,A}}},t.destroy=function(t){return!!t.parentNode&&(t.parentNode.removeChild(t),!0)},t}();!function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"}(Pn||(Pn={}));var lo,co=function(t,e){var i=t.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=e.width.toString(),i.height=e.height.toString(),i.scrolling="no",i.setAttribute(so,"true"),t.body.appendChild(i),i},uo=function(t){return new Promise((function(e){t.complete?e():t.src?(t.onload=e,t.onerror=e):e()}))},ho=function(t){return Promise.all([].slice.call(t.images,0).map(uo))},po=function(t){return new Promise((function(e,i){var n=t.contentWindow;if(!n)return i("No window assigned for iframe");var a=n.document;n.onload=t.onload=function(){n.onload=t.onload=null;var i=setInterval((function(){a.body.childNodes.length>0&&"complete"===a.readyState&&(clearInterval(i),e(t))}),50)}}))},go=["all","d","content"],fo=function(t,e){for(var i=t.length-1;i>=0;i--){var n=t.item(i);-1===go.indexOf(n)&&e.style.setProperty(n,t.getPropertyValue(n))}return e},mo=function(t){var e="";return t&&(e+="<!DOCTYPE ",t.name&&(e+=t.name),t.internalSubset&&(e+=t.internalSubset),t.publicId&&(e+='"'+t.publicId+'"'),t.systemId&&(e+='"'+t.systemId+'"'),e+=">"),e},vo=function(t,e,i){t&&t.defaultView&&(e!==t.defaultView.pageXOffset||i!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(e,i)},yo=function(t){var e=t[0],i=t[1],n=t[2];e.scrollLeft=i,e.scrollTop=n},wo="___html2canvas___pseudoelement_before",bo="___html2canvas___pseudoelement_after",Bo='{\n    content: "" !important;\n    display: none !important;\n}',Co=function(t){xo(t,"."+wo+":before"+Bo+"\n         ."+bo+":after"+Bo)},xo=function(t,e){var i=t.ownerDocument;if(i){var n=i.createElement("style");n.textContent=e,t.appendChild(n)}},Do=function(){function t(){}return t.getOrigin=function(e){var i=t._link;return i?(i.href=e,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),To=function(){function t(t,e){this.context=t,this._options=e,this._cache={}}return t.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)?e:Uo(t)||Fo(t)?((this._cache[t]=this.loadImage(t)).catch((function(){})),e):e},t.prototype.match=function(t){return this._cache[t]},t.prototype.loadImage=function(t){return n(this,void 0,void 0,(function(){var e,i,n,o,r=this;return a(this,(function(a){switch(a.label){case 0:return e=Do.isSameOrigin(t),i=!ko(t)&&!0===this._options.useCORS&&Yn.SUPPORT_CORS_IMAGES&&!e,n=!ko(t)&&!e&&!Uo(t)&&"string"==typeof this._options.proxy&&Yn.SUPPORT_CORS_XHR&&!i,e||!1!==this._options.allowTaint||ko(t)||Uo(t)||n||i?(o=t,n?[4,this.proxy(o)]:[3,2]):[2];case 1:o=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise((function(t,e){var n=new Image;n.onload=function(){return t(n)},n.onerror=e,(_o(o)||i)&&(n.crossOrigin="anonymous"),n.src=o,!0===n.complete&&setTimeout((function(){return t(n)}),500),r._options.imageTimeout>0&&setTimeout((function(){return e("Timed out ("+r._options.imageTimeout+"ms) loading image")}),r._options.imageTimeout)}))];case 3:return[2,a.sent()]}}))}))},t.prototype.has=function(t){return void 0!==this._cache[t]},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(t){var e=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var n=t.substring(0,256);return new Promise((function(a,o){var r=Yn.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===r)a(s.response);else{var t=new FileReader;t.addEventListener("load",(function(){return a(t.result)}),!1),t.addEventListener("error",(function(t){return o(t)}),!1),t.readAsDataURL(s.response)}else o("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=o;var A=i.indexOf("?")>-1?"&":"?";if(s.open("GET",""+i+A+"url="+encodeURIComponent(t)+"&responseType="+r),"text"!==r&&s instanceof XMLHttpRequest&&(s.responseType=r),e._options.imageTimeout){var l=e._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return o("Timed out ("+l+"ms) proxying "+n)}}s.send()}))},t}(),Io=/^data:image\/svg\+xml/i,Eo=/^data:image\/.*;base64,/i,So=/^data:image\/.*/i,Fo=function(t){return Yn.SUPPORT_SVG_DRAWING||!Qo(t)},ko=function(t){return So.test(t)},_o=function(t){return Eo.test(t)},Uo=function(t){return"blob"===t.substr(0,4)},Qo=function(t){return"svg"===t.substr(-3).toLowerCase()||Io.test(t)},Po=function(){function t(t,e){this.type=0,this.x=t,this.y=e}return t.prototype.add=function(e,i){return new t(this.x+e,this.y+i)},t}(),Lo=function(t,e,i){return new Po(t.x+(e.x-t.x)*i,t.y+(e.y-t.y)*i)},Ho=function(){function t(t,e,i,n){this.type=1,this.start=t,this.startControl=e,this.endControl=i,this.end=n}return t.prototype.subdivide=function(e,i){var n=Lo(this.start,this.startControl,e),a=Lo(this.startControl,this.endControl,e),o=Lo(this.endControl,this.end,e),r=Lo(n,a,e),s=Lo(a,o,e),A=Lo(r,s,e);return i?new t(this.start,n,r,A):new t(A,s,o,this.end)},t.prototype.add=function(e,i){return new t(this.start.add(e,i),this.startControl.add(e,i),this.endControl.add(e,i),this.end.add(e,i))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Oo=function(t){return 1===t.type},Mo=function(t){var e=t.styles,i=t.bounds,n=ae(e.borderTopLeftRadius,i.width,i.height),a=n[0],o=n[1],r=ae(e.borderTopRightRadius,i.width,i.height),s=r[0],A=r[1],l=ae(e.borderBottomRightRadius,i.width,i.height),d=l[0],c=l[1],u=ae(e.borderBottomLeftRadius,i.width,i.height),h=u[0],p=u[1],g=[];g.push((a+s)/i.width),g.push((h+d)/i.width),g.push((o+p)/i.height),g.push((A+c)/i.height);var f=Math.max.apply(Math,g);f>1&&(a/=f,o/=f,s/=f,A/=f,d/=f,c/=f,h/=f,p/=f);var m=i.width-s,v=i.height-c,y=i.width-d,w=i.height-p,b=e.borderTopWidth,B=e.borderRightWidth,C=e.borderBottomWidth,x=e.borderLeftWidth,D=oe(e.paddingTop,t.bounds.width),T=oe(e.paddingRight,t.bounds.width),I=oe(e.paddingBottom,t.bounds.width),E=oe(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?No(i.left+x/3,i.top+b/3,a-x/3,o-b/3,lo.TOP_LEFT):new Po(i.left+x/3,i.top+b/3),this.topRightBorderDoubleOuterBox=a>0||o>0?No(i.left+m,i.top+b/3,s-B/3,A-b/3,lo.TOP_RIGHT):new Po(i.left+i.width-B/3,i.top+b/3),this.bottomRightBorderDoubleOuterBox=d>0||c>0?No(i.left+y,i.top+v,d-B/3,c-C/3,lo.BOTTOM_RIGHT):new Po(i.left+i.width-B/3,i.top+i.height-C/3),this.bottomLeftBorderDoubleOuterBox=h>0||p>0?No(i.left+x/3,i.top+w,h-x/3,p-C/3,lo.BOTTOM_LEFT):new Po(i.left+x/3,i.top+i.height-C/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?No(i.left+2*x/3,i.top+2*b/3,a-2*x/3,o-2*b/3,lo.TOP_LEFT):new Po(i.left+2*x/3,i.top+2*b/3),this.topRightBorderDoubleInnerBox=a>0||o>0?No(i.left+m,i.top+2*b/3,s-2*B/3,A-2*b/3,lo.TOP_RIGHT):new Po(i.left+i.width-2*B/3,i.top+2*b/3),this.bottomRightBorderDoubleInnerBox=d>0||c>0?No(i.left+y,i.top+v,d-2*B/3,c-2*C/3,lo.BOTTOM_RIGHT):new Po(i.left+i.width-2*B/3,i.top+i.height-2*C/3),this.bottomLeftBorderDoubleInnerBox=h>0||p>0?No(i.left+2*x/3,i.top+w,h-2*x/3,p-2*C/3,lo.BOTTOM_LEFT):new Po(i.left+2*x/3,i.top+i.height-2*C/3),this.topLeftBorderStroke=a>0||o>0?No(i.left+x/2,i.top+b/2,a-x/2,o-b/2,lo.TOP_LEFT):new Po(i.left+x/2,i.top+b/2),this.topRightBorderStroke=a>0||o>0?No(i.left+m,i.top+b/2,s-B/2,A-b/2,lo.TOP_RIGHT):new Po(i.left+i.width-B/2,i.top+b/2),this.bottomRightBorderStroke=d>0||c>0?No(i.left+y,i.top+v,d-B/2,c-C/2,lo.BOTTOM_RIGHT):new Po(i.left+i.width-B/2,i.top+i.height-C/2),this.bottomLeftBorderStroke=h>0||p>0?No(i.left+x/2,i.top+w,h-x/2,p-C/2,lo.BOTTOM_LEFT):new Po(i.left+x/2,i.top+i.height-C/2),this.topLeftBorderBox=a>0||o>0?No(i.left,i.top,a,o,lo.TOP_LEFT):new Po(i.left,i.top),this.topRightBorderBox=s>0||A>0?No(i.left+m,i.top,s,A,lo.TOP_RIGHT):new Po(i.left+i.width,i.top),this.bottomRightBorderBox=d>0||c>0?No(i.left+y,i.top+v,d,c,lo.BOTTOM_RIGHT):new Po(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=h>0||p>0?No(i.left,i.top+w,h,p,lo.BOTTOM_LEFT):new Po(i.left,i.top+i.height),this.topLeftPaddingBox=a>0||o>0?No(i.left+x,i.top+b,Math.max(0,a-x),Math.max(0,o-b),lo.TOP_LEFT):new Po(i.left+x,i.top+b),this.topRightPaddingBox=s>0||A>0?No(i.left+Math.min(m,i.width-B),i.top+b,m>i.width+B?0:Math.max(0,s-B),Math.max(0,A-b),lo.TOP_RIGHT):new Po(i.left+i.width-B,i.top+b),this.bottomRightPaddingBox=d>0||c>0?No(i.left+Math.min(y,i.width-x),i.top+Math.min(v,i.height-C),Math.max(0,d-B),Math.max(0,c-C),lo.BOTTOM_RIGHT):new Po(i.left+i.width-B,i.top+i.height-C),this.bottomLeftPaddingBox=h>0||p>0?No(i.left+x,i.top+Math.min(w,i.height-C),Math.max(0,h-x),Math.max(0,p-C),lo.BOTTOM_LEFT):new Po(i.left+x,i.top+i.height-C),this.topLeftContentBox=a>0||o>0?No(i.left+x+E,i.top+b+D,Math.max(0,a-(x+E)),Math.max(0,o-(b+D)),lo.TOP_LEFT):new Po(i.left+x+E,i.top+b+D),this.topRightContentBox=s>0||A>0?No(i.left+Math.min(m,i.width+x+E),i.top+b+D,m>i.width+x+E?0:s-x+E,A-(b+D),lo.TOP_RIGHT):new Po(i.left+i.width-(B+T),i.top+b+D),this.bottomRightContentBox=d>0||c>0?No(i.left+Math.min(y,i.width-(x+E)),i.top+Math.min(v,i.height+b+D),Math.max(0,d-(B+T)),c-(C+I),lo.BOTTOM_RIGHT):new Po(i.left+i.width-(B+T),i.top+i.height-(C+I)),this.bottomLeftContentBox=h>0||p>0?No(i.left+x+E,i.top+w,Math.max(0,h-(x+E)),p-(C+I),lo.BOTTOM_LEFT):new Po(i.left+x+E,i.top+i.height-(C+I))};!function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(lo||(lo={}));var No=function(t,e,i,n,a){var o=(Math.sqrt(2)-1)/3*4,r=i*o,s=n*o,A=t+i,l=e+n;switch(a){case lo.TOP_LEFT:return new Ho(new Po(t,l),new Po(t,l-s),new Po(A-r,e),new Po(A,e));case lo.TOP_RIGHT:return new Ho(new Po(t,e),new Po(t+r,e),new Po(A,l-s),new Po(A,l));case lo.BOTTOM_RIGHT:return new Ho(new Po(A,e),new Po(A,e+s),new Po(t+r,l),new Po(t,l));case lo.BOTTOM_LEFT:default:return new Ho(new Po(A,l),new Po(A-r,l),new Po(t,e+s),new Po(t,e))}},Ro=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},$o=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},qo=function(t,e,i){this.offsetX=t,this.offsetY=e,this.matrix=i,this.type=0,this.target=6},Vo=function(t,e){this.path=t,this.target=e,this.type=1},zo=function(t){this.opacity=t,this.type=2,this.target=6},Ko=function(t){return 1===t.type},Wo=function(t,e){return t.length===e.length&&t.some((function(t,i){return t===e[i]}))},Go=function(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Yo=function(){function t(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new Mo(this.container),this.container.styles.opacity<1&&this.effects.push(new zo(this.container.styles.opacity)),null!==this.container.styles.transform){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new qo(i,n,a))}if(0!==this.container.styles.overflowX){var o=Ro(this.curves),r=$o(this.curves);Wo(o,r)?this.effects.push(new Vo(o,6)):(this.effects.push(new Vo(o,2)),this.effects.push(new Vo(r,4)))}}return t.prototype.getEffects=function(t){for(var e=-1===[2,3].indexOf(this.container.styles.position),i=this.parent,n=this.effects.slice(0);i;){var a=i.effects.filter((function(t){return!Ko(t)}));if(e||0!==i.container.styles.position||!i.parent){if(n.unshift.apply(n,a),e=-1===[2,3].indexOf(i.container.styles.position),0!==i.container.styles.overflowX){var o=Ro(i.curves),r=$o(i.curves);Wo(o,r)||n.unshift(new Vo(r,6))}}else n.unshift.apply(n,a);i=i.parent}return n.filter((function(e){return dn(e.target,t)}))},t}(),jo=function(t,e,i,n){t.container.elements.forEach((function(a){var o=dn(a.flags,4),r=dn(a.flags,2),s=new Yo(a,t);dn(a.styles.display,2048)&&n.push(s);var A=dn(a.flags,8)?[]:n;if(o||r){var l=o||a.styles.isPositioned()?i:e,d=new Go(s);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var c=a.styles.zIndex.order;if(c<0){var u=0;l.negativeZIndex.some((function(t,e){return c>t.element.container.styles.zIndex.order?(u=e,!1):u>0})),l.negativeZIndex.splice(u,0,d)}else if(c>0){var h=0;l.positiveZIndex.some((function(t,e){return c>=t.element.container.styles.zIndex.order?(h=e+1,!1):h>0})),l.positiveZIndex.splice(h,0,d)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else a.styles.isFloating()?l.nonPositionedFloats.push(d):l.nonPositionedInlineLevel.push(d);jo(s,d,o?d:i,A)}else a.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),jo(s,e,i,A);dn(a.flags,8)&&Xo(a,A)}))},Xo=function(t,e){for(var i=t instanceof ca?t.start:1,n=t instanceof ca&&t.reversed,a=0;a<e.length;a++){var o=e[a];o.container instanceof da&&"number"==typeof o.container.value&&0!==o.container.value&&(i=o.container.value),o.listValue=ro(i,o.container.styles.listStyleType,!0),i+=n?-1:1}},Jo=function(t,e){switch(e){case 0:return tr(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return tr(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return tr(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);default:return tr(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},Zo=function(t,e){var i=[];return Oo(t)?i.push(t.subdivide(.5,!1)):i.push(t),Oo(e)?i.push(e.subdivide(.5,!0)):i.push(e),i},tr=function(t,e,i,n){var a=[];return Oo(t)?a.push(t.subdivide(.5,!1)):a.push(t),Oo(i)?a.push(i.subdivide(.5,!0)):a.push(i),Oo(n)?a.push(n.subdivide(.5,!0).reverse()):a.push(n),Oo(e)?a.push(e.subdivide(.5,!1).reverse()):a.push(e),a},er=function(t){var e=t.bounds,i=t.styles;return e.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},ir=function(t){var e=t.styles,i=t.bounds,n=oe(e.paddingLeft,i.width),a=oe(e.paddingRight,i.width),o=oe(e.paddingTop,i.width),r=oe(e.paddingBottom,i.width);return i.add(n+e.borderLeftWidth,o+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+a),-(e.borderTopWidth+e.borderBottomWidth+o+r))},nr=function(t,e,i){var n=function(t,e){return 0===t?e.bounds:2===t?ir(e):er(e)}(sr(t.styles.backgroundOrigin,e),t),a=function(t,e){return 0===t?e.bounds:2===t?ir(e):er(e)}(sr(t.styles.backgroundClip,e),t),o=rr(sr(t.styles.backgroundSize,e),i,n),r=o[0],s=o[1],A=ae(sr(t.styles.backgroundPosition,e),n.width-r,n.height-s);return[Ar(sr(t.styles.backgroundRepeat,e),A,o,n,a),Math.round(n.left+A[0]),Math.round(n.top+A[1]),r,s]},ar=function(t){return zt(t)&&t.value===Re.AUTO},or=function(t){return"number"==typeof t},rr=function(t,e,i){var n=e[0],a=e[1],o=e[2],r=t[0],s=t[1];if(!r)return[0,0];if(Zt(r)&&s&&Zt(s))return[oe(r,i.width),oe(s,i.height)];var A=or(o);if(zt(r)&&(r.value===Re.CONTAIN||r.value===Re.COVER))return or(o)?i.width/i.height<o!=(r.value===Re.COVER)?[i.width,i.width/o]:[i.height*o,i.height]:[i.width,i.height];var l=or(n),d=or(a),c=l||d;if(ar(r)&&(!s||ar(s)))return l&&d?[n,a]:A||c?c&&A?[l?n:a*o,d?a:n/o]:[l?n:i.width,d?a:i.height]:[i.width,i.height];if(A){var u=0,h=0;return Zt(r)?u=oe(r,i.width):Zt(s)&&(h=oe(s,i.height)),ar(r)?u=h*o:s&&!ar(s)||(h=u/o),[u,h]}var p=null,g=null;if(Zt(r)?p=oe(r,i.width):s&&Zt(s)&&(g=oe(s,i.height)),null===p||s&&!ar(s)||(g=l&&d?p/n*a:i.height),null!==g&&ar(r)&&(p=l&&d?g/a*n:i.width),null!==p&&null!==g)return[p,g];throw new Error("Unable to calculate background-size for element")},sr=function(t,e){var i=t[e];return void 0===i?t[0]:i},Ar=function(t,e,i,n,a){var o=e[0],r=e[1],s=i[0],A=i[1];switch(t){case 2:return[new Po(Math.round(n.left),Math.round(n.top+r)),new Po(Math.round(n.left+n.width),Math.round(n.top+r)),new Po(Math.round(n.left+n.width),Math.round(A+n.top+r)),new Po(Math.round(n.left),Math.round(A+n.top+r))];case 3:return[new Po(Math.round(n.left+o),Math.round(n.top)),new Po(Math.round(n.left+o+s),Math.round(n.top)),new Po(Math.round(n.left+o+s),Math.round(n.height+n.top)),new Po(Math.round(n.left+o),Math.round(n.height+n.top))];case 1:return[new Po(Math.round(n.left+o),Math.round(n.top+r)),new Po(Math.round(n.left+o+s),Math.round(n.top+r)),new Po(Math.round(n.left+o+s),Math.round(n.top+r+A)),new Po(Math.round(n.left+o),Math.round(n.top+r+A))];default:return[new Po(Math.round(a.left),Math.round(a.top)),new Po(Math.round(a.left+a.width),Math.round(a.top)),new Po(Math.round(a.left+a.width),Math.round(a.height+a.top)),new Po(Math.round(a.left),Math.round(a.height+a.top))]}},lr="Hidden Text",dr=function(){function t(t){this._data={},this._document=t}return t.prototype.parseMetrics=function(t,e){var i=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),o=this._document.body;i.style.visibility="hidden",i.style.fontFamily=t,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",o.appendChild(i),n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(lr)),i.appendChild(a),i.appendChild(n);var r=n.offsetTop-a.offsetTop+2;i.removeChild(a),i.appendChild(this._document.createTextNode(lr)),i.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-i.offsetTop+2;return o.removeChild(i),{baseline:r,middle:s}},t.prototype.getMetrics=function(t,e){var i=t+" "+e;return void 0===this._data[i]&&(this._data[i]=this.parseMetrics(t,e)),this._data[i]},t}(),cr=function(t,e){this.context=t,this.options=e},ur=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n._activeEffects=[],n.canvas=i.canvas?i.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),i.canvas||(n.canvas.width=Math.floor(i.width*i.scale),n.canvas.height=Math.floor(i.height*i.scale),n.canvas.style.width=i.width+"px",n.canvas.style.height=i.height+"px"),n.fontMetrics=new dr(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-i.x,-i.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),n}return e(i,t),i.prototype.applyEffects=function(t){for(var e=this;this._activeEffects.length;)this.popEffect();t.forEach((function(t){return e.applyEffect(t)}))},i.prototype.applyEffect=function(t){this.ctx.save(),function(t){return 2===t.type}(t)&&(this.ctx.globalAlpha=t.opacity),function(t){return 0===t.type}(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Ko(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},i.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},i.prototype.renderStack=function(t){return n(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return t.element.container.styles.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},i.prototype.renderNode=function(t){return n(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return dn(t.container.flags,16),t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(t)];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},i.prototype.renderTextWithLetterSpacing=function(t,e,i){var n=this;0===e?this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+i):Zn(t.text).reduce((function(e,a){return n.ctx.fillText(a,e,t.bounds.top+i),e+n.ctx.measureText(a).width}),t.bounds.left)},i.prototype.createFontStyle=function(t){var e=t.fontVariant.filter((function(t){return"normal"===t||"small-caps"===t})).join(""),i=mr(t.fontFamily).join(", "),n=qt(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,e,t.fontWeight,n,i].join(" "),i,n]},i.prototype.renderTextNode=function(t,e){return n(this,void 0,void 0,(function(){var i,n,o,r,s,A,l,d,c=this;return a(this,(function(a){return i=this.createFontStyle(e),n=i[0],o=i[1],r=i[2],this.ctx.font=n,this.ctx.direction=1===e.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(o,r),A=s.baseline,l=s.middle,d=e.paintOrder,t.textBounds.forEach((function(t){d.forEach((function(i){switch(i){case 0:c.ctx.fillStyle=pe(e.color),c.renderTextWithLetterSpacing(t,e.letterSpacing,A);var n=e.textShadow;n.length&&t.text.trim().length&&(n.slice(0).reverse().forEach((function(i){c.ctx.shadowColor=pe(i.color),c.ctx.shadowOffsetX=i.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=i.offsetY.number*c.options.scale,c.ctx.shadowBlur=i.blur.number,c.renderTextWithLetterSpacing(t,e.letterSpacing,A)})),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),e.textDecorationLine.length&&(c.ctx.fillStyle=pe(e.textDecorationColor||e.color),e.textDecorationLine.forEach((function(e){switch(e){case 1:c.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top+A),t.bounds.width,1);break;case 2:c.ctx.fillRect(t.bounds.left,Math.round(t.bounds.top),t.bounds.width,1);break;case 3:c.ctx.fillRect(t.bounds.left,Math.ceil(t.bounds.top+l),t.bounds.width,1)}})));break;case 1:e.webkitTextStrokeWidth&&t.text.trim().length&&(c.ctx.strokeStyle=pe(e.webkitTextStrokeColor),c.ctx.lineWidth=e.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(t.text,t.bounds.left,t.bounds.top+A)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}}))})),[2]}))}))},i.prototype.renderReplacedElement=function(t,e,i){if(i&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var n=ir(t),a=$o(e);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,t.intrinsicWidth,t.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},i.prototype.renderNodeContent=function(t){return n(this,void 0,void 0,(function(){var e,n,o,s,A,l,d,c,u,h,p,g,f,m,v,y,w,b;return a(this,(function(a){switch(a.label){case 0:this.applyEffects(t.getEffects(4)),e=t.container,n=t.curves,o=e.styles,s=0,A=e.textNodes,a.label=1;case 1:return s<A.length?(l=A[s],[4,this.renderTextNode(l,o)]):[3,4];case 2:a.sent(),a.label=3;case 3:return s++,[3,1];case 4:if(!(e instanceof sa))return[3,8];a.label=5;case 5:return a.trys.push([5,7,,8]),[4,this.context.cache.match(e.src)];case 6:return v=a.sent(),this.renderReplacedElement(e,n,v),[3,8];case 7:return a.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof Aa&&this.renderReplacedElement(e,n,e.canvas),!(e instanceof la))return[3,12];a.label=9;case 9:return a.trys.push([9,11,,12]),[4,this.context.cache.match(e.svg)];case 10:return v=a.sent(),this.renderReplacedElement(e,n,v),[3,12];case 11:return a.sent(),this.context.logger.error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof ba&&e.tree?[4,new i(this.context,{scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,width:e.width,height:e.height}).render(e.tree)]:[3,14];case 13:d=a.sent(),e.width&&e.height&&this.ctx.drawImage(d,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),a.label=14;case 14:if(e instanceof va&&(c=Math.min(e.bounds.width,e.bounds.height),e.type===pa?e.checked&&(this.ctx.save(),this.path([new Po(e.bounds.left+.39363*c,e.bounds.top+.79*c),new Po(e.bounds.left+.16*c,e.bounds.top+.5549*c),new Po(e.bounds.left+.27347*c,e.bounds.top+.44071*c),new Po(e.bounds.left+.39694*c,e.bounds.top+.5649*c),new Po(e.bounds.left+.72983*c,e.bounds.top+.23*c),new Po(e.bounds.left+.84*c,e.bounds.top+.34085*c),new Po(e.bounds.left+.39363*c,e.bounds.top+.79*c)]),this.ctx.fillStyle=pe(ma),this.ctx.fill(),this.ctx.restore()):e.type===ga&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+c/2,e.bounds.top+c/2,c/4,0,2*Math.PI,!0),this.ctx.fillStyle=pe(ma),this.ctx.fill(),this.ctx.restore())),hr(e)&&e.value.length){switch(u=this.createFontStyle(o),w=u[0],h=u[1],p=this.fontMetrics.getMetrics(w,h).baseline,this.ctx.font=w,this.ctx.fillStyle=pe(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=gr(e.styles.textAlign),b=ir(e),g=0,e.styles.textAlign){case 1:g+=b.width/2;break;case 2:g+=b.width}f=b.add(g,0,0,-b.height/2+1),this.ctx.save(),this.path([new Po(b.left,b.top),new Po(b.left+b.width,b.top),new Po(b.left+b.width,b.top+b.height),new Po(b.left,b.top+b.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new jn(e.value,f),o.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!dn(e.styles.display,2048))return[3,20];if(null===e.styles.listStyleImage)return[3,19];if(0!==(m=e.styles.listStyleImage).type)return[3,18];v=void 0,y=m.url,a.label=15;case 15:return a.trys.push([15,17,,18]),[4,this.context.cache.match(y)];case 16:return v=a.sent(),this.ctx.drawImage(v,e.bounds.left-(v.width+10),e.bounds.top),[3,18];case 17:return a.sent(),this.context.logger.error("Error loading list-style-image "+y),[3,18];case 18:return[3,20];case 19:t.listValue&&-1!==e.styles.listStyleType&&(w=this.createFontStyle(o)[0],this.ctx.font=w,this.ctx.fillStyle=pe(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",b=new r(e.bounds.left,e.bounds.top+oe(e.styles.paddingTop,e.bounds.width),e.bounds.width,Ti(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new jn(t.listValue,b),o.letterSpacing,Ti(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),a.label=20;case 20:return[2]}}))}))},i.prototype.renderStackContent=function(t){return n(this,void 0,void 0,(function(){var e,i,n,o,r,s,A,l,d,c,u,h,p,g,f;return a(this,(function(a){switch(a.label){case 0:return dn(t.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:a.sent(),e=0,i=t.negativeZIndex,a.label=2;case 2:return e<i.length?(f=i[e],[4,this.renderStack(f)]):[3,5];case 3:a.sent(),a.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:a.sent(),n=0,o=t.nonInlineLevel,a.label=7;case 7:return n<o.length?(f=o[n],[4,this.renderNode(f)]):[3,10];case 8:a.sent(),a.label=9;case 9:return n++,[3,7];case 10:r=0,s=t.nonPositionedFloats,a.label=11;case 11:return r<s.length?(f=s[r],[4,this.renderStack(f)]):[3,14];case 12:a.sent(),a.label=13;case 13:return r++,[3,11];case 14:A=0,l=t.nonPositionedInlineLevel,a.label=15;case 15:return A<l.length?(f=l[A],[4,this.renderStack(f)]):[3,18];case 16:a.sent(),a.label=17;case 17:return A++,[3,15];case 18:d=0,c=t.inlineLevel,a.label=19;case 19:return d<c.length?(f=c[d],[4,this.renderNode(f)]):[3,22];case 20:a.sent(),a.label=21;case 21:return d++,[3,19];case 22:u=0,h=t.zeroOrAutoZIndexOrTransformedOrOpacity,a.label=23;case 23:return u<h.length?(f=h[u],[4,this.renderStack(f)]):[3,26];case 24:a.sent(),a.label=25;case 25:return u++,[3,23];case 26:p=0,g=t.positiveZIndex,a.label=27;case 27:return p<g.length?(f=g[p],[4,this.renderStack(f)]):[3,30];case 28:a.sent(),a.label=29;case 29:return p++,[3,27];case 30:return[2]}}))}))},i.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},i.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},i.prototype.formatPath=function(t){var e=this;t.forEach((function(t,i){var n=Oo(t)?t.start:t;0===i?e.ctx.moveTo(n.x,n.y):e.ctx.lineTo(n.x,n.y),Oo(t)&&e.ctx.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)}))},i.prototype.renderRepeat=function(t,e,i,n){this.path(t),this.ctx.fillStyle=e,this.ctx.translate(i,n),this.ctx.fill(),this.ctx.translate(-i,-n)},i.prototype.resizeImage=function(t,e,i){var n;if(t.width===e&&t.height===i)return t;var a=(null!==(n=this.canvas.ownerDocument)&&void 0!==n?n:document).createElement("canvas");return a.width=Math.max(1,e),a.height=Math.max(1,i),a.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,e,i),a},i.prototype.renderBackgroundImage=function(t){return n(this,void 0,void 0,(function(){var e,i,n,o,r,s;return a(this,(function(A){switch(A.label){case 0:e=t.styles.backgroundImage.length-1,i=function(i){var o,r,s,A,l,d,c,u,h,p,g,f,m,v,y,w,b,B,C,x,D,T,I,E,S,F,k,_,U,Q,P;return a(this,(function(a){switch(a.label){case 0:if(0!==i.type)return[3,5];o=void 0,r=i.url,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.context.cache.match(r)];case 2:return o=a.sent(),[3,4];case 3:return a.sent(),n.context.logger.error("Error loading background-image "+r),[3,4];case 4:return o&&(s=nr(t,e,[o.width,o.height,o.width/o.height]),w=s[0],T=s[1],I=s[2],C=s[3],x=s[4],v=n.ctx.createPattern(n.resizeImage(o,C,x),"repeat"),n.renderRepeat(w,v,T,I)),[3,6];case 5:1===i.type?(A=nr(t,e,[null,null,null]),w=A[0],T=A[1],I=A[2],C=A[3],x=A[4],l=Ie(i.angle,C,x),d=l[0],c=l[1],u=l[2],h=l[3],p=l[4],(g=document.createElement("canvas")).width=C,g.height=x,f=g.getContext("2d"),m=f.createLinearGradient(c,h,u,p),Te(i.stops,d).forEach((function(t){return m.addColorStop(t.stop,pe(t.color))})),f.fillStyle=m,f.fillRect(0,0,C,x),C>0&&x>0&&(v=n.ctx.createPattern(g,"repeat"),n.renderRepeat(w,v,T,I))):function(t){return 2===t.type}(i)&&(y=nr(t,e,[null,null,null]),w=y[0],b=y[1],B=y[2],C=y[3],x=y[4],D=0===i.position.length?[ie]:i.position,T=oe(D[0],C),I=oe(D[D.length-1],x),E=function(t,e,i,n,a){var o=0,r=0;switch(t.size){case 0:0===t.shape?o=r=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(i),Math.abs(i-a)):1===t.shape&&(o=Math.min(Math.abs(e),Math.abs(e-n)),r=Math.min(Math.abs(i),Math.abs(i-a)));break;case 2:if(0===t.shape)o=r=Math.min(Ee(e,i),Ee(e,i-a),Ee(e-n,i),Ee(e-n,i-a));else if(1===t.shape){var s=Math.min(Math.abs(i),Math.abs(i-a))/Math.min(Math.abs(e),Math.abs(e-n)),A=Se(n,a,e,i,!0),l=A[0],d=A[1];r=s*(o=Ee(l-e,(d-i)/s))}break;case 1:0===t.shape?o=r=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(i),Math.abs(i-a)):1===t.shape&&(o=Math.max(Math.abs(e),Math.abs(e-n)),r=Math.max(Math.abs(i),Math.abs(i-a)));break;case 3:if(0===t.shape)o=r=Math.max(Ee(e,i),Ee(e,i-a),Ee(e-n,i),Ee(e-n,i-a));else if(1===t.shape){s=Math.max(Math.abs(i),Math.abs(i-a))/Math.max(Math.abs(e),Math.abs(e-n));var c=Se(n,a,e,i,!1);l=c[0],d=c[1],r=s*(o=Ee(l-e,(d-i)/s))}}return Array.isArray(t.size)&&(o=oe(t.size[0],n),r=2===t.size.length?oe(t.size[1],a):o),[o,r]}(i,T,I,C,x),S=E[0],F=E[1],S>0&&F>0&&(k=n.ctx.createRadialGradient(b+T,B+I,0,b+T,B+I,S),Te(i.stops,2*S).forEach((function(t){return k.addColorStop(t.stop,pe(t.color))})),n.path(w),n.ctx.fillStyle=k,S!==F?(_=t.bounds.left+.5*t.bounds.width,U=t.bounds.top+.5*t.bounds.height,P=1/(Q=F/S),n.ctx.save(),n.ctx.translate(_,U),n.ctx.transform(1,0,0,Q,0,0),n.ctx.translate(-_,-U),n.ctx.fillRect(b,P*(B-U)+U,C,x*P),n.ctx.restore()):n.ctx.fill())),a.label=6;case 6:return e--,[2]}}))},n=this,o=0,r=t.styles.backgroundImage.slice(0).reverse(),A.label=1;case 1:return o<r.length?(s=r[o],[5,i(s)]):[3,4];case 2:A.sent(),A.label=3;case 3:return o++,[3,1];case 4:return[2]}}))}))},i.prototype.renderSolidBorder=function(t,e,i){return n(this,void 0,void 0,(function(){return a(this,(function(n){return this.path(Jo(i,e)),this.ctx.fillStyle=pe(t),this.ctx.fill(),[2]}))}))},i.prototype.renderDoubleBorder=function(t,e,i,o){return n(this,void 0,void 0,(function(){var n,r;return a(this,(function(a){switch(a.label){case 0:return e<3?[4,this.renderSolidBorder(t,i,o)]:[3,2];case 1:return a.sent(),[2];case 2:return n=function(t,e){switch(e){case 0:return tr(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return tr(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return tr(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);default:return tr(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}}(o,i),this.path(n),this.ctx.fillStyle=pe(t),this.ctx.fill(),r=function(t,e){switch(e){case 0:return tr(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return tr(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return tr(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);default:return tr(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}}(o,i),this.path(r),this.ctx.fill(),[2]}}))}))},i.prototype.renderNodeBackgroundAndBorders=function(t){return n(this,void 0,void 0,(function(){var e,i,n,o,r,s,A,l,d=this;return a(this,(function(a){switch(a.label){case 0:return this.applyEffects(t.getEffects(2)),e=t.container.styles,i=!he(e.backgroundColor)||e.backgroundImage.length,n=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],o=pr(sr(e.backgroundClip,0),t.curves),i||e.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),he(e.backgroundColor)||(this.ctx.fillStyle=pe(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:a.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach((function(e){d.ctx.save();var i,n,a,o,r,s=Ro(t.curves),A=e.inset?0:1e4,l=(i=s,n=-A+(e.inset?1:-1)*e.spread.number,a=(e.inset?1:-1)*e.spread.number,o=e.spread.number*(e.inset?-2:2),r=e.spread.number*(e.inset?-2:2),i.map((function(t,e){switch(e){case 0:return t.add(n,a);case 1:return t.add(n+o,a);case 2:return t.add(n+o,a+r);case 3:return t.add(n,a+r)}return t})));e.inset?(d.path(s),d.ctx.clip(),d.mask(l)):(d.mask(s),d.ctx.clip(),d.path(l)),d.ctx.shadowOffsetX=e.offsetX.number+A,d.ctx.shadowOffsetY=e.offsetY.number,d.ctx.shadowColor=pe(e.color),d.ctx.shadowBlur=e.blur.number,d.ctx.fillStyle=e.inset?pe(e.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()})),a.label=2;case 2:r=0,s=0,A=n,a.label=3;case 3:return s<A.length?0!==(l=A[s]).style&&!he(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,r,t.curves,2)]:[3,11]:[3,13];case 4:return a.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,r,t.curves,3)];case 6:return a.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,r,t.curves)];case 8:return a.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,r,t.curves)];case 10:a.sent(),a.label=11;case 11:r++,a.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},i.prototype.renderDashedDottedBorder=function(t,e,i,o,r){return n(this,void 0,void 0,(function(){var n,s,A,l,d,c,u,h,p,g,f,m,v,y,w,b;return a(this,(function(a){return this.ctx.save(),n=function(t,e){switch(e){case 0:return Zo(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Zo(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Zo(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);default:return Zo(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}}(o,i),s=Jo(o,i),2===r&&(this.path(s),this.ctx.clip()),Oo(s[0])?(A=s[0].start.x,l=s[0].start.y):(A=s[0].x,l=s[0].y),Oo(s[1])?(d=s[1].end.x,c=s[1].end.y):(d=s[1].x,c=s[1].y),u=0===i||2===i?Math.abs(A-d):Math.abs(l-c),this.ctx.beginPath(),3===r?this.formatPath(n):this.formatPath(s.slice(0,2)),h=e<3?3*e:2*e,p=e<3?2*e:e,3===r&&(h=e,p=e),g=!0,u<=2*h?g=!1:u<=2*h+p?(h*=f=u/(2*h+p),p*=f):(m=Math.floor((u+p)/(h+p)),v=(u-m*h)/(m-1),p=(y=(u-(m+1)*h)/m)<=0||Math.abs(p-v)<Math.abs(p-y)?v:y),g&&(3===r?this.ctx.setLineDash([0,h+p]):this.ctx.setLineDash([h,p])),3===r?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=2*e+1.1,this.ctx.strokeStyle=pe(t),this.ctx.stroke(),this.ctx.setLineDash([]),2===r&&(Oo(s[0])&&(w=s[3],b=s[0],this.ctx.beginPath(),this.formatPath([new Po(w.end.x,w.end.y),new Po(b.start.x,b.start.y)]),this.ctx.stroke()),Oo(s[1])&&(w=s[1],b=s[2],this.ctx.beginPath(),this.formatPath([new Po(w.end.x,w.end.y),new Po(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},i.prototype.render=function(t){return n(this,void 0,void 0,(function(){var e;return a(this,(function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=pe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=new Yo(t,null),a=new Go(n),jo(n,a,a,o=[]),Xo(n.container,o),e=a,[4,this.renderStack(e)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}var n,a,o}))}))},i}(cr),hr=function(t){return t instanceof wa||(t instanceof ya||t instanceof va&&t.type!==ga&&t.type!==pa)},pr=function(t,e){switch(t){case 0:return Ro(e);case 2:return function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]}(e);default:return $o(e)}},gr=function(t){switch(t){case 1:return"center";case 2:return"right";default:return"left"}},fr=["-apple-system","system-ui"],mr=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter((function(t){return-1===fr.indexOf(t)})):t},vr=function(t){function i(e,i){var n=t.call(this,e,i)||this;return n.canvas=i.canvas?i.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=i,n.canvas.width=Math.floor(i.width*i.scale),n.canvas.height=Math.floor(i.height*i.scale),n.canvas.style.width=i.width+"px",n.canvas.style.height=i.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-i.x,-i.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),n}return e(i,t),i.prototype.render=function(t){return n(this,void 0,void 0,(function(){var e,i;return a(this,(function(n){switch(n.label){case 0:return e=Wn(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,yr(e)];case 1:return i=n.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=pe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},i}(cr),yr=function(t){return new Promise((function(e,i){var n=new Image;n.onload=function(){e(n)},n.onerror=i,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(t))}))},wr=function(){function t(t){var e=t.id,i=t.enabled;this.id=e,this.enabled=i,this.start=Date.now()}return t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,o([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,o([this.id,this.getTime()+"ms"],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,o([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,o([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},t.instances={},t}(),br=function(){function t(e,i){var n;this.windowBounds=i,this.instanceName="#"+t.instanceCount++,this.logger=new wr({id:this.instanceName,enabled:e.logging}),this.cache=null!==(n=e.cache)&&void 0!==n?n:new To(this,e)}return t.instanceCount=1,t}();"undefined"!=typeof window&&Do.setContext(window);var Br=function(t,e){return n(void 0,void 0,void 0,(function(){var n,o,A,l,d,c,u,h,p,g,f,m,v,y,w,b,B,C,x,D,T,I,E,S,F,k,_,U,Q,P,L,H,O,M,N,R,$,q;return a(this,(function(a){switch(a.label){case 0:if(!t||"object"!=typeof t)return[2,Promise.reject("Invalid element provided as first argument")];if(!(n=t.ownerDocument))throw new Error("Element is not attached to a Document");if(!(o=n.defaultView))throw new Error("Document is not attached to a Window");return A={allowTaint:null!==(I=e.allowTaint)&&void 0!==I&&I,imageTimeout:null!==(E=e.imageTimeout)&&void 0!==E?E:15e3,proxy:e.proxy,useCORS:null!==(S=e.useCORS)&&void 0!==S&&S},l=i({logging:null===(F=e.logging)||void 0===F||F,cache:e.cache},A),d={windowWidth:null!==(k=e.windowWidth)&&void 0!==k?k:o.innerWidth,windowHeight:null!==(_=e.windowHeight)&&void 0!==_?_:o.innerHeight,scrollX:null!==(U=e.scrollX)&&void 0!==U?U:o.pageXOffset,scrollY:null!==(Q=e.scrollY)&&void 0!==Q?Q:o.pageYOffset},c=new r(d.scrollX,d.scrollY,d.windowWidth,d.windowHeight),u=new br(l,c),h=null!==(P=e.foreignObjectRendering)&&void 0!==P&&P,p={allowTaint:null!==(L=e.allowTaint)&&void 0!==L&&L,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:h,copyStyles:h},u.logger.debug("Starting document clone with size "+c.width+"x"+c.height+" scrolled to "+-c.left+","+-c.top),g=new Ao(u,t,p),(f=g.clonedReferenceElement)?[4,g.toIFrame(n,c)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=a.sent(),v=La(f)||"HTML"===f.tagName?function(t){var e=t.body,i=t.documentElement;if(!e||!i)throw new Error("Unable to get document size");var n=Math.max(Math.max(e.scrollWidth,i.scrollWidth),Math.max(e.offsetWidth,i.offsetWidth),Math.max(e.clientWidth,i.clientWidth)),a=Math.max(Math.max(e.scrollHeight,i.scrollHeight),Math.max(e.offsetHeight,i.offsetHeight),Math.max(e.clientHeight,i.clientHeight));return new r(0,0,n,a)}(f.ownerDocument):s(u,f),y=v.width,w=v.height,b=v.left,B=v.top,C=Cr(u,f,e.backgroundColor),x={canvas:e.canvas,backgroundColor:C,scale:null!==(O=null!==(H=e.scale)&&void 0!==H?H:o.devicePixelRatio)&&void 0!==O?O:1,x:(null!==(M=e.x)&&void 0!==M?M:0)+b,y:(null!==(N=e.y)&&void 0!==N?N:0)+B,width:null!==(R=e.width)&&void 0!==R?R:Math.ceil(y),height:null!==($=e.height)&&void 0!==$?$:Math.ceil(w)},h?(u.logger.debug("Document cloned, using foreign object rendering"),[4,new vr(u,x).render(f)]):[3,3];case 2:return D=a.sent(),[3,5];case 3:return u.logger.debug("Document cloned, element located at "+b+","+B+" with size "+y+"x"+w+" using computed rendering"),u.logger.debug("Starting DOM parsing"),T=Da(u,f),C===T.styles.backgroundColor&&(T.styles.backgroundColor=Be.TRANSPARENT),u.logger.debug("Starting renderer for element at "+x.x+","+x.y+" with size "+x.width+"x"+x.height),[4,new ur(u,x).render(T)];case 4:D=a.sent(),a.label=5;case 5:return(null===(q=e.removeContainer)||void 0===q||q)&&(Ao.destroy(m)||u.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),u.logger.debug("Finished rendering"),[2,D]}}))}))},Cr=function(t,e,i){var n=e.ownerDocument,a=n.documentElement?be(t,getComputedStyle(n.documentElement).backgroundColor):Be.TRANSPARENT,o=n.body?be(t,getComputedStyle(n.body).backgroundColor):Be.TRANSPARENT,r="string"==typeof i?be(t,i):null===i?Be.TRANSPARENT:4294967295;return e===n.documentElement?he(a)?he(o)?r:o:a:r};return function(t,e){return void 0===e&&(e={}),Br(t,e)}})),define("drops/businessProcessCanvas/businessProcessCanvas",["jquery","lq/drop","lq/style","lq/util","lq/dropFactory","drops/drawings/businessprocessEvents","drops/drawings/runtimeTypesProvider","lq/onlongpress","html2canvas","when"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d={data:{text:"Guid",longPressDelay:1e3}};function c(o){e.call(this,t("<div/>"),d,o);var s=this;return s.rootDrop=this,s.drawingDropFactory=new a(r,!1),s.data.eventing=n.convertListOfKeyValuesToObject(s.data.eventing),s.$canvas=t("<div/>").addClass("boxToBorderSize").attr("name",s.data.name).appendTo(s.$element).attr("tabindex",s.data.tabIndex).css({overflow:"scroll",position:"relative",display:"block",verticalAlign:"middle",width:"100%",height:"100%"}),s.$element.css({whiteSpace:"pre-wrap",display:"block"}),i.renderStyles(s,null,s.$canvas),s}e.extend(c,e),c.typeName="BusinessProcessCanvas",c.prototype.setValue=function(t){var e=this;e.piping.dispatcher.dispatch("LicquidAction/GetDrawing",{id:t.value},(function(t){e.$canvas.empty();var i=e.drawingDropFactory.createDrops(t.drawing.childDrops);_.each(i,(function(t){t.piping=e.piping,t.render(e.$canvas)})),_.each(i,(function(t){o.informListeners("bp_element_moved_"+t.data.id,t)}))}))},c.prototype.renderStyles=function(){i.renderStyles(this,null,this.$canvas)},c.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()};var u=function(e,i){var n=0;return i.length?(i.each((function(){n+=t(this).outerWidth(!0)})),n):(e.children().each((function(){var e=t(this);if(e.height()){var i=e.position().left+e.outerWidth();i>n&&(n=i)}})),n)},h=function(t,e){return e.length?e.height():t.get(0).scrollHeight};return c.prototype.getFile=function(){var e,i,n=l.defer(),a=(e=this.$canvas,i=e.children(".bp-milestone"),{width:u(e,i),height:h(e,i)}),o=this.$canvas.clone().css({position:"relative",width:a.width+"px",height:a.height+"px"}).appendTo(t("body"));return A(o.get(0)).then((function(t){var e=t.toDataURL("image/png");n.resolve(e),o.remove()})),n.promise},c})),define("drops/button/button",["jquery","lq/drop","lq/style","lq/util","lq/onlongpress","lq/tooltip"],(function(t,e,i,n,a,o){"use strict";var r={data:{text:"New Button",useDynamicWidth:!0,useDynamicHeight:!0,longPressDelay:1e3,activeStyleDuration:0,state:"enabled",title:{option:o.hardcoded}}};function s(a){e.call(this,t("<div/>"),r,a),this.defaultStyleSettings={text:{verticalAlign:"middle"}},this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.$button=t("<div/>").addClass("boxToBorderSize drop-text-content").attr("name",this.data.name).text(this.data.text).attr("tabindex",this.data.tabIndex).css({cursor:"pointer",display:"flex",flexDirection:"column",flex:"1 1 100%",width:"100%"}),this.tooltip=new o(this,this.data.title,this.$button),this.$element.append(t("<div />").css({display:"flex",whiteSpace:"pre-wrap",height:"100%",width:"100%"}).append(this.$button)),i.renderStyles(this,null,this.$button),"enabled"===this.data.state?this.enable():this.disable(),this.data.activeStyleDuration>0&&this.$element.on("click",this.triggerActiveStyle.bind(this)),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave")}return e.extend(s),s.typeName="Button",s.prototype.triggerActiveStyle=function(){this.$button.addClass("active");var t=this;setTimeout((function(){t.$button.removeClass("active")}),this.data.activeStyleDuration)},s.prototype.renderStyles=function(){i.renderStyles(this,null,this.$button)},s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.$button.text(this.data.text),this.tooltip.update()},s.prototype.licquidMethod_enable=function(){this.enable()},s.prototype.enable=function(){if((new a).applyLongPressOnElement(this.$button,this),this.data.eventing&&this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled){var t=this;this.$element.on("keypress",(function(e){13===e.keyCode&&t.triggerEvent(t.data.eventing.clicked.raisedEventName)}))}this.designData||this.$button.css({cursor:"pointer"}),this.$button.removeClass("disabled")},s.prototype.licquidMethod_disable=function(){this.disable()},s.prototype.disable=function(){this.designData||this.$button.css({cursor:"default"}),this.$button.addClass("disabled"),this.unsubscribeEventHandlers()},s.prototype.unsubscribeEventHandlers=function(){this.$element.off("clicked"),this.$element.off("keypress")},s})),define("drops/buttonWithIcon/buttonWithIcon",["jquery","lq/drop","lq/style","lq/util","lq/tooltip","lq/onlongpress"],(function(t,e,i,n,a,o){"use strict";var r={data:{icon:"?",text:"New Button with Icon",iconAlignment:"left",title:{option:a.hardcoded},useDynamicWidth:!0,useDynamicHeight:!0,longPressDelay:1e3,activeStyleDuration:0}};function s(i){var s=this;if(e.call(this,t("<div/>"),r,i),this.defaultStyleSettings={text:{verticalAlign:"middle"}},this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.$icon=t('<span class="buttonIcon drop-text-content">'+this.data.icon+"</span>"),this.$text=t('<span class="text drop-text-content">'+this.data.text+"</span>"),this.$button=t("<div/>").addClass("boxToBorderSize drop-text-content").attr("name",this.data.name).append("left"===this.data.iconAlignment||"top"===this.data.iconAlignment?this.$icon:this.$text).append("left"===this.data.iconAlignment||"top"===this.data.iconAlignment?this.$text:this.$icon).addClass("top"===this.data.iconAlignment||"bottom"===this.data.iconAlignment?"flex-column":"flex-row").attr("tabindex",this.data.tabIndex).css({display:"flex",flex:"1 1 100%",width:"100%"}),this.$element.append(t("<div />").css({cursor:"pointer",display:"flex",whiteSpace:"pre-wrap",height:"100%",width:"100%"}).append(this.$button)),(new o).applyLongPressOnElement(this.$button,this),this.data.eventing&&this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled){s=this;this.$element.on("keypress",(function(t){13===t.keyCode&&s.triggerEvent(s.data.eventing.clicked.raisedEventName)}))}this.data.activeStyleDuration>0&&this.$element.on("click",this.triggerActiveStyle.bind(this)),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave"),this.tooltip=new a(this,this.data.title,this.$element)}return e.extend(s),s.typeName="ButtonWithIcon",s.prototype.triggerActiveStyle=function(){this.$button.addClass("active");var t=this;setTimeout((function(){t.$button.removeClass("active")}),this.data.activeStyleDuration)},s.prototype.renderStyles=function(){i.renderStyles(this,null,this.$button),"object"==typeof this.data.styles&&this.data.styles.buttonIcon&&i.renderStyles(this,null,this.$icon,this.data.styles,"buttonIcon"),this.moveAttributeToTextElement("font-style","normal"),this.moveAttributeToTextElement("text-decoration","none"),this.moveAttributeToTextElement("text-transform","none")},s.prototype.preRender=function(){this.tooltip.update(),this.piping.visibility.apply(this),this.applyPosition()},s.prototype.postRender=function(){this.renderStyles()},s.prototype.moveAttributeToTextElement=function(t,e){this.$text.css(t,this.$button.css(t)),this.$button.css(t,e)},s})),
//! moment.js
//! version : 2.10.6
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("moment",e):t.moment=e()}(this,(function(){"use strict";var t;function e(){return t.apply(null,arguments)}function i(t){return"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function o(t,e){for(var i in e)a(e,i)&&(t[i]=e[i]);return a(e,"toString")&&(t.toString=e.toString),a(e,"valueOf")&&(t.valueOf=e.valueOf),t}function r(t,e,i,n){return Mt(t,e,i,n,!0).utc()}function s(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}),t._pf}function A(t){if(null==t._isValid){var e=s(t);t._isValid=!(isNaN(t._d.getTime())||!(e.overflow<0)||e.empty||e.invalidMonth||e.invalidWeekday||e.nullInput||e.invalidFormat||e.userInvalidated),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function l(t){var e=r(NaN);return null!=t?o(s(e),t):s(e).userInvalidated=!0,e}var d=e.momentProperties=[];function c(t,e){var i,n,a;if(void 0!==e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),void 0!==e._i&&(t._i=e._i),void 0!==e._f&&(t._f=e._f),void 0!==e._l&&(t._l=e._l),void 0!==e._strict&&(t._strict=e._strict),void 0!==e._tzm&&(t._tzm=e._tzm),void 0!==e._isUTC&&(t._isUTC=e._isUTC),void 0!==e._offset&&(t._offset=e._offset),void 0!==e._pf&&(t._pf=s(e)),void 0!==e._locale&&(t._locale=e._locale),d.length>0)for(i in d)void 0!==(a=e[n=d[i]])&&(t[n]=a);return t}var u=!1;function h(t){c(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),!1===u&&(u=!0,e.updateOffset(this),u=!1)}function p(t){return t instanceof h||null!=t&&null!=t._isAMomentObject}function g(t){return t<0?Math.ceil(t):Math.floor(t)}function f(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=g(e)),i}function m(t,e,i){var n,a=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),r=0;for(n=0;n<a;n++)(i&&t[n]!==e[n]||!i&&f(t[n])!==f(e[n]))&&r++;return r+o}function v(){}var y,w={};function b(t){return t?t.toLowerCase().replace("_","-"):t}function B(t){var e=null;if(!w[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=y._abbr,require("./locale/"+t),C(e)}catch(t){}return w[t]}function C(t,e){var i;return t&&(i=void 0===e?D(t):x(t,e))&&(y=i),y._abbr}function x(t,e){return null!==e?(e.abbr=t,w[t]=w[t]||new v,w[t].set(e),C(t),w[t]):(delete w[t],null)}function D(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return y;if(!i(t)){if(e=B(t))return e;t=[t]}return function(t){for(var e,i,n,a,o=0;o<t.length;){for(e=(a=b(t[o]).split("-")).length,i=(i=b(t[o+1]))?i.split("-"):null;e>0;){if(n=B(a.slice(0,e).join("-")))return n;if(i&&i.length>=e&&m(a,i,!0)>=e-1)break;e--}o++}return null}(t)}var T={};function I(t,e){var i=t.toLowerCase();T[i]=T[i+"s"]=T[e]=t}function E(t){return"string"==typeof t?T[t]||T[t.toLowerCase()]:void 0}function S(t){var e,i,n={};for(i in t)a(t,i)&&(e=E(i))&&(n[e]=t[i]);return n}function F(t,i){return function(n){return null!=n?(_(this,t,n),e.updateOffset(this,i),this):k(this,t)}}function k(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function _(t,e,i){return t._d["set"+(t._isUTC?"UTC":"")+e](i)}function U(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if("function"==typeof this[t=E(t)])return this[t](e);return this}function Q(t,e,i){var n=""+Math.abs(t),a=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var P=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},O={};function M(t,e,i,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),t&&(O[t]=a),e&&(O[e[0]]=function(){return Q(a.apply(this,arguments),e[1],e[2])}),i&&(O[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function N(t,e){return t.isValid()?(e=R(e,t.localeData()),H[e]=H[e]||function(t){var e,i,n,a=t.match(P);for(e=0,i=a.length;e<i;e++)O[a[e]]?a[e]=O[a[e]]:a[e]=(n=a[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(n){var o="";for(e=0;e<i;e++)o+=a[e]instanceof Function?a[e].call(n,t):a[e];return o}}(e),H[e](t)):t.localeData().invalidDate()}function R(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(L.lastIndex=0;i>=0&&L.test(t);)t=t.replace(L,n),L.lastIndex=0,i-=1;return t}var $=/\d/,q=/\d\d/,V=/\d{3}/,z=/\d{4}/,K=/[+-]?\d{6}/,W=/\d\d?/,G=/\d{1,3}/,Y=/\d{1,4}/,j=/[+-]?\d{1,6}/,X=/\d+/,J=/[+-]?\d+/,Z=/Z|[+-]\d\d:?\d\d/gi,tt=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,et={};function it(t,e,i){var n;et[t]="function"==typeof(n=e)&&"[object Function]"===Object.prototype.toString.call(n)?e:function(t){return t&&i?i:e}}function nt(t,e){return a(et,t)?et[t](e._strict,e._locale):new RegExp(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,n,a){return e||i||n||a})).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))}var at={};function ot(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(n=function(t,i){i[e]=f(t)}),i=0;i<t.length;i++)at[t[i]]=n}function rt(t,e){ot(t,(function(t,i,n,a){n._w=n._w||{},e(t,n._w,n,a)}))}function st(t,e,i){null!=e&&a(at,t)&&at[t](e,i._a,i,t)}var At=0,lt=1,dt=2,ct=3,ut=4,ht=5,pt=6;function gt(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}M("M",["MM",2],"Mo",(function(){return this.month()+1})),M("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),M("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),I("month","M"),it("M",W),it("MM",W,q),it("MMM",tt),it("MMMM",tt),ot(["M","MM"],(function(t,e){e[lt]=f(t)-1})),ot(["MMM","MMMM"],(function(t,e,i,n){var a=i._locale.monthsParse(t,n,i._strict);null!=a?e[lt]=a:s(i).invalidMonth=t}));var ft="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var mt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function vt(t,e){var i;return"string"==typeof e&&"number"!=typeof(e=t.localeData().monthsParse(e))||(i=Math.min(t.date(),gt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i)),t}function yt(t){return null!=t?(vt(this,t),e.updateOffset(this,!0),this):k(this,"Month")}function wt(t){var e,i=t._a;return i&&-2===s(t).overflow&&(e=i[lt]<0||i[lt]>11?lt:i[dt]<1||i[dt]>gt(i[At],i[lt])?dt:i[ct]<0||i[ct]>24||24===i[ct]&&(0!==i[ut]||0!==i[ht]||0!==i[pt])?ct:i[ut]<0||i[ut]>59?ut:i[ht]<0||i[ht]>59?ht:i[pt]<0||i[pt]>999?pt:-1,s(t)._overflowDayOfYear&&(e<At||e>dt)&&(e=dt),s(t).overflow=e),t}function bt(t){!1===e.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function Bt(t,e){var i=!0;return o((function(){return i&&(bt(t+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)}),e)}var Ct={};e.suppressDeprecationWarnings=!1;var xt=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Tt=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],It=/^\/?Date\((\-?\d+)/i;function Et(t){var e,i,n=t._i,a=xt.exec(n);if(a){for(s(t).iso=!0,e=0,i=Dt.length;e<i;e++)if(Dt[e][1].exec(n)){t._f=Dt[e][0];break}for(e=0,i=Tt.length;e<i;e++)if(Tt[e][1].exec(n)){t._f+=(a[6]||" ")+Tt[e][0];break}n.match(Z)&&(t._f+="Z"),Ht(t)}else t._isValid=!1}function St(t,e,i,n,a,o,r){var s=new Date(t,e,i,n,a,o,r);return t<1970&&s.setFullYear(t),s}function Ft(t){var e=new Date(Date.UTC.apply(null,arguments));return t<1970&&e.setUTCFullYear(t),e}function kt(t){return _t(t)?366:365}function _t(t){return t%4==0&&t%100!=0||t%400==0}e.createFromInputFallback=Bt("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),M(0,["YY",2],0,(function(){return this.year()%100})),M(0,["YYYY",4],0,"year"),M(0,["YYYYY",5],0,"year"),M(0,["YYYYYY",6,!0],0,"year"),I("year","y"),it("Y",J),it("YY",W,q),it("YYYY",Y,z),it("YYYYY",j,K),it("YYYYYY",j,K),ot(["YYYYY","YYYYYY"],At),ot("YYYY",(function(t,i){i[At]=2===t.length?e.parseTwoDigitYear(t):f(t)})),ot("YY",(function(t,i){i[At]=e.parseTwoDigitYear(t)})),e.parseTwoDigitYear=function(t){return f(t)+(f(t)>68?1900:2e3)};var Ut=F("FullYear",!1);function Qt(t,e,i){var n,a=i-e,o=i-t.day();return o>a&&(o-=7),o<a-7&&(o+=7),n=Nt(t).add(o,"d"),{week:Math.ceil(n.dayOfYear()/7),year:n.year()}}M("w",["ww",2],"wo","week"),M("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),it("w",W),it("ww",W,q),it("W",W),it("WW",W,q),rt(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=f(t)}));function Pt(t,e,i){return null!=t?t:null!=e?e:i}function Lt(t){var e,i,n,a,o=[];if(!t._d){for(n=function(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[dt]&&null==t._a[lt]&&function(t){var e,i,n,a,o,r,s;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,r=4,i=Pt(e.GG,t._a[At],Qt(Nt(),1,4).year),n=Pt(e.W,1),a=Pt(e.E,1)):(o=t._locale._week.dow,r=t._locale._week.doy,i=Pt(e.gg,t._a[At],Qt(Nt(),o,r).year),n=Pt(e.w,1),null!=e.d?(a=e.d)<o&&++n:a=null!=e.e?e.e+o:o);s=function(t,e,i,n,a){var o,r=6+a-n,s=Ft(t,0,1+r).getUTCDay();return s<a&&(s+=7),{year:(o=1+r+7*(e-1)-s+(i=null!=i?1*i:a))>0?t:t-1,dayOfYear:o>0?o:kt(t-1)+o}}(i,n,a,r,o),t._a[At]=s.year,t._dayOfYear=s.dayOfYear}(t),t._dayOfYear&&(a=Pt(t._a[At],n[At]),t._dayOfYear>kt(a)&&(s(t)._overflowDayOfYear=!0),i=Ft(a,0,t._dayOfYear),t._a[lt]=i.getUTCMonth(),t._a[dt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ct]&&0===t._a[ut]&&0===t._a[ht]&&0===t._a[pt]&&(t._nextDay=!0,t._a[ct]=0),t._d=(t._useUTC?Ft:St).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ct]=24)}}function Ht(t){if(t._f!==e.ISO_8601){t._a=[],s(t).empty=!0;var i,n,a,o,r,A=""+t._i,l=A.length,d=0;for(a=R(t._f,t._locale).match(P)||[],i=0;i<a.length;i++)o=a[i],(n=(A.match(nt(o,t))||[])[0])&&((r=A.substr(0,A.indexOf(n))).length>0&&s(t).unusedInput.push(r),A=A.slice(A.indexOf(n)+n.length),d+=n.length),O[o]?(n?s(t).empty=!1:s(t).unusedTokens.push(o),st(o,n,t)):t._strict&&!n&&s(t).unusedTokens.push(o);s(t).charsLeftOver=l-d,A.length>0&&s(t).unusedInput.push(A),!0===s(t).bigHour&&t._a[ct]<=12&&t._a[ct]>0&&(s(t).bigHour=void 0),t._a[ct]=function(t,e,i){var n;if(null==i)return e;return null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[ct],t._meridiem),Lt(t),wt(t)}else Et(t)}function Ot(t){var a=t._i,r=t._f;return t._locale=t._locale||D(t._l),null===a||void 0===r&&""===a?l({nullInput:!0}):("string"==typeof a&&(t._i=a=t._locale.preparse(a)),p(a)?new h(wt(a)):(i(r)?function(t){var e,i,n,a,r;if(0===t._f.length)return s(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;a<t._f.length;a++)r=0,e=c({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],Ht(e),A(e)&&(r+=s(e).charsLeftOver,r+=10*s(e).unusedTokens.length,s(e).score=r,(null==n||r<n)&&(n=r,i=e));o(t,i||e)}(t):r?Ht(t):n(a)?t._d=a:function(t){var a=t._i;void 0===a?t._d=new Date:n(a)?t._d=new Date(+a):"string"==typeof a?function(t){var i=It.exec(t._i);null===i?(Et(t),!1===t._isValid&&(delete t._isValid,e.createFromInputFallback(t))):t._d=new Date(+i[1])}(t):i(a)?(t._a=function(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}(a.slice(0),(function(t){return parseInt(t,10)})),Lt(t)):"object"==typeof a?function(t){if(!t._d){var e=S(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],Lt(t)}}(t):"number"==typeof a?t._d=new Date(a):e.createFromInputFallback(t)}(t),t))}function Mt(t,e,i,n,a){var o,r={};return"boolean"==typeof i&&(n=i,i=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=a,r._l=i,r._i=t,r._f=e,r._strict=n,(o=new h(wt(Ot(r))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Nt(t,e,i,n){return Mt(t,e,i,n,!1)}M("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),it("DDD",G),it("DDDD",V),ot(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=f(t)})),e.ISO_8601=function(){};var Rt=Bt("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",(function(){var t=Nt.apply(null,arguments);return t<this?this:t})),$t=Bt("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",(function(){var t=Nt.apply(null,arguments);return t>this?this:t}));function qt(t,e){var n,a;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Nt();for(n=e[0],a=1;a<e.length;++a)e[a].isValid()&&!e[a][t](n)||(n=e[a]);return n}function Vt(t){var e=S(t),i=e.year||0,n=e.quarter||0,a=e.month||0,o=e.week||0,r=e.day||0,s=e.hour||0,A=e.minute||0,l=e.second||0,d=e.millisecond||0;this._milliseconds=+d+1e3*l+6e4*A+36e5*s,this._days=+r+7*o,this._months=+a+3*n+12*i,this._data={},this._locale=D(),this._bubble()}function zt(t){return t instanceof Vt}function Kt(t,e){M(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+Q(~~(t/60),2)+e+Q(~~t%60,2)}))}Kt("Z",":"),Kt("ZZ",""),it("Z",Z),it("ZZ",Z),ot(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=Gt(t)}));var Wt=/([\+\-]|\d\d)/gi;function Gt(t){var e=(t||"").match(Z)||[],i=((e[e.length-1]||[])+"").match(Wt)||["-",0,0],n=60*i[1]+f(i[2]);return"+"===i[0]?n:-n}function Yt(t,i){var a,o;return i._isUTC?(a=i.clone(),o=(p(t)||n(t)?+t:+Nt(t))-+a,a._d.setTime(+a._d+o),e.updateOffset(a,!1),a):Nt(t).local()}function jt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Xt(){return this._isUTC&&0===this._offset}e.updateOffset=function(){};var Jt=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Zt=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;function te(t,e){var i,n,o,r=t,s=null;return zt(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(r={},e?r[e]=t:r.milliseconds=t):(s=Jt.exec(t))?(i="-"===s[1]?-1:1,r={y:0,d:f(s[dt])*i,h:f(s[ct])*i,m:f(s[ut])*i,s:f(s[ht])*i,ms:f(s[pt])*i}):(s=Zt.exec(t))?(i="-"===s[1]?-1:1,r={y:ee(s[2],i),M:ee(s[3],i),d:ee(s[4],i),h:ee(s[5],i),m:ee(s[6],i),s:ee(s[7],i),w:ee(s[8],i)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(o=function(t,e){var i;e=Yt(e,t),t.isBefore(e)?i=ie(t,e):((i=ie(e,t)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(Nt(r.from),Nt(r.to)),(r={}).ms=o.milliseconds,r.M=o.months),n=new Vt(r),zt(t)&&a(t,"_locale")&&(n._locale=t._locale),n}function ee(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function ie(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ne(t,e){return function(i,n){var a;return null===n||isNaN(+n)||(!function(t,e){Ct[t]||(bt(e),Ct[t]=!0)}(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=i,i=n,n=a),ae(this,te(i="string"==typeof i?+i:i,n),t),this}}function ae(t,i,n,a){var o=i._milliseconds,r=i._days,s=i._months;a=null==a||a,o&&t._d.setTime(+t._d+o*n),r&&_(t,"Date",k(t,"Date")+r*n),s&&vt(t,k(t,"Month")+s*n),a&&e.updateOffset(t,r||s)}te.fn=Vt.prototype;var oe=ne(1,"add"),re=ne(-1,"subtract");function se(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():N(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):N(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function Ae(t){var e;return void 0===t?this._locale._abbr:(null!=(e=D(t))&&(this._locale=e),this)}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var le=Bt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function de(){return this._locale}function ce(t,e){M(0,[t,t.length],0,e)}function ue(t,e,i){return Qt(Nt([t,11,31+e-i]),e,i).week}M(0,["gg",2],0,(function(){return this.weekYear()%100})),M(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ce("gggg","weekYear"),ce("ggggg","weekYear"),ce("GGGG","isoWeekYear"),ce("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),it("G",J),it("g",J),it("GG",W,q),it("gg",W,q),it("GGGG",Y,z),it("gggg",Y,z),it("GGGGG",j,K),it("ggggg",j,K),rt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=f(t)})),rt(["gg","GG"],(function(t,i,n,a){i[a]=e.parseTwoDigitYear(t)})),M("Q",0,0,"quarter"),I("quarter","Q"),it("Q",$),ot("Q",(function(t,e){e[lt]=3*(f(t)-1)})),M("D",["DD",2],"Do","date"),I("date","D"),it("D",W),it("DD",W,q),it("Do",(function(t,e){return t?e._ordinalParse:e._ordinalParseLenient})),ot(["D","DD"],dt),ot("Do",(function(t,e){e[dt]=f(t.match(W)[0])}));var he=F("Date",!0);M("d",0,"do","day"),M("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),M("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),M("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),M("e",0,0,"weekday"),M("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),it("d",W),it("e",W),it("E",W),it("dd",tt),it("ddd",tt),it("dddd",tt),rt(["dd","ddd","dddd"],(function(t,e,i){var n=i._locale.weekdaysParse(t);null!=n?e.d=n:s(i).invalidWeekday=t})),rt(["d","e","E"],(function(t,e,i,n){e[n]=f(t)}));var pe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var ge="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var fe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function me(t,e){M(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ve(t,e){return e._meridiemParse}M("H",["HH",2],0,"hour"),M("h",["hh",2],0,(function(){return this.hours()%12||12})),me("a",!0),me("A",!1),I("hour","h"),it("a",ve),it("A",ve),it("H",W),it("h",W),it("HH",W,q),it("hh",W,q),ot(["H","HH"],ct),ot(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),ot(["h","hh"],(function(t,e,i){e[ct]=f(t),s(i).bigHour=!0}));var ye=F("Hours",!0);M("m",["mm",2],0,"minute"),I("minute","m"),it("m",W),it("mm",W,q),ot(["m","mm"],ut);var we=F("Minutes",!1);M("s",["ss",2],0,"second"),I("second","s"),it("s",W),it("ss",W,q),ot(["s","ss"],ht);var be,Be=F("Seconds",!1);for(M("S",0,0,(function(){return~~(this.millisecond()/100)})),M(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),M(0,["SSS",3],0,"millisecond"),M(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),M(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),M(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),M(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),M(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),M(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),I("millisecond","ms"),it("S",G,$),it("SS",G,q),it("SSS",G,V),be="SSSS";be.length<=9;be+="S")it(be,X);function Ce(t,e){e[pt]=f(1e3*("0."+t))}for(be="S";be.length<=9;be+="S")ot(be,Ce);var xe=F("Milliseconds",!1);M("z",0,0,"zoneAbbr"),M("zz",0,0,"zoneName");var De=h.prototype;De.add=oe,De.calendar=function(t,e){var i=t||Nt(),n=Yt(i,this).startOf("day"),a=this.diff(n,"days",!0),o=a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse";return this.format(e&&e[o]||this.localeData().calendar(o,this,Nt(i)))},De.clone=function(){return new h(this)},De.diff=function(t,e,i){var n,a,o=Yt(t,this),r=6e4*(o.utcOffset()-this.utcOffset());return"year"===(e=E(e))||"month"===e||"quarter"===e?(a=function(t,e){var i,n=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(n,"months");i=e-a<0?(e-a)/(a-t.clone().add(n-1,"months")):(e-a)/(t.clone().add(n+1,"months")-a);return-(n+i)}(this,o),"quarter"===e?a/=3:"year"===e&&(a/=12)):(n=this-o,a="second"===e?n/1e3:"minute"===e?n/6e4:"hour"===e?n/36e5:"day"===e?(n-r)/864e5:"week"===e?(n-r)/6048e5:n),i?a:g(a)},De.endOf=function(t){return void 0===(t=E(t))||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},De.format=function(t){var i=N(this,t||e.defaultFormat);return this.localeData().postformat(i)},De.from=function(t,e){return this.isValid()?te({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},De.fromNow=function(t){return this.from(Nt(),t)},De.to=function(t,e){return this.isValid()?te({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},De.toNow=function(t){return this.to(Nt(),t)},De.get=U,De.invalidAt=function(){return s(this).overflow},De.isAfter=function(t,e){return"millisecond"===(e=E(void 0!==e?e:"millisecond"))?+this>+(t=p(t)?t:Nt(t)):(p(t)?+t:+Nt(t))<+this.clone().startOf(e)},De.isBefore=function(t,e){var i;return"millisecond"===(e=E(void 0!==e?e:"millisecond"))?+this<+(t=p(t)?t:Nt(t)):(i=p(t)?+t:+Nt(t),+this.clone().endOf(e)<i)},De.isBetween=function(t,e,i){return this.isAfter(t,i)&&this.isBefore(e,i)},De.isSame=function(t,e){var i;return"millisecond"===(e=E(e||"millisecond"))?+this==+(t=p(t)?t:Nt(t)):(i=+Nt(t),+this.clone().startOf(e)<=i&&i<=+this.clone().endOf(e))},De.isValid=function(){return A(this)},De.lang=le,De.locale=Ae,De.localeData=de,De.max=$t,De.min=Rt,De.parsingFlags=function(){return o({},s(this))},De.set=U,De.startOf=function(t){switch(t=E(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},De.subtract=re,De.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},De.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},De.toDate=function(){return this._offset?new Date(+this):this._d},De.toISOString=se,De.toJSON=se,De.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},De.unix=function(){return Math.floor(+this/1e3)},De.valueOf=function(){return+this._d-6e4*(this._offset||0)},De.year=Ut,De.isLeapYear=function(){return _t(this.year())},De.weekYear=function(t){var e=Qt(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},De.isoWeekYear=function(t){var e=Qt(this,1,4).year;return null==t?e:this.add(t-e,"y")},De.quarter=De.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},De.month=yt,De.daysInMonth=function(){return gt(this.year(),this.month())},De.week=De.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},De.isoWeek=De.isoWeeks=function(t){var e=Qt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},De.weeksInYear=function(){var t=this.localeData()._week;return ue(this.year(),t.dow,t.doy)},De.isoWeeksInYear=function(){return ue(this.year(),1,4)},De.date=he,De.day=De.days=function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},De.weekday=function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},De.isoWeekday=function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},De.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},De.hour=De.hours=ye,De.minute=De.minutes=we,De.second=De.seconds=Be,De.millisecond=De.milliseconds=xe,De.utcOffset=function(t,i){var n,a=this._offset||0;return null!=t?("string"==typeof t&&(t=Gt(t)),Math.abs(t)<16&&(t*=60),!this._isUTC&&i&&(n=jt(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),a!==t&&(!i||this._changeInProgress?ae(this,te(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?a:jt(this)},De.utc=function(t){return this.utcOffset(0,t)},De.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(jt(this),"m")),this},De.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Gt(this._i)),this},De.hasAlignedHourOffset=function(t){return t=t?Nt(t).utcOffset():0,(this.utcOffset()-t)%60==0},De.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},De.isDSTShifted=function(){if(void 0!==this._isDSTShifted)return this._isDSTShifted;var t={};if(c(t,this),(t=Ot(t))._a){var e=t._isUTC?r(t._a):Nt(t._a);this._isDSTShifted=this.isValid()&&m(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted},De.isLocal=function(){return!this._isUTC},De.isUtcOffset=function(){return this._isUTC},De.isUtc=Xt,De.isUTC=Xt,De.zoneAbbr=function(){return this._isUTC?"UTC":""},De.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},De.dates=Bt("dates accessor is deprecated. Use date instead.",he),De.months=Bt("months accessor is deprecated. Use month instead",yt),De.years=Bt("years accessor is deprecated. Use year instead",Ut),De.zone=Bt("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}));var Te=De;function Ie(t){return t}var Ee=v.prototype;function Se(t,e,i,n){var a=D(),o=r().set(n,e);return a[i](o,t)}function Fe(t,e,i,n,a){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Se(t,e,i,a);var o,r=[];for(o=0;o<n;o++)r[o]=Se(t,o,i,a);return r}Ee._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ee.calendar=function(t,e,i){var n=this._calendar[t];return"function"==typeof n?n.call(e,i):n},Ee._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ee.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},Ee._invalidDate="Invalid date",Ee.invalidDate=function(){return this._invalidDate},Ee._ordinal="%d",Ee.ordinal=function(t){return this._ordinal.replace("%d",t)},Ee._ordinalParse=/\d{1,2}/,Ee.preparse=Ie,Ee.postformat=Ie,Ee._relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Ee.relativeTime=function(t,e,i,n){var a=this._relativeTime[i];return"function"==typeof a?a(t,e,i,n):a.replace(/%d/i,t)},Ee.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return"function"==typeof i?i(e):i.replace(/%s/i,e)},Ee.set=function(t){var e,i;for(i in t)"function"==typeof(e=t[i])?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},Ee.months=function(t){return this._months[t.month()]},Ee._months=ft,Ee.monthsShort=function(t){return this._monthsShort[t.month()]},Ee._monthsShort=mt,Ee.monthsParse=function(t,e,i){var n,a,o;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=r([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(o="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},Ee.week=function(t){return Qt(t,this._week.dow,this._week.doy).week},Ee._week={dow:0,doy:6},Ee.firstDayOfYear=function(){return this._week.doy},Ee.firstDayOfWeek=function(){return this._week.dow},Ee.weekdays=function(t){return this._weekdays[t.day()]},Ee._weekdays=pe,Ee.weekdaysMin=function(t){return this._weekdaysMin[t.day()]},Ee._weekdaysMin=fe,Ee.weekdaysShort=function(t){return this._weekdaysShort[t.day()]},Ee._weekdaysShort=ge,Ee.weekdaysParse=function(t){var e,i,n;for(this._weekdaysParse=this._weekdaysParse||[],e=0;e<7;e++)if(this._weekdaysParse[e]||(i=Nt([2e3,1]).day(e),n="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[e]=new RegExp(n.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},Ee.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Ee._meridiemParse=/[ap]\.?m?\.?/i,Ee.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},C("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===f(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),e.lang=Bt("moment.lang is deprecated. Use moment.locale instead.",C),e.langData=Bt("moment.langData is deprecated. Use moment.localeData instead.",D);var ke=Math.abs;function _e(t,e,i,n){var a=te(e,i);return t._milliseconds+=n*a._milliseconds,t._days+=n*a._days,t._months+=n*a._months,t._bubble()}function Ue(t){return t<0?Math.floor(t):Math.ceil(t)}function Qe(t){return 4800*t/146097}function Pe(t){return 146097*t/4800}function Le(t){return function(){return this.as(t)}}var He=Le("ms"),Oe=Le("s"),Me=Le("m"),Ne=Le("h"),Re=Le("d"),$e=Le("w"),qe=Le("M"),Ve=Le("y");function ze(t){return function(){return this._data[t]}}var Ke=ze("milliseconds"),We=ze("seconds"),Ge=ze("minutes"),Ye=ze("hours"),je=ze("days"),Xe=ze("months"),Je=ze("years");var Ze=Math.round,ti={s:45,m:45,h:22,d:26,M:11};function ei(t,e,i,n,a){return a.relativeTime(e||1,!!i,t,n)}var ii=Math.abs;function ni(){var t,e,i=ii(this._milliseconds)/1e3,n=ii(this._days),a=ii(this._months);t=g(i/60),e=g(t/60),i%=60,t%=60;var o=g(a/12),r=a%=12,s=n,A=e,l=t,d=i,c=this.asSeconds();return c?(c<0?"-":"")+"P"+(o?o+"Y":"")+(r?r+"M":"")+(s?s+"D":"")+(A||l||d?"T":"")+(A?A+"H":"")+(l?l+"M":"")+(d?d+"S":""):"P0D"}var ai=Vt.prototype;return ai.abs=function(){var t=this._data;return this._milliseconds=ke(this._milliseconds),this._days=ke(this._days),this._months=ke(this._months),t.milliseconds=ke(t.milliseconds),t.seconds=ke(t.seconds),t.minutes=ke(t.minutes),t.hours=ke(t.hours),t.months=ke(t.months),t.years=ke(t.years),this},ai.add=function(t,e){return _e(this,t,e,1)},ai.subtract=function(t,e){return _e(this,t,e,-1)},ai.as=function(t){var e,i,n=this._milliseconds;if("month"===(t=E(t))||"year"===t)return e=this._days+n/864e5,i=this._months+Qe(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Pe(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},ai.asMilliseconds=He,ai.asSeconds=Oe,ai.asMinutes=Me,ai.asHours=Ne,ai.asDays=Re,ai.asWeeks=$e,ai.asMonths=qe,ai.asYears=Ve,ai.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*f(this._months/12)},ai._bubble=function(){var t,e,i,n,a,o=this._milliseconds,r=this._days,s=this._months,A=this._data;return o>=0&&r>=0&&s>=0||o<=0&&r<=0&&s<=0||(o+=864e5*Ue(Pe(s)+r),r=0,s=0),A.milliseconds=o%1e3,t=g(o/1e3),A.seconds=t%60,e=g(t/60),A.minutes=e%60,i=g(e/60),A.hours=i%24,r+=g(i/24),s+=a=g(Qe(r)),r-=Ue(Pe(a)),n=g(s/12),s%=12,A.days=r,A.months=s,A.years=n,this},ai.get=function(t){return this[(t=E(t))+"s"]()},ai.milliseconds=Ke,ai.seconds=We,ai.minutes=Ge,ai.hours=Ye,ai.days=je,ai.weeks=function(){return g(this.days()/7)},ai.months=Xe,ai.years=Je,ai.humanize=function(t){var e=this.localeData(),i=function(t,e,i){var n=te(t).abs(),a=Ze(n.as("s")),o=Ze(n.as("m")),r=Ze(n.as("h")),s=Ze(n.as("d")),A=Ze(n.as("M")),l=Ze(n.as("y")),d=a<ti.s&&["s",a]||1===o&&["m"]||o<ti.m&&["mm",o]||1===r&&["h"]||r<ti.h&&["hh",r]||1===s&&["d"]||s<ti.d&&["dd",s]||1===A&&["M"]||A<ti.M&&["MM",A]||1===l&&["y"]||["yy",l];return d[2]=e,d[3]=+t>0,d[4]=i,ei.apply(null,d)}(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},ai.toISOString=ni,ai.toString=ni,ai.toJSON=ni,ai.locale=Ae,ai.localeData=de,ai.toIsoString=Bt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ni),ai.lang=le,M("X",0,0,"unix"),M("x",0,0,"valueOf"),it("x",J),it("X",/[+-]?\d+(\.\d{1,3})?/),ot("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))})),ot("x",(function(t,e,i){i._d=new Date(f(t))})),e.version="2.10.6",t=Nt,e.fn=Te,e.min=function(){return qt("isBefore",[].slice.call(arguments,0))},e.max=function(){return qt("isAfter",[].slice.call(arguments,0))},e.utc=r,e.unix=function(t){return Nt(1e3*t)},e.months=function(t,e){return Fe(t,e,"months",12,"month")},e.isDate=n,e.locale=C,e.invalid=l,e.duration=te,e.isMoment=p,e.weekdays=function(t,e){return Fe(t,e,"weekdays",7,"day")},e.parseZone=function(){return Nt.apply(null,arguments).parseZone()},e.localeData=D,e.isDuration=zt,e.monthsShort=function(t,e){return Fe(t,e,"monthsShort",12,"month")},e.weekdaysMin=function(t,e){return Fe(t,e,"weekdaysMin",7,"day")},e.defineLocale=x,e.weekdaysShort=function(t,e){return Fe(t,e,"weekdaysShort",7,"day")},e.normalizeUnits=E,e.relativeTimeThreshold=function(t,e){return void 0!==ti[t]&&(void 0===e?ti[t]:(ti[t]=e,!0))},e})),define("drops/calendar/calendar",["jquery","moment","lq/drop","lq/style"],(function(t,e,i,n){"use strict";function a(e){i.call(this,t("<div/>"),e),this.$element.addClass("calendar")}return i.extend(a,i),a.typeName="Calendar",a.prototype.preRender=function(){this.piping.visibility.apply(this),this.renderStyles(),this.applyPosition()},a.prototype.renderStyles=function(){this.data.styles?(this.$element.removeClass("default-calendar-style"),n.renderStyles(this,"calendarstyle-")):this.$element.addClass("default-calendar-style")},a.prototype.render=function(t){return this.createAndRenderDrops(t)},a.prototype.postRender=function(){this.openFirstView()},a.prototype.openFirstView=function(){this.pool.length&&(this.currentView=this.pool[0],this.currentView.$element.appendTo(this.$element),this.currentView.init(),this.currentView.open(e()))},a.prototype.getEnabledViews=function(){return _.map(this.pool,(function(t){return{type:t.type,id:t.data.id}}))},a.prototype.openViewById=function(t){var e=_.find(this.pool,(function(e){return e.data.id===t}));this.openView(e)},a.prototype.openView=function(t){var i=this.currentView?this.currentView.getOpenDate():e(),n=this.currentView?this.currentView.getSelectedDate():null;this.currentView&&this.currentView.$element.detach(),this.currentView=t,this.currentView.$element.appendTo(this.$element),this.currentView.open(i),n?this.currentView.setSelectedDate(n):this.currentView.clearSelectedDate(),this.currentView.loadCalendarData()},a.prototype.clearValue=function(){this.currentView&&this.currentView.clearSelectedDate()},a.prototype.setValue=function(t){if(this.currentView){var i=e(t.value,"YYYY-MM-DD");this.currentView.open(i),this.currentView.setSelectedDate(i),this.currentView.loadCalendarData()}},a.prototype.changeView=function(t){for(var e=0;e<this.pool.length;e++)if(t===this.pool[e].type){this.openView(this.pool[e]);break}},a.prototype.licquidMethod_previous=function(){this.currentView.previous()},a.prototype.licquidMethod_next=function(){this.currentView.next()},a.prototype.licquidMethod_today=function(){this.currentView.open(e(new Date)),this.currentView.setSelectedDate(e(new Date)),this.currentView.loadCalendarData()},a.prototype.licquidMethod_changeToDayView=function(){this.changeView("CalendarDayView")},a.prototype.licquidMethod_changeToWeekView=function(){this.changeView("CalendarWeekView")},a.prototype.licquidMethod_changeToMonthView=function(){this.changeView("CalendarMonthView")},a.prototype.licquidMethod_changeToYearView=function(){this.changeView("CalendarYearView")},a})),define("drops/calendar/calendarParameter",[],(function(){"use strict";return{convert:function(t){return new Date(Date.UTC(t.get("year"),t.get("month"),t.get("date"),t.get("hour"),t.get("minute"),t.get("second")))}}})),
/*! jQuery UI - v1.12.1 - 2016-09-14
* http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
function(t){"function"==typeof define&&define.amd?define("jquery-ui",["jquery"],t):t(jQuery)}((function(t){t.ui=t.ui||{};t.ui.version="1.12.1";
/*!
 * jQuery UI Widget 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */var e,i=0,n=Array.prototype.slice;t.cleanData=(e=t.cleanData,function(i){var n,a,o;for(o=0;null!=(a=i[o]);o++)try{(n=t._data(a,"events"))&&n.remove&&t(a).triggerHandler("remove")}catch(t){}e(i)}),t.widget=function(e,i,n){var a,o,r,s={},A=e.split(".")[0],l=A+"-"+(e=e.split(".")[1]);return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[A]=t[A]||{},a=t[A][e],o=t[A][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(n,(function(e,n){t.isFunction(n)?s[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function a(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=a,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}():s[e]=n})),o.prototype=t.widget.extend(r,{widgetEventPrefix:a&&r.widgetEventPrefix||e},s,{constructor:o,namespace:A,widgetName:e,widgetFullName:l}),a?(t.each(a._childConstructors,(function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,o,i._proto)})),delete a._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,a,o=n.call(arguments,1),r=0,s=o.length;r<s;r++)for(i in o[r])a=o[r][i],o[r].hasOwnProperty(i)&&void 0!==a&&(t.isPlainObject(a)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],a):t.widget.extend({},a):e[i]=a);return e},t.widget.bridge=function(e,i){var a=i.prototype.widgetFullName||e;t.fn[e]=function(o){var r="string"==typeof o,s=n.call(arguments,1),A=this;return r?this.length||"instance"!==o?this.each((function(){var i,n=t.data(this,a);return"instance"===o?(A=n,!1):n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(i=n[o].apply(n,s))!==n&&void 0!==i?(A=i&&i.jquery?A.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")})):A=void 0:(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each((function(){var e=t.data(this,a);e?(e.option(o||{}),e._init&&e._init()):t.data(this,a,new i(o,this))}))),A}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,i){e._removeClass(i,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,a,o,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},n=e.split("."),e=n.shift(),n.length){for(a=r[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)a[n[o]]=a[n[o]]||{},a=a[n[o]];if(e=n.pop(),1===arguments.length)return void 0===a[e]?null:a[e];a[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,n,a;for(i in e)a=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&a&&a.length&&(n=t(a.get()),this._removeClass(a,i),n.addClass(this._classes({element:n,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var i=[],n=this;function a(a,o){var r,s;for(s=0;s<a.length;s++)r=n.classesElementLookup[a[s]]||t(),r=e.add?t(t.unique(r.get().concat(e.element.get()))):t(r.not(e.element).get()),n.classesElementLookup[a[s]]=r,i.push(a[s]),o&&e.classes[a[s]]&&i.push(e.classes[a[s]])}return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&a(e.keys.match(/\S+/g)||[],!0),e.extra&&a(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,(function(n,a){-1!==t.inArray(e.target,a)&&(i.classesElementLookup[n]=t(a.not(e.target).get()))}))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var a="string"==typeof t||null===t,o={extra:a?e:i,keys:a?t:e,element:a?this.element:t,add:n};return o.element.toggleClass(this._classes(o),n),this},_on:function(e,i,n){var a,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=a=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,a=this.widget()),t.each(n,(function(n,r){function s(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof r?o[r]:r).apply(o,arguments)}"string"!=typeof r&&(s.guid=r.guid=r.guid||s.guid||t.guid++);var A=n.match(/^([\w:-]*)\s*(.*)$/),l=A[1]+o.eventNamespace,d=A[2];d?a.on(l,d,s):i.on(l,s)}))},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var a,o,r=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(a in o)a in i||(i[a]=o[a]);return this.element.trigger(i,n),!(t.isFunction(r)&&!1===r.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(n,a,o){var r;"string"==typeof a&&(a={effect:a});var s=a?!0===a||"number"==typeof a?i:a.effect||i:e;"number"==typeof(a=a||{})&&(a={duration:a}),r=!t.isEmptyObject(a),a.complete=o,a.delay&&n.delay(a.delay),r&&t.effects&&t.effects.effect[s]?n[e](a):s!==e&&n[s]?n[s](a.duration,a.easing,o):n.queue((function(i){t(this)[e](),o&&o.call(n[0]),i()}))}}));t.widget;
/*!
 * jQuery UI Position 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */!function(){var e,i=Math.max,n=Math.abs,a=/left|center|right/,o=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,A=/%$/,l=t.fn.position;function d(t,e,i){return[parseFloat(t[0])*(A.test(t[0])?e/100:1),parseFloat(t[1])*(A.test(t[1])?i/100:1)]}function c(e,i){return parseInt(t.css(e,i),10)||0}t.position={scrollbarWidth:function(){if(void 0!==e)return e;var i,n,a=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=a.children()[0];return t("body").append(a),i=o.offsetWidth,a.css("overflow","scroll"),i===(n=o.offsetWidth)&&(n=a[0].clientWidth),a.remove(),e=i-n},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),a="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:a?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),a=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:a,offset:!n&&!a?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return l.apply(this,arguments);e=t.extend({},e);var A,u,h,p,g,f,m,v,y=t(e.of),w=t.position.getWithinInfo(e.within),b=t.position.getScrollInfo(w),B=(e.collision||"flip").split(" "),C={};return f=9===(v=(m=y)[0]).nodeType?{width:m.width(),height:m.height(),offset:{top:0,left:0}}:t.isWindow(v)?{width:m.width(),height:m.height(),offset:{top:m.scrollTop(),left:m.scrollLeft()}}:v.preventDefault?{width:0,height:0,offset:{top:v.pageY,left:v.pageX}}:{width:m.outerWidth(),height:m.outerHeight(),offset:m.offset()},y[0].preventDefault&&(e.at="left top"),u=f.width,h=f.height,p=f.offset,g=t.extend({},p),t.each(["my","at"],(function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=a.test(n[0])?n.concat(["center"]):o.test(n[0])?["center"].concat(n):["center","center"]),n[0]=a.test(n[0])?n[0]:"center",n[1]=o.test(n[1])?n[1]:"center",t=r.exec(n[0]),i=r.exec(n[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[s.exec(n[0])[0],s.exec(n[1])[0]]})),1===B.length&&(B[1]=B[0]),"right"===e.at[0]?g.left+=u:"center"===e.at[0]&&(g.left+=u/2),"bottom"===e.at[1]?g.top+=h:"center"===e.at[1]&&(g.top+=h/2),A=d(C.at,u,h),g.left+=A[0],g.top+=A[1],this.each((function(){var a,o,r=t(this),s=r.outerWidth(),l=r.outerHeight(),f=c(this,"marginLeft"),m=c(this,"marginTop"),v=s+f+c(this,"marginRight")+b.width,x=l+m+c(this,"marginBottom")+b.height,D=t.extend({},g),T=d(C.my,r.outerWidth(),r.outerHeight());"right"===e.my[0]?D.left-=s:"center"===e.my[0]&&(D.left-=s/2),"bottom"===e.my[1]?D.top-=l:"center"===e.my[1]&&(D.top-=l/2),D.left+=T[0],D.top+=T[1],a={marginLeft:f,marginTop:m},t.each(["left","top"],(function(i,n){t.ui.position[B[i]]&&t.ui.position[B[i]][n](D,{targetWidth:u,targetHeight:h,elemWidth:s,elemHeight:l,collisionPosition:a,collisionWidth:v,collisionHeight:x,offset:[A[0]+T[0],A[1]+T[1]],my:e.my,at:e.at,within:w,elem:r})})),e.using&&(o=function(t){var a=p.left-D.left,o=a+u-s,A=p.top-D.top,d=A+h-l,c={target:{element:y,left:p.left,top:p.top,width:u,height:h},element:{element:r,left:D.left,top:D.top,width:s,height:l},horizontal:o<0?"left":a>0?"right":"center",vertical:d<0?"top":A>0?"bottom":"middle"};u<s&&n(a+o)<u&&(c.horizontal="center"),h<l&&n(A+d)<h&&(c.vertical="middle"),i(n(a),n(o))>i(n(A),n(d))?c.important="horizontal":c.important="vertical",e.using.call(this,t,c)}),r.offset(t.extend(D,{using:o}))}))},t.ui.position={fit:{left:function(t,e){var n,a=e.within,o=a.isWindow?a.scrollLeft:a.offset.left,r=a.width,s=t.left-e.collisionPosition.marginLeft,A=o-s,l=s+e.collisionWidth-r-o;e.collisionWidth>r?A>0&&l<=0?(n=t.left+A+e.collisionWidth-r-o,t.left+=A-n):t.left=l>0&&A<=0?o:A>l?o+r-e.collisionWidth:o:A>0?t.left+=A:l>0?t.left-=l:t.left=i(t.left-s,t.left)},top:function(t,e){var n,a=e.within,o=a.isWindow?a.scrollTop:a.offset.top,r=e.within.height,s=t.top-e.collisionPosition.marginTop,A=o-s,l=s+e.collisionHeight-r-o;e.collisionHeight>r?A>0&&l<=0?(n=t.top+A+e.collisionHeight-r-o,t.top+=A-n):t.top=l>0&&A<=0?o:A>l?o+r-e.collisionHeight:o:A>0?t.top+=A:l>0?t.top-=l:t.top=i(t.top-s,t.top)}},flip:{left:function(t,e){var i,a,o=e.within,r=o.offset.left+o.scrollLeft,s=o.width,A=o.isWindow?o.scrollLeft:o.offset.left,l=t.left-e.collisionPosition.marginLeft,d=l-A,c=l+e.collisionWidth-s-A,u="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,h="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];d<0?((i=t.left+u+h+p+e.collisionWidth-s-r)<0||i<n(d))&&(t.left+=u+h+p):c>0&&((a=t.left-e.collisionPosition.marginLeft+u+h+p-A)>0||n(a)<c)&&(t.left+=u+h+p)},top:function(t,e){var i,a,o=e.within,r=o.offset.top+o.scrollTop,s=o.height,A=o.isWindow?o.scrollTop:o.offset.top,l=t.top-e.collisionPosition.marginTop,d=l-A,c=l+e.collisionHeight-s-A,u="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,h="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];d<0?((a=t.top+u+h+p+e.collisionHeight-s-r)<0||a<n(d))&&(t.top+=u+h+p):c>0&&((i=t.top-e.collisionPosition.marginTop+u+h+p-A)>0||n(i)<c)&&(t.top+=u+h+p)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}();t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,n){return!!t.data(e,n[3])}}),t.fn.extend({disableSelection:(a="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(a+".ui-disableSelection",(function(t){t.preventDefault()}))}),enableSelection:function(){return this.off(".ui-disableSelection")}});
/*!
 * jQuery UI :data 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */var a,o,r="ui-effects-",s="ui-effects-style",A="ui-effects-animated",l=t;t.effects={effect:{}},
/*!
 * jQuery Color Animations v2.1.2
 * https://github.com/jquery/jquery-color
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * Date: Wed Jan 16 08:47:09 2013 -0600
 */
function(t,e){var i,n=/^([\-+])=\s*(\d+\.?\d*)/,a=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],o=t.Color=function(e,i,n,a){return new t.Color.fn.parse(e,i,n,a)},r={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},s={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},A=o.support={},l=t("<p>")[0],d=t.each;function c(t,e,i){var n=s[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function u(e){var n=o(),s=n._rgba=[];return e=e.toLowerCase(),d(a,(function(t,i){var a,o=i.re.exec(e),A=o&&i.parse(o),l=i.space||"rgba";if(A)return a=n[l](A),n[r[l].cache]=a[r[l].cache],s=n._rgba=a._rgba,!1})),s.length?("0,0,0,0"===s.join()&&t.extend(s,i.transparent),n):i[e]}function h(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}l.style.cssText="background-color:rgba(1,1,1,.5)",A.rgba=l.style.backgroundColor.indexOf("rgba")>-1,d(r,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),o.fn=t.extend(o.prototype,{parse:function(n,a,s,A){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var l=this,h=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,s,A],h="array"),"string"===h?this.parse(u(n)||i._default):"array"===h?(d(r.rgba.props,(function(t,e){p[e.idx]=c(n[e.idx],e)})),this):"object"===h?(d(r,n instanceof o?function(t,e){n[e.cache]&&(l[e.cache]=n[e.cache].slice())}:function(e,i){var a=i.cache;d(i.props,(function(t,e){if(!l[a]&&i.to){if("alpha"===t||null==n[t])return;l[a]=i.to(l._rgba)}l[a][e.idx]=c(n[t],e,!0)})),l[a]&&t.inArray(null,l[a].slice(0,3))<0&&(l[a][3]=1,i.from&&(l._rgba=i.from(l[a])))}),this):void 0},is:function(t){var e=o(t),i=!0,n=this;return d(r,(function(t,a){var o,r=e[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],d(a.props,(function(t,e){if(null!=r[e.idx])return i=r[e.idx]===o[e.idx]}))),i})),i},_space:function(){var t=[],e=this;return d(r,(function(i,n){e[n.cache]&&t.push(i)})),t.pop()},transition:function(t,e){var i=o(t),n=i._space(),a=r[n],A=0===this.alpha()?o("transparent"):this,l=A[a.cache]||a.to(A._rgba),u=l.slice();return i=i[a.cache],d(a.props,(function(t,n){var a=n.idx,o=l[a],r=i[a],A=s[n.type]||{};null!==r&&(null===o?u[a]=r:(A.mod&&(r-o>A.mod/2?o+=A.mod:o-r>A.mod/2&&(o-=A.mod)),u[a]=c((r-o)*e+o,n)))})),this[n](u)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),a=o(e)._rgba;return o(t.map(i,(function(t,e){return(1-n)*a[e]+n*t})))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,(function(t,e){return null==t?e>2?1:0:t}));return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t}));return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,r.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=t[3],s=Math.max(n,a,o),A=Math.min(n,a,o),l=s-A,d=s+A,c=.5*d;return e=A===s?0:n===s?60*(a-o)/l+360:a===s?60*(o-n)/l+120:60*(n-a)/l+240,i=0===l?0:c<=.5?l/d:l/(2-d),[Math.round(e)%360,i,c,null==r?1:r]},r.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],a=t[3],o=n<=.5?n*(1+i):n+i-n*i,r=2*n-o;return[Math.round(255*h(r,o,e+1/3)),Math.round(255*h(r,o,e)),Math.round(255*h(r,o,e-1/3)),a]},d(r,(function(i,a){var r=a.props,s=a.cache,A=a.to,l=a.from;o.fn[i]=function(i){if(A&&!this[s]&&(this[s]=A(this._rgba)),i===e)return this[s].slice();var n,a=t.type(i),u="array"===a||"object"===a?i:arguments,h=this[s].slice();return d(r,(function(t,e){var i=u["object"===a?t:e.idx];null==i&&(i=h[e.idx]),h[e.idx]=c(i,e)})),l?((n=o(l(h)))[s]=h,n):o(h)},d(r,(function(e,a){o.fn[e]||(o.fn[e]=function(o){var r,s=t.type(o),A="alpha"===e?this._hsla?"hsla":"rgba":i,l=this[A](),d=l[a.idx];return"undefined"===s?d:("function"===s&&(o=o.call(this,d),s=t.type(o)),null==o&&a.empty?this:("string"===s&&(r=n.exec(o))&&(o=d+parseFloat(r[2])*("+"===r[1]?1:-1)),l[a.idx]=o,this[A](l)))})}))})),o.hook=function(e){var i=e.split(" ");d(i,(function(e,i){t.cssHooks[i]={set:function(e,n){var a,r,s="";if("transparent"!==n&&("string"!==t.type(n)||(a=u(n)))){if(n=o(a||n),!A.rgba&&1!==n._rgba[3]){for(r="backgroundColor"===i?e.parentNode:e;(""===s||"transparent"===s)&&r&&r.style;)try{s=t.css(r,"backgroundColor"),r=r.parentNode}catch(t){}n=n.blend(s&&"transparent"!==s?s:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=o(e.elem,i),e.end=o(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}))},o.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return d(["Top","Right","Bottom","Left"],(function(i,n){e["border"+n+"Color"]=t})),e}},i=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(l),function(){var e=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function n(e){var i,n,a=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(a&&a.length&&a[0]&&a[a[0]])for(n=a.length;n--;)"string"==typeof a[i=a[n]]&&(o[t.camelCase(i)]=a[i]);else for(i in a)"string"==typeof a[i]&&(o[i]=a[i]);return o}t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(l.style(t.elem,i,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(a,o,r,s){var A=t.speed(o,r,s);return this.queue((function(){var o,r=t(this),s=r.attr("class")||"",l=A.children?r.find("*").addBack():r;l=l.map((function(){return{el:t(this),start:n(this)}})),(o=function(){t.each(e,(function(t,e){a[e]&&r[e+"Class"](a[e])}))})(),l=l.map((function(){return this.end=n(this.el[0]),this.diff=function(e,n){var a,o,r={};for(a in n)o=n[a],e[a]!==o&&(i[a]||!t.fx.step[a]&&isNaN(parseFloat(o))||(r[a]=o));return r}(this.start,this.end),this})),r.attr("class",s),l=l.map((function(){var e=this,i=t.Deferred(),n=t.extend({},A,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()})),t.when.apply(t,l.get()).done((function(){o(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),A.complete.call(r[0])}))}))},t.fn.extend({addClass:function(e){return function(i,n,a,o){return n?t.effects.animateClass.call(this,{add:i},n,a,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,a,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,a,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,a,o,r){return"boolean"==typeof n||void 0===n?a?t.effects.animateClass.call(this,n?{add:i}:{remove:i},a,o,r):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,a,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,a,o)}})}(),function(){function e(e,i,n,a){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(a=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(a=n,n=i,i={}),t.isFunction(n)&&(a=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=a||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function n(t,e){var i=e.outerWidth(),n=e.outerHeight(),a=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,n,0];return{top:parseFloat(a[1])||0,right:"auto"===a[2]?i:parseFloat(a[2]),bottom:"auto"===a[3]?n:parseFloat(a[3]),left:parseFloat(a[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(A)||e(i)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;i<n;i++)null!==e[i]&&t.data(r+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,a=e.length;n<a;n++)null!==e[n]&&(i=t.data(r+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),a={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(a),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,a="vertical"!==i?(e||100)/100:1;return{height:t.height()*a,width:t.width()*n,outerHeight:t.outerHeight()*a,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(s,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(s)||"",t.removeData(s)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),a=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(r+"placeholder",i)),e.css({position:n,left:a.left,top:a.top}),i},removePlaceholder:function(t){var e=r+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,a){return a=a||{},t.each(i,(function(t,i){var o=e.cssUnit(i);o[0]>0&&(a[i]=o[0]*n+o[1])})),a}}),t.fn.extend({effect:function(){var i=e.apply(this,arguments),n=t.effects.effect[i.effect],a=n.mode,o=i.queue,r=o||"fx",s=i.complete,l=i.mode,d=[],c=function(e){var i=t(this),n=t.effects.mode(i,l)||a;i.data(A,!0),d.push(n),a&&("show"===n||n===a&&"hide"===n)&&i.show(),a&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};if(t.fx.off||!n)return l?this[l](i.duration,s):this.each((function(){s&&s.call(this)}));function u(e){var o=t(this);function r(){t.isFunction(s)&&s.call(o[0]),t.isFunction(e)&&e()}i.mode=d.shift(),!1===t.uiBackCompat||a?"none"===i.mode?(o[l](),r()):n.call(o[0],i,(function(){o.removeData(A),t.effects.cleanUp(o),"hide"===i.mode&&o.hide(),r()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),r()):n.call(o[0],i,r)}return!1===o?this.each(c).each(u):this.queue(r,c).queue(r,u)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var a=e.apply(this,arguments);return a.mode="show",this.effect.call(this,a)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var a=e.apply(this,arguments);return a.mode="hide",this.effect.call(this,a)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var a=e.apply(this,arguments);return a.mode="toggle",this.effect.call(this,a)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])})),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):n(this.css("clip"),this)},transfer:function(e,i){var n=t(this),a=t(e.to),o="fixed"===a.css("position"),r=t("body"),s=o?r.scrollTop():0,A=o?r.scrollLeft():0,l=a.offset(),d={top:l.top-s,left:l.left-A,height:a.innerHeight(),width:a.innerWidth()},c=n.offset(),u=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:c.top-s,left:c.left-A,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(d,e.duration,e.easing,(function(){u.remove(),t.isFunction(i)&&i()}))}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=n(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),o={},t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,e){o[e]=function(e){return Math.pow(e,t+2)}})),t.extend(o,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(o,(function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}}));t.effects,t.effects.define("blind","hide",(function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},a=t(this),o=e.direction||"up",r=a.cssClip(),s={clip:t.extend({},r)},A=t.effects.createPlaceholder(a);s.clip[n[o][0]]=s.clip[n[o][1]],"show"===e.mode&&(a.cssClip(s.clip),A&&A.css(t.effects.clipToBox(s)),s.clip=r),A&&A.animate(t.effects.clipToBox(s),e.duration,e.easing),a.animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("bounce",(function(e,i){var n,a,o,r=t(this),s=e.mode,A="hide"===s,l="show"===s,d=e.direction||"up",c=e.distance,u=e.times||5,h=2*u+(l||A?1:0),p=e.duration/h,g=e.easing,f="up"===d||"down"===d?"top":"left",m="up"===d||"left"===d,v=0,y=r.queue().length;for(t.effects.createPlaceholder(r),o=r.css(f),c||(c=r["top"===f?"outerHeight":"outerWidth"]()/3),l&&((a={opacity:1})[f]=o,r.css("opacity",0).css(f,m?2*-c:2*c).animate(a,p,g)),A&&(c/=Math.pow(2,u-1)),(a={})[f]=o;v<u;v++)(n={})[f]=(m?"-=":"+=")+c,r.animate(n,p,g).animate(a,p,g),c=A?2*c:c/2;A&&((n={opacity:0})[f]=(m?"-=":"+=")+c,r.animate(n,p,g)),r.queue(i),t.effects.unshift(r,y,h+1)})),t.effects.define("clip","hide",(function(e,i){var n,a={},o=t(this),r=e.direction||"vertical",s="both"===r,A=s||"horizontal"===r,l=s||"vertical"===r;n=o.cssClip(),a.clip={top:l?(n.bottom-n.top)/2:n.top,right:A?(n.right-n.left)/2:n.right,bottom:l?(n.bottom-n.top)/2:n.bottom,left:A?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(a.clip),a.clip=n),o.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("drop","hide",(function(e,i){var n,a=t(this),o="show"===e.mode,r=e.direction||"left",s="up"===r||"down"===r?"top":"left",A="up"===r||"left"===r?"-=":"+=",l="+="===A?"-=":"+=",d={opacity:0};t.effects.createPlaceholder(a),n=e.distance||a["top"===s?"outerHeight":"outerWidth"](!0)/2,d[s]=A+n,o&&(a.css(d),d[s]=l+n,d.opacity=1),a.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("explode","hide",(function(e,i){var n,a,o,r,s,A,l=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=l,c=t(this),u="show"===e.mode,h=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/d),g=Math.ceil(c.outerHeight()/l),f=[];function m(){f.push(this),f.length===l*d&&(c.css({visibility:"visible"}),t(f).remove(),i())}for(n=0;n<l;n++)for(r=h.top+n*g,A=n-(l-1)/2,a=0;a<d;a++)o=h.left+a*p,s=a-(d-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*p,top:-n*g}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:g,left:o+(u?s*p:0),top:r+(u?A*g:0),opacity:u?0:1}).animate({left:o+(u?0:s*p),top:r+(u?0:A*g),opacity:u?1:0},e.duration||500,e.easing,m)})),t.effects.define("fade","toggle",(function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("fold","hide",(function(e,i){var n=t(this),a=e.mode,o="show"===a,r="hide"===a,s=e.size||15,A=/([0-9]+)%/.exec(s),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],d=e.duration/2,c=t.effects.createPlaceholder(n),u=n.cssClip(),h={clip:t.extend({},u)},p={clip:t.extend({},u)},g=[u[l[0]],u[l[1]]],f=n.queue().length;A&&(s=parseInt(A[1],10)/100*g[r?0:1]),h.clip[l[0]]=s,p.clip[l[0]]=s,p.clip[l[1]]=0,o&&(n.cssClip(p.clip),c&&c.css(t.effects.clipToBox(p)),p.clip=u),n.queue((function(i){c&&c.animate(t.effects.clipToBox(h),d,e.easing).animate(t.effects.clipToBox(p),d,e.easing),i()})).animate(h,d,e.easing).animate(p,d,e.easing).queue(i),t.effects.unshift(n,f,4)})),t.effects.define("highlight","show",(function(e,i){var n=t(this),a={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(a.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:i})})),t.effects.define("size",(function(e,i){var n,a,o,r=t(this),s=["fontSize"],A=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],d=e.mode,c="effect"!==d,u=e.scale||"both",h=e.origin||["middle","center"],p=r.css("position"),g=r.position(),f=t.effects.scaledDimensions(r),m=e.from||f,v=e.to||t.effects.scaledDimensions(r,0);t.effects.createPlaceholder(r),"show"===d&&(o=m,m=v,v=o),a={from:{y:m.height/f.height,x:m.width/f.width},to:{y:v.height/f.height,x:v.width/f.width}},"box"!==u&&"both"!==u||(a.from.y!==a.to.y&&(m=t.effects.setTransition(r,A,a.from.y,m),v=t.effects.setTransition(r,A,a.to.y,v)),a.from.x!==a.to.x&&(m=t.effects.setTransition(r,l,a.from.x,m),v=t.effects.setTransition(r,l,a.to.x,v))),"content"!==u&&"both"!==u||a.from.y!==a.to.y&&(m=t.effects.setTransition(r,s,a.from.y,m),v=t.effects.setTransition(r,s,a.to.y,v)),h&&(n=t.effects.getBaseline(h,f),m.top=(f.outerHeight-m.outerHeight)*n.y+g.top,m.left=(f.outerWidth-m.outerWidth)*n.x+g.left,v.top=(f.outerHeight-v.outerHeight)*n.y+g.top,v.left=(f.outerWidth-v.outerWidth)*n.x+g.left),r.css(m),"content"!==u&&"both"!==u||(A=A.concat(["marginTop","marginBottom"]).concat(s),l=l.concat(["marginLeft","marginRight"]),r.find("*[width]").each((function(){var i=t(this),n=t.effects.scaledDimensions(i),o={height:n.height*a.from.y,width:n.width*a.from.x,outerHeight:n.outerHeight*a.from.y,outerWidth:n.outerWidth*a.from.x},r={height:n.height*a.to.y,width:n.width*a.to.x,outerHeight:n.height*a.to.y,outerWidth:n.width*a.to.x};a.from.y!==a.to.y&&(o=t.effects.setTransition(i,A,a.from.y,o),r=t.effects.setTransition(i,A,a.to.y,r)),a.from.x!==a.to.x&&(o=t.effects.setTransition(i,l,a.from.x,o),r=t.effects.setTransition(i,l,a.to.x,r)),c&&t.effects.saveStyle(i),i.css(o),i.animate(r,e.duration,e.easing,(function(){c&&t.effects.restoreStyle(i)}))}))),r.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=r.offset();0===v.opacity&&r.css("opacity",m.opacity),c||(r.css("position","static"===p?"relative":p).offset(e),t.effects.saveStyle(r)),i()}})})),t.effects.define("scale",(function(e,i){var n=t(this),a=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)||"effect"!==a?0:100),r=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(r.from.opacity=1,r.to.opacity=0),t.effects.effect.size.call(this,r,i)})),t.effects.define("puff","hide",(function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)})),t.effects.define("pulsate","show",(function(e,i){var n=t(this),a=e.mode,o="show"===a,r=o||"hide"===a,s=2*(e.times||5)+(r?1:0),A=e.duration/s,l=0,d=1,c=n.queue().length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),l=1);d<s;d++)n.animate({opacity:l},A,e.easing),l=1-l;n.animate({opacity:l},A,e.easing),n.queue(i),t.effects.unshift(n,c,s+1)})),t.effects.define("shake",(function(e,i){var n=1,a=t(this),o=e.direction||"left",r=e.distance||20,s=e.times||3,A=2*s+1,l=Math.round(e.duration/A),d="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,u={},h={},p={},g=a.queue().length;for(t.effects.createPlaceholder(a),u[d]=(c?"-=":"+=")+r,h[d]=(c?"+=":"-=")+2*r,p[d]=(c?"-=":"+=")+2*r,a.animate(u,l,e.easing);n<s;n++)a.animate(h,l,e.easing).animate(p,l,e.easing);a.animate(h,l,e.easing).animate(u,l/2,e.easing).queue(i),t.effects.unshift(a,g,A+1)})),t.effects.define("slide","show",(function(e,i){var n,a,o=t(this),r={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},s=e.mode,A=e.direction||"left",l="up"===A||"down"===A?"top":"left",d="up"===A||"left"===A,c=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),u={};t.effects.createPlaceholder(o),n=o.cssClip(),a=o.position()[l],u[l]=(d?-1:1)*c+a,u.clip=o.cssClip(),u.clip[r[A][1]]=u.clip[r[A][0]],"show"===s&&(o.cssClip(u.clip),o.css(l,u[l]),u.clip=n,u[l]=a),o.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}));
/*!
 * jQuery UI Effects Blind 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */!1!==t.uiBackCompat&&t.effects.define("transfer",(function(e,i){t(this).transfer(e,i)}));
/*!
 * jQuery UI Focusable 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
t.ui.focusable=function(e,i){var n,a,o,r,s,A=e.nodeName.toLowerCase();return"area"===A?(a=(n=e.parentNode).name,!(!e.href||!a||"map"!==n.nodeName.toLowerCase())&&((o=t("img[usemap='#"+a+"']")).length>0&&o.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(A)?(r=!e.disabled)&&(s=t(e).closest("fieldset")[0])&&(r=!s.disabled):r="a"===A&&e.href||i,r&&t(e).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)e=(t=t.parent()).css("visibility");return"hidden"!==e}(t(e)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}});t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout((function(){var i=e.data("ui-form-reset-instances");t.each(i,(function(){this.refresh()}))}))},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};
/*!
 * jQuery UI Support for jQuery core 1.7.x 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 */
"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],(function(e,i){var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};function r(e,i,a,o){return t.each(n,(function(){i-=parseFloat(t.css(e,"padding"+this))||0,a&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)})),i}t.fn["inner"+i]=function(e){return void 0===e?o["inner"+i].call(this):this.each((function(){t(this).css(a,r(this,e)+"px")}))},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?o["outer"+i].call(this,e):this.each((function(){t(this).css(a,r(this,e,!0,n)+"px")}))}})),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});
/*!
 * jQuery UI Keycode 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
var d,c;t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=(d=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(d,"\\$1")}),t.fn.labels=function(){var e,i,n,a,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(a=this.eq(0).parents("label"),(n=this.attr("id"))&&(o=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",a=a.add(o.find(i).addBack(i))),this.pushStack(a))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,a=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter((function(){var e=t(this);return(!n||"static"!==e.css("position"))&&a.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),t.fn.extend({uniqueId:(c=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++c)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")}))}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,n=this.options.icons;n&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,a=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(a+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(a-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,a=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each((function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),a=n.uniqueId().attr("id");e.attr("aria-controls",a),n.attr("aria-labelledby",i)})).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=a.height(),this.element.siblings(":visible").each((function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))})),this.headers.each((function(){e-=t(this).outerHeight(!0)})),this.headers.next().each((function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))})).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each((function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()})).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),(function(t,e){i[e]="_eventHandler"})),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,n,a=this.options,o=this.active,r=t(e.currentTarget),s=r[0]===o[0],A=s&&a.collapsible,l=A?t():r.next(),d=o.next(),c={oldHeader:o,oldPanel:d,newHeader:A?t():r,newPanel:l};e.preventDefault(),s&&!a.collapsible||!1===this._trigger("beforeActivate",e,c)||(a.active=!A&&this.headers.index(r),this.active=s?t():r,this._toggle(c),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),a.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,a.icons.activeHeader)._addClass(i,null,a.icons.header)),s||(this._removeClass(r,"ui-accordion-header-collapsed")._addClass(r,"ui-accordion-header-active","ui-state-active"),a.icons&&(n=r.children(".ui-accordion-header-icon"),this._removeClass(n,null,a.icons.header)._addClass(n,null,a.icons.activeHeader)),this._addClass(r.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter((function(){return 0===parseInt(t(this).attr("tabIndex"),10)})).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,a,o,r=this,s=0,A=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),d=this.options.animate||{},c=l&&d.down||d,u=function(){r._toggleComplete(i)};return"number"==typeof c&&(o=c),"string"==typeof c&&(a=c),a=a||c.easing||d.easing,o=o||c.duration||d.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:a,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:a,complete:u,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===A&&(s+=i.now):"content"!==r.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-s),s=0)}})):e.animate(this.hideProps,o,a,u):t.animate(this.showProps,o,a,u)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay((function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)}))},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each((function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()}))},_keydown:function(e){var i,n,a,o,r=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:r=!1,n=this.previousFilter||"",o=!1,a=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,i=this._filterMenuItems(a),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(a=String.fromCharCode(e.keyCode),i=this._filterMenuItems(a)),i.length?(this.focus(e,i),this.previousFilter=a,this.filterTimer=this._delay((function(){delete this.previousFilter}),1e3)):delete this.previousFilter}r&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n,a,o=this,r=this.options.icons.submenu,s=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=s.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each((function(){var e=t(this),i=e.prev(),n=t("<span>").data("ui-menu-submenu-caret",!0);o._addClass(n,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))})),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=s.add(this.element).find(this.options.items)).not(".ui-menu-item").each((function(){var e=t(this);o._isDivider(e)&&o._addClass(e,"ui-menu-divider","ui-widget-content")})),a=(n=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(a,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,a;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),a=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(a,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay((function(){this._close()}),this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,a,o,r,s;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,a=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),s=e.outerHeight(),a<0?this.activeMenu.scrollTop(o+a):a+s>r&&this.activeMenu.scrollTop(o+a-r+s))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay((function(){this._close(),this._open(t)}),this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay((function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n}),this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay((function(){this.focus(t,e)})))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,a;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,a=this.element.height(),this.active.nextAll(".ui-menu-item").each((function(){return(i=t(this)).offset().top-n-a<0})),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var i,n,a;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,a=this.element.height(),this.active.prevAll(".ui-menu-item").each((function(){return(i=t(this)).offset().top-n+a>0})),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter((function(){return n.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))}))}});
/*!
 * jQuery UI Autocomplete 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,a=this.element[0].nodeName.toLowerCase(),o="textarea"===a,r="input"===a;this.isMultiLine=o||!r&&this._isContentEditable(this.element),this.valueMethod=this.element[o||r?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(a){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(a.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",a);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",a);break;case o.UP:e=!0,this._keyEvent("previous",a);break;case o.DOWN:e=!0,this._keyEvent("next",a);break;case o.ENTER:this.menu.active&&(e=!0,a.preventDefault(),this.menu.select(a));break;case o.TAB:this.menu.active&&this.menu.select(a);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(a),a.preventDefault());break;default:i=!0,this._searchTimeout(a)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:this._move("previousPage",n);break;case a.PAGE_DOWN:this._move("nextPage",n);break;case a.UP:this._keyEvent("previous",n);break;case a.DOWN:this._keyEvent("next",n)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay((function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")}))},menufocus:function(e,i){var n,a;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",(function(){t(e.target).trigger(e.originalEvent)}));a=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:a})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(a.value),(n=i.item.attr("aria-label")||a.value)&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),a=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=a,this._delay((function(){this.previous=a,this.selectedItem=n}))),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,a){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){a(t)},error:function(){a([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay((function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(this.selectedItem=null,this.search(null,t))}),this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy((function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}),this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,(function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})}))},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,(function(t,i){n._renderItemData(e,i)}))},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,(function(t){return n.test(t.label||t.value||t)}))}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}});t.ui.autocomplete;
/*!
 * jQuery UI Controlgroup 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */var u=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,(function(n,a){var o,r={};if(a)return"controlgroupLabel"===n?((o=e.element.find(a)).each((function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")})),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(o.get()))):void(t.fn[n]&&(r=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(a).each((function(){var a=t(this),o=a[n]("instance"),s=t.widget.extend({},r);if("button"!==n||!a.parent(".ui-spinner").length){o||(o=a[n]()[n]("instance")),o&&(s.classes=e._resolveClassesValues(s.classes,o)),a[n](s);var A=a[n]("widget");t.data(A[0],"ui-controlgroup-data",o||a[n]("instance")),i.push(A[0])}}))))})),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each((function(){var i=t(this).data("ui-controlgroup-data");i&&i[e]&&i[e]()}))},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var n={};return t.each(e,(function(a){var o=i.options.classes[a]||"";o=t.trim(o.replace(u,"")),n[a]=(o+" "+e[a]).replace(/\s+/g," ")})),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],(function(t,n){var a=e[n]().data("ui-controlgroup-data");if(a&&i["_"+a.widgetName+"Options"]){var o=i["_"+a.widgetName+"Options"](1===e.length?"only":n);o.classes=i._resolveClassesValues(o.classes,a),a.element[a.widgetName](o)}else i._updateCornerClass(e[n](),n)})),this._callChildMethod("refresh"))}});
/*!
 * jQuery UI Checkboxradio 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,n=this,a=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each((function(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML})),this.originalLabel&&(a.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(a.disabled=e),a},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,i="input[name='"+t.ui.escapeSelector(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(i):t(i).filter((function(){return 0===t(this).form().length}))).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each((function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")}))},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);t.ui.checkboxradio;
/*!
 * jQuery UI Button 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var n="iconPosition"!==e,a=n?this.options.iconPosition:i,o="top"===a||"bottom"===a;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,i),this._attachIcon(a),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(a))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var h;
/*!
 * jQuery UI Datepicker 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.ui.button;function p(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=g(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function g(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,(function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")})).on("mouseover",i,f)}function f(){t.datepicker._isDisabledDatepicker(h.inline?h.dpDiv.parent()[0]:h.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function m(e,i){for(var n in t.extend(e,i),i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.12.1"}}),t.extend(p.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return m(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,a,o;a="div"===(n=e.nodeName.toLowerCase())||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(o=this._newInst(t(e),a)).settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):a&&this._inlineDatepicker(e,o)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?g(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,a,o,r=this._get(i,"appendText"),s=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[s?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),"focus"!==(n=this._get(i,"showOn"))&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(a=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:a,title:a}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:a,title:a}):a)),e[s?"before":"after"](i.trigger),i.trigger.on("click",(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1})))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,a,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,n=0,a=0;a<t.length;a++)t[a].length>i&&(i=t[a].length,n=a);return n},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,a,o){var r,s,A,l,d,c=this._dialogInst;return c||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),(c=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",c)),m(c.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(s=document.documentElement.clientWidth,A=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[s/2-100+l,A/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",c),this},_destroyDatepicker:function(e){var i,n=t(e),a=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(a.append.remove(),a.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),h===a&&(h=null))},_enableDatepicker:function(e){var i,n,a=t(e),o=t.data(e,"datepicker");a.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,o.trigger.filter("button").each((function(){this.disabled=!1})).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||((n=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,(function(t){return t===e?null:t})))},_disableDatepicker:function(e){var i,n,a=t(e),o=t.data(e,"datepicker");a.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,o.trigger.filter("button").each((function(){this.disabled=!0})).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||((n=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,(function(t){return t===e?null:t})),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,n){var a,o,r,s,A=this._getInst(e);if(2===arguments.length&&"string"==typeof i)return"defaults"===i?t.extend({},t.datepicker._defaults):A?"all"===i?t.extend({},A.settings):this._get(A,i):null;a=i||{},"string"==typeof i&&((a={})[i]=n),A&&(this._curInst===A&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(A,"min"),s=this._getMinMaxDate(A,"max"),m(A.settings,a),null!==r&&void 0!==a.dateFormat&&void 0===a.minDate&&(A.settings.minDate=this._formatDate(A,r)),null!==s&&void 0!==a.dateFormat&&void 0===a.maxDate&&(A.settings.maxDate=this._formatDate(A,s)),"disabled"in a&&(a.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),A),this._autoSize(A),this._setDate(A,o),this._updateAlternate(A),this._updateDatepicker(A))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,a,o=t.datepicker._getInst(e.target),r=!0,s=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return(a=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv))[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,a[0]),(i=t.datepicker._get(o,"onSelect"))?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,s?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,s?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,a=t.datepicker._getInst(e.target);if(t.datepicker._get(a,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(t){}return!0},_showDatepicker:function(e){var i,n,a,o,r,s,A;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e)||(i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(a=(n=t.datepicker._get(i,"beforeShow"))?n.apply(e,[e,i]):{})&&(m(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),o=!1,t(e).parents().each((function(){return!(o|="fixed"===t(this).css("position"))})),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,o),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":o?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(s=t.datepicker._get(i,"showAnim"),A=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[s]?i.dpDiv.show(s,t.datepicker._get(i,"showOptions"),A):i.dpDiv[s||"show"](s?A:null),t.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),t.datepicker._curInst=i)))},_updateDatepicker:function(e){this.maxRows=4,h=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),a=n[1],o=e.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&f.apply(o.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),a>1&&e.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout((function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null}),0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var a=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,s=e.input?e.input.outerHeight():0,A=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?a-r:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+s?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+a>A&&A>a?Math.abs(i.left+a-A):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+s):0),i},_findPos:function(e){for(var i,n=this._getInst(e),a=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[a?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},_hideDatepicker:function(e){var i,n,a,o,r=this._curInst;!r||e&&r!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),n=this._get(r,"duration"),a=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),n,a):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,a),i||a(),this._datepickerShowing=!1,(o=this._get(r,"onClose"))&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var a=t(e),o=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),a=this._getInst(n[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear):(i=new Date,a.selectedDay=i.getDate(),a.drawMonth=a.selectedMonth=i.getMonth(),a.drawYear=a.selectedYear=i.getFullYear()),this._notifyChange(a),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var a=t(e),o=this._getInst(a[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(a)},_selectDay:function(e,i,n,a){var o,r=t(e);t(a).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||((o=this._getInst(r[0])).selectedDay=o.currentDay=t("a",a).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,a=t(e),o=this._getInst(a[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),(n=this._get(o,"onSelect"))?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,n,a,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),a=this.formatDate(i,n,this._getFormatConfig(e)),t(o).val(a))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var a,o,r,s,A=0,l=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,d="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),c=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,u=(n?n.dayNames:null)||this._defaults.dayNames,h=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,p=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,f=-1,m=-1,v=-1,y=!1,w=function(t){var i=a+1<e.length&&e.charAt(a+1)===t;return i&&a++,i},b=function(t){var e=w(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,a=new RegExp("^\\d{"+("y"===t?n:1)+","+n+"}"),o=i.substring(A).match(a);if(!o)throw"Missing number at position "+A;return A+=o[0].length,parseInt(o[0],10)},B=function(e,n,a){var o=-1,r=t.map(w(e)?a:n,(function(t,e){return[[e,t]]})).sort((function(t,e){return-(t[1].length-e[1].length)}));if(t.each(r,(function(t,e){var n=e[1];if(i.substr(A,n.length).toLowerCase()===n.toLowerCase())return o=e[0],A+=n.length,!1})),-1!==o)return o+1;throw"Unknown name at position "+A},C=function(){if(i.charAt(A)!==e.charAt(a))throw"Unexpected literal at position "+A;A++};for(a=0;a<e.length;a++)if(y)"'"!==e.charAt(a)||w("'")?C():y=!1;else switch(e.charAt(a)){case"d":m=b("d");break;case"D":B("D",c,u);break;case"o":v=b("o");break;case"m":f=b("m");break;case"M":f=B("M",h,p);break;case"y":g=b("y");break;case"@":g=(s=new Date(b("@"))).getFullYear(),f=s.getMonth()+1,m=s.getDate();break;case"!":g=(s=new Date((b("!")-this._ticksTo1970)/1e4)).getFullYear(),f=s.getMonth()+1,m=s.getDate();break;case"'":w("'")?C():y=!0;break;default:C()}if(A<i.length&&(r=i.substr(A),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===g?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=d?0:-100)),v>-1)for(f=1,m=v;;){if(m<=(o=this._getDaysInMonth(g,f-1)))break;f++,m-=o}if((s=this._daylightSavingAdjust(new Date(g,f-1,m))).getFullYear()!==g||s.getMonth()+1!==f||s.getDate()!==m)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,s=(i?i.monthNames:null)||this._defaults.monthNames,A=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},l=function(t,e,i){var n=""+e;if(A(t))for(;n.length<i;)n="0"+n;return n},d=function(t,e,i,n){return A(t)?n[e]:i[e]},c="",u=!1;if(e)for(n=0;n<t.length;n++)if(u)"'"!==t.charAt(n)||A("'")?c+=t.charAt(n):u=!1;else switch(t.charAt(n)){case"d":c+=l("d",e.getDate(),2);break;case"D":c+=d("D",e.getDay(),a,o);break;case"o":c+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=l("m",e.getMonth()+1,2);break;case"M":c+=d("M",e.getMonth(),r,s);break;case"y":c+=A("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":A("'")?c+="'":u=!0;break;default:c+=t.charAt(n)}return c},_possibleChars:function(t){var e,i="",n=!1,a=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||a("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":a("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,a=this._getDefaultDate(t),o=a,r=this._getFormatConfig(t);try{o=this.parseDate(i,n,r)||a}catch(t){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var a=null==i||""===i?n:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,A=s.exec(i);A;){switch(A[2]||"d"){case"d":case"D":r+=parseInt(A[1],10);break;case"w":case"W":r+=7*parseInt(A[1],10);break;case"m":case"M":o+=parseInt(A[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(A[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(a,o))}A=s.exec(i)}return new Date(a,o,r)}(i):"number"==typeof i?isNaN(i)?n:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return(a=a&&"Invalid Date"===a.toString()?n:a)&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,a=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),a===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map((function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])}))},_generateHTML:function(t){var e,i,n,a,o,r,s,A,l,d,c,u,h,p,g,f,m,v,y,w,b,B,C,x,D,T,I,E,S,F,k,_,U,Q,P,L,H,O,M,N=new Date,R=this._daylightSavingAdjust(new Date(N.getFullYear(),N.getMonth(),N.getDate())),$=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),z=this._get(t,"navigationAsDateFormat"),K=this._getNumberOfMonths(t),W=this._get(t,"showCurrentAtPos"),G=this._get(t,"stepMonths"),Y=1!==K[0]||1!==K[1],j=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-W,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-K[0]*K[1]+1,J.getDate())),e=X&&e<X?X:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-G,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+($?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+($?"e":"w")+"'>"+i+"</span></a>",a=this._get(t,"nextText"),a=z?this.formatDate(a,this._daylightSavingAdjust(new Date(tt,Z+G,1)),this._getFormatConfig(t)):a,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+a+"'><span class='ui-icon ui-icon-circle-triangle-"+($?"w":"e")+"'>"+a+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+a+"'><span class='ui-icon ui-icon-circle-triangle-"+($?"w":"e")+"'>"+a+"</span></a>",r=this._get(t,"currentText"),s=this._get(t,"gotoCurrent")&&t.currentDay?j:R,r=z?this.formatDate(r,s,this._getFormatConfig(t)):r,A=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=q?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+($?A:"")+(this._isInRange(t,s)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+($?"":A)+"</div>":"",d=parseInt(this._get(t,"firstDay"),10),d=isNaN(d)?0:d,c=this._get(t,"showWeek"),u=this._get(t,"dayNames"),h=this._get(t,"dayNamesMin"),p=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),f=this._get(t,"beforeShowDay"),m=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),y=this._getDefaultDate(t),w="",B=0;B<K[0];B++){for(C="",this.maxRows=4,x=0;x<K[1];x++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),T=" ui-corner-all",I="",Y){if(I+="<div class='ui-datepicker-group",K[1]>1)switch(x){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+($?"right":"left");break;case K[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+($?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===B?$?o:n:"")+(/all|right/.test(T)&&0===B?$?n:o:"")+this._generateMonthYearHeader(t,Z,tt,X,J,B>0||x>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",E=c?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",b=0;b<7;b++)E+="<th scope='col'"+((b+d+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+u[S=(b+d)%7]+"'>"+h[S]+"</span></th>";for(I+=E+"</tr></thead><tbody>",F=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,F)),k=(this._getFirstDayOfMonth(tt,Z)-d+7)%7,_=Math.ceil((k+F)/7),U=Y&&this.maxRows>_?this.maxRows:_,this.maxRows=U,Q=this._daylightSavingAdjust(new Date(tt,Z,1-k)),P=0;P<U;P++){for(I+="<tr>",L=c?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(Q)+"</td>":"",b=0;b<7;b++)H=f?f.apply(t.input?t.input[0]:null,[Q]):[!0,""],M=(O=Q.getMonth()!==Z)&&!v||!H[0]||X&&Q<X||J&&Q>J,L+="<td class='"+((b+d+6)%7>=5?" ui-datepicker-week-end":"")+(O?" ui-datepicker-other-month":"")+(Q.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||y.getTime()===Q.getTime()&&y.getTime()===D.getTime()?" "+this._dayOverClass:"")+(M?" "+this._unselectableClass+" ui-state-disabled":"")+(O&&!m?"":" "+H[1]+(Q.getTime()===j.getTime()?" "+this._currentClass:"")+(Q.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(O&&!m||!H[2]?"":" title='"+H[2].replace(/'/g,"&#39;")+"'")+(M?"":" data-handler='selectDay' data-event='click' data-month='"+Q.getMonth()+"' data-year='"+Q.getFullYear()+"'")+">"+(O&&!m?"&#xa0;":M?"<span class='ui-state-default'>"+Q.getDate()+"</span>":"<a class='ui-state-default"+(Q.getTime()===R.getTime()?" ui-state-highlight":"")+(Q.getTime()===j.getTime()?" ui-state-active":"")+(O?" ui-priority-secondary":"")+"' href='#'>"+Q.getDate()+"</a>")+"</td>",Q.setDate(Q.getDate()+1),Q=this._daylightSavingAdjust(Q);I+=L+"</tr>"}++Z>11&&(Z=0,tt++),C+=I+="</tbody></table>"+(Y?"</div>"+(K[0]>0&&x===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}w+=C}return w+=l,t._keyEvent=!1,w},_generateMonthYearHeader:function(t,e,i,n,a,o,r,s){var A,l,d,c,u,h,p,g,f=this._get(t,"changeMonth"),m=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),y="<div class='ui-datepicker-title'>",w="";if(o||!f)w+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(A=n&&n.getFullYear()===i,l=a&&a.getFullYear()===i,w+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",d=0;d<12;d++)(!A||d>=n.getMonth())&&(!l||d<=a.getMonth())&&(w+="<option value='"+d+"'"+(d===e?" selected='selected'":"")+">"+s[d]+"</option>");w+="</select>"}if(v||(y+=w+(!o&&f&&m?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!m)y+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),h=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(e)?u:e},p=h(c[0]),g=Math.max(p,h(c[1]||"")),p=n?Math.max(p,n.getFullYear()):p,g=a?Math.min(g,a.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)t.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",y+=t.yearshtml,t.yearshtml=null}return y+=this._get(t,"yearSuffix"),v&&(y+=(!o&&f&&m?"":"&#xa0;")+w),y+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),a=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,a))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,a,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),a=i&&e<i?i:e;return n&&a>n?n:a},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var a=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(e<0?e:a[0]*a[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,a=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,s=null,A=this._get(t,"yearRange");return A&&(i=A.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),s=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(s+=n)),(!a||e.getTime()>=a.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!s||e.getFullYear()<=s)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var a=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),a,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each((function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)})):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new p,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1";t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var v=!1;t(document).on("mouseup",(function(){v=!1}));t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!v){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,a=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!a&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),v=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,v=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,n){var a,o=t.ui[e].prototype;for(a in n)o.plugins[a]=o.plugins[a]||[],o.plugins[a].push([i,n[a]])},call:function(t,e,i,n){var a,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(a=0;a<o.length;a++)t.options[o[a][0]]&&o[a][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")};
/*!
 * jQuery UI Draggable 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),a=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return a.parents("body").length||a.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&a[0]===this.element[0]&&this._setPositionRelative(),a[0]===this.element[0]||/(fixed|absolute)/.test(a.css("position"))||a.css("position","absolute"),a},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,a=this.options,o=this.document[0];this.relativeContainer=null,a.containment?"window"!==a.containment?"document"!==a.containment?a.containment.constructor!==Array?("parent"===a.containment&&(a.containment=this.helper[0].parentNode),(n=(i=t(a.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=a.containment:this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,a,o,r=this.options,s=this._isRootNode(this.scrollParent[0]),A=t.pageX,l=t.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(A=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(A=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(a=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?a-this.offset.click.top>=i[1]||a-this.offset.click.top>i[3]?a:a-this.offset.click.top>=i[1]?a-r.grid[1]:a+r.grid[1]:a,o=r.grid[0]?this.originalPageX+Math.round((A-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,A=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o),"y"===r.axis&&(A=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:A-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var a=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,a))}))},stop:function(e,i,n){var a=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,(function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,a))}))},drag:function(e,i,n){t.each(n.sortables,(function(){var a=!1,o=this;o.positionAbs=n.positionAbs,o.helperProportions=n.helperProportions,o.offset.click=n.offset.click,o._intersectsWith(o.containerCache)&&(a=!0,t.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(a=!1),a}))),a?(o.isOver||(o.isOver=1,n._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=n.offset.click.top,o.offset.click.left=n.offset.click.left,o.offset.parent.left-=n.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=n.offset.parent.top-o.offset.parent.top,n._trigger("toSortable",e),n.dropped=o.element,t.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,o.fromOutside=n),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var a=t("body"),o=n.options;a.css("cursor")&&(o._cursor=a.css("cursor")),a.css("cursor",o.cursor)},stop:function(e,i,n){var a=n.options;a._cursor&&t("body").css("cursor",a._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var a=t(i.helper),o=n.options;a.css("opacity")&&(o._opacity=a.css("opacity")),a.css("opacity",o.opacity)},stop:function(e,i,n){var a=n.options;a._opacity&&t(i.helper).css("opacity",a._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var a=n.options,o=!1,r=n.scrollParentNotHidden[0],s=n.document[0];r!==s&&"HTML"!==r.tagName?(a.axis&&"x"===a.axis||(n.overflowOffset.top+r.offsetHeight-e.pageY<a.scrollSensitivity?r.scrollTop=o=r.scrollTop+a.scrollSpeed:e.pageY-n.overflowOffset.top<a.scrollSensitivity&&(r.scrollTop=o=r.scrollTop-a.scrollSpeed)),a.axis&&"y"===a.axis||(n.overflowOffset.left+r.offsetWidth-e.pageX<a.scrollSensitivity?r.scrollLeft=o=r.scrollLeft+a.scrollSpeed:e.pageX-n.overflowOffset.left<a.scrollSensitivity&&(r.scrollLeft=o=r.scrollLeft-a.scrollSpeed))):(a.axis&&"x"===a.axis||(e.pageY-t(s).scrollTop()<a.scrollSensitivity?o=t(s).scrollTop(t(s).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(s).scrollTop())<a.scrollSensitivity&&(o=t(s).scrollTop(t(s).scrollTop()+a.scrollSpeed))),a.axis&&"y"===a.axis||(e.pageX-t(s).scrollLeft()<a.scrollSensitivity?o=t(s).scrollLeft(t(s).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(s).scrollLeft())<a.scrollSensitivity&&(o=t(s).scrollLeft(t(s).scrollLeft()+a.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var a=n.options;n.snapElements=[],t(a.snap.constructor!==String?a.snap.items||":data(ui-draggable)":a.snap).each((function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})}))},drag:function(e,i,n){var a,o,r,s,A,l,d,c,u,h,p=n.options,g=p.snapTolerance,f=i.offset.left,m=f+n.helperProportions.width,v=i.offset.top,y=v+n.helperProportions.height;for(u=n.snapElements.length-1;u>=0;u--)l=(A=n.snapElements[u].left-n.margins.left)+n.snapElements[u].width,c=(d=n.snapElements[u].top-n.margins.top)+n.snapElements[u].height,m<A-g||f>l+g||y<d-g||v>c+g||!t.contains(n.snapElements[u].item.ownerDocument,n.snapElements[u].item)?(n.snapElements[u].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[u].item})),n.snapElements[u].snapping=!1):("inner"!==p.snapMode&&(a=Math.abs(d-y)<=g,o=Math.abs(c-v)<=g,r=Math.abs(A-m)<=g,s=Math.abs(l-f)<=g,a&&(i.position.top=n._convertPositionTo("relative",{top:d-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:A-n.helperProportions.width}).left),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left)),h=a||o||r||s,"outer"!==p.snapMode&&(a=Math.abs(d-v)<=g,o=Math.abs(c-y)<=g,r=Math.abs(A-f)<=g,s=Math.abs(l-m)<=g,a&&(i.position.top=n._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:A}).left),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left)),!n.snapElements[u].snapping&&(a||o||r||s||h)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[u].item})),n.snapElements[u].snapping=a||o||r||s||h)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var a,o=n.options,r=t.makeArray(t(o.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));r.length&&(a=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each((function(e){t(this).css("zIndex",a+e)})),this.css("zIndex",a+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var a=t(i.helper),o=n.options;a.css("zIndex")&&(o._zIndex=a.css("zIndex")),a.css("zIndex",o.zIndex)},stop:function(e,i,n){var a=n.options;a._zIndex&&t(i.helper).css("zIndex",a._zIndex)}});t.ui.draggable;
/*!
 * jQuery UI Resizable 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n,a=i&&"left"===i?"scrollLeft":"scrollTop";return e[a]>0||(e[a]=1,n=e[a]>0,e[a]=0,n)},_create:function(){var e,i=this.options,n=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",(function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())})).on("mouseleave",(function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){if(this._super(t,e),"handles"===t)this._removeHandles(),this._setupHandles()},_setupHandles:function(){var e,i,n,a,o,r=this.options,s=this;if(this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)a="ui-resizable-"+(e=t.trim(n[i])),o=t("<div>"),this._addClass(o,"ui-resizable-handle "+a),o.css({zIndex:r.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,n,a,o;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:s._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),a=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(a,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){s.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=o&&o[1]?o[1]:"se")})),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,n,a=!1;for(i in this.handles)((n=t(this.handles[i])[0])===e.target||t.contains(n,e.target))&&(a=!0);return!this.options.disabled&&a},_mouseStart:function(e){var i,n,a,o=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,a=this.originalMousePosition,o=this.axis,r=e.pageX-a.left||0,s=e.pageY-a.top||0,A=this._change[o];return this._updatePrevProperties(),!!A&&(i=A.apply(this,[e,r,s]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,a,o,r,s,A,l=this.options,d=this;return this._helper&&(a=(n=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:d.sizeDiff.height,o=n?0:d.sizeDiff.width,r={width:d.helper.width()-o,height:d.helper.height()-a},s=parseFloat(d.element.css("left"))+(d.position.left-d.originalPosition.left)||null,A=parseFloat(d.element.css("top"))+(d.position.top-d.originalPosition.top)||null,l.animate||this.element.css(t.extend(r,{top:A,left:s})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,a,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),a<o.maxHeight&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,a=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,s=this.originalPosition.left+this.originalSize.width,A=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),d=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&l&&(t.left=s-e.minWidth),n&&l&&(t.left=s-e.maxWidth),r&&d&&(t.top=A-e.minHeight),a&&d&&(t.top=A-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],a=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(a[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,a=i._proportionallyResizeElements,o=a.length&&/textarea/i.test(a[0].nodeName),r=o&&i._hasScroll(a[0],"left")?0:i.sizeDiff.height,s=o?0:i.sizeDiff.width,A={width:i.size.width-s,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,d=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(A,d&&l?{top:d,left:l}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};a&&a.length&&t(a[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,a,o,r,s,A=t(this).resizable("instance"),l=A.options,d=A.element,c=l.containment,u=c instanceof t?c.get(0):/parent/.test(c)?d.parent().get(0):c;u&&(A.containerElement=t(u),/document/.test(c)||c===document?(A.containerOffset={left:0,top:0},A.containerPosition={left:0,top:0},A.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(u),i=[],t(["Top","Right","Left","Bottom"]).each((function(t,n){i[t]=A._num(e.css("padding"+n))})),A.containerOffset=e.offset(),A.containerPosition=e.position(),A.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=A.containerOffset,a=A.containerSize.height,o=A.containerSize.width,r=A._hasScroll(u,"left")?u.scrollWidth:o,s=A._hasScroll(u)?u.scrollHeight:a,A.parentData={element:u,left:n.left,top:n.top,width:r,height:s}))},resize:function(e){var i,n,a,o,r=t(this).resizable("instance"),s=r.options,A=r.containerOffset,l=r.position,d=r._aspectRatio||e.shiftKey,c={top:0,left:0},u=r.containerElement,h=!0;u[0]!==document&&/static/.test(u.css("position"))&&(c=A),l.left<(r._helper?A.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-A.left:r.position.left-c.left),d&&(r.size.height=r.size.width/r.aspectRatio,h=!1),r.position.left=s.helper?A.left:0),l.top<(r._helper?A.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-A.top:r.position.top),d&&(r.size.width=r.size.height*r.aspectRatio,h=!1),r.position.top=r._helper?A.top:0),a=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),a&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-c.left:r.offset.left-A.left)),n=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-c.top:r.offset.top-A.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,d&&(r.size.height=r.size.width/r.aspectRatio,h=!1)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,d&&(r.size.width=r.size.height*r.aspectRatio,h=!1)),h||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,a=e.containerPosition,o=e.containerElement,r=t(e.helper),s=r.offset(),A=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:s.left-a.left-n.left,width:A,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:s.left-a.left-n.left,width:A,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})}))},resize:function(e,i){var n=t(this).resizable("instance"),a=n.options,o=n.originalSize,r=n.originalPosition,s={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0};t(a.alsoResize).each((function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,(function(t,e){var i=(n[e]||0)+(s[e]||0);i&&i>=0&&(a[e]=i||null)})),e.css(a)}))},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,a=i.size,o=i.originalSize,r=i.originalPosition,s=i.axis,A="number"==typeof n.grid?[n.grid,n.grid]:n.grid,l=A[0]||1,d=A[1]||1,c=Math.round((a.width-o.width)/l)*l,u=Math.round((a.height-o.height)/d)*d,h=o.width+c,p=o.height+u,g=n.maxWidth&&n.maxWidth<h,f=n.maxHeight&&n.maxHeight<p,m=n.minWidth&&n.minWidth>h,v=n.minHeight&&n.minHeight>p;n.grid=A,m&&(h+=l),v&&(p+=d),g&&(h-=l),f&&(p-=d),/^(se|s|e)$/.test(s)?(i.size.width=h,i.size.height=p):/^(ne)$/.test(s)?(i.size.width=h,i.size.height=p,i.position.top=r.top-u):/^(sw)$/.test(s)?(i.size.width=h,i.size.height=p,i.position.left=r.left-c):((p-d<=0||h-l<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),p-d>0?(i.size.height=p,i.position.top=r.top-u):(p=d-e.height,i.size.height=p,i.position.top=r.top+o.height-p),h-l>0?(i.size.width=h,i.position.left=r.left-c):(h=l-e.width,i.size.width=h,i.position.left=r.left+o.width-h))}});t.ui.resizable;
/*!
 * jQuery UI Dialog 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,(function(){i._trigger("close",e)})))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var n=!1,a=this.uiDialog.siblings(".ui-front:visible").map((function(){return+t(this).css("z-index")})).get(),o=Math.max.apply(null,a);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,(function(){e._focusTabbable(),e._trigger("focus")})),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),a=i.filter(":last");e.target!==a[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay((function(){a.trigger("focus")})),e.preventDefault()):(this._delay((function(){n.trigger("focus")})),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,(function(i,n){var a,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),a=n.click,o={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,t("<button></button>",n).button(o).appendTo(e.uiButtonSet).on("click",(function(){a.apply(e.element[0],arguments)}))})),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var e=this,i=this.options;function n(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,a){e._addClass(t(this),"ui-dialog-dragging"),e._blockFrames(),e._trigger("dragStart",i,n(a))},drag:function(t,i){e._trigger("drag",t,n(i))},stop:function(a,o){var r=o.offset.left-e.document.scrollLeft(),s=o.offset.top-e.document.scrollTop();i.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(s>=0?"+":"")+s,of:e.window},e._removeClass(t(this),"ui-dialog-dragging"),e._unblockFrames(),e._trigger("dragStop",a,n(o))}})},_makeResizable:function(){var e=this,i=this.options,n=i.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";function r(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(i,n){e._addClass(t(this),"ui-dialog-resizing"),e._blockFrames(),e._trigger("resizeStart",i,r(n))},resize:function(t,i){e._trigger("resize",t,r(i))},stop:function(n,a){var o=e.uiDialog.offset(),s=o.left-e.document.scrollLeft(),A=o.top-e.document.scrollTop();i.height=e.uiDialog.height(),i.width=e.uiDialog.width(),i.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(A>=0?"+":"")+A,of:e.window},e._removeClass(t(this),"ui-dialog-resizing"),e._unblockFrames(),e._trigger("resizeStop",n,r(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,a={};t.each(e,(function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(a[t]=e)})),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(e,i){var n,a,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&((n=o.is(":data(ui-draggable)"))&&!i&&o.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((a=o.is(":data(ui-resizable)"))&&!i&&o.resizable("destroy"),a&&"string"==typeof i&&o.resizable("option","handles",i),a||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map((function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay((function(){e=!1})),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});t.ui.dialog;
/*!
 * jQuery UI Droppable 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,a=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&y(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return a=!0,!1})),!a&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(n)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var y=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,n,a){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,r=(e.positionAbs||e.position.absolute).top+e.margins.top,s=o+e.helperProportions.width,A=r+e.helperProportions.height,l=i.offset.left,d=i.offset.top,c=l+i.proportions().width,u=d+i.proportions().height;switch(n){case"fit":return l<=o&&s<=c&&d<=r&&A<=u;case"intersect":return l<o+e.helperProportions.width/2&&s-e.helperProportions.width/2<c&&d<r+e.helperProportions.height/2&&A-e.helperProportions.height/2<u;case"pointer":return t(a.pageY,d,i.proportions().height)&&t(a.pageX,l,i.proportions().width);case"touch":return(r>=d&&r<=u||A>=d&&A<=u||r<d&&A>u)&&(o>=l&&o<=c||s>=l&&s<=c||o<l&&s>c);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var n,a,o=t.ui.ddmanager.droppables[e.options.scope]||[],r=i?i.type:null,s=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(a=0;a<s.length;a++)if(s[a]===o[n].element[0]){o[n].proportions().height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===r&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&y(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),n},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}))},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,a,o,r=y(e,this,this.options.tolerance,i),s=!r&&this.isover?"isout":r&&!this.isover?"isover":null;s&&(this.options.greedy&&(a=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===a}))).length&&((n=t(o[0]).droppable("instance")).greedyChild="isover"===s)),n&&"isover"===s&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,i),n&&"isout"===s&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}}))},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each((function(){var i=t(this),n=i.offset(),a={left:n.left-e.elementPos.left,top:n.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:a.left,top:a.top,right:a.left+i.outerWidth(),bottom:a.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))})),t(e.target).parents().addBack().each((function(){var n,a=t.data(this,"selectable-item");if(a)return n=!e.metaKey&&!e.ctrlKey||!a.$element.hasClass("ui-selected"),i._removeClass(a.$element,n?"ui-unselecting":"ui-selected")._addClass(a.$element,n?"ui-selecting":"ui-unselecting"),a.unselecting=!n,a.selecting=n,a.selected=n,n?i._trigger("selecting",e,{selecting:a.element}):i._trigger("unselecting",e,{unselecting:a.element}),!1})))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,a=this.options,o=this.opos[0],r=this.opos[1],s=e.pageX,A=e.pageY;return o>s&&(i=s,s=o,o=i),r>A&&(i=A,A=r,r=i),this.helper.css({left:o,top:r,width:s-o,height:A-r}),this.selectees.each((function(){var i=t.data(this,"selectable-item"),l=!1,d={};i&&i.element!==n.element[0]&&(d.left=i.left+n.elementPos.left,d.right=i.right+n.elementPos.left,d.top=i.top+n.elementPos.top,d.bottom=i.bottom+n.elementPos.top,"touch"===a.tolerance?l=!(d.left>s||d.right<o||d.top>A||d.bottom<r):"fit"===a.tolerance&&(l=d.left>o&&d.right<s&&d.top>r&&d.bottom<A),l?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))})),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each((function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})})),t(".ui-selecting",this.element[0]).each((function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})})),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",(function(){i._rendered||i._refreshMenu()}))},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var n=this,a="";t.each(i,(function(i,o){var r;o.optgroup!==a&&(r=t("<li>",{text:o.optgroup}),n._addClass(r,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),r.appendTo(e),a=o.optgroup),n._renderItemData(e,o)}))},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>"),a=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(a,i.label),n.append(a).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,n,a=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),a+=":not(.ui-state-disabled)"),(n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](a).eq(-1):i[t+"All"](a).eq(0)).length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,n=[];e.each((function(e,a){n.push(i._parseOption(t(a),e))})),this.items=n},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,a=this.element.find(".ui-slider-handle"),o=[];for(i=n.values&&n.values.length||1,a.length>i&&(a.slice(i).remove(),a=a.slice(0,i)),e=a.length;e<i;e++)o.push("<span tabindex='0'></span>");this.handles=a.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)}))},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,n,a,o,r,s,A,l=this,d=this.options;return!d.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),a=this._valueMax()-this._valueMin()+1,this.handles.each((function(e){var i=Math.abs(n-l.values(e));(a>i||a===i&&(e===l._lastChangedValue||l.values(e)===d.min))&&(a=i,o=t(this),r=e)})),!1!==this._start(e,r)&&(this._mouseSliding=!0,this._handleIndex=r,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),s=o.offset(),A=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=A?{left:0,top:0}:{left:e.pageX-s.left-o.width()/2,top:e.pageY-s.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,a,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(n=i/e)>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),a=this._valueMax()-this._valueMin(),o=this._valueMin()+n*a,this._trimAlignValue(o)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var n,a=this.value(),o=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),a=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(n,i):Math.max(n,i)),o[e]=i),i!==a&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,a,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,a=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(a[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,a=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(a=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=a-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,n,a,o,r=this.options.range,s=this.options,A=this,l=!this._animateOff&&s.animate,d={};this._hasMultipleValues()?this.handles.each((function(n){i=(A.values(n)-A._valueMin())/(A._valueMax()-A._valueMin())*100,d["horizontal"===A.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](d,s.animate),!0===A.options.range&&("horizontal"===A.orientation?(0===n&&A.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},s.animate),1===n&&A.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:s.animate})):(0===n&&A.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},s.animate),1===n&&A.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:s.animate}))),e=i})):(n=this.value(),a=this._valueMin(),o=this._valueMax(),i=o!==a?(n-a)/(o-a)*100:0,d["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](d,s.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},s.animate),"max"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},s.animate),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},s.animate),"max"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},s.animate))},_handleEvents:{keydown:function(e){var i,n,a,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(a=this.options.step,i=n=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-a)}this._slide(e,o,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,(function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,a=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,o.widgetName+"-item")===o)return n=t(this),!1})),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each((function(){this===e.target&&(a=!0)})),!a))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var a,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(a=this.containers.length-1;a>=0;a--)this.containers[a]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,a,o,r=this.options,s=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop+r.scrollSpeed:e.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=s=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft+r.scrollSpeed:e.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=s=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(e.pageY-this.document.scrollTop()<r.scrollSensitivity?s=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<r.scrollSensitivity&&(s=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),e.pageX-this.document.scrollLeft()<r.scrollSensitivity?s=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(s=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),!1!==s&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(a=(n=this.items[i]).item[0],(o=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(a===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===a||t.contains(this.placeholder[0],a)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],a))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,a=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=a.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=a.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){n._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each((function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")})),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,a=n+this.helperProportions.height,o=t.left,r=o+t.width,s=t.top,A=s+t.height,l=this.offset.click.top,d=this.offset.click.left,c="x"===this.options.axis||n+l>s&&n+l<A,u="y"===this.options.axis||e+d>o&&e+d<r,h=c&&u;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&s<n+this.helperProportions.height/2&&a-this.helperProportions.height/2<A},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),a="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!n||!a)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&i||"left"===a&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,n,a,o,r=[],s=[],A=this._connectWith();if(A&&e)for(i=A.length-1;i>=0;i--)for(n=(a=t(A[i],this.document[0])).length-1;n>=0;n--)(o=t.data(a[n],this.widgetFullName))&&o!==this&&!o.options.disabled&&s.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function l(){r.push(this)}for(s.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=s.length-1;i>=0;i--)s[i][0].each(l);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,a,o,r,s,A,l,d=this.items,c=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(i=u.length-1;i>=0;i--)for(n=(a=t(u[i],this.document[0])).length-1;n>=0;n--)(o=t.data(a[n],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=c.length-1;i>=0;i--)for(r=c[i][1],n=0,l=(s=c[i][0]).length;n<l;n++)(A=t(s[n])).data(this.widgetName+"-item",r),d.push({item:A,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,n,a,o;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(n=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(a=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=a.outerWidth(),n.height=a.outerHeight()),o=a.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,n=(e=e||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),a=t("<"+n+">",e.document[0]);return e._addClass(a,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(a,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(a)):"tr"===n?e._createTrPlaceholder(e.currentItem,a):"img"===n&&a.attr("src",e.currentItem.attr("src")),i||a.css("visibility","hidden"),a},update:function(t,a){i&&!n.forcePlaceholderSize||(a.height()||a.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),a.width()||a.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each((function(){t("<td>&#160;</td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){var i,n,a,o,r,s,A,l,d,c,u=null,h=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(u&&t.contains(this.containers[i].element[0],u.element[0]))continue;u=this.containers[i],h=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(u)if(1===this.containers.length)this.containers[h].containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1);else{for(a=1e4,o=null,r=(d=u.floating||this._isFloating(this.currentItem))?"left":"top",s=d?"width":"height",c=d?"pageX":"pageY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[h].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(A=this.items[n].item.offset()[r],l=!1,e[c]-A>this.items[n][s]/2&&(l=!0),Math.abs(e[c]-A)<a&&(a=Math.abs(e[c]-A),o=this.items[n],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[h])return void(this.currentContainer.containerCache.over||(this.containers[h]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[h].element,!0),this._trigger("change",e,this._uiHash()),this.containers[h]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[h],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[h]._trigger("over",e,this._uiHash(this)),this.containers[h].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,a=this.options;"parent"===a.containment&&(a.containment=this.helper[0].parentNode),"document"!==a.containment&&"window"!==a.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===a.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===a.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(a.containment)||(e=t(a.containment)[0],i=t(a.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(a[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:a.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:a.scrollLeft())*n}},_generatePosition:function(e){var i,n,a=this.options,o=e.pageX,r=e.pageY,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,A=/(html|body)/i.test(s[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),a.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/a.grid[1])*a.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-a.grid[1]:i+a.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/a.grid[0])*a.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-a.grid[0]:n+a.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():A?0:s.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():A?0:s.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var a=this.counter;this._delay((function(){a===this.counter&&this.refreshPositions(!n)}))},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function a(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}for(this.fromOutside&&!e&&n.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(n.push((function(t){this._trigger("remove",t,this._uiHash())})),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||n.push(a("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(a("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<n.length;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}});
/*!
 * jQuery UI Progressbar 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
/*!
 * jQuery UI Spinner 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function w(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],(function(t,n){var a=i.attr(n);null!=a&&a.length&&(e[n]=a)})),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay((function(){this.spinning&&this._stop(t)}),100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){var i;function n(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=i,this._delay((function(){this.previous=i})))}i=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay((function(){delete this.cancelBlur,n.call(this)})),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay((function(){this._repeat(40,e,i)}),t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return i=t-(e=null!==n.min?n.min:0),t=e+(i=Math.round(i/n.step)*n.step),t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,n,a;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),a=this.buttons.last().find(".ui-icon"),this._removeClass(a,null,this.options.icons.down),this._addClass(a,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:w((function(t){this._super(t)})),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:w((function(t){this._stepUp(t)})),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:w((function(t){this._stepDown(t)})),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:w((function(t){this._stepUp((t||1)*this.options.page)})),pageDown:w((function(t){this._stepDown((t||1)*this.options.page)})),value:function(t){if(!arguments.length)return this._parse(this.element.val());w(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var b;
/*!
 * jQuery UI Tabs 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.ui.spinner;t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(b=/#.*$/,function(t){var e,i;e=t.href.replace(b,""),i=location.href.replace(b,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return t.hash.length>1&&e===i}),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),(function(t){return e.tabs.index(t)})))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each((function(i,a){if(t(a).attr("aria-controls")===n)return e=i,!1})),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==e&&-1!==e||(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),a=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay((function(){this.option("active",n)}),this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){var n=this.tabs.length-1;for(;-1!==t.inArray((e>n&&(e=0),e<0&&(e=n),e),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),(function(t){return i.index(t)})),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,n=this.anchors,a=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",(function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()})).on("focus"+this.eventNamespace,".ui-tabs-anchor",(function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()})),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map((function(){return t("a",this)[0]})).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each((function(i,n){var a,o,r,s=t(n).uniqueId().attr("id"),A=t(n).closest("li"),l=A.attr("aria-controls");e._isLocal(n)?(r=(a=n.hash).substring(1),o=e.element.find(e._sanitizeSelector(a))):(a="#"+(r=A.attr("aria-controls")||t({}).uniqueId()[0].id),(o=e.element.find(a)).length||(o=e._createPanel(r)).insertAfter(e.panels[i-1]||e.tablist),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&A.data("ui-tabs-aria-controls",l),A.attr({"aria-controls":r,"aria-labelledby":s}),o.attr("aria-labelledby",s)})),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(a.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,n,a;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),a=0;n=this.tabs[a];a++)i=t(n),!0===e||-1!==t.inArray(a,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),(function(t,e){i[e]="_eventHandler"})),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each((function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))})),this.element.children().not(this.panels).each((function(){i-=t(this).outerHeight(!0)})),this.panels.each((function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))})).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each((function(){i=Math.max(i,t(this).height("").height())})).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,a=t(e.currentTarget).closest("li"),o=a[0]===n[0],r=o&&i.collapsible,s=r?t():this._getPanelForTab(a),A=n.length?this._getPanelForTab(n):t(),l={oldTab:n,oldPanel:A,newTab:r?t():a,newPanel:s};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||!1===this._trigger("beforeActivate",e,l)||(i.active=!r&&this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),A.length||s.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),s.length&&this.load(this.tabs.index(a),e),this._toggle(e,l))},_toggle:function(e,i){var n=this,a=i.newPanel,o=i.oldPanel;function r(){n.running=!1,n._trigger("activate",e,i)}function s(){n._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&n.options.show?n._show(a,n.options.show,r):(a.show(),r())}this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,(function(){n._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),s()})):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o.hide(),s()),o.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&o.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter((function(){return 0===t(this).attr("tabIndex")})).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each((function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")})),this.tabs.each((function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")})),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,(function(t){return t!==e?t:null})):t.map(this.tabs,(function(t,i){return i!==e?i:null}))),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),s={tab:a,panel:r},A=function(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(a,"ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,s)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(a,"ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done((function(t,e,a){setTimeout((function(){r.html(t),n._trigger("load",i,s),A(a,e)}),1)})).fail((function(t,e){setTimeout((function(){A(t,e)}),1)}))))},_ajaxSettings:function(e,i,n){var a=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return a._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});t.ui.tabs;
/*!
 * jQuery UI Tooltip 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),a=t.inArray(i,n);-1!==a&&n.splice(a,1),e.removeData("ui-tooltip-id"),(n=t.trim(n.join(" ")))?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,(function(t,e){n._updateContent(e.element)}))},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,(function(i,n){var a=t.Event("blur");a.target=a.currentTarget=n.element[0],e.close(a,!0)})),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter((function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})))},_enable:function(){this.disabledTitles.each((function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})),this.disabledTitles=t([])},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each((function(){var e,n=t(this);n.data("ui-tooltip-open")&&((e=t.Event("blur")).target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))})),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,a=this,o=e?e.type:null;if("string"==typeof n||n.nodeType||n.jquery)return this._open(e,t,n);(i=n.call(t[0],(function(i){a._delay((function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))}))})))&&this._open(e,t,i)},_open:function(e,i,n){var a,o,r,s,A=t.extend({},this.options.position);function l(t){A.of=t,o.is(":hidden")||o.position(A)}n&&((a=this._find(i))?a.tooltip.find(".ui-tooltip-content").html(n):(i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(s=t("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),s.removeAttr("id").find("[id]").removeAttr("id"),s.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:l}),l(e)):o.position(t.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval((function(){o.is(":visible")&&(l(A.of),clearInterval(r))}),t.fx.interval)),this._trigger("open",e,{tooltip:o})))},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,a=t(e?e.currentTarget:this.element),o=this._find(a);o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),a.data("ui-tooltip-title")&&!a.attr("title")&&a.attr("title",a.data("ui-tooltip-title")),this._removeDescribedBy(a),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,(function(){n._removeTooltip(t(this))})),a.removeData("ui-tooltip-open"),this._off(a,"mouseleave focusout keyup"),a[0]!==this.element[0]&&this._off(a,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,(function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]})),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1))):a.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),n=t("<div>").appendTo(i),a=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[a]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,(function(i,n){var a=t.Event("blur"),o=n.element;a.target=a.currentTarget=o[0],e.close(a,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))})),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});t.ui.tooltip})),define("drops/calendar/calendarItems",["jquery-ui","underscore","moment","when","lq/style","drops/calendar/calendarParameter","lq/onlongpress"],(function(t,e,i,n,a,o,r){"use strict";const s=1440;var A=function(t,e){return t.data.endOfItem.isAfter(e.data.startOfItem)&&t.data.startOfItem.isBefore(e.data.endOfItem)},l=function(t,e,i){for(var n=1,a=i+1;a<e.length;a++){for(var o=e[a],r=0;r<o.length;r++){var s=o[r];if(A(t,s))return n}n++}return n},d=function(t){for(var e=0;e<t.length;e++)for(var i=t[e],n=0;n<i.length;n++){var a=i[n],o=l(a,t,e);a.$element.css({left:e/t.length*100+"%",width:100/t.length*o+"%"})}},c=function(t){var i=[],n=null;e.each(function(t){return t.sort((function(t,e){return t.data.startOfItem.isBefore(e.data.startOfItem)?-1:t.data.startOfItem.isAfter(e.data.startOfItem)?1:t.data.endOfItem.isBefore(e.data.endOfItem)?-1:t.data.endOfItem.isAfter(e.data.endOfItem)?1:0}))}(t),(function(t){(function(t,e){return!!t&&t.data.endOfItem.isBefore(e.data.startOfItem)})(n,t)&&(d(i),i=[],n=null),function(t,i){for(var n=0;n<t.length;n++){var a=t[n];if(!A(e.last(a),i))return a.push(i),!0}return!1}(i,t)||i.push([t]),(null===n||t.data.endOfItem.isAfter(n.data.endOfItem))&&(n=t)})),i.length>0&&d(i)},u=function(t,n,a,r,A,l){if(t.isEventEnabled("onUpdate")){var d=a.data.timeslotSize,c=h(a),u=t.data.resizeSnapInterval;u||(u=d);var p=c/d*u,g=parseFloat(t.data.$target.css("width")),f=e.range(a.data.dayStart,a.data.dayEnd,d).length*c,m=function(t,i){C(.6);var n=v().groupMembers;e.each(n,(function(t){t.data.leftOffset=parseFloat(t.$element.css("left")),t.data.prevState={top:i.position.top,left:i.position.left,height:parseFloat(t.$element.css("height")),width:parseFloat(t.$element.css("width"))}}))},v=function(){for(var e=0;e<a.data.calendarItemGroups.length;e++){var i=a.data.calendarItemGroups[e];if(i.groupMembers[0].data.row[t.data.idOutput]===t.data.row[t.data.idOutput])return i}},y=function(e,i){T();var n=v().groupMembers,r=n[0],A=n[n.length-1],l=I(r),d=I(A),c=a.getDatetimeFromRow(r.data.row,a.data.startOutput),u=a.getDatetimeFromRow(A.data.row,a.data.endOutput),h=60*c.hours()+c.minutes(),p=60*u.hours()+u.minutes(),g=o.convert(c),f=o.convert(u);if(e.type.includes("drag")){var m=c.startOf("day"),y=u.startOf("day");"CalendarWeekView"==a.type&&(m=D(r.$element.css("left"),r,!0),y=D(A.$element.css("left"),A,!0));var w=m.clone(),b=l.start;w.add(b,"minutes");var B=y.clone(),x=d.end===s?d.end-1:d.end;B.add(x,"minutes"),g=o.convert(w),f=o.convert(B),C(1)}else if(l.start>=0&&l.start!==h&&(a.getStartOfCurrentWeek&&!a.getStartOfCurrentWeek().isAfter(c)||"CalendarDayView"===a.type)){(E=c.clone().startOf("day")).add(l.start,"minutes"),g=o.convert(E),C(1)}else if(d.end!==p){var E;(E=u.clone().startOf("day")).add(d.end===s?d.end-1:d.end,"minutes"),f=o.convert(E),C(1)}var S=t.data.row[t.data.idOutput];const F=t.data.updateParams;F&&(F.newStart&&a.piping.parameters.locals.setValue(F.newStart,g),F.newEnd&&a.piping.parameters.locals.setValue(F.newEnd,f),F.id&&a.piping.parameters.locals.setValue(F.id,S)),t.triggerEventIfEnabled("onUpdate")},w=function(t,i,a,o){var r=t.$element.css(["top","height"]);o&&(r.height=o);var s=v().groupMembers,A=D(parseInt(a),t),l=n.filter((function(e){return e!=t&&!s.includes(e)&&e.data.startOfDay.startOf("day").isSame(A.startOf("day"))}));return e.some(l,(function(t){return b(t.$element,{top:1===s.length?parseInt(i):parseInt(r.top),height:parseInt(r.height)})}))},b=function(t,e){var i=t.css(["top","height"]),n=e;return i.start=_(parseFloat(i.top),p),i.end=_(i.start+parseFloat(i.height),p),n.start=_(parseFloat(n.top),p),n.end=_(n.start+parseFloat(n.height),p),i.start>n.start&&i.start<n.end||i.end>n.start&&i.end<n.end||n.start>i.start&&n.start<i.end||n.end>i.start&&n.end<i.end||n.start===i.start&&n.end===i.end},B=function(t,e,i){if(!a.getStartOfCurrentWeek)return!1;var n=D(i,t).diff(a.getStartOfCurrentWeek()),o=a.getEndOfCurrentWeek().diff(D(i,t));return n<0||o<0};r||(t.$element.is(".ui-resizable")&&(l=t.$element.resizable("option","handles")+", "+l,t.$element.resizable("destroy")),t.$element.resizable({handles:l,grid:[0,p],start:m,stop:y,resize:function(e,n){var o=i(t.data.row[a.data.startOutput]);n.position.left=x(n.position.left)+t.data.leftOffset,n.size.width=t.data.prevState.width,n.position.top=_(n.position.top,p),n.size.height=_(n.size.height,p),"CalendarDayView"===a.type&&o.isBefore(a.date.startOf("day"))||(n.position.top<0&&(n.size.height=n.size.height+n.position.top,n.position.top=0),n.position.top+n.size.height>f&&(n.size.height=n.size.height-(n.position.top+n.size.height-f))),a.data.savePosition&&!t.data.allowItemOverlap&&w(t,n.position.top,n.position.left,n.size.height)&&(n.position.top=a.data.savePosition.uiTop,n.size.height=a.data.savePosition.uiHeight),a.data.savePosition={uiTop:n.position.top,uiHeight:n.size.height}}})),A||t.$element.draggable({axis:"CalendarWeekView"==a.type?"x, y":"y",grid:[g,p],scroll:!0,scrollSensitivity:100,scrollSpeed:5,start:m,stop:y,drag:function(i,n){var o=v().groupMembers;"CalendarWeekView"!==a.type?t.$element.draggable({axis:"y"}):o.length>1?t.$element.draggable({axis:"x"}):t.$element.draggable({axis:"x, y"}),n.position.left=x(n.position.left),n.position.top=_(n.position.top,p),t.$element.css("height",E());var r=parseFloat(t.$element.css("height"));n.position.top<0&&(n.position.top=0),n.position.top+r>f&&(n.position.top=f-r);var s=t.data.startOfDay.isoWeekday()-1;n.position.left<-g*s+t.data.leftOffset&&(n.position.left=-g*s),n.position.left>g*(6-s)+t.data.leftOffset&&(n.position.left=g*(6-s));var A=[],l=!1;if(t.data.allowItemOverlap)for(d=0;d<o.length;d++){c=o[d];if(u=B(c,n.position.top,n.position.left)){l=!0;break}}else for(var d=0;d<o.length;d++){var c=o[d],u=B(c,n.position.top,n.position.left),h=w(c,n.position.top,n.position.left);if(A.push(h),h||u){l=!0;break}}a.data.savePosition&&l&&(n.position.top=a.data.savePosition.uiTop,n.position.left=a.data.savePosition.uiLeft),a.data.savePosition={uiTop:n.position.top,uiLeft:n.position.left},e.each(o,(function(t){var e=t.$element.css(["top","left"]);t.$element.css({top:e.top+n.position.top,left:n.position.left,width:g})}))}});var C=function(i){var a=v().groupMembers;e.each(n,(function(e){e==t||a.includes(e)||e.$element.css("opacity",i)}))},x=function(e,i,n){return i&&n&&(i.data.leftOffset=0),_((i?i.data.leftOffset:t.data.leftOffset>=g/2?-g:0)+e,g)},D=function(e,n,a){var o=x(parseFloat(e),n,a)/g,r=new Date(n?n.data.startOfDay:t.data.startOfDay);return r.setDate(r.getDate()+o),i(r).startOf("day")},T=function(){t.$element.css("height",E()+"px"),t.$element.css("top",S()+"px")},I=function(t){var e=F(t)/c*d,i=a.data.dayStart+k(t)/c*d;return{start:i,end:i+e}},E=function(){return _(parseFloat(t.$element.css("height")),p)},S=function(){return _(parseFloat(t.$element.css("top")),p)},F=function(t){return _(parseFloat(t.$element.css("height")),p)},k=function(t){return _(parseFloat(t.$element.css("top")),p)},_=function(t,e){var i=!1;t<0&&(t=-t,i=!0);var n=t%e<e/2?t-t%e:t+(e-t%e);return i&&(n=-n),n}}},h=function(t){var e="."+t.$element.attr("class").replace(/ /g,".");return parseFloat($(e+" .timeslot").css("height"))},p=function(t,e,i){var n,a,o,r=$(t.target).index(),A=t.offsetY,l=r*e.timeslotSize+A,d=e.creationInterval||e.timeslotSize;return i?(n=l,a=d,(o=Math.round(n/a)*a)===s?o-1:o):function(t,e){return Math.floor(t/e)*e}(l,d)},g=function(t,i){if(t.selectedItem=null,!i.length)return n();var o=t.piping.dropFactory.createDrops(i);c(o);var s=[],A=[],l=[];return e.each(o,(function(i){t.addDrop(i),function(t,e){(new r).applyLongPressOnElement(e.$element,e,null,(function(){e!==t.selectedItem&&(e.data.styles.selected&&!e.data.styles.selected.enabled&&(t.selectedItem&&a.renderStyle(t.selectedItem.data.styles.normal,t.selectedItem),a.renderStyle(e.data.styles.selected,e)),t.selectedItem=e),e.triggerEventIfEnabled("clicked")})),e.data.eventing.clicked.enabled&&e.$element.addClass("clickable")}(t,i),i.piping=t.piping.fork(i.data.row,t,i.data.idOutput),s=[],e.each(o,(function(t){i&&t.data.row[t.data.idOutput]===i.data.row[i.data.idOutput]&&!l.includes(t.data.row[i.data.idOutput])&&s.push(t)})),l.push(i.data.row[i.data.idOutput]),s.length>0&&A.push({groupMembers:s})})),e.each(A,(function(e){var i=!1;if(t.getStartOfCurrentWeek){var n=t.getDatetimeFromRow(e.groupMembers[0].data.row,t.data.startOutput),a=t.getDatetimeFromRow(e.groupMembers[0].data.row,t.data.endOutput),r=t.getStartOfCurrentWeek(),s=t.getEndOfCurrentWeek(),A=n.isBetween(r,s,void 0,"[]"),l=a.isBetween(r,s,void 0,"[]");i=!A||!l;for(var d=1;d<e.groupMembers.length-1;d++)u(e.groupMembers[d],o,t,!0,i);r.isAfter(n)||u(e.groupMembers[0],o,t,!1,i,"n"),s.isBefore(a)||u(e.groupMembers[e.groupMembers.length-1],o,t,!1,i,"s")}else u(e.groupMembers[0],o,t,!1,!1,"n, s")})),t.data.calendarItemGroups=A,n.all(e.map(o,(function(t){return t.render(t.data.$target)})))};return{fillUp:g,timeslotMousedown:function(t,n,a){if(0===a.button&&null!==t&&!this.designData&&this.childDrops[0].data.enableDragAndResize&&this.childDrops[0].data.eventing.onCreate&&this.childDrops[0].data.eventing.onCreate.enabled){this.designData||e.each(this.pool,(function(t){t.$element.css({cursor:"default","pointer-events":"none",opacity:.6})}));var o=p(a,this.data,!1),r=i(this.date).startOf("day").add(this.data.dayStart,"minutes"),s=i(this.date).startOf("day").add(this.data.dayEnd,"minutes"),A=$.extend(!0,{},this.childDrops[0],{data:{$target:t,startOfDay:r,endOfDay:s,dayOfWeek:n,startOfItem:i(r).add(o,"minutes"),endOfItem:i(r).add(o,"minutes"),row:{},eventArg:this.data.eventArg,tooltipOutput:this.data.tooltipOutput,idOutput:this.data.idOutput}}),l=this;g(this,[A]).then((function(t){var e=t[0];e.applyPosition(),e.$element.css("pointer-events","none"),l.itemCreation={dragStartMinutes:o,inProgress:!0,isCreatable:!1,pageX:a.pageX,pageY:a.pageY,drop:e}}))}},timeslotMouseup:function(t){if(0===t.button&&this.itemCreation&&this.itemCreation.inProgress){if(this.designData||e.each(this.pool,(function(t){t.$element.css({cursor:"all-scroll","pointer-events":"",opacity:1})})),this.itemCreation.isCreatable){this.itemCreation.drop.$element.css("pointer-events","auto");var i=this.itemCreation.drop.data.startOfItem,n=this.itemCreation.drop.data.endOfItem;i.isSame(n)&&n.add(this.itemCreation.drop.data.resizeSnapInterval||this.data.timeslotSize,"minutes");var a=this.piping.parameters;const t=this.itemCreation.drop.data.createParams;t&&(this.getStartOfCurrentWeek?(t.newStart&&a.locals.setValue(t.newStart,o.convert(this.getStartOfCurrentWeek().add(this.itemCreation.drop.data.dayOfWeek,"day").add(i,"minutes"))),t.newEnd&&a.locals.setValue(t.newEnd,o.convert(this.getStartOfCurrentWeek().add(this.itemCreation.drop.data.dayOfWeek,"day").add(n,"minutes")))):(t.newStart&&a.locals.setValue(t.newStart,o.convert(i)),t.newEnd&&a.locals.setValue(t.newEnd,o.convert(n)))),this.itemCreation.drop.triggerEventIfEnabled("onCreate")}else this.itemCreation.drop.$element.remove(),delete this.itemCreation.drop;this.itemCreation={dragStartMinutes:null,inProgress:!1,isCreatable:!1,drop:null}}},timeslotMousemove:function(t){if(this.itemCreation&&this.itemCreation.inProgress){Math.sqrt(Math.pow(t.pageX-this.itemCreation.pageX,2)+Math.pow(t.pageY-this.itemCreation.pageY,2))>h(this)/3&&(this.itemCreation.isCreatable=!0);var e=p(t,this.data,!0),n=i(this.date).startOf("day").add(this.data.dayStart,"minutes"),a=this.itemCreation.drop.data.startOfItem.clone(),o=this.itemCreation.drop.data.endOfItem.clone();e>=this.itemCreation.dragStartMinutes?(this.itemCreation.drop.data.startOfItem=i(n).add(this.itemCreation.dragStartMinutes,"minutes"),this.itemCreation.drop.data.endOfItem=i(n).add(e,"minutes")):(this.itemCreation.drop.data.startOfItem=i(n).add(e,"minutes"),this.itemCreation.drop.data.endOfItem=i(n).add(this.itemCreation.dragStartMinutes,"minutes"));var r=!1;if(!this.itemCreation.drop.data.allowItemOverlap){var s=this.itemCreation.drop.data.startOfItem.clone(),A=this.itemCreation.drop.data.endOfItem.clone();this.getStartOfCurrentWeek&&(s=this.getStartOfCurrentWeek().add(this.itemCreation.drop.data.dayOfWeek,"day").add(this.itemCreation.drop.data.startOfItem,"minutes"),A=this.getStartOfCurrentWeek().add(this.itemCreation.drop.data.dayOfWeek,"day").add(this.itemCreation.drop.data.endOfItem,"minutes"));var l=this.pool.filter((function(t){return t.data.startOfDay.startOf("day").isSame(s.startOf("day"))}));s.add(this.itemCreation.drop.data.startOfItem,"minutes");for(var d=0;d<l.length;d++){var c=l[d],u=c.data.startOfItem.isBetween(s,A,void 0,"[]")||c.data.startOfItem.isSame(s),g=c.data.endOfItem.isBetween(s,A,void 0,"[]")||c.data.endOfItem.isSame(A);if(u||g){r=!0;break}}}r?(this.itemCreation.drop.data.startOfItem=a,this.itemCreation.drop.data.endOfItem=o):this.itemCreation.drop.applyPosition()}}}})),define("lq/nestingContext",[],(function(){"use strict";var t=function(t){this.nestedDataSources=[],this.piping=t};return t.prototype.addDataSource=function(t){-1===this.nestedDataSources.indexOf(t)&&this.nestedDataSources.push(t)},t.prototype.executeDataSources=function(){var t=this;_.forEach(this.nestedDataSources,(function(e){var i=t.piping.datasources.getDatasourceListenersThatListenFor(e);i.length&&t.piping.queryDispatcher.dispatch(e,(function(t){_.each(i,(function(e){e.handler(t)}))}),$.noop)}))},t})),define("tpl!drops/calendarDayView/calendarDayView.html",["underscore"],(function(_){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="calendar-view day-view">\r\n    <div class="calendar-title">\r\n        <a class="previous-page clickable no-text-select">〈 </a>\r\n        <a class="next-page clickable no-text-select"> 〉</a>\r\n\r\n        <div class="date-as-title"></div>\r\n    </div>\r\n    <div class="calendar-main">\r\n\r\n        <div class="hours"></div>\r\n\r\n        <div class="timeslots"></div>\r\n\r\n        <div class="clear"></div>\r\n    </div>\r\n</div>\r\n';return __p}})),define("drops/calendarDayView/calendarDayView",["jquery","underscore","moment","lq/constants","globalize","lq/drop","drops/calendar/calendarParameter","drops/calendar/calendarItems","lq/nestingContext","tpl!drops/calendarDayView/calendarDayView.html","lq/onlongpress"],(function(t,e,i,n,a,o,r,s,A,l,d){"use strict";var c={data:{dataSource:null,dataSourceType:"datetimes",dateOutput:null,startOutput:null,endOutput:null,calendarStartParameter:"CalendarDayStart",calendarEndParameter:"CalendarDayEnd",timeslotSize:30,dayStart:0,dayEnd:1439,titleFormat:"D",timeslotHourFormat:"HH:mm",longPressDelay:1e3},childDrops:[{data:{type:"CalendarItem"}}]};function u(e){o.call(this,t(l()),c,e),this.selectedDate=null,this.bindings=[]}o.extend(u,o),u.typeName="CalendarDayView",u.prototype.applyPosition=t.noop,u.prototype.init=function(){this.nestingContext=new A(this.piping),this.goToDefaultPosition(),this.bindScrollPositionParameter()},u.prototype.goToDefaultPosition=function(){if(t.isNumeric(this.data.defaultScrollPosition)){var e=Math.floor((this.data.defaultScrollPosition-this.data.dayStart)/this.data.timeslotSize),i=this.$hours.children(".timeslot").eq(e);this.$container.scrollTop(this.$container.scrollTop()+i.position().top)}},u.prototype.bindScrollPositionParameter=function(){if(this.data.scrollPositionParameter){var t=this.piping.parameters.subscribeForUpdates(this.data.scrollPositionParameter,this.goToScrollToPosition.bind(this),!0);this.bindings||(this.bindings=[]),this.bindings.push(t)}},u.prototype.goToScrollToPosition=function(){var e=this.piping.parameters.getValue(this.data.scrollPositionParameter);if(t.isNumeric(e)){var i=Math.floor((e-this.data.dayStart)/this.data.timeslotSize),n=this.$hours.children(".timeslot").eq(i);this.$container.scrollTop(this.$container.scrollTop()+n.position().top)}},u.prototype.loadCalendarData=function(){if(this.data.dataSource){var t=i(this.date),e=this;this.piping.queryDispatcher.backgroundDispatch(this.data.dataSource,(function(i){t.isSame(e.date)&&e.showItems(i.outputs,i.results)})),this.data.activeTSDataSource&&this.piping.queryDispatcher.backgroundDispatch(this.data.activeTSDataSource,(function(i){t.isSame(e.date)&&e.setActiveTimeslots(i.results)}))}},u.prototype.setSelectedDate=function(t){this.selectedDate=t},u.prototype.clearSelectedDate=function(){this.selectedDate=null},u.prototype.getSelectedDate=function(){return this.selectedDate},u.prototype.render=function(){this.registerForDataSource(),this.prepareUi(),this.createTimeslots(),this.open(i())},u.prototype.prepareUi=function(){this.$container=this.$element.find(".calendar-main"),this.$title=this.$element.find(".date-as-title"),this.$hours=this.$element.find(".hours"),this.$timeslots=this.$element.find(".timeslots"),this.$element.find(".previous-page").on("click",this.previous.bind(this)),this.$element.find(".next-page").on("click",this.next.bind(this))},u.prototype.createTimeslots=function(){var i=e.range(this.data.dayStart,this.data.dayEnd,this.data.timeslotSize),n=this,o=e.map(i,(function(e){var i=new Date(1970,0,1);return i.setMinutes(e),t("<div />").addClass("timeslot").append(t("<span />").text(a.format(i,n.data.timeslotHourFormat)))}));this.$hours.append(o);var r=e.map(i,(function(e){var i=t("<div />").addClass("timeslot").data("time",e);return(new d).applyLongPressOnElement(i,n,(function(t){return n.determineEventArg(e)}),(function(){n.timeslotClicked(e)})),i.on("mousedown",s.timeslotMousedown.bind(n,n.$timeslots,0)),i.on("mouseup",s.timeslotMouseup.bind(n)),i.on("mousemove",s.timeslotMousemove.bind(n)),i}));this.$timeslots.append(t('<div class="calendar-item-container"/>')),this.$timeslots.append(r)};return u.prototype.determineEventArg=function(t){var e=i(this.date).startOf("day").add(t,"minute");return a.format(e.toDate(),n.licquidDateFormat)},u.prototype.timeslotClicked=function(t){var e=this.determineEventArg(t);this.triggerEvent(this.data.eventing.clicked.raisedEventName,e)},u.prototype.registerForDataSource=function(){if(this.data.dataSource){var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.removeCalendarItems(),t.showItems(e.outputs,e.results)}))}if(this.data.activeTSDataSource){t=this;this.piping.datasources.registerDatasourceListener(this.data.activeTSDataSource,(function(e){t.setActiveTimeslots(e.results)}))}},u.prototype.previous=function(){this.open(i(this.date).add(-1,"day")),this.loadCalendarData(),this.triggerNavigatedEvent()},u.prototype.next=function(){this.open(i(this.date).add(1,"day")),this.loadCalendarData(),this.triggerNavigatedEvent()},u.prototype.triggerNavigatedEvent=function(){this.triggerEventIfEnabled("navigated",this.date)},u.prototype.open=function(t){this.date=t,this.updateTitle(),this.removeCalendarItems();var e=this.piping.parameters;e.locals.setValue(this.data.calendarStartParameter,r.convert(i(this.date).startOf("day"))),e.locals.setValue(this.data.calendarEndParameter,r.convert(i(this.date).endOf("day")))},u.prototype.getOpenDate=function(){return this.date},u.prototype.updateTitle=function(){var t=a.format(this.date.toDate(),this.data.titleFormat);this.$title.text(t)},u.prototype.showItems=function(n,a){var o=i(this.date).startOf("day").add(this.data.dayStart,"minutes"),r=i(this.date).startOf("day").add(this.data.dayEnd,"minutes"),A=this,l=e.map(a,(function(e){var i=A.getDatetimeFromRow(e,A.data.startOutput),a=A.getDatetimeFromRow(e,A.data.endOutput);return t.extend(!0,{},A.childDrops[0],{data:{$target:A.$timeslots.find(".calendar-item-container"),startOfDay:o,endOfDay:r,startOfItem:i,endOfItem:a,row:e,outputs:n,eventArg:A.data.eventArg,tooltipOutput:A.data.tooltipOutput,idOutput:A.data.idOutput}})}));s.fillUp(this,l).then((function(){A.nestingContext.executeDataSources()})).catch((function(t){A.piping.errorHandler.showErrorDialog(t)}))},u.prototype.removeCalendarItems=function(){e.each(this.pool,(function(t){t.$element.remove()})),this.removeAllDrops()},u.prototype.getDatetimeFromRow=function(t,e){if("datetimes"===this.data.dataSourceType)return i(t[e]);var n=i(this.date).startOf("day"),a=t[e];return n.add(a,"seconds")},u.prototype.setActiveTimeslots=function(e){var i=this,n=i.$timeslots.children(),a=t();e.forEach((function(e){var o=i.getDatetimeFromRow(e,i.data.activeTSStartOutput).toDate(),r=i.getDatetimeFromRow(e,i.data.activeTSEndOutput).toDate(),s=n.filter((function(){var e=t(this).data("time");return e>=i.getTimeOfDay(o)&&e<i.getTimeOfDay(r)}));a.push(...s)})),a.addClass("active-timeslot"),n.not(a).removeClass("active-timeslot")},u.prototype.getTimeOfDay=function(t){return 60*t.getHours()+t.getMinutes()},u.prototype.cleanUp=function(){e.each(this.bindings,(function(t){t.dispose()})),this.bindings=void 0},u})),define("drops/calendarItem/calendarItem",["jquery","underscore","lq/drop","lq/style","lq/html"],(function(t,e,i,n,a){"use strict";var o={data:{eventing:{clicked:{}},styles:{normal:{enabled:!0},selected:{enabled:!1}},updateParams:{},createParams:{},longPressDelay:1e3,allowItemOverlap:!0}};function r(e){i.call(this,t("<div/>"),o,e);var a=this;this.$element.addClass("calendar-item boxToBorderSize"),this.data.row&&this.data.eventArg&&(this.defaultEventArg=this.data.row[this.data.eventArg]),this.addListener("ChildAdded",(function(t){a.applyDataToChild(t)})),n.renderStyles(this)}return i.extend(r,i),r.typeName="CalendarItem",r.prototype.preRender=function(){this.applyPosition()},r.prototype.render=function(t){return this.createAndRenderDrops(t)},r.prototype.postRender=function(){if(this.data.row){var t=this.data.row[this.data.tooltipOutput];t&&this.$element.attr("title",a.strip(t))}},r.prototype.applyDataToChild=function(t){if(this.data.row){t.defaultEventArg=this.defaultEventArg;var i=this;e.defer((function(){t.setValue&&e.has(i.data.row,t.data.name)&&t.setValue({type:i.data.outputs[t.data.name],value:i.data.row[t.data.name]}),t.informListeners("DatasourceApplied",i.data.row)}))}},r.prototype.applyPosition=function(){var t=this.data.endOfDay.diff(this.data.startOfDay,"minutes"),e=100/t*this.data.endOfItem.diff(this.data.startOfItem,"minutes"),i=100/t*this.data.startOfItem.diff(this.data.startOfDay,"minutes");this.$element.css({top:i+"%",height:e+"%"})},r.prototype.unsubscribeEventHandlers=function(){this.piping.cleanUp()},r})),define("lq/eventSource",["underscore"],(function(t){"use strict";var e=function(e,i){var n=[];e["withOn"+i]=function(t){return n.push(t),e};var a=function(t){var e=n.indexOf(t);e>=0&&n.splice(e,1)};e["withOnce"+i]=function(t){var i=function(){a(i),t.apply(this,arguments)};return n.push(i),e},e["withoutOn"+i]=function(t){return a(t),e},e["trigger"+i]=function(){var i=arguments;return t.each(n.slice(),(function(t){t.apply(e,i)})),e},e["get"+i+"Listeners"]=function(){return n.slice()},e["has"+i+"Listeners"]=function(){return n.length>0}};return function(i){var n=this;t.isArray(i)?t.each(i,(function(t){e(n,t)})):e(n,i)}})),define("tpl!drops/calendar/daysofmonthcalendar.html",["underscore"],(function(_){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="days-of-month-calendar">\r\n    \r\n    <div class="calendar-header">\r\n        <a class="previous-page clickable no-text-select">〈</a>\r\n        <a class="next-page clickable no-text-select">〉</a>\r\n\r\n        <div class="date-as-title"></div>\r\n    </div>\r\n    \r\n    <div class="calendar-days">\r\n    </div>\r\n</div>';return __p}})),define("drops/calendar/daysofmonthcalendar",["jquery","underscore","globalize","moment","lq/eventSource","tpl!drops/calendar/daysofmonthcalendar.html","lq/html"],(function(t,e,i,n,a,o,r){"use strict";var s={standalone:!1,showWeekdayHeaders:!1,weekdayHeadersFormat:"d",titleFormat:"MMMM yyyy",languageISOCode:null},A=function(i){a.call(this,["Navigated","Clicked"]),this.options=t.extend({},s,i),this.selectedDate=null,this.$element=t(o());var n=this;this.$element.find(".previous-page").on("click",(function(){n.previous()})),this.$element.find(".next-page").on("click",(function(){n.next()})),this.$title=this.$element.find(".date-as-title"),this.$days=this.$element.find(".calendar-days"),this.$weekdayHeaders=e.map(e.range(1,8),(function(){return t("<div />")})),this.$days.append(t("<div />").addClass("weekday-headers").append(this.$weekdayHeaders)),this.options.standalone||(this.$element.addClass("no-navigation"),this.$title.addClass("always-visible")),this.updateWeekdayHeaders(),this.toggleWeekdayHeaders()};return A.prototype.updateWeekdayHeaders=function(){var t=this;e.each(this.$weekdayHeaders,(function(e,a){var o=n().day(a+1),r=i.format(o.toDate(),t.options.weekdayHeadersFormat,t.options.languageISOCode?t.options.languageISOCode:void 0);e.text(r)}))},A.prototype.toggleWeekdayHeaders=function(){this.options.showWeekdayHeaders?this.$element.removeClass("no-weekday-headers"):this.$element.addClass("no-weekday-headers")},A.prototype.previous=function(){this.open(n(this.date).add(-1,"month")),this.triggerNavigated()},A.prototype.next=function(){this.open(n(this.date).add(1,"month")),this.triggerNavigated()},A.prototype.open=function(t){this.date=t,this.rerender()},A.prototype.rerender=function(){this.updateTitle(),this.buildDays(),this.renderDaysInRowsOfSeven()},A.prototype.updateTitle=function(){var t=i.format(this.date.toDate(),this.options.titleFormat,this.options.languageISOCode?this.options.languageISOCode:void 0);this.$title.text(t)},A.prototype.getOpenDate=function(){return this.date},A.prototype.buildDays=function(){this.days=[];for(var t=n(this.date).startOf("month").startOf("isoWeek").startOf("day"),e=n(t).add(5,"weeks").endOf("isoWeek").startOf("day");t.isBefore(e,"day")||t.isSame(e,"day");){var i=n(t),a=this.createDay(i);this.days.push(a),t.add(1,"days")}},A.prototype.createDay=function(e){var a=t("<div />").text(i.format(e.toDate()," d")),o=n();if(e.isSame(this.date,"month")){if(a.addClass("this-month"),this.isWeekend(e)&&a.addClass("weekend"),e.isSame(o,"day")&&a.addClass("today"),this.selectedDate&&e.isSame(this.selectedDate,"day")&&a.addClass("selected"),this.hasClickedListeners()){var r=this;a.addClass("clickable").on("click",(function(){r.isSelectedDate(e)||(r.setSelectedDate(e),r.triggerClicked(e))}))}}else a.addClass("another-month");return{$element:a,moment:e}},A.prototype.isWeekend=function(t){var e=t.isoWeekday();return 6===e||7===e},A.prototype.isSelectedDate=function(t){return this.selectedDate&&this.selectedDate.isSame(t)},A.prototype.renderDaysInRowsOfSeven=function(){this.$days.children(":not(.weekday-headers)").remove();for(var i=e.pluck(this.days,"$element");i.length;){var n=i.splice(0,7);this.$days.append(t("<div />").addClass("days-of-month").append(n))}},A.prototype.decorateDate=function(t,e,i,n,a){var o=this.getDay(t);if(o&&(a&&o.$element.addClass("unavailable").removeClass("clickable").off("click"),e&&o.$element.css("background-color",e),i&&o.$element.css("color",i),n)){var s=o.$element.attr("title");s=s?s+"\n"+n:n,o.$element.attr("title",r.strip(s))}},A.prototype.setSelectedDate=function(t){this.clearSelectedDate();var e=this.getDay(t);e&&e.$element.addClass("selected"),this.selectedDate=t},A.prototype.clearSelectedDate=function(){if(this.selectedDate){var t=this.getDay(this.selectedDate);t&&t.$element.removeClass("selected"),this.selectedDate=null}},A.prototype.getSelectedDate=function(){return this.selectedDate},A.prototype.getDay=function(t){return e.find(this.days,(function(e){return e.moment.isSame(t,"day")}))},A.prototype.set=function(t,e){this.options.hasOwnProperty(t)&&(this.options[t]=e,"titleFormat"===t?this.updateTitle():"showWeekdayHeaders"===t?this.toggleWeekdayHeaders():"weekdayHeadersFormat"===t&&this.updateWeekdayHeaders())},A})),define("drops/calendarMonthView/calendarMonthView",["jquery","moment","globalize","lq/drop","lq/constants","drops/calendar/calendarParameter","drops/calendar/daysofmonthcalendar"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{dataSource:null,dateOutput:null,tooltipOutput:null,colorOutput:null,fontColorOutput:null,isUnavailableOutput:null,calendarStartParameter:"CalendarMonthStart",calendarEndParameter:"CalendarMonthEnd",titleFormat:"MMMM yyyy",showWeekdayHeaders:!1,weekdayHeadersFormat:"ddd",eventing:{clicked:{}}}};function A(e){n.call(this,t("<div/>"),s,e)}return n.extend(A,n),A.typeName="CalendarMonthView",A.prototype.applyPosition=t.noop,A.prototype.loadCalendarData=function(){if(this.data.dataSource){var t=e(this.getOpenDate()),i=this;this.piping.queryDispatcher.backgroundDispatch(this.data.dataSource,(function(e){t.isSame(i.getOpenDate())&&i.showColors(e.results)}))}},A.prototype.setSelectedDate=function(t){this.calendar.setSelectedDate(t)},A.prototype.init=t.noop,A.prototype.clearSelectedDate=function(){this.calendar.clearSelectedDate()},A.prototype.getSelectedDate=function(){return this.calendar.getSelectedDate()},A.prototype.render=function(){this.registerForDataSource(),this.prepareUi(),this.open(e())},A.prototype.prepareUi=function(){this.calendar=new r({standalone:!0,titleFormat:this.data.titleFormat,showWeekdayHeaders:this.data.showWeekdayHeaders,weekdayHeadersFormat:this.data.weekdayHeadersFormat,languageISOCode:this.piping.parameters.getValue("CurrentLanguageISOCode")});var t=this;this.calendar.withOnNavigated((function(){var i=t.piping.parameters,n=o.convert(e(t.getOpenDate()).startOf("month")),a=o.convert(e(t.getOpenDate()).endOf("month"));i.locals.setValue(t.data.calendarStartParameter,n),i.locals.setValue(t.data.calendarEndParameter,a),t.loadCalendarData(),t.triggerEventIfEnabled("navigated",n)})),this.data.eventing.clicked.enabled&&this.calendar.withOnClicked((function(e){var n=i.format(e.toDate(),a.licquidDateFormat);t.triggerEventIfEnabled("clicked",n)})),this.$element.addClass("calendar-view month-view").append(this.calendar.$element)},A.prototype.registerForDataSource=function(){if(this.data.dataSource){var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.calendar.rerender(),t.showColors(e.results)}))}},A.prototype.open=function(t){this.calendar.open(t);var i=this.piping.parameters;i.locals.setValue(this.data.calendarStartParameter,o.convert(e(this.getOpenDate()).startOf("month"))),i.locals.setValue(this.data.calendarEndParameter,o.convert(e(this.getOpenDate()).endOf("month")))},A.prototype.getOpenDate=function(){return this.calendar.getOpenDate()},A.prototype.showColors=function(t){var e=this;_.each(t,(function(t){var i=new Date(t[e.data.dateOutput]),n=t[e.data.colorOutput],a=t[e.data.fontColorOutput],o=t[e.data.tooltipOutput],r=t[e.data.isUnavailableOutput];e.calendar.decorateDate(i,n,a,o,r)}))},A.prototype.previous=function(){this.open(e(this.getOpenDate()).add(-1,"month")),this.loadCalendarData(),this.triggerNavigatedEvent()},A.prototype.next=function(){this.open(e(this.getOpenDate()).add(1,"month")),this.loadCalendarData(),this.triggerNavigatedEvent()},A.prototype.triggerNavigatedEvent=function(){this.triggerEventIfEnabled("navigated",e(this.getOpenDate()).startOf("isoMonth"))},A})),define("lq/windowSize",["jquery","lq/eventSource"],(function(t,e){"use strict";var i=t(window),n=function(){e.call(this,["Changed"]),this.lastWidth=i.width(),this.lastHeight=i.height(),i.on("resize",this.resize.bind(this))};return n.prototype.resize=function(){var t=i.width(),e=i.height();t===this.lastWidth&&e===this.lastHeight||(this.lastWidth=t,this.lastHeight=e,this.triggerChanged())},new n})),define("tpl!drops/calendarWeekView/calendarWeekView.html",["underscore"],(function(_){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="calendar-view week-view">\r\n    <div class="calendar-title">\r\n        <a class="previous-page clickable no-text-select">〈 </a>\r\n        <a class="next-page clickable no-text-select"> 〉</a>\r\n\r\n        <div class="date-as-title"></div>\r\n    </div>\r\n\r\n    <div class="weekday-headers-row">\r\n        <div class="weekday-headers"></div>\r\n    </div>\r\n\r\n    <div class="calendar-main">\r\n\r\n        <div class="hours">\r\n            \r\n        </div>\r\n\r\n        <div class="weekdays"></div>\r\n\r\n        <div class="clear"></div>\r\n\r\n    </div>\r\n</div>';return __p}})),define("drops/calendarWeekView/calendarWeekView",["jquery","underscore","globalize","moment","lq/constants","lq/drop","drops/calendar/calendarParameter","drops/calendar/calendarItems","lq/windowSize","lq/nestingContext","tpl!drops/calendarWeekView/calendarWeekView.html","lq/onlongpress"],(function(t,e,i,n,a,o,r,s,A,l,d,c){"use strict";var u={data:{dataSource:null,dataSourceType:"datetimes",dateOutput:null,startOutput:null,endOutput:null,calendarStartParameter:"CalendarWeekStart",calendarEndParameter:"CalendarWeekEnd",timeslotSize:30,dayStart:0,dayEnd:1439,titleFormat:"D",dayHeaderFormat:"ddd, MMM dd",timeslotHourFormat:"HH:mm",hideTitleEndDate:!1},childDrops:[{data:{type:"CalendarItem"}}]};function h(e){o.call(this,t(d()),u,e),this.selectedDate=null,this.bindings=[]}return o.extend(h,o),h.typeName="CalendarWeekView",h.prototype.applyPosition=t.noop,h.prototype.loadCalendarData=function(){if(this.data.dataSource){var t=n(this.date),e=this;this.piping.queryDispatcher.backgroundDispatch(this.data.dataSource,(function(i){t.isSame(e.date)&&e.showItems(i.outputs,i.results)})),this.data.activeTSDataSource&&this.piping.queryDispatcher.backgroundDispatch(this.data.activeTSDataSource,(function(i){t.isSame(e.date)&&e.setActiveTimeslots(i.results)}))}},h.prototype.setSelectedDate=function(t){this.selectedDate=t},h.prototype.clearSelectedDate=function(){this.selectedDate=null},h.prototype.getSelectedDate=function(){return this.selectedDate},h.prototype.init=function(){this.nestingContext=new l(this.piping),this.goToDefaultPosition(),this.bindScrollPositionParameter()},h.prototype.goToDefaultPosition=function(){if(t.isNumeric(this.data.defaultScrollPosition)){var e=Math.floor((this.data.defaultScrollPosition-this.data.dayStart)/this.data.timeslotSize),i=this.$hours.children(".timeslot").eq(e);this.$container.scrollTop(this.$container.scrollTop()+i.position().top)}},h.prototype.bindScrollPositionParameter=function(){if(this.data.scrollPositionParameter){var t=this.piping.parameters.subscribeForUpdates(this.data.scrollPositionParameter,this.goToScrollToPosition.bind(this),!0);this.bindings||(this.bindings=[]),this.bindings.push(t)}},h.prototype.goToScrollToPosition=function(){var e=this.piping.parameters.getValue(this.data.scrollPositionParameter);if(t.isNumeric(e)){var i=Math.floor((e-this.data.dayStart)/this.data.timeslotSize),n=this.$hours.children(".timeslot").eq(i);this.$container.scrollTop(this.$container.scrollTop()+n.position().top)}},h.prototype.render=function(){this.registerForDataSource(),this.prepareUi(),this.createWeekdayHeaders(),this.createWeekdayColumns(),this.createTimeslots(),this.open(n());var i=this;e.each(this.$columns,(function(e,n){t(i.$headers[n]).hasClass("today")&&e.children().addClass("today")}))},h.prototype.prepareUi=function(){this.$container=this.$element.find(".calendar-main"),this.$title=this.$element.find(".date-as-title"),this.$hours=this.$element.find(".hours"),this.$weekdays=this.$element.find(".weekdays"),this.$weekdayHeaders=this.$element.find(".weekday-headers"),this.$backPage=this.$element.find(".previous-page"),this.$nextPage=this.$element.find(".next-page");var t=this;this.$backPage.on("click",(function(){t.previous()})),this.$nextPage.on("click",(function(){t.next()})),this.events(A,{Changed:this.updateHeadersWidth.bind(this)})},h.prototype.afterShown=function(){this.updateHeadersWidth(),this.updateHeadersLeftMargin()},h.prototype.createWeekdayHeaders=function(){this.$headers=e.map(e.range(0,7),(function(){return t("<div />").addClass("weekday-header")})),this.$weekdayHeaders.append(this.$headers)},h.prototype.createWeekdayColumns=function(){this.$columns=e.map(e.range(0,7),(function(){return t("<div />").addClass("weekday").append(t('<div class="calendar-item-container"/>'))})),this.$weekdays.append(this.$columns)},h.prototype.createTimeslots=function(){var n=e.range(this.data.dayStart,this.data.dayEnd,this.data.timeslotSize),a=this;e.each(this.$columns,(function(i,o){var r=e.map(n,(function(e){var n=t("<div />").addClass("timeslot").data("dayOfWeek",o).data("time",e);return(new c).applyLongPressOnElement(n,a,(function(t){return a.determineEventArg(o,e)}),(function(){a.timeslotClicked(o,e)})),n.on("mousedown",s.timeslotMousedown.bind(a,i,o)),n.on("mouseup",s.timeslotMouseup.bind(a)),n.on("mousemove",s.timeslotMousemove.bind(a)),n}));i.append(r)}));var o=e.map(n,(function(e){var n=new Date(1970,0,1);return n.setMinutes(e),t("<div />").addClass("timeslot").text(i.format(n,a.data.timeslotHourFormat))}));this.$hours.append(t('<div class="calendar-header"></div>')).append(o)},h.prototype.determineEventArg=function(t,e){var o=n(this.monday).add(t,"day").add(e,"minute");return i.format(o.toDate(),a.licquidDateFormat)},h.prototype.timeslotClicked=function(t,e){var i=this.determineEventArg(t,e);this.triggerEvent(this.data.eventing.clicked.raisedEventName,i)},h.prototype.registerForDataSource=function(){if(this.data.dataSource){var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.removeCalendarItems(),t.showItems(e.outputs,e.results)}))}if(this.data.activeTSDataSource){t=this;this.piping.datasources.registerDatasourceListener(this.data.activeTSDataSource,(function(e){t.setActiveTimeslots(e.results)}))}},h.prototype.previous=function(){this.open(n(this.date).add(-1,"week")),this.loadCalendarData(),this.triggerNavigatedEvent()},h.prototype.next=function(){this.open(n(this.date).add(1,"week")),this.loadCalendarData(),this.triggerNavigatedEvent()},h.prototype.triggerNavigatedEvent=function(){this.triggerEventIfEnabled("navigated",this.getStartOfCurrentWeek())},h.prototype.open=function(t){this.date=t,this.monday=n(this.date).startOf("isoWeek"),this.sunday=n(this.date).endOf("isoWeek"),this.updateTitle(),this.updateWeekdayHeaders(),this.removeCalendarItems(),this.updateHeadersWidth(),this.updateHeadersLeftMargin();var e=this.piping.parameters;e.locals.setValue(this.data.calendarStartParameter,r.convert(this.getStartOfCurrentWeek())),e.locals.setValue(this.data.calendarEndParameter,r.convert(this.getEndOfCurrentWeek()))},h.prototype.getStartOfCurrentWeek=function(){return n(this.getOpenDate()).startOf("isoWeek")},h.prototype.getEndOfCurrentWeek=function(){return n(this.getOpenDate()).endOf("isoWeek")},h.prototype.updateTitle=function(){if(this.data.hideTitleEndDate)t=i.format(this.monday.toDate(),this.data.titleFormat);else var t=i.format(this.monday.toDate(),this.data.titleFormat)+" - "+i.format(this.sunday.toDate(),this.data.titleFormat);this.$title.text(t)},h.prototype.updateWeekdayHeaders=function(){var t=this;e.each(this.$headers,(function(e,a){var o=n(t.monday).add(a,"days"),r=i.format(o.toDate(),t.data.dayHeaderFormat);e.text(r);var s=n();o.isSame(s,"day")&&e.addClass("today")}))},h.prototype.updateHeadersWidth=function(){var t=this;e.defer((function(){t.$weekdayHeaders.width(t.$weekdays.width())}))},h.prototype.updateHeadersLeftMargin=function(){var t=this;e.defer((function(){t.$weekdayHeaders.css("margin-left",t.$hours.outerWidth())}))},h.prototype.getOpenDate=function(){return this.date},h.prototype.showItems=function(i,a){var o=this,r=this.getStartOfCurrentWeek(),A=this.getEndOfCurrentWeek(),l=e.chain(a).map((function(a){var s=o.getDatetimeFromRow(a,o.data.startOutput),l=o.getDatetimeFromRow(a,o.data.endOutput),d=l.clone(),c=s.clone(),u=s.isBetween(r,A,void 0,"[]"),h=l.isBetween(r,A,void 0,"[]"),p=0;return p=u&&h?d.isoWeekday()-c.isoWeekday()+1:d.endOf("day").diff(c.startOf("day"),"days")+1,e.chain(e.range(p)).map((function(t){return n(s).add(t,"day")})).filter((function(t){return(r.isSame(t)||r.isBefore(t))&&(A.isSame(t)||A.isAfter(t))&&!n(t).startOf("day").isSame(l)})).map((function(e){var r=e.isSame(s,"day")?e:n(e).startOf("day"),A=e.isSame(l,"day")?l:n(e).endOf("day"),d=r.isoWeekday()-1,c=o.$columns[d].find(".calendar-item-container");return t.extend(!0,{},o.childDrops[0],{data:{$target:c,startOfDay:n(r).startOf("day").add(o.data.dayStart,"minutes"),endOfDay:n(A).startOf("day").minutes(o.data.dayEnd),startOfItem:r,endOfItem:A,row:a,outputs:i,eventArg:o.data.eventArg,tooltipOutput:o.data.tooltipOutput,idOutput:o.data.idOutput}})})).value()})).flatten().value();s.fillUp(this,l).then((function(){o.nestingContext.executeDataSources()})).catch((function(t){o.piping.errorHandler.showErrorDialog(t)}))},h.prototype.removeCalendarItems=function(){e.each(this.pool,(function(t){t.$element.remove()})),this.removeAllDrops()},h.prototype.getDatetimeFromRow=function(t,e){if("datetimes"===this.data.dataSourceType)return n(t[e]);var i=n(t[this.data.dateOutput]).startOf("day"),a=t[e];return i.add(a,"seconds")},h.prototype.setActiveTimeslots=function(e){var i=this,n=i.$weekdays.find(".timeslot"),a=t();e.forEach((function(e){var o=i.getDatetimeFromRow(e,i.data.activeTSStartOutput).toDate(),r=i.getDatetimeFromRow(e,i.data.activeTSEndOutput).toDate(),s=n.filter((function(){var e=t(this).data("dayOfWeek"),n=t(this).data("time");return e+1===o.getDay()&&n>=i.getTimeOfDay(o)&&n<i.getTimeOfDay(r)}));a.push(...s)})),a.addClass("active-timeslot"),n.not(a).removeClass("active-timeslot")},h.prototype.getTimeOfDay=function(t){return 60*t.getHours()+t.getMinutes()},h.prototype.cleanUp=function(){e.each(this.bindings,(function(t){t.dispose()})),this.bindings=void 0},h})),define("tpl!drops/calendarYearView/calendarYearView.html",["underscore"],(function(_){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="calendar-view year-view">\r\n\r\n    <div class="calendar-title">\r\n        <a class="previous-page clickable no-text-select">〈 </a>\r\n        <a class="next-page clickable no-text-select"> 〉</a>\r\n\r\n        <div class="date-as-title"></div>\r\n    </div>\r\n\r\n    <div class="calendar-main">\r\n    </div>\r\n\r\n</div>';return __p}})),define("drops/calendarYearView/calendarYearView",["jquery","underscore","moment","globalize","lq/drop","lq/constants","drops/calendar/calendarParameter","drops/calendar/daysofmonthcalendar","tpl!drops/calendarYearView/calendarYearView.html"],(function(t,e,i,n,a,o,r,s,A){"use strict";var l={data:{dataSource:null,dateOutput:null,tooltipOutput:null,colorOutput:null,fontColorOutput:null,isUnavailableOutput:null,calendarStartParameter:"CalendarYearStart",calendarEndParameter:"CalendarYearEnd",monthTitleFormat:"MMMM yyyy",showWeekdayHeaders:!1,weekdayHeadersFormat:"ddd",eventing:{clicked:{}}}};function d(e){a.call(this,t(A()),l,e),this.selectedDate=null}return a.extend(d,a),d.typeName="CalendarYearView",d.prototype.loadCalendarData=function(){if(this.data.dataSource){var t=i(this.date),e=this;this.piping.queryDispatcher.backgroundDispatch(this.data.dataSource,(function(i){t.isSame(e.date)&&e.showColors(i.results)}))}},d.prototype.setSelectedDate=function(t){this.clearSelectedDate(),this.getCalendarForDate(t).setSelectedDate(t),this.selectedDate=t},d.prototype.clearSelectedDate=function(){this.selectedDate&&(this.getCalendarForDate(this.selectedDate).clearSelectedDate(),this.selectedDate=null)},d.prototype.init=t.noop,d.prototype.getSelectedDate=function(){return this.selectedDate},d.prototype.getCalendarForDate=function(t){var e=t.get("month");return this.calendars[e]},d.prototype.render=function(){this.registerForDataSource(),this.prepareUi(),this.open(i())},d.prototype.prepareUi=function(){var t={standalone:!1,titleFormat:this.data.monthTitleFormat,showWeekdayHeaders:this.data.showWeekdayHeaders,weekdayHeadersFormat:this.data.weekdayHeadersFormat,languageISOCode:this.piping.parameters.getValue("CurrentLanguageISOCode")},i=this;this.calendars=e.map(e.range(0,12),(function(){return new s(t)})),this.data.eventing.clicked.enabled&&e.each(this.calendars,(function(t){t.withOnClicked((function(t){t.isSame(i.selectedDate,"month")||i.clearSelectedDate(),i.selectedDate=t;var e=n.format(t.toDate(),o.licquidDateFormat);i.triggerEventIfEnabled("clicked",e)}))})),this.$title=this.$element.find(".date-as-title");var a=e.pluck(this.calendars,"$element");this.$element.find(".calendar-main").append(a),this.$element.find(".previous-page").on("click",(function(){i.previous()})),this.$element.find(".next-page").on("click",(function(){i.next()}))},d.prototype.registerForDataSource=function(){if(this.data.dataSource){var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(i){e.each(t.calendars,(function(t){t.rerender()})),t.showColors(i.results)}))}},d.prototype.previous=function(){this.open(i(this.date).add(-1,"year")),this.loadCalendarData(),this.triggerNavigatedEvent()},d.prototype.next=function(){this.open(i(this.date).add(1,"year")),this.loadCalendarData(),this.triggerNavigatedEvent()},d.prototype.triggerNavigatedEvent=function(){this.triggerEventIfEnabled("navigated",this.getStartOfCurrentYear())},d.prototype.open=function(t){this.date=t,this.$title.text(this.date.get("year"));for(var e=0;e<12;e++){var n=i(this.date).set("month",e);this.calendars[e].open(n)}var a=this.piping.parameters;a.locals.setValue(this.data.calendarStartParameter,this.getStartOfCurrentYear()),a.locals.setValue(this.data.calendarEndParameter,this.getEndOfCurrentYear())},d.prototype.getStartOfCurrentYear=function(){return r.convert(i(this.date).startOf("year"))},d.prototype.getEndOfCurrentYear=function(){return r.convert(i(this.date).endOf("year"))},d.prototype.showColors=function(t){var i=this;e.each(t,(function(t){var e=new Date(t[i.data.dateOutput]),n=t[i.data.colorOutput],a=t[i.data.fontColorOutput],o=t[i.data.tooltipOutput],r=t[i.data.isUnavailableOutput];i.calendars[e.getMonth()].decorateDate(e,n,a,o,r)}))},d.prototype.getOpenDate=function(){return this.date},d})),define("drops/bucketDrop/bucketDrop",["jquery","underscore","lq","lq/style","lq/drop","lq/responsive"],(function(t,e,i,n,a,o){"use strict";function r(e){a.call(this,t('<div class="canvas-target" />'),e),this.$element.css({"overflow-y":"auto","overflow-x":"hidden"}),n.renderStyles(this,null,this.$element)}return a.extend(r,a),r.typeName="BucketDrop",r.prototype.preRender=function(){this.applyPosition()},r.prototype.postRender=function(){var n=(this.data.url||i.getTenantUploads("Buckets"))+"/",a=this;t.get(n+this.data.definition+requirejs.s.contexts._.config.urlArgs(null,""),(function(t){e.each(t.files.stylesheets,(function(t){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href",n+t+requirejs.s.contexts._.config.urlArgs(null,"")),document.getElementsByTagName("head")[0].appendChild(e)}));var r=t.files.scripts.length;e.each(t.files.scripts,(function(s){var A=document.createElement("script");A.async=!1,A.setAttribute("type","text/javascript"),A.setAttribute("src",n+s+requirejs.s.contexts._.config.urlArgs(null,"")),A.onload=function(){1===r?(window[t.id].default({id:a.data.id,bucketsBaseUrl:n,configuration:a.data.configuration,targetElement:a.$element.get(0),piping:a.piping,triggerEvent:a.triggerEventIfEnabled.bind(a),deviceType:o.getDeviceType().name,url:{runtime:i.getTenantUrl(""),uploads:i.getTenantUploads(""),root:i.getBaseUrl("")}}),e.each(t.methods,(function(e){a["licquidMethod_"+e.name]=a.callMethodOnBucket.bind(a,t.id,e.name)}))):r--},document.getElementsByTagName("head")[0].appendChild(A)}))}))},r.prototype.callMethodOnBucket=function(t,e,i){window[t][e](i)},r})),define("drops/captcha/captcha",["jquery","underscore","lq","lq/drop","lq/style","jquery.placeholder"],(function(t,e,i,n,a){"use strict";function o(e){n.call(this,t("<div/>"),e),this.$image=t("<div />").css({width:"100%",height:"100%",overflow:"hidden"}).attr("tabindex",this.data.tabIndex).appendTo(this.$element),this.$element.addClass("boxToBorderSize"),a.renderStyles(this,null,this.$image)}return n.extend(o,n),o.typeName="Captcha",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.setACaptcha()},o.prototype.setACaptcha=function(){this.$image.css({"background-image":"url("+this.createCaptchaUrl()+")","background-size":"100% 100%","background-repeat":"no-repeat"})},o.prototype.createCaptchaUrl=function(){return i.getTenantUrl("LicquidAction/Captcha?t="+(new Date).getTime())},o.prototype.refreshCaptcha=function(){this.setACaptcha()},o})),define("drops/carousel/carousel",["jquery","underscore","lq/drop","lq/constants","lq/responsive","jquery.bxslider/jquery.bxslider"],(function(t,e,i,n,a){"use strict";var o={data:{size:{x:200,y:150},showPager:!0,showControls:!0,controls:"default",opacity:100,border:{width:5,color:"rgba(255, 255, 255, 1)",style:"solid",top:!0,left:!0,bottom:!0,right:!0},background:{enabled:!0,color:"rgb(255, 255, 255)"}}};function r(n){i.call(this,t("<div/>"),o,n),this.slideChanged=0,this.sliderActive=!1,this.onChangeFunctions=[],this.childDrops=e.sortBy(this.childDrops,(function(t){return t.data.index})),this.$shadowWrapper=t("<div />").css({height:"100%",width:"100%"}),this.$sliderUl=t("<ul />").addClass("bxslider").css({margin:"0"}).width(this.data.size.x).height("100%").appendTo(this.$shadowWrapper),this.$shadowWrapper.appendTo(this.$element),this.$element.addClass("boxToBorderSize").css({opacity:Number(this.data.opacity)/100,paddingBottom:"30px"}),this.renderDropShadow()}return i.extend(r,i),r.typeName="Carousel",r.controls=["default","custom"],r.prototype.renderDropShadow=function(){this.data.hasDrop?this.$shadowWrapper.css({boxShadow:this.data.dropSize+"px "+this.data.dropSize+"px "+this.data.dropBlur+"px #888888"}):this.$shadowWrapper.css("boxShadow","none")},r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},r.prototype.render=function(t){return this.createAndRenderDrops(t)},r.prototype.postRender=function(){e.defer(this.initSlider.bind(this))},r.prototype.hasPanels=function(){return!!e.findWhere(this.pool,{type:"CarouselPanel"})},r.prototype.initSlider=function(){var e=this,i=function(i,n,a){e.setInitialIndex(a),e.slideChanged=e.slideChanged+1;for(var o=0;o<e.$sliderUl[0].childNodes.length;o++){var r=e.$sliderUl[0].childNodes[o];e.disableTabbing(t(r))}return e.enableTabbing(t(i)),!0};if(this.hasPanels()){var o=a.getDeviceType();e.$element.children("li").appendTo(e.$sliderUl),e.slider=e.$sliderUl.bxSlider({mode:"horizontal",hideControlOnEnd:!0,responsive:!0,video:!0,touchEnabled:o===n.deviceTypes.Phone||o===n.deviceTypes.Tablet,oneToOneTouch:!1,controls:this.data.showControls&&"default"===this.data.controls,pager:this.data.showPager,swipeThreshold:100,speed:500,startSlide:e.getInitialIndex(),onSlideBefore:function(t,n,a){return i(t,0,a),e.change(),!0},auto:!this.designData&&this.data.enableAutoTransition,pause:1e3*this.data.autoTransitionPause,infiniteLoop:!this.designData&&this.data.enableAutoTransition,onSlideNext:i,onSlidePrev:i,onSlideAfter:function(){e.sliderActive=!1}}),e.$element.find(".bx-controls").css({lineHeight:"1"}),e.$element.find(".bx-viewport").height(e.data.size.y),e.setBorderAndBGStyle();for(var r=0;r<e.$sliderUl[0].childNodes.length;r++)if(r!==e.getInitialIndex()+1){var s=e.$sliderUl[0].childNodes[r];e.disableTabbing(t(s))}}},r.prototype.setBorderAndBGStyle=function(){var t=this.data.border,e=this.data.background;this.$element.find(".bx-wrapper").css({borderBottom:t.bottom?t.width+"px "+t.style+" "+t.color:"none",borderLeft:t.left?t.width+"px "+t.style+" "+t.color:"none",borderTop:t.top?t.width+"px "+t.style+" "+t.color:"none",borderRight:t.right?t.width+"px "+t.style+" "+t.color:"none",background:e.enabled?e.color:"none"});var i=0;t.left&&t.right?i=2*(5-t.width):t.left||t.right?i=10-t.width:t.left||t.right||(i=10);var n=this.$element.find(".bx-wrapper").css("width"),a=null,o=10;"none"!==t.style&&"hidden"!==t.style||(o=0,i=0,a=10),this.$sliderUl.find("li").css({width:parseFloat(n)-o+i+"px",left:a?-a+"px":-i+"px"})},r.prototype.disableTabbing=function(i){var n=this;i&&(i.prop("originalTabindex")||(i.attr("tabindex")?i.prop("originalTabindex",i.attr("tabindex")):i.prop("originalTabindex","undef")),i.attr("tabindex",-1),e.each(i[0].childNodes,(function(e){n.disableTabbing(t(e))})))},r.prototype.enableTabbing=function(i){var n=this;i&&("undef"!==i.prop("originalTabindex")?i.attr("tabindex",i.prop("originalTabindex")):i.removeAttr("tabindex"),e.each(i[0].childNodes,(function(e){n.enableTabbing(t(e))})))},r.prototype.goToSlide=function(t){var e=this;null!=e.slider&&e.slider.getCurrentSlide()!==t&&(e.setInitialIndex(t),e.sliderActive=!0,e.slider.goToSlide(t))},r.prototype.onChange=function(t){this.onChangeFunctions.push(t)},r.prototype.offChange=function(t){this.onChangeFunctions=e.without(this.onChangeFunctions,t)},r.prototype.change=function(){var t=this.getInitialIndex();e.each(this.onChangeFunctions,(function(e){e(t)}))},r.prototype.setInitialIndex=function(t){this.getInitialIndexParameters().setValue(this.data.id,t)},r.prototype.getInitialIndex=function(){return this.getInitialIndexParameters().getValue(this.data.id)||0},r.prototype.getInitialIndexParameters=function(){var t=this.piping.parameters;return this.data.useLocalParameter?t.locals:t.globals},r.prototype.performAction=function(t){"next"===t&&this.slider.goToNextSlide(),"previous"===t&&this.slider.goToPrevSlide()},r.prototype.canPerformAction=function(t){if(this.slider){if("next"===t)return this.slider.getCurrentSlide()+1<this.slider.getSlideCount();if("previous"===t)return this.slider.getCurrentSlide()>0}else if("next"===t)return this.hasPanels();return!1},r.prototype.unsubscribeEventHandlers=function(){this.slider&&(this.slider.destroySlider(),this.slider=null)},r})),define("drops/carouselControl/carouselControl",["jquery","lq","lq/drop","lq/style"],(function(t,e,i,n){"use strict";function a(e){i.call(this,t("<div/>"),e),n.renderStyles(this),this.$element.addClass("clickable").on("click",this.clicked.bind(this)).css("background-size","cover"),this.onChangeListener=this.updateVisibility.bind(this)}return i.extend(a,i),a.typeName="CarouselControl",a.prototype.preRender=function(){this.applyPosition(),this.setupControlImages(),this.updateVisibility(),this.parent.onChange(this.onChangeListener)},a.prototype.clicked=function(){this.parent.performAction(this.data.action)},a.prototype.updateVisibility=function(){this.$element.toggle(this.parent.canPerformAction(this.data.action))},a.prototype.setupControlImages=function(){if(this.data.normalImage){var t=e.getTenantUploads(this.data.normalImage);if(this.setImage(t),this.data.hoverImage){var i=e.getTenantUploads(this.data.hoverImage);this.$element.on("mouseenter",this.setImage.bind(this,i)).on("mouseleave",this.setImage.bind(this,t))}}},a.prototype.setImage=function(t){this.$element.css("background-image","url("+t+")")},a})),define("drops/carouselPanel/carouselPanel",["jquery","underscore","lq/drop"],(function(t,e,i){"use strict";var n={data:{color:"rgba(255, 255, 255, 1)"}},a={data:{positioning:"relative",position:{x:0,y:0}}};function o(e){t.extend(!0,e,a),i.call(this,t("<li/>"),n,e);this.$element.addClass("boxToBorderSize").css({overflow:"hidden"}),this.applyColor()}return i.extend(o),o.typeName="CarouselPanel",o.prototype.preRender=function(){this.data.size=this.parent.data.size,this.applyPosition()},o.prototype.postRender=function(){this.$element.height("100%")},o.prototype.applyColor=function(){this.$element.css("backgroundColor",this.data.color)},o.prototype.render=function(t){return this.createAndRenderDrops(t)},o})),define("drops/carouselTabControl/carouselTabControl",["jquery","underscore","lq/drop","lq/style","lq/util"],(function(t,e,i,n,a){"use strict";var o={data:{type:"CarouselTabControl"}};function r(e){i.call(this,t("<div/>"),o,e),this.data.styles=this.data.tabStyles;var n=this;this.onChangeFunc=function(t){n.$element.find(".carousel-tab-control-tab").eq(t).trigger("click")}}return i.extend(r,i),r.typeName="CarouselTabControl",r.prototype.getCarousel=function(){return this.data.carousel&&this.piping.dropFactory.findDropByName(this.data.carousel)},r.prototype.getTabData=function(){return this.carousel?e.chain(this.carousel.childDrops).pluck("data").where({type:"CarouselPanel"}).value():[]},r.prototype.preRender=function(){this.piping.visibility.apply(this),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.carousel=this.getCarousel(),this.applyPosition()},r.prototype.postRender=function(){this.renderTabs()},r.prototype.renderTabs=function(){var i=this,o=a.convertListOfKeyValuesToObject(i.data.tabStyles);this.carousel=this.getCarousel(),e.each(this.getTabData(),(function(e,a){var r=t("<div />").text(e.name).width(i.data.tabX).height(i.data.tabY).addClass("boxToBorderSize").addClass("carousel-tab-control-tab").css({cursor:"pointer",float:"left",overflow:"hidden",wordWrap:"break-word",display:"block",lineHeight:1}).appendTo(i.$element);o&&o.normal?n.renderStyle(o.normal,i,r):n.renderStyles(i,null,r),o&&o.active&&o.active.enabled?(a===i.carousel.getInitialIndex()&&(i.selectedTab=a,n.renderStyle(o.active,i,r)),r.on("click",(function(){i.carousel.sliderActive||(i.carousel.goToSlide(a),i.selectedTab=a,n.renderStyle(o.normal,i,i.$element.find(".carousel-tab-control-tab")),n.renderStyle(o.active,i,r))})),o.hover&&o.hover.enabled&&r.on("mouseenter",(function(){i.selectedTab!==a&&n.renderStyle(o.hover,i,r)})).on("mouseleave",(function(){i.selectedTab!==a&&n.renderStyle(o.normal,i,r)}))):(a===i.carousel.getInitialIndex()&&(i.selectedTab=a,r.addClass("active")),r.on("click",(function(){i.carousel.goToSlide(a),t(this).addClass("active").siblings().removeClass("active")})))})),this.carousel&&this.carousel.onChange(this.onChangeFunc)},r})),define("lq/cache",["underscore"],(function(t){"use strict";var e=function(){this.store={}};return e.prototype.hasOwn=function(t){return Object.prototype.hasOwnProperty.call(this.store,t)},e.prototype.set=function(t,e){this.store[t]=e},e.prototype.get=function(t){if(this.has(t))return this.store[t]},e.prototype.has=function(t){return this.hasOwn(t)},e.prototype.remove=function(t){delete this.store[t]},e.prototype.clear=function(){this.store={}},e.prototype.keys=function(){return t.keys(this.store)},e.prototype.values=function(){return t.values(this.store)},e})),define("lq/cssutil",["require","lq/cache"],(function(t,e){"use strict";var i=new e;return{requireCss:function(e){this.loadCss(t.toUrl(e))},loadCss:function(t){if(!i.has(t)){i.set(t,!0);var e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,document.getElementsByTagName("head")[0].appendChild(e)}}}})),define("drops/chart/chart",["jquery","when","underscore","lq/drop","lq/util","lq/cssutil"],(function(t,e,i,n,a,o){"use strict";var r=null,s=null,A={data:{pageSize:10240,showGridX:!1,showGridY:!1,showTooltip:!0,showLegend:!0,showDataLabels:!1,labelType:"percentage",legendPosition:"bottom",showXAxis:!0,axisXType:"indexed",axisXLabel:"",axisXLabelPosition:"outer-center",showYAxis:!0,axisYLabel:"",axisYLabelPosition:"outer-middle",showY2Axis:!1,axisY2Label:"",axisY2LabelPosition:"outer-middle",emptyText:"No data",animationDuration:0,removeAxisPadding:!1,enableZoom:!1,zoomType:"scroll",zoomBoundaries:!1,axisXLimit:!1,enableSubchart:!1,subchartHeight:10,subchartHide:!0,scrollbarColor:"#DDDDDD"}},l=function(e){n.call(this,t("<div>"),A,e),this.$chart=t("<div>").appendTo(this.$element)};return n.extend(l),l.typeName="Chart",l.prototype.preRender=function(){this.piping.visibility.apply(this);var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e)}),(function(e){t.decorateDataSourceData(e)})),this.applyPosition();var i=e.defer();return require(["d3","c3"],(function(t,e){o.requireCss("c3.min.css"),r=t,s=e,i.resolve()})),i.promise},l.prototype.postRender=function(){this.update()},l.prototype.decorateDataSourceData=function(t){this.update(),"number"==typeof this.data.pageSize&&this.data.pageSize>0?t.pageSize=this.data.pageSize:t.pageSize=A.pageSize},l.prototype.getStepType=function(){return"at start"===this.data.stepType?"step-before":"at end"===this.data.stepType?"step-after":"step"},l.prototype.getTickSettings=function(t,e){var n=this.data["axis"+e.toUpperCase()+"Precision"];if(i.isFinite(n))return{format:r.format("."+n+"f"),fit:!1};var o=i.findWhere(this.data.series,{axis:e});if(o&&o.output&&t.outputs[o.output]){var s=t.outputs[o.output];return"System.Int32"===s||"System.Int64"===s||"System.Decimal"===s?{format:a.autoFormatNumber,fit:!1}:{fit:!1}}return{format:a.autoFormatNumber,fit:!1}},l.prototype.update=function(t){var e=this;t=t||{outputs:[],results:[],totalResults:0},e.chart&&e.chart.destroy();var n=e.data.series,a=t.results,o=i.find(n,(function(t){return"pie-dynamic"===t.type&&"y"===t.axis}));o&&(a=[i.reduce(t.results,(function(t,e){return t[e[o.labelOutput]]=e[o.output],t}),{})],n=i.map(t.results,(function(t){var e=Object.assign({},o);return e.type="pie",e.output=t[o.labelOutput],e.label=t[o.labelOutput],e})));var r=i.filter(n,(function(t){return t.hasCustomColor})),A=i.filter(n,(function(t){return"bar-stacked"===t.type})),l={bindto:e.$chart[0],transition:{duration:e.data.animationDuration},size:{height:null!=this.data.top||null!=this.data.bottom?void 0:e.data.size.y},data:{names:i.object(i.pluck(n,"output"),i.pluck(n,"label")),types:i.object(i.pluck(n,"output"),i.map(i.pluck(n,"type"),(function(t){return"bar-stacked"===t?"bar":t}))),colors:i.object(i.pluck(r,"output"),i.pluck(r,"customColor")),axes:i.object(i.pluck(n,"output"),i.map(n,(function(t){return t.axis||"y"}))),groups:[i.pluck(A,"output")],labels:e.data.showDataLabels,json:a,keys:{value:i.pluck(n,"output")},empty:{label:{text:e.data.emptyText}}},grid:{x:{show:e.data.showGridX},y:{show:e.data.showGridY}},tooltip:{show:e.data.showTooltip},legend:{show:e.data.showLegend,position:e.data.legendPosition},axis:{x:{show:e.data.showXAxis,label:{text:e.data.axisXLabel,position:e.data.axisXLabelPosition},tick:e.getTickSettings(t,"x"),min:e.data.axisXLimit?e.data.axisXLimitMin:void 0,max:e.data.axisXLimit?e.data.axisXLimitMax:void 0,type:e.data.axisXType,height:e.data.axisXLabelHeight},y:{show:e.data.showYAxis,label:{text:e.data.axisYLabel,position:e.data.axisYLabelPosition},tick:e.getTickSettings(t,"y")},y2:{show:e.data.showY2Axis,label:{text:e.data.axisY2Label,position:e.data.axisY2LabelPosition},tick:e.getTickSettings(t,"y2")}},line:{step:{type:e.getStepType()}},pie:{label:{format:function(t,i,n){return"percentage"===e.data.labelType?(100*i).toFixed(1)+"%":t}}},zoom:{enabled:e.data.enableZoom,type:e.data.zoomType},subchart:{show:e.data.enableSubchart,size:{height:e.data.subchartHeight}}};this.isEventEnabled("clicked")&&(l.data.onclick=function(t){e.triggerEventIfEnabled("clicked",t.id)}),(e.data.axisYMax||0===e.data.axisYMax)&&(l.axis.y.max=e.data.axisYMax),(e.data.axisYMin||0===e.data.axisYMin)&&(l.axis.y.min=e.data.axisYMin);var d=i.findWhere(e.data.series,{axis:"x"});d&&(l.data.x=d.output),e.data.removeAxisPadding&&(l.axis.x.padding={left:0,right:0},l.axis.y.padding={top:0,bottom:0}),e.chart=s.generate(l);var c=e.chart.xs(),u=c[Object.keys(c)[0]];if(e.data.enableZoom){if(e.data.zoomBoundaries&&(e.data.zoomBoundaryMin||e.data.zoomBoundaryMax)&&u.length)if(e.data.zoomBoundaryMin&&e.data.zoomBoundaryMax)e.chart.zoom([e.data.zoomBoundaryMin,e.data.zoomBoundaryMax]);else{var h="category"==l.axis.x.type?0:Math.min.apply(null,u),p="category"==l.axis.x.type?u.length:Math.max.apply(null,u);e.chart.zoom([e.data.zoomBoundaryMin?Number(e.data.zoomBoundaryMin):h,e.data.zoomBoundaryMax?Number(e.data.zoomBoundaryMax):p])}e.data.enableZoom&&e.data.enableSubchart&&(e.$chart.find(".c3-axis-x").not(".c3-axis").hide(),e.data.subchartHide&&e.$chart.find(".c3-brush > .overlay").attr("fill",e.data.scrollbarColor))}},l.prototype.afterShown=function(){this.$element.css("display","inherit")},l.prototype.afterHidden=function(){this.$element.css("display","none")},l})),define("lq/Drop",["underscore","jquery","when","lq","lq/oop","lq/observable","lq/validations"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{positioning:"absolute",position:{x:0,y:0},size:{x:100,y:20},zIndex:1,locked:!1,isHidden:!1,formatting:{dateFormat:"dd-MM-yyyy",groupSeperator:"",decimalSeperator:"",decimalPrecision:""},eventing:{},initialVisibility:!0,initialVisibilityOption:"Hard Coded",centered:!1,toPage:!1},childDrops:[],editable:!1,renderInBackground:!1},A=function(t,i,n){e.extend(!0,this,s,i,n),this.type=this.data.type,this.$element=t.addClass("drop-element").css("visibility","inherit"),this.parent=null,this.pool=[],this.otherVisuals=[],this.eventHandlers=[],o.makeObservable(this,["ChildAdded","DatasourceApplied"]),this.applyLayouts(),"function"==typeof A.constructing&&A.constructing(this),A.informListeners("Constructing",this)};return A.prototype.defaultEventArg=void 0,A.prototype.isHidden=!1,A.prototype.supportsManyToManyData=function(){return!1},a.makeExtendable(A),o.makeObservable(A,"Constructing"),A.prototype.$=function(t){return this.$element.find(t)},A.prototype.autoPositionAt=function(t){this.$element.css({left:null===t.left?"auto":t.left+"px",top:null===t.top?"auto":t.top+"px",right:null===t.right?"auto":t.right+"px",bottom:null===t.bottom?"auto":t.bottom+"px"}).appendTo(e("body"))},A.prototype.createAndRenderDrops=function(t){var e=this;return i(e.preRender()).then((function(){if(!e.removed){e.$element.appendTo(t);var n=e.piping.dropFactory.createDrops(e.childDrops);return i.all(e.createRenderPromisesForChildren(n))}})).then((function(){return e.postRender()}))},A.prototype.isRenderedInBackground=function(){return!0===this.renderInBackground||!!this.parent&&this.parent.isRenderedInBackground()},A.prototype.createRenderPromiseForChild=function(t){return t.data.toBrowser?t.render(this.piping.$actionWrapper):t.renderInBackground&&this.rootDrop.$masterPage?t.render(this.rootDrop.$masterPage):t.data.toPage&&this.rootDrop.$pageAnchored?t.render(this.rootDrop.$pageAnchored):t.render(this.$element)},A.prototype.createRenderPromisesForChildren=function(e){var i=this,n=[];return t.each(e,(function(t){i.addDrop(t),n.push(i.createRenderPromiseForChild(t))})),n},A.prototype.render=function(e){var n=this;return i(n.preRender()).then((function(){if(!n.removed){n.$element.appendTo(e);var a=[];return t.forEach(n.pool,(function(t){a.push(n.createRenderPromiseForChild(t))})),i.all(a)}})).then((function(){return n.postRender()}))},A.prototype.preRender=e.noop,A.prototype.postRender=e.noop,A.prototype.resize=function(){this.postWindowResize(),t.forEach(this.pool,(function(t){t.resize()}))},A.prototype.postWindowResize=e.noop,A.prototype.error=function(e){this.onError(e),t.forEach(this.pool,(function(t){t.error(e)}))},A.prototype.onError=function(t){},A.prototype.isVisible=function(){return!this.isHidden&&(!this.parent||this.parent.isVisible())},A.prototype.showWithoutAnimation=function(){this.getElementForVisibility().removeClass("drop-hidden"),this.isHidden=!1,this.shown()},A.prototype.show=function(){var t=this,i=this.data.showAnimation;"none"!==i&&null!=i?(this.data.showAnimationTime&&e(this.getElementForVisibility()).css({animationDuration:this.data.showAnimationTime.delay+this.data.showAnimationTime.unit}),this.getElementForVisibility().removeClass("drop-hidden"),this.getElementForVisibility().addClass("animated "+i),this.getElementForVisibility().one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){t.getElementForVisibility().removeClass("animated "+i),t.isHidden=!1,t.shown()}))):this.showWithoutAnimation()},A.prototype.hideWithoutAnimation=function(){this.getElementForVisibility().addClass("drop-hidden"),this.isHidden=!0,this.hidden()},A.prototype.hide=function(){var t=this,i=this.data.hideAnimation;"none"!==i&&null!=i?(this.data.hideAnimationTime&&e(this.getElementForVisibility()).css({animationDuration:this.data.hideAnimationTime.delay+this.data.hideAnimationTime.unit}),this.getElementForVisibility().addClass("animated "+i),this.getElementForVisibility().one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){t.getElementForVisibility().removeClass("animated "+i),t.getElementForVisibility().addClass("drop-hidden"),t.isHidden=!0,t.hidden()}))):this.hideWithoutAnimation()},A.prototype.getElementForVisibility=function(){return null!=this.parent?this.parent.getChildElementForVisibility(this):this.$element},A.prototype.getChildElementForVisibility=function(t){return t.$element},A.prototype.toggle=function(t){0===arguments.length&&(t=!this.isVisible()),t?this.show():this.hide()},A.prototype.shown=function(){this.isVisible()&&(this.afterShown(),t.forEach(this.pool,(function(t){t.shown()})))},A.prototype.afterShown=e.noop,A.prototype.hidden=function(){this.isVisible()||(this.afterHidden(),t.forEach(this.pool,(function(t){t.hidden()})))},A.prototype.afterHidden=e.noop,A.prototype.getEventDataFor=function(t){return this.data&&this.data.eventing&&this.data.eventing[t]||{}},A.prototype.applyEventTrigger=function(t,e,i,n){var a=this;i=i||a.$element;var o=this.getEventDataFor(t),r=e+".licquidEventTrigger-"+t;i.off(r),o.enabled&&this.subscribeEventHandler(i,r,(function(){return a.triggerEvent(o.raisedEventName,n,void 0,void 0,a.isBackgroundEvent(t)),!a.insideList()}))},A.prototype.insideList=function(){return!!this.parent&&("List"===this.parent.type||this.parent.insideList())},A.prototype.triggerEventIfEnabled=function(t,e,i,n){var a=this.getEventDataFor(t);if(a.enabled){var o=this.isBackgroundEvent(t);this.triggerEvent(a.raisedEventName,e,i,n,o)}},A.prototype.isBackgroundEvent=function(t){return"mouseEnter"===t||"mouseLeave"===t},A.prototype.isEventEnabled=function(t){return this.getEventDataFor(t).enabled},A.prototype.triggerEvent=function(t,i,n,a,o,r){if(this.piping){void 0===i&&(i=this.getDefaultEventArg());var s,A=n||this.$element;A instanceof e&&(A=A.get(0)),a&&(s={clientX:a.clientX,clientY:a.clientY,offsetX:a.offsetX,offsetY:a.offsetY,pageX:a.pageX,pageY:a.pageY,screenX:a.screenX,screenY:a.screenY});var l={drop:this,element:A,activeArea:A.getBoundingClientRect(),eventPosition:s,isBackgroundEvent:!!o};this.piping.eventing.publish(t,l,i,null,r)}},A.prototype.getDefaultEventArg=function(){return void 0!==this.defaultEventArg?this.defaultEventArg:this.parent?this.parent.getDefaultEventArg():void 0},A.prototype.updateRequiredIndicator=function(){this.isValid()?this.$element.addClass("hasValidValue"):this.$element.removeClass("hasValidValue")},A.prototype.isValid=function(){return!this.requiredData||this.hasValue()},A.prototype.triggerValidationEvent=function(t,e){this.triggerEvent(e,null,null,null,null,t)},A.prototype.performValidation=function(t){return r.runValidation(this.data.validation,this.piping,this.triggerValidationEvent.bind(this,t),this.getValue())},A.prototype.hasValue=function(){var t=this.getValue();return null!=t&&!1!==t&&0!==t.length},A.prototype.makesItGrow=function(){return this.rootDrop&&this.rootDrop.doesThisMakeMeGrow(this)},A.prototype.applyPosition=function(){if(this.canGrow()||this.makesItGrow()){var t={position:"relative",display:"block",zIndex:this.getZIndex()};this.data.minHeight&&(t.minHeight=this.data.minHeight+"px"),!0===this.data.centered?(t.width=this.data.size.x+"px",t.margin="0 auto"):null!=this.data.right&&null==this.data.left?(t.marginLeft="auto",t.marginRight=this.data.right+"px",t.width=this.data.size.x+"px"):null!=this.data.right&&null!=this.data.left?(t.marginLeft=this.data.left+"px",t.marginRight=this.data.right+"px",t.width="calc(100% - "+this.data.left+"px"-this.data.right+"px)"):(t.marginLeft=(null!=this.data.left?this.data.left:this.data.position.x)+"px",t.width=this.data.size.x+"px"),this.$element.css(t);var e={paddingTop:(null!=this.data.top?this.data.top:this.data.position.y)+"px"};null!=this.data.bottom&&(e.paddingBottom=this.data.bottom+"px"),this===this.rootDrop?this.piping.$actionView.css(e):this.parent.$element.css(e)}else if(null==this.parent||null!=this.parent.parent||this.isRenderedInBackground())null!=this.parent?this.parent.applyPositionForChild(this):this.$element.css(this.getPositionCss(this.data));else{var i=this.rootDrop.$element[0];if(this.$element[0]!==i){var n=this.$element.parent()[0];if((this.data.toPage||this.data.toBrowser)&&this.rootDrop.$pageAnchored){var a=this.rootDrop.$pageAnchored[0];n!==a&&this.$element.appendTo(a)}else this.data.toPage||this.data.toBrowser||n!==i&&this.$element.appendTo(i)}this.parent.applyPositionForChild(this)}this.data.parallax&&this.data.parallax.enabled&&this.piping.$actionWrapper.on("scroll",this.updateParallaxPosition.bind(this))},A.prototype.doesThisMakeMeGrow=function(t){return!1},A.prototype.canGrow=function(t){return!1},A.prototype.updateParallaxPosition=function(){var t=this.piping.$actionWrapper.scrollTop();this.$element.css("top",this.data.position.y+t-t*this.data.parallax.factor+"px")},A.prototype.applyPositionForChild=function(t){var e=t.getZIndex(),i=this.getPositionCss(t.data,e);t.$element.css(i)},A.prototype.getZIndex=function(){return this.renderInBackground||this.parent!==this.rootDrop||this.designData?this.data.zIndex:this.data.zIndex+3e3},A.prototype.getPositionCss=function(t,e){var i=void 0!==e?e:t.zIndex;if(!0===t.dynamicHeight)return{position:"relative",top:t.position.y+"px",left:t.position.x+"px",width:t.size.x,zIndex:i,height:"auto"};var n={zIndex:i,position:t.positioning};return t.useFullScreen?(n.left="0px",n.right="0px",n.top="0px",n.bottom="0px",n.height="auto",n.width="auto",n):(null!=t.bottom&&null==t.top?(n.top="auto",n.bottom=t.bottom+"px",n.height=t.size.y):null!=t.bottom&&null!=t.top?(n.top=t.top+"px",n.bottom=t.bottom+"px",n.height="auto"):(n.top=(null!=t.top?t.top:t.position.y)+"px",n.bottom="auto",n.height=t.size.y),null!=t.right&&null==t.left?(n.left="auto",n.right=t.right+"px",n.width=t.size.x):null!=t.right&&null!=t.left?(n.left=t.left+"px",n.right=t.right+"px",n.width="auto"):(n.left=(null!=t.left?t.left:t.position.x)+"px",n.right="auto",n.width=t.size.x),!0===t.centered&&(n.left="0",n.right="0",n.marginLeft="auto",n.marginRight="auto"),(t.autoHeight||t.useDynamicHeight&&t.isDynamiclySizedContainer)&&(n.height="auto"),(t.autoWidth||t.useDynamicWidth&&t.isDynamiclySizedContainer)&&(n.width="auto"),t.fitContent&&(n.width="fit-content"),n)},A.prototype.getPosition=function(){var t={};return null!==this.data.left&&(t.left=this.data.left),null!==this.data.top&&(t.top=this.data.top),null!==this.data.right&&(t.right=this.data.right),null!==this.data.bottom&&(t.bottom=this.data.bottom),t},A.prototype.addDrop=function(t){return this.pool.push(t),t.parent=this,t.rootDrop=this.rootDrop,t.piping=this.piping,this.informListeners("ChildAdded",t),delete t.removed,this},A.prototype.removeDrop=function(t){t.beforeRemove(),"Query"===t.type&&this.piping.datasources.unregisterDatasource(t.data);var e=this.pool.indexOf(t);return this.pool.splice(e,1),t.parent=null,t.rootDrop=null,t.piping=null,t.removed=!0,this},A.prototype.beforeRemove=function(){t.each(this.pool,(function(t){t.beforeRemove()}))},A.prototype.removeAllDrops=function(){var e=this;t.each(this.pool.slice(0),(function(t){e.removeDrop(t)}))},A.prototype.subscribeEventHandler=function(t,e,i){if("string"==typeof arguments[0])return this.subscribeEventHandler(this.$element,arguments[0],arguments[1]);this.eventHandlers.push({$element:t,event:e,handler:i}),t.on(e,i)},A.prototype.unsubscribeEventHandlers=e.noop,A.prototype.unsubscribeEventHandlersRecursive=function(){t.each(this.pool,(function(t){t.unsubscribeEventHandlersRecursive()})),this.unsubscribeEventHandlers(),this.removeClicks&&this.removeClicks();var e=this;t.each(this.eventHandlers,(function(t){t.$element?t.$element.off(t.event,t.handler):t.source&&e.unsubscribe(t.source,t.events)})),this.parent=null,this.rootDrop=null,this.piping=null,this.$element.remove()},A.prototype.getRootDrop=function(){return this.parent?this.parent.getRootDrop():this},A.prototype.isChildDropOfRecursive=function(t){return!!this.parent&&(this.parent===t||this.parent.isChildDropOfRecursive(t))},A.prototype.events=function(e,i,n){t.each(t.keys(i),(function(t){var n=i[t];e["withOn"+t](n)})),!0!==n&&this.eventHandlers.push({source:e,events:i})},A.prototype.unsubscribe=function(e,i){t.each(t.keys(i),(function(t){var n=i[t];e["withoutOn"+t](n)}))},A.prototype.descendantOf=function(t){return!!this.parent&&(this.parent.type===t||this.parent.descendantOf(t))},A.prototype.getFirstParentOfType=function(t){if(this.parent)return this.parent.type===t?this.parent:this.parent.getFirstParentOfType(t)},A.prototype.getNestingContext=function(){if(this.parent)return this.parent.nestingContext?this.parent.nestingContext:this.parent.getNestingContext()},A.prototype.applyLayouts=function(){this.data.appliedLayouts&&this.data.appliedLayouts.length>0&&this.$element.addClass("layout-specific").addClass(t.map(this.data.appliedLayouts,(function(t){return"supports-layout-"+t})))},A})),define("drops/chart_v2/Chart_v2Defaults",[],(function(){const t={fontFamily:"Arial",size:14,weight:"normal",color:"rgba(0, 0, 0, 1)"},e={fontFamily:"Arial",size:14,weight:"normal",color:"rgba(255, 255, 255, 1)"},i={left:0,right:0,top:0,bottom:0};return{data:{labelType:"value",backgroundColor:"rgba(255, 255, 255, 0)",chartPadding:i,showXAxis:!1,axisXColor:"rgba(0, 0, 0, 0.1)",axisXWidth:1,showXAxisLabel:!1,axisXLabel:"",axisXLabelFont:t,axisXLabelAlignment:"end",axisXLabelPadding:4,showXAxisTicks:!0,axisXTickColor:"rgba(0, 0, 0, 1)",axisXTickWidth:1,axisXTickLength:8,axisXDashedTick:!1,axisXDashedTickLength:1,axisXDashedTickSpacing:1,showXAxisTickLabels:!0,axisXTickLabelAlignment:"center",axisXTickLabelFont:t,axisXTickLabelPadding:3,axisXTickLabelMirror:!1,axisXLabelAutoSkip:!0,axisXLabelAutoSkipPadding:3,axisXLabelMinRotation:0,axisXLabelMaxRotation:0,showYAxis:!1,axisYColor:"rgba(0, 0, 0, 0.1)",axisYWidth:1,showYAxisLabel:!1,axisYLabel:"",axisYLabelFont:t,axisYLabelAlignment:"end",axisYLabelPadding:4,showYAxisTicks:!0,axisYTickColor:"rgba(0, 0, 0, 1)",axisYTickWidth:1,axisYTickLength:8,axisYDashedTick:!1,axisYDashedTickLength:1,axisYDashedTickSpacing:1,showYAxisTickLabels:!0,axisYTickLabelAlignment:"center",axisYTickLabelFont:t,axisYTickLabelPadding:3,axisYTickLabelMirror:!1,axisYLabelAutoSkip:!0,axisYLabelAutoSkipPadding:3,axisYLabelMinRotation:0,axisYLabelMaxRotation:0,showY2Axis:!1,axisY2Color:"rgba(0, 0, 0, 0.1)",axisY2Width:1,showY2AxisLabel:!1,axisY2Label:"",axisY2LabelFont:t,axisY2LabelAlignment:"end",axisY2LabelPadding:4,showY2AxisTicks:!0,axisY2TickColor:"rgba(0, 0, 0, 1)",axisY2TickWidth:1,axisY2TickLength:8,axisY2DashedTick:!1,axisY2DashedTickLength:1,axisY2DashedTickSpacing:1,showY2AxisTickLabels:!0,axisY2TickLabelAlignment:"center",axisY2TickLabelFont:t,axisY2TickLabelPadding:3,axisY2TickLabelMirror:!1,axisY2LabelAutoSkip:!0,axisY2LabelAutoSkipPadding:3,axisY2LabelMinRotation:0,axisY2LabelMaxRotation:0,showXGrid:!1,gridXColor:"rgba(0, 0, 0, 0.1)",gridXLineWidth:1,gridXDashedLine:!1,gridXDashedLineLength:1,gridXDashedLineSpacing:1,showYGrid:!1,gridYColor:"rgba(0, 0, 0, 0.1)",gridYLineWidth:1,gridYDashedLine:!1,gridYDashedLineLength:1,gridYDashedLineSpacing:1,showTitle:!1,titleText:"",titleFont:t,titleFullSize:!1,titlePosition:"top",titleAlignment:"center",titlePadding:10,showTooltip:!1,tooltipInteractionMode:"nearest",tooltipInteractionIntersect:!0,tooltipInteractionAxis:"x",tooltipInteractionIncludeInvisible:!1,tooltipPosition:"average",tooltipPadding:i,tooltipBoxPadding:1,tooltipCaretPadding:2,tooltipCaretSize:5,tooltipBorderWidth:0,tooltipBorderColor:"rgba(0, 0, 0, 0)",tooltipRoundedCorners:{enabled:!1,leftBottomRadius:6,leftTopRadius:6,rightBottomRadius:6,rightTopRadius:6},tooltipBackgroundColor:"rgba(0, 0, 0, 0.8)",showTooltipTitle:!0,tooltipTitleFont:e,tooltipTitleAlignment:"left",tooltipTitleSpacing:2,tooltipTitleMarginBottom:6,showTooltipBody:!0,tooltipBodyFont:e,tooltipBodyLabelType:"value",tooltipBodyAlignment:"left",tooltipBodySpacing:2,tooltipUsePointStyle:!1,tooltipShowColorBoxes:!0,showLegend:!1,legendPosition:"top",legendAlignment:"center",legendMaxWidth:void 0,legendMaxHeight:void 0,legendDisableClick:!0,legendLabelFont:t,legendItemShowBorder:!1,legendItemBorderColor:"rgba(0, 0, 0, 0.8)",legendItemBorderWidth:1,legendItemBorderRadius:0,legendItemBorderPadding:5,legendLabelBoxWitdh:40,legendLabelBoxHeight:12,legendLabelAlignment:"left",legendLabelPadding:10,legendLabelUsePointStyle:!1,legendLabelBoxRoundedCorners:0,showLegendTitle:!1,legendTitleText:"",legendTitleFont:t,legendTitlePadding:10,legendHideNullSeries:!0,enableZoom:!1,enableZoomWheel:!1,zoomWheelSpeed:.1,zoomWheelModifierKey:"None",enableZoomDrag:!1,zoomDragBacgroundColor:"rgba(225, 225, 225, 0.3)",showScrollbar:!1,scrollbarColor:"rgba(0, 0, 0, 0.1)",scrollbarHeight:15,scrollbarRoundedCorners:0,enableZoomPinch:!1,zoomMode:"x",zoomScaleMode:"x",enablePanning:!1,panningMode:"x",panningModifierKey:"None",showDatalabels:!1,datalabelFont:t,datalabelHideZero:!1,datalabelMinPercentageThreshold:0,datalabelAnchor:"center",datalabelAlignment:"center",datalabelOffset:4,datalabelClamp:!1}}})),define("lq/frontendModules",["lq"],(function(t){"use strict";var e=function(){return 621356004e9+1e4*Date.now()},i=function(t){var e=document.createElement("script");return e.async=!1,e.setAttribute("type","text/javascript"),e.setAttribute("src",t),e},n=!1;return{load:function(a,o){if(!n){var r=i(t.getFrontEndUrl("")+"vendor.bundle.js?bust="+e());document.getElementsByTagName("head")[0].appendChild(r),n=!0}if(o){var s=function(t){var e=document.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href",t),e}(t.getFrontEndUrl("")+a+".bundle.css?bust="+e());document.getElementsByTagName("head")[0].appendChild(s)}return new Promise((n=>{if(window[a])return n(window[a]);var o=i(t.getFrontEndUrl("")+a+".bundle.js?bust="+e());o.onload=function(){n(window[a])},document.getElementsByTagName("head")[0].appendChild(o)}))}}})),define("drops/chart_v2/chart_v2",["jquery","lq/Drop","drops/chart_v2/Chart_v2Defaults","lq/frontendModules"],(function(t,e,i,n){"use strict";var a=function(n){e.call(this,t("<div>"),i,n),this.$canvas=t("<canvas>").appendTo(this.$element)};return e.extend(a),a.typeName="Chart_v2",a.prototype.preRender=function(){var t=this;this.ChartComponent=null,this.piping.visibility.apply(this),this.applyPosition(),n.load("chart",!0).then(this.setChart.bind(this)),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.dataSourceResult=e,t.ChartComponent&&t.setData(e)}))},a.prototype.setChart=function(t){this.ChartComponent=t,this.dataSourceResult&&this.setData(this.dataSourceResult)},a.prototype.setData=function(t){var e={labelType:this.data.labelType,backgroundColor:this.data.backgroundColor,chartPadding:this.data.chartPadding,showXAxis:this.data.showXAxis,axisXColor:this.data.axisXColor,axisXWidth:this.data.axisXWidth,showXAxisLabel:this.data.showXAxisLabel,axisXLabel:this.data.axisXLabel,axisXLabelFont:this.data.axisXLabelFont,axisXLabelAlignment:this.data.axisXLabelAlignment,axisXLabelPadding:this.data.axisXLabelPadding,showXAxisTicks:this.data.showXAxisTicks,axisXTickColor:this.data.axisXTickColor,axisXTickWidth:this.data.axisXTickWidth,axisXTickLength:this.data.axisXTickLength,axisXDashedTick:this.data.axisXDashedTick,axisXDashedTickLength:this.data.axisXDashedTickLength,axisXDashedTickSpacing:this.data.axisXDashedTickSpacing,showXAxisTickLabels:this.data.showXAxisTickLabels,axisXTickLabelAlignment:this.data.axisXTickLabelAlignment,axisXTickLabelFont:this.data.axisXTickLabelFont,axisXTickLabelPadding:this.data.axisXTickLabelPadding,axisXTickLabelMirror:this.data.axisXTickLabelMirror,axisXLabelAutoSkip:this.data.axisXLabelAutoSkip,axisXLabelAutoSkipPadding:this.data.axisXLabelAutoSkipPadding,axisXLabelMinRotation:this.data.axisXLabelMinRotation,axisXLabelMaxRotation:this.data.axisXLabelMaxRotation,showYAxis:this.data.showYAxis,axisYColor:this.data.axisYColor,axisYWidth:this.data.axisYWidth,showYAxisLabel:this.data.showYAxisLabel,axisYLabel:this.data.axisYLabel,axisYLabelFont:this.data.axisYLabelFont,axisYLabelAlignment:this.data.axisYLabelAlignment,axisYLabelPadding:this.data.axisYLabelPadding,showYAxisTicks:this.data.showYAxisTicks,axisYTickColor:this.data.axisYTickColor,axisYTickWidth:this.data.axisYTickWidth,axisYTickLength:this.data.axisYTickLength,axisYDashedTick:this.data.axisYDashedTick,axisYDashedTickLength:this.data.axisYDashedTickLength,axisYDashedTickSpacing:this.data.axisYDashedTickSpacing,showYAxisTickLabels:this.data.showYAxisTickLabels,axisYTickLabelAlignment:this.data.axisYTickLabelAlignment,axisYTickLabelFont:this.data.axisYTickLabelFont,axisYTickLabelPadding:this.data.axisYTickLabelPadding,axisYTickLabelMirror:this.data.axisYTickLabelMirror,axisYLabelAutoSkip:this.data.axisYLabelAutoSkip,axisYLabelAutoSkipPadding:this.data.axisYLabelAutoSkipPadding,axisYLabelMinRotation:this.data.axisYLabelMinRotation,axisYLabelMaxRotation:this.data.axisYLabelMaxRotation,showY2Axis:this.data.showY2Axis,axisY2Color:this.data.axisY2Color,axisY2Width:this.data.axisY2Width,showY2AxisLabel:this.data.showY2AxisLabel,axisY2Label:this.data.axisY2Label,axisY2LabelFont:this.data.axisY2LabelFont,axisY2LabelAlignment:this.data.axisY2LabelAlignment,axisY2LabelPadding:this.data.axisY2LabelPadding,showY2AxisTicks:this.data.showY2AxisTicks,axisY2TickColor:this.data.axisY2TickColor,axisY2TickWidth:this.data.axisY2TickWidth,axisY2TickLength:this.data.axisY2TickLength,axisY2DashedTick:this.data.axisY2DashedTick,axisY2DashedTickLength:this.data.axisY2DashedTickLength,axisY2DashedTickSpacing:this.data.axisY2DashedTickSpacing,showY2AxisTickLabels:this.data.showY2AxisTickLabels,axisY2TickLabelAlignment:this.data.axisY2TickLabelAlignment,axisY2TickLabelFont:this.data.axisY2TickLabelFont,axisY2TickLabelPadding:this.data.axisY2TickLabelPadding,axisY2TickLabelMirror:this.data.axisY2TickLabelMirror,axisY2LabelAutoSkip:this.data.axisY2LabelAutoSkip,axisY2LabelAutoSkipPadding:this.data.axisY2LabelAutoSkipPadding,axisY2LabelMinRotation:this.data.axisY2LabelMinRotation,axisY2LabelMaxRotation:this.data.axisY2LabelMaxRotation,showXGrid:this.data.showXGrid,gridXColor:this.data.gridXColor,gridXLineWidth:this.data.gridXLineWidth,gridXDashedLine:this.data.gridXDashedLine,gridXDashedLineLength:this.data.gridXDashedLineLength,gridXDashedLineSpacing:this.data.gridXDashedLineSpacing,showYGrid:this.data.showYGrid,gridYColor:this.data.gridYColor,gridYLineWidth:this.data.gridYLineWidth,gridYDashedLine:this.data.gridYDashedLine,gridYDashedLineLength:this.data.gridYDashedLineLength,gridYDashedLineSpacing:this.data.gridYDashedLineSpacing,showTitle:this.data.showTitle,titleText:this.data.titleText,titleFont:this.data.titleFont,titleFullSize:this.data.titleFullSize,titlePosition:this.data.titlePosition,titleAlignment:this.data.titleAlignment,titlePadding:this.data.titlePadding,showTooltip:this.data.showTooltip,tooltipInteractionMode:this.data.tooltipInteractionMode,tooltipInteractionIntersect:this.data.tooltipInteractionIntersect,tooltipInteractionAxis:this.data.tooltipInteractionAxis,tooltipInteractionIncludeInvisible:this.data.tooltipInteractionIncludeInvisible,tooltipPosition:this.data.tooltipPosition,tooltipPadding:this.data.tooltipPadding,tooltipBoxPadding:this.data.tooltipBoxPadding,tooltipCaretPadding:this.data.tooltipCaretPadding,tooltipCaretSize:this.data.tooltipCaretSize,tooltipBorderWidth:this.data.tooltipBorderWidth,tooltipBorderColor:this.data.tooltipBorderColor,tooltipRoundedCorners:this.data.tooltipRoundedCorners,tooltipBackgroundColor:this.data.tooltipBackgroundColor,showTooltipTitle:this.data.showTooltipTitle,tooltipTitleFont:this.data.tooltipTitleFont,tooltipTitleAlignment:this.data.tooltipTitleAlignment,tooltipTitleSpacing:this.data.tooltipTitleSpacing,tooltipTitleMarginBottom:this.data.tooltipTitleMarginBottom,showTooltipBody:this.data.showTooltipBody,tooltipBodyFont:this.data.tooltipBodyFont,tooltipBodyLabelType:this.data.tooltipBodyLabelType,tooltipBodyAlignment:this.data.tooltipBodyAlignment,tooltipBodySpacing:this.data.tooltipBodySpacing,tooltipUsePointStyle:this.data.tooltipUsePointStyle,tooltipShowColorBoxes:this.data.tooltipShowColorBoxes,showLegend:this.data.showLegend,legendPosition:this.data.legendPosition,legendAlignment:this.data.legendAlignment,legendMaxWidth:this.data.legendMaxWidth,legendMaxHeight:this.data.legendMaxHeight,legendDisableClick:this.data.legendDisableClick,legendLabelFont:this.data.legendLabelFont,legendItemShowBorder:this.data.legendItemShowBorder,legendItemBorderColor:this.data.legendItemBorderColor,legendItemBorderWidth:this.data.legendItemBorderWidth,legendItemBorderRadius:this.data.legendItemBorderRadius,legendItemBorderPadding:this.data.legendItemBorderPadding,legendLabelBoxWitdh:this.data.legendLabelBoxWitdh,legendLabelBoxHeight:this.data.legendLabelBoxHeight,legendLabelAlignment:this.data.legendLabelAlignment,legendLabelPadding:this.data.legendLabelPadding,legendLabelUsePointStyle:this.data.legendLabelUsePointStyle,legendLabelBoxRoundedCorners:this.data.legendLabelBoxRoundedCorners,showLegendTitle:this.data.showLegendTitle,legendTitleText:this.data.legendTitleText,legendTitleFont:this.data.legendTitleFont,legendTitlePadding:this.data.legendTitlePadding,legendHideNullSeries:this.data.legendHideNullSeries,enableZoom:this.data.enableZoom,enableZoomWheel:this.data.enableZoomWheel,zoomWheelSpeed:this.data.zoomWheelSpeed,zoomWheelModifierKey:this.data.zoomWheelModifierKey,enableZoomDrag:this.data.enableZoomDrag,showScrollbar:this.data.showScrollbar,scrollbarColor:this.data.scrollbarColor,scrollbarHeight:this.data.scrollbarHeight,scrollbarRoundedCorners:this.data.scrollbarRoundedCorners,zoomDragBacgroundColor:this.data.zoomDragBacgroundColor,enableZoomPinch:this.data.enableZoomPinch,zoomMode:this.data.zoomMode,zoomScaleMode:this.data.zoomScaleMode,enablePanning:this.data.enablePanning,panningMode:this.data.panningMode,panningModifierKey:this.data.panningModifierKey,showDatalabels:this.data.showDatalabels,datalabelFont:this.data.datalabelFont,datalabelHideZero:this.data.datalabelHideZero,datalabelMinPercentageThreshold:this.data.datalabelMinPercentageThreshold,datalabelAnchor:this.data.datalabelAnchor,datalabelAlignment:this.data.datalabelAlignment,datalabelOffset:this.data.datalabelOffset,datalabelClamp:this.data.datalabelClamp,emptyText:this.data.emptyText,clickedEvent:this.isEventEnabled("clicked")?this.triggerEventIfEnabled.bind(this):void 0};this.ChartComponent.default(t,this.data.series,e,this.$element.get(0))},a.prototype.afterShown=function(){this.$element.css("display","inherit")},a.prototype.afterHidden=function(){this.$element.css("display","none")},a})),define("drops/circle/circle",["jquery","lq/drop","lq/style","underscore"],(function(t,e,i,n){"use strict";function a(i){e.call(this,t("<div/>"),i),this.styleTheCircle(),this.$element.addClass("boxToBorderSize");var n=t("<div />").css({display:"table-cell",width:this.data.size.x+"px",height:this.data.size.y+"px",textAlign:"center",verticalAlign:"middle"}).appendTo(this.$element);this.$text=t("<div/>").text(this.data.value).appendTo(n),this.setColors(this.data.value)}return e.extend(a),a.typeName="Circle",a.prototype.preRender=function(){this.piping.visibility.apply(this),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.applyPosition()},a.prototype.styleTheCircle=function(){i.renderStyles(this),this.$element.css({borderRadius:"1000px"})},a.prototype.setColors=function(t){var e=this;n.forEach(this.data.colorRanges,(function(i){var n=parseFloat(i.from),a=parseFloat(i.to);n<=t&&t<=a&&e.$element.css({backgroundColor:i.color})}))},a.prototype.clearValue=function(){this.$text.text("0"),this.setColors(0)},a.prototype.setValue=function(t){this.$text.text(t.value),this.setColors(t.value)},a})),define("drops/circleShape/circleShape",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";function n(i){e.call(this,t("<div/>"),i),this.$element.addClass("boxToBorderSize")}return e.extend(n,e),n.typeName="CircleShape",n.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition();var e=this.data.size,i=e.x<e.y?e.x:e.y;this.$circle=t("<div/>").css({width:i+"px",height:i+"px"}),this.renderStyles(),this.$circle.appendTo(this.$element)},n.prototype.renderStyles=function(){i.renderStyles(this,null,this.$circle),this.$circle.css("border-radius","50%")},n})),define("drops/clock/clock",["jquery","lq/drop","lq/style","globalize","lq/util"],(function(t,e,i,n,a){"use strict";var o={data:{format:"HH:mm"}};function r(n){e.call(this,t("<div/>"),o,n);var r=this;r.$timeField=t("<div/>").addClass("drop-text-content").css({display:"flex",flexDirection:"column",flex:"1 1 100%"}).appendTo(r.$element);var s=a.convertListOfKeyValuesToObject(r.data.styles);i.renderStyles(r);s&&s.normal&&s.normal.font&&s.normal.font.size||i.getDefaults().font.size;return r.$element.addClass("boxToBorderSize drop-text-container").css({display:"flex"}),r.update(),r}return e.extend(r,e),r.typeName="Clock",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},r.prototype.update=function(){var t=n.format(new Date,this.data.format);this.$timeField.text(t);var e=this;setTimeout((function(){e.update()}),1e3-(new Date).getTime()%1e3)},r})),function(t){"function"==typeof define&&define.amd?define("jquery.miniColors/jquery.miniColors",["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}((function(t){"use strict";function e(t){var e=t.parent();t.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),e.before(t).remove()}function i(t){var e=t.parent(),i=e.find(".minicolors-panel"),a=t.data("minicolors-settings");!t.data("minicolors-initialized")||t.prop("disabled")||e.hasClass("minicolors-inline")||e.hasClass("minicolors-focus")||(n(),e.addClass("minicolors-focus"),i.animate?i.stop(!0,!0).fadeIn(a.showSpeed,(function(){a.show&&a.show.call(t.get(0))})):(i.show(),a.show&&a.show.call(t.get(0))))}function n(){t(".minicolors-focus").each((function(){var e=t(this),i=e.find(".minicolors-input"),n=e.find(".minicolors-panel"),a=i.data("minicolors-settings");n.animate?n.fadeOut(a.hideSpeed,(function(){a.hide&&a.hide.call(i.get(0)),e.removeClass("minicolors-focus")})):(n.hide(),a.hide&&a.hide.call(i.get(0)),e.removeClass("minicolors-focus"))}))}function a(t,e,i){var n,a,r,s,A,l=t.parents(".minicolors").find(".minicolors-input"),d=l.data("minicolors-settings"),c=t.find("[class$=-picker]"),u=t.offset().left,h=t.offset().top,p=Math.round(e.pageX-u),g=Math.round(e.pageY-h),f=i?d.animationSpeed:0;e.originalEvent.changedTouches&&(p=e.originalEvent.changedTouches[0].pageX-u,g=e.originalEvent.changedTouches[0].pageY-h),p<0&&(p=0),g<0&&(g=0),p>t.width()&&(p=t.width()),g>t.height()&&(g=t.height()),t.parent().is(".minicolors-slider-wheel")&&c.parent().is(".minicolors-grid")&&(n=75-p,a=75-g,r=Math.sqrt(n*n+a*a),(s=Math.atan2(a,n))<0&&(s+=2*Math.PI),r>75&&(r=75,p=75-75*Math.cos(s),g=75-75*Math.sin(s)),p=Math.round(p),g=Math.round(g)),A={top:g+"px"},t.is(".minicolors-grid")&&(A.left=p+"px"),c.animate?c.stop(!0).animate(A,f,d.animationEasing,(function(){o(l,t)})):(c.css(A),o(l,t))}function o(t,e){function i(t,e){var i,n;return t.length&&e?(i=t.offset().left,n=t.offset().top,{x:i-e.offset().left+t.outerWidth()/2,y:n-e.offset().top+t.outerHeight()/2}):null}var n,a,o,s,l,d,c,u=t.val(),p=t.attr("data-opacity"),g=t.parent(),f=t.data("minicolors-settings"),m=g.find(".minicolors-input-swatch"),y=g.find(".minicolors-grid"),w=g.find(".minicolors-slider"),b=g.find(".minicolors-opacity-slider"),B=y.find("[class$=-picker]"),C=w.find("[class$=-picker]"),x=b.find("[class$=-picker]"),D=i(B,y),T=i(C,w),I=i(x,b);if(e.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(f.control){case"wheel":s=y.width()/2-D.x,l=y.height()/2-D.y,d=Math.sqrt(s*s+l*l),(c=Math.atan2(l,s))<0&&(c+=2*Math.PI),d>75&&(d=75,D.x=69-75*Math.cos(c),D.y=69-75*Math.sin(c)),a=h(d/.75,0,100),u=v({h:n=h(180*c/Math.PI,0,360),s:a,b:o=h(100-Math.floor(T.y*(100/w.height())),0,100)}),w.css("backgroundColor",v({h:n,s:a,b:100}));break;case"saturation":u=v({h:n=h(parseInt(D.x*(360/y.width()),10),0,360),s:a=h(100-Math.floor(T.y*(100/w.height())),0,100),b:o=h(100-Math.floor(D.y*(100/y.height())),0,100)}),w.css("backgroundColor",v({h:n,s:100,b:o})),g.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":u=v({h:n=h(parseInt(D.x*(360/y.width()),10),0,360),s:a=h(100-Math.floor(D.y*(100/y.height())),0,100),b:o=h(100-Math.floor(T.y*(100/w.height())),0,100)}),w.css("backgroundColor",v({h:n,s:a,b:100})),g.find(".minicolors-grid-inner").css("opacity",1-o/100);break;default:u=v({h:n=h(360-parseInt(T.y*(360/w.height()),10),0,360),s:a=h(Math.floor(D.x*(100/y.width())),0,100),b:o=h(100-Math.floor(D.y*(100/y.height())),0,100)}),y.css("backgroundColor",v({h:n,s:100,b:100}))}r(t,u,p=f.opacity?parseFloat(1-I.y/b.height()).toFixed(2):1)}else m.find("span").css({backgroundColor:u,opacity:String(p)}),A(t,u,p)}function r(t,e,i){var n,a=t.parent(),o=t.data("minicolors-settings"),r=a.find(".minicolors-input-swatch");o.opacity&&t.attr("data-opacity",i),"rgb"===o.format?(n=p(e)?c(e,!0):y(d(e,!0)),i=""===t.attr("data-opacity")?1:h(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),!isNaN(i)&&o.opacity||(i=1),e=t.minicolors("rgbObject").a<=1&&n&&o.opacity?"rgba("+n.r+", "+n.g+", "+n.b+", "+parseFloat(i)+")":"rgb("+n.r+", "+n.g+", "+n.b+")"):(p(e)&&(e=f(e)),e=l(e,o.letterCase)),t.val(e),r.find("span").css({backgroundColor:e,opacity:String(i)}),A(t,e,i)}function s(e,i){var n,a,o,r,s,m,w,b,B,C,x=e.parent(),D=e.data("minicolors-settings"),T=x.find(".minicolors-input-swatch"),I=x.find(".minicolors-grid"),E=x.find(".minicolors-slider"),S=x.find(".minicolors-opacity-slider"),F=I.find("[class$=-picker]"),k=E.find("[class$=-picker]"),_=S.find("[class$=-picker]");switch(p(e.val())?(n=f(e.val()),(s=h(parseFloat(g(e.val())).toFixed(2),0,1))&&e.attr("data-opacity",s)):n=l(d(e.val(),!0),D.letterCase),n||(n=l(u(D.defaultValue,!0),D.letterCase)),a=function(t){var e=function(t){var e={h:0,s:0,b:0},i=Math.min(t.r,t.g,t.b),n=Math.max(t.r,t.g,t.b),a=n-i;e.b=n,e.s=0!==n?255*a/n:0,0!==e.s?t.r===n?e.h=(t.g-t.b)/a:t.g===n?e.h=2+(t.b-t.r)/a:e.h=4+(t.r-t.g)/a:e.h=-1;e.h*=60,e.h<0&&(e.h+=360);return e.s*=100/255,e.b*=100/255,e}(y(t));0===e.s&&(e.h=360);return e}(n),r=D.keywords?t.map(D.keywords.split(","),(function(t){return t.toLowerCase().trim()})):[],m=""!==e.val()&&t.inArray(e.val().toLowerCase(),r)>-1?l(e.val()):p(e.val())?c(e.val()):n,i||e.val(m),D.opacity&&(o=""===e.attr("data-opacity")?1:h(parseFloat(e.attr("data-opacity")).toFixed(2),0,1),isNaN(o)&&(o=1),e.attr("data-opacity",o),T.find("span").css("opacity",String(o)),b=h(S.height()-S.height()*o,0,S.height()),_.css("top",b+"px")),"transparent"===e.val().toLowerCase()&&T.find("span").css("opacity",String(0)),T.find("span").css("backgroundColor",n),D.control){case"wheel":B=h(Math.ceil(.75*a.s),0,I.height()/2),C=a.h*Math.PI/180,w=h(75-Math.cos(C)*B,0,I.width()),b=h(75-Math.sin(C)*B,0,I.height()),F.css({top:b+"px",left:w+"px"}),b=150-a.b/(100/I.height()),""===n&&(b=0),k.css("top",b+"px"),E.css("backgroundColor",v({h:a.h,s:a.s,b:100}));break;case"saturation":w=h(5*a.h/12,0,150),b=h(I.height()-Math.ceil(a.b/(100/I.height())),0,I.height()),F.css({top:b+"px",left:w+"px"}),b=h(E.height()-a.s*(E.height()/100),0,E.height()),k.css("top",b+"px"),E.css("backgroundColor",v({h:a.h,s:100,b:a.b})),x.find(".minicolors-grid-inner").css("opacity",a.s/100);break;case"brightness":w=h(5*a.h/12,0,150),b=h(I.height()-Math.ceil(a.s/(100/I.height())),0,I.height()),F.css({top:b+"px",left:w+"px"}),b=h(E.height()-a.b*(E.height()/100),0,E.height()),k.css("top",b+"px"),E.css("backgroundColor",v({h:a.h,s:a.s,b:100})),x.find(".minicolors-grid-inner").css("opacity",1-a.b/100);break;default:w=h(Math.ceil(a.s/(100/I.width())),0,I.width()),b=h(I.height()-Math.ceil(a.b/(100/I.height())),0,I.height()),F.css({top:b+"px",left:w+"px"}),b=h(E.height()-a.h/(360/E.height()),0,E.height()),k.css("top",b+"px"),I.css("backgroundColor",v({h:a.h,s:100,b:100}))}e.data("minicolors-initialized")&&A(e,m,o)}function A(t,e,i){var n,a,o,r=t.data("minicolors-settings"),s=t.data("minicolors-lastChange");if(!s||s.value!==e||s.opacity!==i){if(t.data("minicolors-lastChange",{value:e,opacity:i}),r.swatches&&0!==r.swatches.length){for(n=p(e)?c(e,!0):y(e),a=-1,o=0;o<r.swatches.length;++o)if(n.r===r.swatches[o].r&&n.g===r.swatches[o].g&&n.b===r.swatches[o].b&&n.a===r.swatches[o].a){a=o;break}t.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),-1!==a&&t.parent().find(".minicolors-swatches .minicolors-swatch").eq(o).addClass("selected")}r.change&&(r.changeDelay?(clearTimeout(t.data("minicolors-changeTimeout")),t.data("minicolors-changeTimeout",setTimeout((function(){r.change.call(t.get(0),e,i)}),r.changeDelay))):r.change.call(t.get(0),e,i)),t.trigger("change").trigger("input")}}function l(t,e){return"uppercase"===e?t.toUpperCase():t.toLowerCase()}function d(t,e){return(t=t.replace(/^#/g,"")).match(/^[A-F0-9]{3,6}/gi)?3!==t.length&&6!==t.length?"":(3===t.length&&e&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),"#"+t):""}function c(t,e){var i=t.replace(/[^\d,.]/g,"").split(",");return i[0]=h(parseInt(i[0],10),0,255),i[1]=h(parseInt(i[1],10),0,255),i[2]=h(parseInt(i[2],10),0,255),void 0!==i[3]&&(i[3]=h(parseFloat(i[3],10),0,1)),e?void 0!==i[3]?{r:i[0],g:i[1],b:i[2],a:i[3]}:{r:i[0],g:i[1],b:i[2]}:void 0!==i[3]&&i[3]<=1?"rgba("+i[0]+", "+i[1]+", "+i[2]+", "+i[3]+")":"rgb("+i[0]+", "+i[1]+", "+i[2]+")"}function u(t,e){return p(t)?c(t):d(t,e)}function h(t,e,i){return t<e&&(t=e),t>i&&(t=i),t}function p(t){var e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!e||4!==e.length)}function g(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i))&&6===t.length?t[4]:"1"}function f(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}function m(e){var i=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];return t.each(i,(function(t,e){1===e.length&&(i[t]="0"+e)})),"#"+i.join("")}function v(t){return m(function(t){var e={},i=Math.round(t.h),n=Math.round(255*t.s/100),a=Math.round(255*t.b/100);if(0===n)e.r=e.g=e.b=a;else{var o=a,r=(255-n)*a/255,s=i%60*(o-r)/60;360===i&&(i=0),i<60?(e.r=o,e.b=r,e.g=r+s):i<120?(e.g=o,e.b=r,e.r=o-s):i<180?(e.g=o,e.r=r,e.b=r+s):i<240?(e.b=o,e.r=r,e.g=o-s):i<300?(e.b=o,e.g=r,e.r=r+s):i<360?(e.r=o,e.g=r,e.b=o-s):(e.r=0,e.g=0,e.b=0)}return{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b)}}(t))}function y(t){return{r:(t=parseInt(t.indexOf("#")>-1?t.substring(1):t,16))>>16,g:(65280&t)>>8,b:255&t}}t.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom",show:null,showSpeed:100,theme:"default",swatches:[]}},t.extend(t.fn,{minicolors:function(a,o){switch(a){case"destroy":return t(this).each((function(){e(t(this))})),t(this);case"hide":return n(),t(this);case"opacity":return void 0===o?t(this).attr("data-opacity"):(t(this).each((function(){s(t(this).attr("data-opacity",o))})),t(this));case"rgbObject":return function(e){var i,n=t(e).attr("data-opacity");if(p(t(e).val()))i=c(t(e).val(),!0);else{i=y(d(t(e).val(),!0))}if(!i)return null;void 0!==n&&t.extend(i,{a:parseFloat(n)});return i}(t(this));case"rgbString":case"rgbaString":return function(e,i){var n,a=t(e).attr("data-opacity");if(p(t(e).val()))n=c(t(e).val(),!0);else{n=y(d(t(e).val(),!0))}if(!n)return null;void 0===a&&(a=1);return i?"rgba("+n.r+", "+n.g+", "+n.b+", "+parseFloat(a)+")":"rgb("+n.r+", "+n.g+", "+n.b+")"}(t(this),"rgbaString"===a);case"settings":return void 0===o?t(this).data("minicolors-settings"):(t(this).each((function(){var i=t(this).data("minicolors-settings")||{};e(t(this)),t(this).minicolors(t.extend(!0,i,o))})),t(this));case"show":return i(t(this).eq(0)),t(this);case"value":return void 0===o?t(this).val():(t(this).each((function(){"object"==typeof o&&null!==o?(void 0!==o.opacity&&t(this).attr("data-opacity",h(o.opacity,0,1)),o.color&&t(this).val(o.color)):t(this).val(o),s(t(this))})),t(this));default:return"create"!==a&&(o=a),t(this).each((function(){!function(e,i){var n,a,o,r,A,l,u,h=t('<div class="minicolors" />'),g=t.minicolors.defaults;if(e.data("minicolors-initialized"))return;i=t.extend(!0,{},g,i),h.addClass("minicolors-theme-"+i.theme).toggleClass("minicolors-with-opacity",i.opacity),void 0!==i.position&&t.each(i.position.split(" "),(function(){h.addClass("minicolors-position-"+this)}));a="rgb"===i.format?i.opacity?"25":"20":i.keywords?"11":"7";e.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",i).prop("size",a).wrap(h).after('<div class="minicolors-panel minicolors-slider-'+i.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),i.inline||(e.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),e.next(".minicolors-input-swatch").on("click",(function(t){t.preventDefault(),e.trigger("focus")})));if((l=e.parent().find(".minicolors-panel")).on("selectstart",(function(){return!1})).end(),i.swatches&&0!==i.swatches.length)for(l.addClass("minicolors-with-swatches"),o=t('<ul class="minicolors-swatches"></ul>').appendTo(l),u=0;u<i.swatches.length;++u)"object"==typeof i.swatches[u]?(n=i.swatches[u].name,r=i.swatches[u].color):(n="",r=i.swatches[u]),A=r,r=p(r)?c(r,!0):y(d(r,!0)),t('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></li>').attr("title",n).appendTo(o).data("swatch-color",A).find(".minicolors-swatch-color").css({backgroundColor:"transparent"!==A?m(r):"transparent",opacity:String(r.a)}),i.swatches[u]=r;i.inline&&e.parent().addClass("minicolors-inline");s(e,!1),e.data("minicolors-initialized",!0)}(t(this),o)})),t(this)}}}),t([document]).on("mousedown.minicolors touchstart.minicolors",(function(e){t(e.target).parents().add(e.target).hasClass("minicolors")||n()})).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",(function(e){var i=t(this);e.preventDefault(),t(e.delegateTarget).data("minicolors-target",i),a(i,e,!0)})).on("mousemove.minicolors touchmove.minicolors",(function(e){var i=t(e.delegateTarget).data("minicolors-target");i&&a(i,e)})).on("mouseup.minicolors touchend.minicolors",(function(){t(this).removeData("minicolors-target")})).on("click.minicolors",".minicolors-swatches li",(function(e){e.preventDefault();var i=t(this),n=i.parents(".minicolors").find(".minicolors-input"),a=i.data("swatch-color");r(n,a,g(a)),s(n)})).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",(function(e){var n=t(this).parent().find(".minicolors-input");e.preventDefault(),i(n)})).on("focus.minicolors",".minicolors-input",(function(){var e=t(this);e.data("minicolors-initialized")&&i(e)})).on("blur.minicolors",".minicolors-input",(function(){var e,i,n,a,o,r=t(this),s=r.data("minicolors-settings");r.data("minicolors-initialized")&&(e=s.keywords?t.map(s.keywords.split(","),(function(t){return t.toLowerCase().trim()})):[],o=""!==r.val()&&t.inArray(r.val().toLowerCase(),e)>-1?r.val():null===(n=p(r.val())?c(r.val(),!0):(i=d(r.val(),!0))?y(i):null)?s.defaultValue:"rgb"===s.format?s.opacity?c("rgba("+n.r+","+n.g+","+n.b+","+r.attr("data-opacity")+")"):c("rgb("+n.r+","+n.g+","+n.b+")"):m(n),a=s.opacity?r.attr("data-opacity"):1,"transparent"===o.toLowerCase()&&(a=0),r.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",String(a)),r.val(o),""===r.val()&&r.val(u(s.defaultValue,!0)),r.val(l(r.val(),s.letterCase)))})).on("keydown.minicolors",".minicolors-input",(function(e){var i=t(this);if(i.data("minicolors-initialized"))switch(e.which){case 9:n();break;case 13:case 27:n(),i.blur()}})).on("keyup.minicolors",".minicolors-input",(function(){var e=t(this);e.data("minicolors-initialized")&&s(e,!0)})).on("paste.minicolors",".minicolors-input",(function(){var e=t(this);e.data("minicolors-initialized")&&setTimeout((function(){s(e,!0)}),1)}))})),define("drops/colorPicker/colorPicker",["jquery","lq/drop","jquery.miniColors/jquery.miniColors","lq/required"],(function(t,e,i,n){"use strict";var a={data:{behaviour:"popup",format:"hex",required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function o(i){e.call(this,t("<div/>"),a,i),this.$colorPicker=this.createElement().appendTo(this.$element).minicolors("create",this.createData()),this.value=null}return e.extend(o,e),o.typeName="ColorPicker",o.prototype.createElement=function(){return"popup"===this.data.behaviour?t('<input type="hidden" />'):t('<input type="text" />')},o.prototype.createData=function(){var t={change:this.colorChanged.bind(this)};return"inline"===this.data.behaviour&&(t.inline=!0),t},o.prototype.colorChanged=function(t){this.value="hex"===this.data.format?t:this.$colorPicker.minicolors("rgbString"),this.triggerEventIfEnabled("changed",this.value)},o.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this),n.prototype.addRemoveRequiredIndicator(this),this.applyPosition()},o.prototype.postRender=function(){this.updatePosition(),t(".licquid-action-wrapper").on("scroll",_.debounce(this.updatePosition.bind(this),75))},o.prototype.clearValue=function(){this.value="",this.$colorPicker.minicolors("value",{color:null,opacity:1})},o.prototype.setValue=function(t){this.value=t.value,this.$colorPicker.minicolors("value",{color:t.value,opacity:1})},o.prototype.getValue=function(){return this.value},o.prototype.updatePosition=function(){if(!this.$colorPicker||"inline"===this.data.behaviour)return;const e=175;var i="",n=this.$colorPicker.closest(".drop-element").position(),a=this.$colorPicker.closest(".drop-element").offset(),o=a.top-t(window).scrollTop(),r=a.left-t(window).scrollLeft();i=n.top+e>this.rootDrop.$element.height()||o+e>t(window).height()?"top":"bottom",n.left+e>this.rootDrop.$element.width()||r+e>t(window).width()?i+=" right":i+=" left",this.$colorPicker.data("minicolors-settings").position!=i&&this.$colorPicker.minicolors("settings",{position:i})},o})),define("drops/custom/custom",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{style:"border:1px solid black;"}};function a(a){e.call(this,t("<div/>"),n,a),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),this.$customStyledElement=t("<div></div>").appendTo(this.$element),i.renderStyles(this)}return e.extend(a,e),a.typeName="Custom",a.prototype.preRender=function(){this.piping.visibility.apply(this),this.renderStyle(),this.renderDropShadow(),this.applyPosition()},a.prototype.renderStyle=function(){this.$customStyledElement.attr("style","width:100%;height:100%;"+this.data.style)},a.prototype.renderDropShadow=function(){this.data.hasDrop?this.$element.css({boxShadow:this.data.dropSize+"px "+this.data.dropSize+"px "+this.data.dropBlur+"px #888888"}):this.$element.css("boxShadow","none")},a})),define("lq/imageSize",[],(function(){"use strict";var t=function(){return window.devicePixelRatio>=2};return{hasHighPixelRatio:t,forElement:function(e){return t()?{x:2*e.x,y:2*e.y}:{x:e.x,y:e.y}}}})),define("lq/dynamicContentImage",["lq/imageSize","lq"],(function(t,e){var i=["png","jpg","jpeg","gif","tiff","bmp","pdf"];return{getPath:function(n){if(function(t){return 0===t.indexOf("http://")||0===t.indexOf("https://")||0===t.indexOf("//")}(n.imageName))return n.imageName;var a=n.imageName,o=n.useThumbnail,r=n.resizeOption,s=n.thumbnailFileType,A=n.size,l=function(t){return t.substr(t.lastIndexOf(".")+1,t.length-t.lastIndexOf(".")).toLowerCase()}(a);if(function(t){return"svg"===t}(l))return e.getTenantUrl("DynamicContent/File/"+a);if(!function(t){return-1!==i.indexOf(t)}(l)||"pdf"===l&&!o)return e.getTenantUrl("DynamicContent/Icon/"+a);if(o){var d=t.forElement(A);return e.getTenantUrl("DynamicContent/Thumbnail/"+a+"?width="+d.x+"&height="+d.y+"&filetype="+s+"&isMaxSize="+("fillKeepRatio"===r?"false":"true"))}return e.getTenantUrl("DynamicContent/File/"+a)}}})),define("drops/dataGrid/dataGrid",["jquery","lq/drop","lq/style","underscore","lq/util","lq","lq/eventSource","lq/windowSize","lq/dynamicContentImage","lq/tooltip","lq/html"],(function(t,e,i,n,a,o,r,s,A,l,d){"use strict";var c={data:{showNavigationAtTop:!1,showNavigationAtBottom:!0,pageSize:100,page:0,headerHeight:25,rowHeight:25,headerEnabled:!0,selection:"single",defaultSortOutput:null,defaultSortDirection:null,infiniteScroll:!0}},u=function(t,e){var i=e?"url("+e+")":"";t.css("background-image",i)},h={inherit:"flex-start",left:"flex-start",center:"center",right:"flex-end"};function p(i){e.call(this,t("<div/>"),c,i),r.call(this,["PageOpened"]),this.data.columns=n.map(this.data.columns,(function(t){return a.convertListOfKeyValuesToObject(t)})),this.results=null;var o=this;this.$tableHeaders=null,this.$tableRows=null,this.$element.css({visibility:"inherit",overflow:"hidden"}),this.$wrapper=t("<div/>").css({position:"absolute",top:0,right:0,bottom:0,left:0,whiteSpace:"pre-wrap"}).addClass("data-grid-wrapper").appendTo(this.$element),this.$headerWrapper=t("<div/>").addClass("header-wrapper header").appendTo(this.$wrapper),this.updateHeaderStyle(this.$headerWrapper,"header","hoverHeader"),this.$contentWrapper=t("<div/>").addClass("content-wrapper").appendTo(this.$wrapper),this.data.infiniteScroll&&this.subscribeEventHandler(this.$contentWrapper,"scroll",this.loadNextPageIfNeeded.bind(this)),this.$footerWrapper=t("<div/>").addClass("footer-wrapper").appendTo(this.$wrapper),this.page=0,this.currentScrollPosition=0,this.loadedAllData=!1,this.loading=!1,this.loadedPages=1,this.previousData=null,this.conditionalStartStates=[],this.footerData=null,this.sortParameters=[],this.clicksCounter=0,this.data.defaultSortOutput&&this.sortParameters.push({output:this.data.defaultSortOutput,descending:"Descending"===this.data.defaultSortDirection}),this.events(s,{Changed:function(){o.previousData&&o.update(o.previousData)}}),o.updateStyle(this.$element,""),this.update([{initializing:!0}])}return e.extend(p,e),p.typeName="DataGrid",p.prototype.preRender=function(){var t=this;this.piping.visibility.apply(this),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.data.keepScrollPositionOnQueryReload?t.storeScollPosition.apply(t):(t.loadedPages=1,t.currentScrollPosition=0),t.loadedAllData=e.totalResults<t.getPageSize(),t.previousData=e,t.selectedRows=[],t.update(e),t.triggerPageOpened(e.totalResults,t.page,t.getPageSize()),t.loadNextPageIfNeeded()}),this.decorateDataSourceDataForFirstPage.bind(this)),this.piping.datasources.registerDatasourceListener(this.data.footerDataSource,(function(e){t.$footerWrapper.empty().append(t.getFooterRow(e))})),this.formatters=n.map(this.data.columns,(function(e){return t.piping.formatting.createFormatter(e.formatting)})),this.applyPosition()},p.prototype.decorateDataSourceDataForFirstPage=function(t){t.doNotExecuteCountQuery=this.data.infiniteScroll,t.page=0,t.pageSize=this.data.keepScrollPositionOnQueryReload?this.loadedPages*this.getPageSize():this.getPageSize(),t.sortParameters=this.sortParameters},p.prototype.loadNextPageIfNeeded=function(){var t=this;t.$contentWrapper.scrollTop()+t.$contentWrapper.height()>=t.$contentWrapper[0].scrollHeight-30&&(t.loading||t.loadedAllData||(t.storeScollPosition(),t.loadNextPage()))},p.prototype.loadNextPage=function(){this.loadDataForPage(this.loadedPages,!1)},p.prototype.updateColumnWidths=function(){if(this.calculateColumnWidths(),this.data.headerEnabled){var t=this;n.each(this.data.columns,(function(e,i){t.$tableHeaders.children().eq(0).children().eq(i).css("width","Pixels"===e.columnSizeType?e.columnSizeInPixels+"px":e.columnSizeInPercentage+"%")}))}},p.prototype.update=function(e,i){e&&(this.results=e.results);var n=this.data.columns;this.data.headerEnabled?this.$tableHeaders||(this.$headerWrapper.addClass("header-enabled"),this.$tableHeaders=t('<table cellspacing="0" cellpadding="0" />').css({height:this.data.headerHeight+"px"}).addClass("table-header").appendTo(this.$headerWrapper)):this.$headerWrapper.removeClass("header-enabled"),this.data.footerEnabled?this.$footerWrapper.addClass("footer-enabled"):this.$footerWrapper.removeClass("footer-enabled"),setTimeout(this.renderHeadersAndRows.bind(this,e,i,n,this.currentScrollPosition))},p.prototype.renderHeadersAndRows=function(e,i,a,o){if(this.$contentWrapper.empty().css("visibility","hidden"),this.$tableRows=t('<table cellspacing="0" cellpadding="0" />').addClass("table-body").append(t("<tbody/>").addClass("table-body-row")).appendTo(this.$contentWrapper),this.updateColumnWidths(),this.updateItems(e,!1),i&&this.$headerRow&&(this.$headerRow.remove(),delete this.$headerRow),this.data.headerEnabled&&!this.$headerRow){this.$headerRow=t("<thead/>").addClass("table-header-row").appendTo(this.$tableHeaders);var r=this;n.each(a,(function(t){var e=r.getHTMLHeaderElementByType(t);r.$headerRow.append(e),"Static Image"===t.type||"Dynamic Image"===t.type||"Static Text"===t.type||t.disabledColumnSorting||e.on("click",r.sortByColumn.bind(r,t)).attr("class","data-grid-clickable")}))}setTimeout(this.postDataGridRender.bind(this,o))},p.prototype.postDataGridRender=function(t){this.data.headerEnabled&&this.$tableHeaders.css("width",this.$tableRows.outerWidth()+"px"),this.data.footerEnabled&&this.$footerWrapper.children().css("width",this.$tableRows.outerWidth()+"px"),this.updateStyle(this.$footerWrapper,"footer","hoverFooter"),this.updateSelectedRow(this.selectedRowValue),this.restoreScrollPosition(t),this.$contentWrapper.css("visibility","inherit")},p.prototype.updateItems=function(t,e){if(t&&t.results){var i=this.$tableRows.find("tbody");e?(i.find("tr:gt(0)").remove(),i.scrollTop(0),this.results=t.results):this.results=n.union(this.results,t.results),i.append(n.map(t.results,this.createRow.bind(this,this.results,this.results.length-t.results.length,t.outputs))),i.children().eq(0).css("padding","0")}},p.prototype.createRow=function(e,i,a,o,r){var s=t("<tr/>"),A=i+r,l=this;s.append(n.map(this.data.columns,(function(t){var i=l.getHTMLRowElementByType(a,o,t,s,t.textAlignment);if(t.dataGrouping&&A>0){var n="Dynamic Text"===t.type?t.output:t.physicalFile;e[A-1][n]===o[n]&&i.addClass("hidden-content")}return i}))),this.data.backgroundColorArg&&o[this.data.backgroundColorArg]&&s.css("background-color",o[this.data.backgroundColorArg]),this.isEventEnabled("dblClicked")&&this.isEventEnabled("clicked")?s.on("click",(function(t){l.clicksCounter++,1===l.clicksCounter?l.dblClickTimer=setTimeout((function(){l.clicksCounter=0,l.handleSingleClick(o)}),250):(clearTimeout(l.dblClickTimer),l.clicksCounter=0,l.handleDoubleClick(o))})).on("dblclick",(function(t){t.preventDefault()})):l.isEventEnabled("dblClicked")?s.on("dblclick",(function(){l.handleDoubleClick(o)})):l.isEventEnabled("clicked")&&s.on("click",(function(){l.handleSingleClick(o)}));var d=A%2==0?"odd":"even";return this.updateStyle(s,d),s.on("selected",this.showRowAsSelected.bind(this,s)),s.on("deselected",this.showRowAsDeselected.bind(this,s,o,d)),this.isSelected(o[this.data.eventArg])&&s.trigger("selected"),s},p.prototype.handleSingleClick=function(t){this.updateSelectedRow(t[this.data.eventArg]),this.triggerEventIfEnabled("clicked",t[this.data.eventArg])},p.prototype.handleDoubleClick=function(t){this.updateSelectedRow(t[this.data.eventArg]),this.triggerEventIfEnabled("dblClicked",t[this.data.eventArg])},p.prototype.setValue=function(t){this.resetRowSelection(),this.updateSelectedRow(t.value)},p.prototype.getValue=function(){return this.supportsManyToManyData()?this.selectedRows:n.first(this.selectedRows)},p.prototype.supportsManyToManyData=function(){return"multiple"===this.data.selection},p.prototype.clearValue=function(){this.resetRowSelection()},p.prototype.resetRowSelection=function(){this.$tableRows.find("tbody").children(".selectedRow").each((function(e,i){t(i).trigger("deselected")})),this.selectedRows=[]},p.prototype.getIndexOfRowWithId=function(t){for(var e=0;e<this.results.length;e++){var i=this.results[e];if(null!==i&&i[this.data.eventArg]===t)return e}},p.prototype.isSelected=function(t){return!!n.find(this.selectedRows,(function(e){return e===t}))},p.prototype.updateSelectedRow=function(e){if(null!=e){var i=this.$tableRows.find("tbody");t.isArray(e)||(e=[e]),"single"===this.data.selection&&this.resetRowSelection();var a=this;n.each(e,(function(t){var e=a.getIndexOfRowWithId(t);if(void 0!==e){var o=i.children().eq(e);a.isSelected(t)?(a.selectedRows=n.reject(a.selectedRows,(function(e){return e===t})),o.trigger("deselected")):(a.selectedRows.push(t),o.trigger("selected"))}else a.selectedRows.push(t)}))}},p.prototype.showRowAsDeselected=function(t,e,i){this.updateStyle(t,i),t.removeClass("selectedRow"),n.each(this.data.columns,(function(e,i){if("Static Image"===e.type){var n="Always"===e.imageVisibility?o.getTenantUploads(e.physicalFile):"";u(t.children().eq(i).children().eq(0).children().eq(0),n)}})),n.each(this.data.columns,(function(i,n){i.backgroundColor&&t.children().eq(n).css("background-color",e[i.backgroundColor])}))},p.prototype.showRowAsSelected=function(t){this.updateStyle(t,"selectedRow"),t.addClass("selectedRow"),n.each(this.data.columns,(function(e,i){"Static Image"===e.type&&("Always"===e.imageVisibility?e.physicalFileHoverSelected&&u(t.children().eq(i).children().eq(0).children().eq(0),o.getTenantUploads(e.physicalFileHoverSelected)):u(t.children().eq(i).children().eq(0).children().eq(0),o.getTenantUploads(e.physicalFile)))}))},p.prototype.updateHeaderStyle=function(t,e,n){n?i.renderStyles(this,null,t,this.data.styles,e,n):i.renderStyles(this,null,t,this.data.styles,e)},p.prototype.updateStyle=function(t,e,n){null==n?i.renderStyles(this,null,t,this.data.styles,e):i.renderStyles(this,null,t,this.data.styles,e,n)},p.prototype.getPaddingFormat=function(t){return t?t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px":""},p.prototype.storeScollPosition=function(){this.currentScrollPosition=this.$contentWrapper.scrollTop()},p.prototype.restoreScrollPosition=function(t){null!=t?this.$contentWrapper.scrollTop(t):this.$contentWrapper.scrollTop(this.currentScrollPosition)},p.prototype.sortByColumn=function(t){if(t){var e=0!==this.sortParameters.length&&this.sortParameters[0].output===t.output&&!this.sortParameters[0].descending;this.sortParameters=[{output:t.output,descending:e}],this.dispatchQuery()}},p.prototype.dispatchQuery=function(){var t=this;this.piping.queryDispatcher.dispatch(this.data.dataSource,(function(e){t.loadedPages=1,t.currentScrollPosition=0,t.loadedAllData=t.getPageSize()>e.results.length,t.update(e,t),t.previousData=e}),this.decorateDataSourceDataForFirstPage.bind(this))},p.prototype.getHTMLHeaderElementByType=function(e){var i=t("<td/>").css({textAlign:e.textAlignmentHeader,height:this.data.headerHeight+"px"});null!=e.columnSize&&i.css("width","Pixels"===e.columnSizeType?e.columnSizeInPixels+"px":e.columnSizeInPercentage+"%");var n=t("<div />");if(this.data.showSortingInHeader&&!e.disabledColumnSorting){var a=t('<div class="column-sorting" />').append(t('<div class="sorting-ascending" />').text("▲")).append(t('<div class="sorting-descending" />').text("▼"));this.sortParameters.length>0&&this.sortParameters[0].output===e.output&&a.addClass(this.sortParameters[0].descending?"descending":"ascending"),n.append(a)}var o=t('<div class="column-title"/>');return e.applyCustomPaddingForHeader&&e.customPaddingForHeader&&o.css({padding:this.getPaddingFormat(e.customPaddingForHeader)}),n.append(o.append(t("<span>").html(d.sanitize(e.headerVisible?e.headerText:"")))),e.headerEnabled||n.css({visibility:"hidden",backgroundColor:"rgba(0, 0, 0, 0)"}),i.append(t('<div class="table header-content">').append(n))},p.prototype.getFooterRow=function(e){if(0===e.results.length)return t("<div/>");var i=this,a=this.data.columns,o=t('<table cellspacing="0" cellpadding="0" />').css("overflow","hidden").addClass("table-body"),r=t("<tbody>").addClass("table-body-row");r.appendTo(o),this.$footerHeaders=r;var s=e.results[0],A=t("<tr/>");return A.appendTo(r),n.each(a,(function(t){if(e.results.length>0){var n=i.getHTMLRowElementByType(e.outputs,s,t,A,t.textAlignmentFooter,!0);n.css({"white-space":"nowrap",padding:t.applyCustomPaddingForFooter?i.getPaddingFormat(t.customPaddingForFooter):""}),A.append(n)}})),o},p.prototype.getHTMLRowElementByType=function(e,i,a,r,s,c){var h=this,p=t("<td/>").css({overflow:"hidden",whiteSpace:"Single Line"===a.textTrimStyle?"nowrap":"pre-line",verticalAlign:a.verticalAlign||"top"});"Single Line"===a.textTrimStyle&&p.find("div").css({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});var g=0!==Object.keys(a.eventing).length,f=0!==Object.keys(this.data.eventing).length;g||f||p.addClass("no-event");var m=t("<div/>").appendTo(p);(m.css({textAlign:s,padding:this.getPaddingFormat(a.customPadding)}),null!=i[a.queryVisible])&&((C=i[a.queryVisible])||p.addClass("hidden-content"));"Dynamic Height"!==a.textTrimStyle&&-1!==a.type.indexOf("image")||p.css("height",this.data.rowHeight+"px"),a.columnSize&&p.css("width","Pixels"===a.columnSizeType?a.columnSizeInPixels+"px":a.columnSizeInPercentage+"%"),a.backgroundColor&&p.css("background-color",i[a.backgroundColor]),a.tooltip?a.tooltip.option===l.hardcoded&&a.tooltip.hardcodedTooltip?m.attr("title",d.strip(a.tooltip.hardcodedTooltip)):a.tooltip.option===l.query&&m.attr("title",d.strip(i[a.tooltip.datasourceOutput])):h.data.tooltip&&m.attr("title",d.strip(i[h.data.tooltip]));var v=a.type,y=a.output;switch(h.data.footerEnabled&&c&&(v=a.footerType),v){case"Input":var w;switch(a.inputType){case"text":w=t('<input type="text"/>');break;case"checkbox":w=t('<input type="checkbox"/>');break;default:w=t("<div/>")}w.css("width",a.inputWidth+"px").css("height",a.inputHeight+"px"),w.attr("class","inputType"),w.on("click",(function(t){t.stopPropagation()})),m.append(w);break;case"Static Text":c&&(y=a.footerStaticValue),a.eventing&&a.eventing.clicked&&a.eventing.clicked.enabled&&m.on("click",(function(){return h.storeScollPosition(),h.triggerEvent(a.eventing.clicked.raisedEventName,i[h.data.eventArg],m),!1})),null===m.attr("title")&&m.attr("title",d.strip(y));var b=t("<span/>").html(d.sanitize(y));this.applyColumnStyleToElement(b,a),m.append(b);break;case"Dynamic Text":c&&(y=a.footerDynamicValue);var B=e[y],C=h.formatters[n.indexOf(h.data.columns,a)].convertFromLicquidFormat(B,i[y]);if(a.eventing&&a.eventing.clicked&&a.eventing.clicked.enabled&&m.on("click",(function(){return h.storeScollPosition(),h.triggerEvent(a.eventing.clicked.raisedEventName,i[h.data.eventArg],m),!1})),null==m.attr("title")&&m.attr("title",d.strip(C)),C){a.textSuffix&&(C+=a.textSuffix);b=t("<span/>").html(d.sanitize(C));this.applyColumnStyleToElement(b,a),m.append(b)}break;case"Static Image":m.css("padding",this.getPaddingFormat(a.customPadding));var x=this.create$image(a,"");this.addImageToContent(x,m,a),"Always"===a.imageVisibility?(u(x,o.getTenantUploads(a.physicalFile)),a.physicalFileHoverSelected&&(r.on("mouseover",(function(){var t=o.getTenantUploads(a.physicalFileHoverSelected);u(x,t)})),r.on("mouseout",(function(){if(!h.isSelected(i[h.data.eventArg])){var t=o.getTenantUploads(a.physicalFile);u(x,t)}})))):(r.on("mouseout",(function(){"single"!==h.data.selection||h.isSelected(i[h.data.eventArg])||u(x,"")})),r.on("mouseover",(function(){u(x,o.getTenantUploads(a.physicalFile))}))),a.eventing&&a.eventing.clicked&&a.eventing.clicked.enabled&&x.on("click",(function(){return h.storeScollPosition(),h.triggerEvent(a.eventing.clicked.raisedEventName,i[h.data.eventArg],x),!1}));break;case"Dynamic Image":if(m.css("padding",this.getPaddingFormat(a.customPadding)),C=i[a.physicalFile]){"string"!=typeof C&&(C=C.Url);var D=A.getPath({imageName:C,useThumbnail:!0,resizeOption:"fillKeepRatio",thumbnailFileType:"png",size:{x:a.imageWidth,y:a.imageHeight}});x=this.create$image(a,D);this.addImageToContent(x,m,a),a.eventing&&a.eventing.clicked&&a.eventing.clicked.enabled&&x.on("click",(function(){return h.storeScollPosition(),h.triggerEvent(a.eventing.clicked.raisedEventName,i[h.data.eventArg],m),!1}))}break;case"Conditional Image":B=e[y],C=i[y],x=this.create$image(a,o.getTenantUploads(C?a.truePhysicalFile:a.falsePhysicalFile));this.addImageToContent(x,m,a),x.on("click",(function(){return h.toggleConditionalState(C,a,i,x,r),!1}))}return p},p.prototype.addImageToContent=function(t,e,i){e.css({display:"flex",justifyContent:h[i.horizontalAlign]}).append(t)},p.prototype.create$image=function(e,i){var n=t("<div />").css({width:e.imageWidth+"px",height:e.imageHeight+"px","background-image":"url("+i+")"});return"stretch"===e.selectedResizeOption?n.css({"background-size":e.imageWidth+"px "+e.imageHeight+"px","background-position":"left top"}):"fillKeepRatio"===e.selectedResizeOption?n.css({"background-size":"cover","background-position":"center"}):"completeImageKeepRatio"===e.selectedResizeOption&&n.css({"background-size":"contain","background-position":"center"}),n.css({"border-radius":e.imageRoundness+"px",display:"inline-block","background-repeat":"no-repeat"}),n},p.prototype.applyColumnStyleToElement=function(t,e){t.css({"font-weight":e.textBold?"bold":"normal","text-decoration":e.textUnderline?"underline":"","font-style":e.textItalic?"italic":""})},p.prototype.toggleConditionalState=function(t,e,i,a,r){var s=this;e.eventing.clicked&&e.eventing.clicked.enabled&&(s.storeScollPosition(),s.triggerEvent(e.eventing.clicked.raisedEventName,i[s.data.eventArg],a)),e.enableConditionalState&&(!(t=null!=n.find(this.selectedRows,(function(t){return t===i.Id})))||"falseState"!==e.conditionalState&&"opposite"!==e.conditionalState?t||"trueState"!==e.conditionalState&&"opposite"!==e.conditionalState||(e.eventing.checked&&e.eventing.checked.enabled&&(s.storeScollPosition(),s.triggerEvent(e.eventing.checked.raisedEventName,i[s.data.eventArg])),t=!0,s.updateSelectedRow(i.Id)):(e.eventing.unchecked&&e.eventing.unchecked.enabled&&(s.storeScollPosition(),s.triggerEvent(e.eventing.unchecked.raisedEventName,i[s.data.eventArg])),t=!1,s.updateSelectedRow(i.Id))),a.css("background-image","url("+o.getTenantUploads(t?e.truePhysicalFile:e.falsePhysicalFile)+")")},p.prototype.usingScrollBar=function(){return n.reduce(this.$tableRows.find("tbody").children(),(function(e,i){return e+t(i).outerHeight()}),0)>this.$contentWrapper.outerHeight()},p.prototype.calculateColumnWidths=function(){var t=this.data.columns;null==t&&(t=[]),n.each(n.where(t,{columnSizeType:"undefined"}),(function(t){t.columnSizeType="Fractions"}));var e=this.usingScrollBar()?this.$wrapper.find("tr:first").outerWidth():this.$wrapper.outerWidth(),i=n.chain(t).where({columnSizeType:"Pixels"}).reduce((function(t,e){return e.columnSizeInPixels=e.columnSize,t+e.columnSize}),0).value();null==i&&(i=0);var a=100/e*(e-i),o=n.chain(t).where({columnSizeType:"Fractions"}).reduce((function(t,e){return t+e.columnSize}),0).value();n.each(n.where(t,{columnSizeType:"Fractions"}),(function(t){t.columnSizeInPercentage=a/o*t.columnSize})),this.$tableRows.css("overflow-y","auto")},p.prototype.openPage=function(t){this.loadDataForPage(t,!0)},p.prototype.loadDataForPage=function(t,e){if(!this.loading){this.loading=!0;var i=this;this.piping.queryDispatcher.backgroundDispatch(this.data.dataSource,(function(n){i.page=t,i.loadedPages=t+1,i.totalResults=n.totalResults,i.loadedAllData=i.getPageSize()>n.results.length,i.loading=!1,i.updateItems(n,e),i.triggerPageOpened(n.totalResults,i.page,i.getPageSize()),i.loadNextPageIfNeeded()}),(function(e){e.page=t,e.pageSize=i.getPageSize(),e.doNotExecuteCountQuery=i.data.infiniteScroll,e.sortParameters=i.sortParameters}),(function(){i.loading=!1}))}},p.prototype.getPageSize=function(){return this.data.pageSize||c.data.pageSize},p})),define("drops/dateInput/dateInputCustom",["jquery","underscore","require","globalize","lq/style","lq/enum","lq/constants","lq/responsive","lq","lq/zebra/zebra_datepicker","jquery.timepicker","drops/modals"],(function(t,e,i,n,a,o,r,s,A,l,d,c){"use strict";var u=new o("FormatType",["Date","Time"]);function h(e,i){this.drop=e,this.formatter=i,this.inputFocusLostTimeout=null,this.$dateInput=t('<input type="text" />').attr("id",e.rootDrop.instanceId+"_"+e.data.id).addClass("date-picker").css({width:"100%",height:"100%",display:"inline-block"}).attr("tabindex",e.data.tabIndex).attr("placeholder",e.data.watermark).addClass("boxToBorderSize").on("blur",this.onDateInputBlur.bind(this)).on("focus",this.cancelFocusLost.bind(this)).on("click",this.setCurrentDateIfNeeded.bind(this)).appendTo(e.$element),e.data.showTimePicker&&(this.$timeInput=t('<input type="text" />').css({display:"inline-block",position:"absolute",right:0,bottom:0,width:"102px",height:"100%"}).attr("tabindex",-1).appendTo(e.$element)),this.$dateIcon=t('<button class="Zebra_DatePicker_Icon Zebra_DatePicker_Icon_Inside">').css({backgroundPosition:"center",backgroundSize:"contain",backgroundRepeat:"no-repeat",right:this.drop.data.showTimePicker?25:5,top:"0px",display:"inline-block",width:"20px",height:"100%"}),this.$timeButton=t("<span>").css({position:"absolute",border:"none",padding:0,backgroundPosition:"center",backgroundSize:"contain",backgroundRepeat:"no-repeat",right:5,top:"0px",display:"inline-block",width:"20px",height:"100%"}),e.data.readOnly&&this.$dateInput.prop("inert",!0),a.renderStyles(e,null,this.$dateInput)}h.prototype.initialize=function(){this.dateOnlyPhpFormat=this.filterAndConvertDateTimeFormat(this.formatter.dateFormat,u.Date),this.timeOnlyPhpFormat=this.filterAndConvertDateTimeFormat(this.formatter.dateFormat,u.Time),"day"!==this.drop.data.precision&&(this.dateOnlyPhpFormat=this.dateOnlyPhpFormat.replace(/[jdDL]/g,""),"month"!==this.drop.data.precision&&(this.dateOnlyPhpFormat=this.dateOnlyPhpFormat.replace(/[nmMF]/g,""))),this.drop.data.showDatePicker&&this.attachDatePicker(),this.drop.data.showTimePicker&&this.attachTimePicker(),this.drop.data.hasLightBox&&this.createLightBoxOverlay()},h.prototype.cancelFocusLost=function(){null!==this.inputFocusLostTimeout&&clearTimeout(this.inputFocusLostTimeout)};var p={yy:"y",yyyy:"Y",M:"n",MM:"m",MMM:"M",MMMM:"F",d:"j",dd:"d",ddd:"D",dddd:"L"},g={h:"g",H:"G",hh:"h",HH:"H",mm:"i",ss:"s",tt:"A",zzz:"P"};return h.prototype.filterAndConvertDateTimeFormat=function(t,e){var i,n=e===u.Time?g:p;return t.replace(/(.)\1*/g,(function(t){var a=p[t]?u.Date:g[t]?u.Time:void 0,o=(a||i)===e?n[t]||t:"";return i=a||i,o}))},h.prototype.attachDatePicker=function(){var e=this;if(this.attachDateButton(),this.drop.data.readOnly)this.$dateInput.prop("readonly",!0),this.$dateIcon.css({cursor:"default"});else{var i=s.getDeviceType(),n=i===r.deviceTypes.Phone||i===r.deviceTypes.Tablet&&window.matchMedia("(orientation: portrait)").matches;this.$dateInput.Zebra_DatePicker({days:this.formatter.culture.calendar.days.names,days_abbr:this.formatter.culture.calendar.days.namesAbbr,months:this.formatter.culture.calendar.months.names,months_abbr:this.formatter.culture.calendar.months.namesAbbr,show_icon:!1,format:this.dateOnlyPhpFormat,readonly_element:n,zero_pad:!1,show_select_today:this.drop.data.todayLabel,lang_clear_date:this.drop.data.clearLabel,onSelect:function(i,n,a){if("day"!==e.drop.data.precision){var o=e.drop.data.defaultDay,r=e.drop.data.defaultMonth;"parameter"===e.drop.data.defaultMonthSource&&e.drop.data.monthParameter&&(r=e.drop.piping.parameters.locals.getValue(e.drop.data.monthParameter)),"parameter"===e.drop.data.defaultDaySource&&e.drop.data.dayParameter?o=e.drop.piping.parameters.locals.getValue(e.drop.data.dayParameter):"lastday"===e.drop.data.defaultDaySource&&(o=new Date(a.getYear(),"month"===e.drop.data.precision?a.getMonth()+1:r,0).getDate()),"month"!==e.drop.data.precision&&a.setMonth(r-1),a.setDate(o)}a.setHours(0,0,0,0);var s=!0;if(e.drop.data.minDate&&a&&e.minDateFormatted&&a<e.minDateFormatted&&(s=!1,e.drop.triggerEventIfEnabled("minMaxDateNotValid")),e.drop.data.maxDate&&a&&e.maxDateFormatted&&a>e.maxDateFormatted&&(s=!1,e.drop.triggerEventIfEnabled("minMaxDateNotValid")),s){t(".Zebra_DatePicker").on("click",(function(t){t.stopImmediatePropagation()}));var A=e.drop.dateChanged(e.date,a);A&&(e.drop.date=a,e.dateFormatted=i,"day"!==e.drop.data.precision&&e.$dateInput.val(e.formatter.formatDate(a))),e.cancelFocusLost(),e.drop.updateRequiredIndicator(),e.drop.data.showTimePicker&&e.$timeInput.timepicker("show");var l=e.drop.getCurrentDateAsLicquidDate();l&&(e.drop.triggerEventIfEnabled("selected",l),e.drop.triggerEventIfEnabled("dateSelected",l)),A&&(e.drop.triggerEventIfEnabled("changed",l),e.drop.triggerEventIfEnabled("dateChanged",l))}else e.dateUpdated(null)},onClear:function(){null!==e.drop.date&&(e.drop.date=null,e.cancelFocusLost(),e.drop.updateRequiredIndicator(),e.drop.triggerEventIfEnabled("deselected"),e.drop.triggerEventIfEnabled("changed"),e.drop.triggerEventIfEnabled("dateChanged"))},onOpen:function(){if(e.cancelFocusLost(),e.drop.data.hasLightBox&&(e.$lightBoxOverlay||e.createLightBoxOverlay(),e.$lightBoxOverlay.css("display","block")),n){var i=t(".Zebra_DatePicker").css(["width","height","margin-left"]),a=t(".Zebra_DatePicker .dp_body.dp_daypicker").css("height"),o={width:Number(i.width.substring(0,i.width.length-2)),height:Number(i.height.substring(0,i.height.length-2)),bodyHeight:Number(a.substring(0,a.length-2)),margin:Number(i["margin-left"].substring(0,i["margin-left"].length-2))},r=window.innerWidth-2*o.margin,s=r*(o.bodyHeight/o.width),A=0==o.margin?"auto":o.margin+"px";s+o.height-o.bodyHeight>window.innerHeight-150&&(r=(s=window.innerHeight-150-o.height+o.bodyHeight)*(o.width/o.bodyHeight),A=(window.innerWidth-r)/2+"px"),t(".Zebra_DatePicker").css({width:r+"px !important",margin:"0 "+A+" 0 "+A,position:"fixed",top:"auto",bottom:0,zIndex:c.getZIndexForPopups()}),t(".Zebra_DatePicker .dp_body:not([style*=none])").css({height:s+"px !important"}),t(".Zebra_DatePicker .dp_body[style*=none]").css({height:s+"px !important",display:"none"})}else{var l=t(".Zebra_DatePicker").attr("style").split(/;/g);if(l.some((function(t){return t.includes("margin")}))&&l.some((function(t){return t.includes("left")}))&&l.some((function(t){return t.includes("top")}))){var d=l.find((function(t){return t.includes("left")})),u=l.find((function(t){return t.includes("top")}));t(".Zebra_DatePicker").attr("style",d+"; "+u+";"),t(".Zebra_DatePicker .dp_body:not([style*=none])").attr("style",""),t(".Zebra_DatePicker .dp_body[style*=none]").attr("style","display: none;")}t(".Zebra_DatePicker").css("zIndex",c.getZIndexForPopups())}},onClose:function(){e.$lightBoxOverlay&&e.$lightBoxOverlay.css("display","none")}}),this.zebra=this.$dateInput.data("Zebra_DatePicker"),this.drop.data.popupStyleId&&this.zebra.datepicker.addClass("dateinputstyle-"+this.drop.data.popupStyleId),this.$dateIcon.on("click",this.setCurrentDateAndShowDatePicker.bind(this))}},h.prototype.attachTimePicker=function(){var e=this;this.$timeInput.css("visibility","hidden"),this.attachTimeButton(),this.drop.data.readOnly||(this.$timeButton.css({cursor:"pointer"}).on("click",(function(){e.$timeInput.timepicker("show")})),this.$timeInput.timepicker({timeFormat:this.timeOnlyPhpFormat,step:this.drop.data.timeInputStep,useSelect:!1,noneOption:!1}),this.$timeInput.on("change",(function(){var t=e.$timeInput.timepicker("getTime",e.drop.date);e.dateUpdated(t),e.$timeInput.timepicker("hide")})).on("showTimepicker",(function(){t(this).data("timepicker-list").css("zIndex",c.getZIndexForPopups()),e.cancelFocusLost()})).on("hideTimepicker",(function(){var t=e.drop.getCurrentDateAsLicquidDate();e.$dateInput.val(e.formatter.convertFromLicquidFormat(r.valueTypes.dateTime,t))})))},h.prototype.attachTimeButton=function(){this.$timeButton.appendTo(this.drop.$element),this.changeTimePickerIcon()},h.prototype.attachDateButton=function(){this.$dateIcon.appendTo(this.drop.$element),this.changeDatePickerIcon()},h.prototype.onDateInputBlur=function(){this.drop.updateRequiredIndicator(),this.handleFocusLost()},h.prototype.handleFocusLost=function(){this.cancelFocusLost();var t=this.$dateInput.val();if(this.dateFormatted!==t){var e=n.parseDate(t,this.formatter.dateFormat);e||(e=n.parseDate(t.replace(/\D/g,""),this.formatter.looseDateFormat)),this.drop.date&&!this.drop.data.showDatePicker&&this.drop.data.showTimePicker&&(e?(e.setFullYear(this.drop.date.getFullYear()),e.setMonth(this.drop.date.getMonth()),e.setDate(this.drop.date.getDate())):e=new Date(this.drop.date)),this.dateUpdated(e)}},h.prototype.dateUpdated=function(e){this.drop.updateDate(e);var i=this;this.inputFocusLostTimeout=setTimeout((function(){i.drop.isEventEnabled("focusLost")&&(!i.zebra.datepicker.hasClass("dp_hidden")||t(".ui-timepicker-wrapper:visible").length||i.$dateInput.is(":focus")||i.drop.triggerEvent(i.drop.data.eventing.focusLost.raisedEventName)),i.inputFocusLostTimeout=null}),100)},h.prototype.afterDateUpdatedSuccesfully=function(t){this.dateFormatted=this.formatter.formatDate(t),this.$dateInput.val(this.dateFormatted),this.drop.data.showTimePicker&&this.$timeInput.timepicker("setTime",t)},h.prototype.focus=function(){this.$dateInput.trigger("focus")},h.prototype.clearValue=function(){this.dateFormatted=null,this.$dateInput.val(null),this.drop.data.showTimePicker&&this.$timeInput.timepicker("setTime",null)},h.prototype.setValue=function(t){this.dateFormatted=this.formatter.formatDate(t),this.$dateInput.val(this.dateFormatted),this.drop.data.showTimePicker&&this.$timeInput.timepicker("setTime",t)},h.prototype.getDatePickerImagePath=function(){return this.drop.data.physicalFileDatePicker&&this.drop.data.useCustomIconDatePicker?A.getTenantUploads(this.drop.data.physicalFileDatePicker):this.drop.data.cdnPath?A.getCdnUrl(this.drop.data.cdnPath):null},h.prototype.getTimePickerImagePath=function(){return this.drop.data.physicalFileTimePicker&&this.drop.data.useCustomIconTimePicker?A.getTenantUploads(this.drop.data.physicalFileTimePicker):this.drop.data.cdnPath?A.getCdnUrl(this.drop.data.cdnPath):null},h.prototype.changeDatePickerIcon=function(){var t=this.getDatePickerImagePath();t&&this.drop.data.useCustomIconDatePicker?this.setImageDatePicker(t):this.setImageDatePicker(!1)},h.prototype.changeTimePickerIcon=function(){var t=this.getTimePickerImagePath();t&&this.drop.data.useCustomIconTimePicker&&this.$timeButton?this.setImageTimePicker(t):this.setImageTimePicker(!1)},h.prototype.setImageTimePicker=function(t){t?this.$timeButton.css({backgroundImage:"url("+i.toUrl(t)+")"}):this.$timeButton.css("background-image","")},h.prototype.setImageDatePicker=function(t){t?this.$dateIcon.css({backgroundImage:"url("+i.toUrl(t)+")"}):this.$dateIcon.css("background-image","")},h.prototype.setCurrentDateIfNeeded=function(){if(this.drop.data.dateParameterWhenOpening){var t=this.drop.piping.parameters.locals.getValue(this.drop.data.dateParameterWhenOpening);if(t){var e=this.formatter.parseLicquidDate(t);this.zebra.update({current_date:e})}}},h.prototype.setCurrentDateAndShowDatePicker=function(){this.setCurrentDateIfNeeded(),this.zebra.show()},h.prototype.createLightBoxOverlay=function(){this.$lightBoxOverlay=t("<div />").css({position:"fixed",top:0,left:0,width:"100%",height:"100%","background-color":this.drop.data.hasLightBox?this.drop.data.lightBoxColor:"rgba(0, 0, 0, 0)",opacity:this.drop.data.lightBoxOpacity/100,"z-index":9999,display:"none"}),this.drop.data.toBrowser?this.$lightBoxOverlay.appendTo(this.drop.piping.$actionWrapper):this.$lightBoxOverlay.appendTo(this.drop.rootDrop.$element),this.$lightBoxOverlay.appendTo(this.drop.$element)},h})),define("drops/dateInput/dateInputNative",["jquery","underscore","lq/style"],(function(t,e,i){"use strict";function n(e){this.drop=e;var n=this;this.$dateInput=t("<input>").attr("type",this.drop.data.showTimePicker?"datetime-local":"date").css({width:"100%",height:"100%",display:"inline-block",whiteSpace:"normal"}).attr("id",e.rootDrop.instanceId+"_"+e.data.id).addClass("date-picker").attr("tabindex",this.drop.data.tabIndex).attr("placeholder",this.drop.data.watermark).addClass("boxToBorderSize").attr("min",this.drop.data.minDate).attr("max",this.drop.data.maxDate).on("blur",(function(){e.triggerEventIfEnabled("focusLost")})).on("change",(function(){var t=new Date(this.value);n.drop.updateDate(t)})).appendTo(this.drop.$element),this.drop.data.readOnly&&this.$dateInput.prop("inert",!0),i.renderStyles(e,null,this.$dateInput)}return n.prototype.initialize=t.noop,n.prototype.afterDateUpdatedSuccesfully=t.noop,n.prototype.focus=function(){this.$dateInput.trigger("focus")},n.prototype.clearValue=function(){this.$dateInput.val(null)},n.prototype.setValue=function(t){var e=new Date(t.getTime()-60*t.getTimezoneOffset()*1e3).toISOString(),i=this.drop.data.showTimePicker?e.substr(0,19):e.substr(0,10);this.$dateInput.val(i)},n})),define("drops/dateInput/dateInput",["jquery","underscore","globalize","lq/drop","lq/constants","lq/responsive","lq/util","lq","./dateInputCustom","./dateInputNative","lq/required"],(function(t,e,i,n,a,o,r,s,A,l,d){"use strict";var c={data:{showDatePicker:!0,showTimePicker:!1,todayLabel:"Today",clearLabel:"Clear",timeInputStep:30,lightBoxOpacity:100,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},precision:"day",defaultMonth:1,defaultDay:1,defaultDaySource:"hardcoded",defaultMonthSource:"hardcoded"}};function u(e){n.call(this,t("<div/>"),c,e),this.data.eventing=r.convertListOfKeyValuesToObject(this.data.eventing)||{},this.date=null,this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),this.minDateFormatted=i.parseDate(this.data.minDate,this.minMaxDateFormat),this.maxDateFormatted=i.parseDate(this.data.maxDate,this.minMaxDateFormat)}return n.extend(u,n),u.typeName="DateInput",u.prototype.minMaxDateFormat="yyyy-MM-dd",u.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this),d.prototype.addRemoveRequiredIndicator(this),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.input=this.shouldShowCustomInput()?new A(this,this.formatter):new l(this),this.input.initialize(),this.applyPosition()},u.prototype.shouldShowCustomInput=function(){var t=this.rootDrop.options.dateInputBehaviour;return 0===t||1===t&&!o.isPhoneDevice()},u.prototype.focus=function(){this.input.focus()},u.prototype.getValue=function(){return this.getCurrentDateAsLicquidDate()},u.prototype.clearValue=function(){this.date=null,this.input.clearValue(),this.updateRequiredIndicator()},u.prototype.setValue=function(t){t.value?(this.date=i.parseDate(t.value,a.licquidDateFormat),this.data.showTimePicker||this.date.setHours(0,0,0,0),this.input.setValue(this.date)):(this.date=null,this.input.clearValue()),this.updateRequiredIndicator()},u.prototype.dateChanged=function(t,e){return t&&e?t.getYear()!==e.getYear()||t.getMonth()!==e.getMonth()||t.getDate()!==e.getDate():t!==e},u.prototype.timeChanged=function(t,e){return t&&e?t.getHours()!==e.getHours()||t.getMinutes()!==e.getMinutes()||t.getSeconds()!==e.getSeconds():t!==e},u.prototype.updateDate=function(t){var e=null;if(t&&(e=new Date(t),this.data.showTimePicker&&e.setHours(0,0,0,0)),this.data.minDate&&e&&this.minDateFormatted&&e<this.minDateFormatted&&(t=null,this.triggerEventIfEnabled("minMaxDateNotValid")),this.data.maxDate&&e&&this.maxDateFormatted&&e>this.maxDateFormatted&&(t=null,this.triggerEventIfEnabled("minMaxDateNotValid")),t){var i=this.timeChanged(this.date,t),n=this.dateChanged(this.date,t);this.date=t,this.input.afterDateUpdatedSuccesfully(t);var a=this.formatter.formatLicquidDate(t);(i||n)&&(this.triggerEventIfEnabled("selected",a),this.triggerEventIfEnabled("changed",a)),i&&(this.triggerEventIfEnabled("timeSelected",a),this.triggerEventIfEnabled("timeChanged",a)),n&&(this.triggerEventIfEnabled("dateSelected",a),this.triggerEventIfEnabled("dateChanged",a))}else{var o=!!this.date;this.date=null,this.input.clearValue(),o&&(this.triggerEventIfEnabled("deselected"),this.triggerEventIfEnabled("changed"),this.triggerEventIfEnabled("timeChanged"),this.triggerEventIfEnabled("dateChanged"))}this.updateRequiredIndicator()},u.prototype.getCurrentDateAsLicquidDate=function(){return this.date?this.formatter.formatLicquidDate(this.date):null},u.prototype.setPlaceholder=function(t){this.input?.$dateInput?.attr("placeholder",t)},u})),define("drops/documentView/documentView",["jquery","lq/drop","lq/style","lq/util","lq/imageSize","lq"],(function(t,e,i,n,a,o){"use strict";function r(n){e.call(this,t("<div/>"),n);var a=this;return a.$element.css({whiteSpace:"pre-wrap"}),i.renderStyles(a),a.$element.height(a.data.size.y).width(a.data.size.x),a.$a=t("<a/>").css({display:"inline-block"}).height(a.data.size.y).width(a.data.size.x).appendTo(a.$element),a.$span=t("<span/>").css({height:a.data.size.y+"px"}).appendTo(a.$a),a.$img=t("<img/>").css({verticalAlign:"middle"}).height(a.data.iconSize).width(a.data.iconSize).appendTo(a.$span),a.data.downloadText&&(a.$spanDownloadText=t("<span/>").css({display:"inline-block",verticalAlign:"middle",paddingLeft:"4px"}).text(a.data.downloadText).appendTo(a.$span)),a.data.showIcon||(a.$img.hide(),a.data.downloadText&&a.$spanDownloadText.css({paddingLeft:"0px"})),a.hide(),a}return e.extend(r,e),r.typeName="DocumentView",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},r.prototype.clearValue=function(){},r.prototype.setValue=function(e){var i,r=n.convertListOfKeyValuesToObject(e.value),s=this,A="";if(r){if("string"===t.type(r)?i=r:(i=r.url||r.Url,A=r.filename||r.Filename),i){s.$a.show(),A&&(A="&filename="+A);var l="";"currentTab"!==s.data.behaviour&&"newTab"!==s.data.behaviour||(l="&openInBrowser=true"),s.$a.attr("href",o.getTenantUrl("DynamicContent/DownloadFile?url="+i+A+l));var d=a.forElement(s.data.size),c=o.getTenantUrl("DynamicContent/Thumbnail/"+i+"?width="+d.x+"&height="+d.y+"&filetype=png&isMaxSize=true");s.$img.attr("src",c),s.$a.on("click",(function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}))}else s.$a.hide();s.show()}},r})),define("drops/dropdown/dropdown",["jquery","lq/drop","lq/style","lq/util","underscore","lq/tooltip","lq/html","lq/required"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{showEmptyItem:!0,title:{option:o.hardcoded},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function l(a){e.call(this,t("<div/>"),A,a),this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.loaded=!1,this.value=null,this.valueIsNumber=!1,this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"});var r=this;this.$dropDown=t("<select />").css({width:"100%",height:"100%",textOverflow:"ellipsis"}).on("change",this.valueChanged.bind(this)).attr("tabindex",r.data.tabIndex).appendTo(r.$element),this.data.showEmptyItem&&this.$dropDown.addClass("dropdown-placeholder"),i.renderStyles(this,null,this.$dropDown),this.data.readOnly&&this.$dropDown.prop("disabled",!0),this.$dropDown.on("change",(function(){if(r.$dropDown.val()){var t=r.$dropDown.val();r.triggerEventIfEnabled("selected",t),r.triggerEventIfEnabled("changed",t)}else r.triggerEventIfEnabled("deselected",null),r.triggerEventIfEnabled("changed",null)})),this.$dropDown.on("change",(function(){r.updateRequiredIndicator()})),this.tooltip=new o(this,this.data.title,this.$dropDown)}return e.extend(l,e),l.typeName="Dropdown",l.prototype.preRender=function(){var t=this;this.tooltip.update(),this.piping.visibility.apply(this),this.piping.required.apply(this,(function(e){e&&t.defaultOption?t.defaultOption.css({display:"none"}):t.defaultOption?t.defaultOption.css({display:""}):t.requiredInitialState=e})),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t._update(e)}),(function(e){t.data.pageSize&&(e.pageSize=t.data.pageSize)})),s.prototype.addRemoveRequiredIndicator(t),this.applyPosition(),this.renderMockData()},l.prototype.postRender=function(){this.$dropDown.css("padding-right","max(23px, "+this.$dropDown.css("padding-right")+")")},l.prototype.valueChanged=function(){var t=this.$dropDown.val();""===t?(this.value=null,this.$dropDown.addClass("dropdown-placeholder")):(this.value=t,this.$dropDown.removeClass("dropdown-placeholder"))},l.prototype.createEmptyItem=function(){return this.defaultOption=t("<option />").val("").text(this.data.emptyItemText||"...").addClass("dropdown-placeholder"),this.requiredInitialState&&this.defaultOption.css({display:"none"}),this.defaultOption},l.prototype.renderMockData=function(){this.data.showEmptyItem&&this.$dropDown.append(this.createEmptyItem()),this.data.mockData&&this.$dropDown.append(a.map(this.data.mockData.split("\n"),(function(e){return t("<option />",{value:e,text:e})})))},l.prototype._update=function(e){this.loaded=!0,this.$dropDown.find("option").remove().end(),this.data.showEmptyItem&&this.$dropDown.append(this.createEmptyItem());var n=this;t.each(e.results,(function(e,a){var o=a[n.data.selectedKeyColumn||"Id"];n.valueIsNumber="number"==typeof o;var s=t("<option />",{value:o,text:r.strip(n.getDisplayStringFromResult(a))});i.renderStyles(n,null,s),s.appendTo(n.$dropDown)})),this.value?this.setValue({value:this.value}):this.selectFirstItem()},l.prototype.getDisplayStringFromResult=function(t){return t[this.getNameOfDisplayedColumn(t)]},l.prototype.getNameOfDisplayedColumn=function(t){var e=Object.keys(t);return 1===e.length?e[0]:-1!==e.indexOf(this.data.selectedColumnToShow)?this.data.selectedColumnToShow:"ID"!==e[0].toUpperCase()?e[0]:e[1]},l.prototype.focus=function(){this.$dropDown.trigger("focus")},l.prototype.getValue=function(){return this.valueIsNumber&&null!==this.value?parseInt(this.value):void 0===this.value?null:this.value},l.prototype.clearValue=function(){if(this.data.showEmptyItem){this.value=null;var t=this;setTimeout((function(){t.$dropDown.val("")}))}else this.selectFirstItem();this.updateRequiredIndicator()},l.prototype.selectFirstItem=function(){var t=this.$dropDown.find("option:first");this.$dropDown.val(t.val()),this.valueChanged()},l.prototype.setValue=function(t){if(this.loaded)if(null!==t.value&&void 0!==t.value)if(a.find(this.$dropDown.children(),(function(e){return e.value===t.value.toString()}))){this.value=t.value;var e=this;""===this.value?this.$dropDown.addClass("dropdown-placeholder"):this.$dropDown.removeClass("dropdown-placeholder"),setTimeout((function(){e.$dropDown.val(t.value.toString()),e.updateRequiredIndicator()}))}else this.triggerEventIfEnabled("valueNotFound",t.value),this.isEventEnabled("valueNotFound")||alert("A value was mapped onto a drop down list, but the corresponding item was not found in the list. Saving this form will cause you to lose this information."),this.clearValue();else this.clearValue();else this.value=t.value;this.updateRequiredIndicator()},l})),define("drops/dropField/dropField",["jquery","lq/drop","lq/style","underscore"],(function(t,e,i,n){"use strict";var a="fileDropped";function o(n){e.call(this,t("<div />"),null,n),i.renderStyles(this,null,this.$element)}return e.extend(o,e),o.typeName="DropField",o.prototype.preRender=function(){this.applyPosition(),this.preventDefaultEventHandlers(),this.isEventEnabled(a)&&this.addDropEventHandler()},o.prototype.preventDefaultEventHandlers=function(){this.$element.on("dragover",(function(t){t.preventDefault(),t.stopPropagation()})),this.$element.on("dragenter",(function(t){t.preventDefault(),t.stopPropagation()})),this.$element.on("dragleave",(function(t){t.preventDefault(),t.stopPropagation()}))},o.prototype.addDropEventHandler=function(){var t=this;this.$element.on("drop",(function(e){e.originalEvent.dataTransfer&&e.originalEvent.dataTransfer.files.length&&(e.preventDefault(),e.stopPropagation(),n.each(e.originalEvent.dataTransfer.files,(function(e){t.triggerEvent(t.data.eventing[a].raisedEventName,e)})))}))},o})),define("drops/dynamicBarcode/dynamicBarcode",["jquery","lq/drop","lq/util","lq"],(function(t,e,i,n){"use strict";var a={data:{code:"12345678955"}};function o(i){return e.call(this,t("<div />"),a,i),this.$element.addClass("boxToBorderSize").css({"background-repeat":"no-repeat","background-size":"100% 100%"}),this}return e.extend(o,e),o.typeName="DynamicBarcode",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},o.prototype.generate=function(t){this.$element.css("background-image","url("+t+")")},o.prototype.clearValue=function(){this.$image.empty()},o.prototype.setValue=function(t){var e=i.convertListOfKeyValuesToObject(t.value);e?(this.data.code=e,this.generate(this.getImageUrl())):this.clearValue()},o.prototype.getImageUrl=function(){return n.getTenantUrl("GeneratedContent/DynamicBarcode/?actionId="+this.rootDrop.data.id+"&barcodeId="+this.data.id+"&code="+this.data.code+"&barcodeType="+this.data.barcodeType+"&width="+this.data.size.x+"&height="+this.data.size.y)},o})),define("drops/dynamicIframe/dynamicIframe",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{scrolling:"auto",eventsToCatch:[]}};function a(a){e.call(this,t("<div/>"),n,a);var o=this;return o.$iframe=t("<iframe />").attr("allow",o.getAllowedFeatures()).attr("scrolling",o.data.scrolling).css({width:"100%",height:"100%",border:0}).appendTo(o.$element),o.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),i.renderStyles(o),this.listenForMessage((function(t){var e=t.args?t.args[0]:null;o.triggerEvent(o.data.id+"."+t.eventName,e)})),o}return e.extend(a,e),a.typeName="DynamicIframe",a.prototype.getAllowedFeatures=function(){var t=[];return this.data.allowCamera&&t.push("camera"),this.data.allowMicrophone&&t.push("microphone"),t.join(";")},a.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},a.prototype.clearValue=function(){this.$element.hide()},a.prototype.setValue=function(t){this.$iframe.attr("src",t.value),null===t.value||void 0===t.value||""===t.value?this.$iframe.hide():this.$iframe.show()},a.prototype.getValue=function(){return this.$iframe?this.$iframe.attr("src"):null},a.prototype.listenForMessage=function(t){var e=window.addEventListener?"addEventListener":"attachEvent",i=window.addEventListener?"message":"onmessage",n=this;window[e](i,(function(e){if(e.source===n.$iframe.get(0).contentWindow)try{var i=JSON.parse(e.data);t(i)}catch(t){}}),!1)},a.prototype.triggerEventForChild=function(t){this.$iframe.get(0).contentWindow.postMessage(JSON.stringify(t),"*")},a.prototype.show=function(){this.$iframe.css("display","inherit"),e.prototype.show.call(this)},a.prototype.hide=function(){this.$iframe.attr("src","").css("display","none"),e.prototype.hide.call(this)},a})),define("drops/dynamicImage/dynamicImage",["jquery","lq/drop","lq/style","lq/util","lq/tooltip","lq/dynamicContentImage","lq","lq/imageSize","lq/onlongpress"],(function(t,e,i,n,a,o,r,s,A){"use strict";var l={data:{horizontalImageAlignment:"center",verticalImageAlignment:"center",thumbnailFileType:"png",selectedResizeOption:"Stretch Image",title:{option:a.hardcoded},notOptimise:!1,optimisationLevel:0}};function d(o){e.call(this,t("<div />"),l,o),this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing)||{},this.$image=t("<div />").css({width:"100%",height:"100%",overflow:"hidden"}).appendTo(this.$element),this.$element.addClass("boxToBorderSize"),i.renderStyles(this,null,this.$image),this.tooltip=new a(this,this.data.title,this.$image),this.hideWhenNecessary(),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave")}return e.extend(d,e),d.typeName="DynamicImage",d.prototype.onResizeOptions=[{key:"Stretch Image",value:"Stretch Image"},{key:"No-Resize",value:"No-Resize"},{key:"Keep Ratio, Show Complete Image",value:"Keep Ratio, Show Complete Image"},{key:"fillKeepRatio",value:"Fill, keep ratio"}],d.prototype.horizontalAlignmentOptions=[{key:"left",value:"Left"},{key:"center",value:"Center"},{key:"right",value:"Right"}],d.prototype.verticalAlignmentOptions=[{key:"top",value:"Top"},{key:"center",value:"Center"},{key:"bottom",value:"Bottom"}],d.prototype.thumbnailFileTypes=[{key:"png",value:"PNG (lossless)"},{key:"jpeg100",value:"JPEG - highest quality"},{key:"jpeg75",value:"JPEG - medium quality"},{key:"jpeg50",value:"JPEG - low quality"},{key:"jpeg25",value:"JPEG - very low quality"},{key:"jpeg10",value:"JPEG - extreme low quality"},{key:"jpeg0",value:"JPEG - max compression"}],d.prototype.preRender=function(){this.tooltip.update(),this.piping.visibility.apply(this),this.initialize(),this.setImageScaling(),this.applyPosition()},d.prototype.initialize=function(){(new A).applyLongPressOnElement(this.$element,this),this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled&&this.$element.addClass("clickable")},d.prototype.setImageScaling=function(){"Stretch Image"===this.data.selectedResizeOption?this.$image.css("background-size","100% 100%"):"Keep Ratio, Show Complete Image"===this.data.selectedResizeOption?this.$image.css({"background-size":"contain","background-repeat":"no-repeat","background-position":this.data.horizontalImageAlignment+" "+this.data.verticalImageAlignment}):"No-Resize"===this.data.selectedResizeOption?this.$image.css({"background-size":this.data.useThumbnail&&s.hasHighPixelRatio()?"contain":"auto","background-repeat":"no-repeat"}):"fillKeepRatio"===this.data.selectedResizeOption&&this.$image.css({"background-size":"cover","background-repeat":"no-repeat","background-position":this.data.horizontalImageAlignment+" "+this.data.verticalImageAlignment})},d.prototype.clearValue=function(){this.$image.css("background-image",""),this.hideWhenNecessary()},d.prototype.hideWhenNecessary=function(){this.data.hideWhenEmpty&&this.hide()},d.prototype.setValue=function(e){var i=n.convertListOfKeyValuesToObject(e.value);if(i)if("string"===t.type(i)){if(i.match(/data:image\/[^;]+;base64[^"]+/g))this.updateImage('"'+i+'"',"");else{var a=this.getPathFromSrcString(i);this.updateImage(a,"")}}else{var o=e.value.url||e.value.Url;if(o){var r=this.getPathFromSrcString(o);r?this.updateImage(r,e.value.filename||e.value.Filename):this.clearValue()}}else this.clearValue()},d.prototype.updateImage=function(t,e){this.$image.css("background-image","url("+t+")").attr("alt",e),this.data.hideWhenEmpty&&this.show()},d.prototype.getPathFromSrcString=function(t){return o.getPath({imageName:t,useThumbnail:this.data.useThumbnail,resizeOption:this.data.selectedResizeOption,thumbnailFileType:this.data.thumbnailFileType,size:this.data.size})},d})),define("drops/dynamicSlideshow/dynamicSlideshow",["jquery","lq/drop","lq/style","lq/util","lq/imageSize","lq","underscore","lq/required"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}},l="next",d="previous",c="none";function u(a){e.call(this,t("<div/>"),A,a),this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing)||{},this.inTransition=!1,this.transitionsQueue=[],this.results=null,this.currentIndex=null,this.deferredUpdate=null,this.$element.addClass("boxToBorderSize dynamic-slideshow"),this.$imageWrapper=t('<div class="dynamic-slideshow-image" />').appendTo(this.$element),this._addPanels(),i.renderStyles(this)}return e.extend(u,e),u.typeName="DynamicSlideshow",u.prototype.preRender=function(){var t=this;this.piping.visibility.apply(this),this.piping.required.apply(this),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e)})),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.applyPosition()},u.prototype.startAutoSlide=function(){this.data.autoTransition&&(this.cancelAutoSlide(),this.autoTransitionTimer=r.delay(this._next.bind(this,this),1e3*this.data.transitionDelay))},u.prototype.cancelAutoSlide=function(){this.data.autoTransition&&clearTimeout(this.autoTransitionTimer)},u.prototype.update=function(t){this.cancelAutoSlide();var e=this.results;if(this.results=t.results,this.results.length>0){if(this.deferredUpdate)return this.setValue(this.deferredUpdate),void(this.deferredUpdate=null);if(null!=this.currentIndex)if(e.length>0){var i=e[this.currentIndex][this.data.selectedKeyField],n=this.getIndexOfRowWithKey(i);null!==n?this._setImage(n,!1,c):this._setImage(0,!0,c)}else this.currentIndex=null;else this._setImage(0,!0,c)}},u.prototype._next=function(){if(this.results&&0!==this.results.length){var t=this.currentIndex+1;this.results[t]?this._setImage(t,!0,l):this._setImage(0,!0,l)}},u.prototype._previous=function(){if(this.results&&0!==this.results.length){var t=this.currentIndex-1;this.results[t]?this._setImage(t,!0,d):this._setImage(this.results.length-1,!0,d)}},u.prototype._setImage=function(e,i,r){var s=this;s.inTransition=!0,s.currentIndex=e;var A=n.convertListOfKeyValuesToObject(s.results[e][s.data.selectedDocumentField]);if(A){var l=A.url||A.Url;if(0!==l.length){var d=l.substr(l.lastIndexOf(".")+1,l.length-l.lastIndexOf(".")).toLowerCase(),c=o.getTenantUrl("DynamicContent/File/"+l);if(-1===["png","jpg","gif","tiff","jpeg","bmp","pdf"].indexOf(d))c=o.getTenantUrl("DynamicContent/Icon/"+l);else if(s.data.useThumbnail){var u=a.forElement(s.data.size);c=o.getTenantUrl("DynamicContent/Thumbnail/"+l+"?width="+u.x+"&height="+u.y+"&filetype=png&isMaxSize=true")}t("<img/>").attr("src",c).on("load",(function(){t(this).remove();var n=t('<div class="dynamic-slideshow-image" />').attr("title",s.data.title);"Stretch Image"===s.data.selectedResizeOption?n.css("background-size","100% 100%"):"Keep Ratio, Show Complete Image"===s.data.selectedResizeOption?n.css({"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}):"No-Resize"===s.data.selectedResizeOption&&n.css({"background-size":s.data.useThumbnail&&a.hasHighPixelRatio()?"contain":"auto","background-repeat":"no-repeat","background-position":"center"}),n.css("background-image","url("+c+")");var o=s.$imageWrapper.children(),A=s.getHideAnimation(r);A&&"none"!==A?(o.addClass("animated "+A),o.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){o.remove()}))):o.remove(),s.$imageWrapper.prepend(n);var l=s.getShowAnimation(r);if(l&&"none"!==l?(n.addClass("animated "+l),n.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){n.removeClass("animated "+l),s.inTransition=!1,s.runNextInQueue()}))):(s.inTransition=!1,s.runNextInQueue()),!0===i&&s.isEventEnabled("displayed")){var d=s.data.selectedKeyField?s.results[e][s.data.selectedKeyField]:null;s.triggerEvent(s.data.eventing.displayed.raisedEventName,d)}s.startAutoSlide()}))}}},u.prototype.getShowAnimation=function(t){return t===l?this.data.nextShowAnimation:t===d?this.data.previousShowAnimation:null},u.prototype.getHideAnimation=function(t){return t===l?this.data.nextHideAnimation:t===d?this.data.previousHideAnimation:null},u.prototype.getLeftImage=function(){return this.data.leftButtonImage?o.getTenantUploads(this.data.leftButtonImage):o.getCdnUrl("drops/dynamicSlideshow/left-arrow.png")},u.prototype.getRightImage=function(){return this.data.rightButtonImage?o.getTenantUploads(this.data.rightButtonImage):o.getCdnUrl("drops/dynamicSlideshow/right-arrow.png")},u.prototype._addPanels=function(){var e=this;e.$leftArrow=t("<div />").css({backgroundImage:"url("+this.getLeftImage()+")",width:"33%",height:"100%",float:"left",backgroundRepeat:"no-repeat",backgroundPosition:"left 10px center",position:"relative",zIndex:"3",opacity:"0.6"}).attr("unselectable","on").on("mouseenter",(function(){t(this).css({opacity:"1"})})).on("mouseleave",(function(){t(this).css({opacity:"0.6"})})).on("click",(function(){e.queue((function(){e._previous()}))})).appendTo(e.$element);var i=t("<div />").css({width:"34%",height:"100%",float:"left",position:"relative",zIndex:"3"}).attr("unselectable","on").appendTo(e.$element);e.data.eventing.selected&&!0===e.data.eventing.selected.enabled&&i.on("click",(function(){if(e.piping){var t=e.data.selectedKeyField&&e.results?e.results[e.currentIndex][e.data.selectedKeyField]:null;e.piping.eventing.publish(e.data.eventing.selected.raisedEventName,e.$element,t)}})),e.$rightArrow=t("<div />").css({backgroundImage:"url("+this.getRightImage()+")",width:"33%",height:"100%",float:"left",backgroundRepeat:"no-repeat",backgroundPosition:"right 10px center",position:"relative",zIndex:"3",opacity:"0.6"}).attr("unselectable","on").on("mouseenter",(function(){t(this).css({opacity:"1"})})).on("mouseleave",(function(){t(this).css({opacity:"0.6"})})).on("click",(function(){e.queue((function(){e._next()}))})).appendTo(e.$element)},u.prototype.queue=function(t){this.inTransition?this.transitionsQueue.push(t):t()},u.prototype.runNextInQueue=function(){0!==this.transitionsQueue.length&&this.transitionsQueue.shift()()},u.prototype.getValue=function(){if(this.data.selectedKeyField&&this.currentIndex)return this.results[this.currentIndex][this.data.selectedKeyField]},u.prototype.clearValue=function(){this.results.length>0&&this._setImage(0,!0,c)},u.prototype.setValue=function(t){if(t.value&&this.data.selectedKeyField)if(this.results){var e=this.getIndexOfRowWithKey(t.value);null!==e&&this._setImage(e,!0,c)}else this.deferredUpdate=t},u.prototype.getIndexOfRowWithKey=function(t){for(var e=0;e<this.results.length;e++){if(this.results[e][this.data.selectedKeyField]===t)return e}return null},u})),define("lq/domainDefinitions",[],(function(){"use strict";var t=function(){this.entityDefinitions=[],this.indexDefinitions=[],this.styles=[]};return t.prototype.getDocumentEntityNames=function(){return _.pluck(this.getDocumentEntityDefinitions(),"name")},t.prototype.getDocumentEntityDefinitions=function(){return _.filter(this.entityDefinitions,(function(t){return"Licquid.Core.LicquidDocumentEntity"===t.entityType||"Licquid.Core.LicquidVersionedDocumentEntity"===t.entityType}))},new t})),define("lq/richText",["jquery","underscore","lq/domainDefinitions","lq/style","lq/eventSource"],(function(t,e,i,n,a){var o="RICHTEXT:",r=function(t){return!(null==t||!t.substring||t.length<=9)&&t.substring(0,9)==o},s=function(t){return o+JSON.stringify(t)},A=function(t){return JSON.parse(t.substring(9))},l=function(t,e){var i=this;i.richTextEditor=t,i.data=e?{styles:e.styleId,text:e.text}:{styles:null,text:""},i.$element=i.createRichTextEditorSection(),i.$viewer=i.createViewer(t)};l.prototype.createRichTextEditorSection=function(){return t("<div />").addClass("richTextEditorSection")},l.prototype.createViewer=function(){var e=this,i=t("<div />").addClass("richTextEditorSectionViewer").appendTo(e.$element);return this.richTextEditor.editable&&i.on("click",(function(){e.openEditor()})),""!==e.data.text?(i.html(e.data.text),n.renderStyles(e,null,i)):this.richTextEditor.editable&&this.setPlaceholder(i),i},l.prototype.openEditor=function(){var e=this;if(e.$viewer.hide(),e.$editor)return e.$editor.show(),void e.$editor.trigger("focus");e.$editor=t("<div />").addClass("richTextEditorSectionEditor").appendTo(e.$element);var i=this.buildToolbar().addClass("richTextEditorToolbar").appendTo(e.$editor),n=t("<div />").addClass("richTextEditorTextAreaDiv").appendTo(e.$editor),a=t("<textarea/>").val(e.data.text).addClass("richTextEditingTextArea").css({width:"100%","max-width":"100%"}).appendTo(n);e.richTextEditor.simpleRichTextEditor||(n.addClass("richTextEditorTextAreaDivFullMode"),i.addClass("richTextEditorToolbarFullMode"),this.buildStylesBar().addClass("richTextEditorStylesBar").appendTo(e.$editor),this.buildSectionOperationsBar().addClass("richTextEditorSectionOperationsBar").appendTo(e.$editor)),require(["Wysihtml5/wysihtml5-0.4.0pre","Wysihtml5/parser_rules/licquid","Wysihtml5/jquery.wysihtml5_size_matters"],(function(){var n=new wysihtml5.Editor(a[0],{toolbar:i.get(0),parserRules:wysihtml5ParserRules,stylesheets:require.toUrl("../Lq/richTextEditor.css")});n.observe("load",(function(){a.data("editor",n),t(n.composer.iframe).wysihtml5_size_matters(),n.focus()})),n.on("change",(function(){e.updateViewerFromEditor(n)})),n.on("aftercommand:composer",(function(){e.updateViewerFromEditor(n)})),n.on("blur",(function(){e.richTextEditor.triggerFocusLost()}))}))},l.prototype.buildToolbar=function(){var e=t("<div />");return t("<button />").attr("data-wysihtml5-command","bold").addClass("smallbutton").css({"font-weight":"bold"}).text("b").appendTo(e),t("<button />").attr("data-wysihtml5-command","italic").addClass("smallbutton").css({"font-style":"italic"}).text("i").appendTo(e),t("<button />").attr("data-wysihtml5-command","underline").addClass("smallbutton").css({"text-decoration":"underline"}).text("u").appendTo(e),t("<button />").attr("data-wysihtml5-command","insertUnorderedList").addClass("smallbutton").text("•").appendTo(e),t("<button />").attr("data-wysihtml5-command","insertOrderedList").addClass("smallbutton").text("1.").appendTo(e),t('<button class="smallbutton">url</button>').attr("data-wysihtml5-command","createLink").appendTo(e),t("<div>").hide().attr("data-wysihtml5-dialog","createLink").append(t('<input type="text" value="http://">').attr("data-wysihtml5-dialog-field","href")).append(t('<button class="smallbutton">ok</button>').attr("data-wysihtml5-dialog-action","save")).appendTo(e),e},l.prototype.buildStylesBar=function(){var a=this,o=t("<div />");return a.$styleSelect=t("<select />").width(150).on("change",(function(){n.removeStyleClass(a,null,a.$viewer),a.data.styles=a.$styleSelect.val(),n.renderStyles(a,null,a.$viewer)})).appendTo(o).append(t("<option />",{value:null,text:"..."})),e.chain(i.styles.genericStyles).sortBy((function(t){return(t.name||"").toLowerCase()})).filter((function(t){return t.normal&&t.normal.runtime})).forEach((function(e){t("<option />",{value:e.id,text:e.name}).appendTo(a.$styleSelect)})),a.$styleSelect.val(a.data.styles),t("<button />").addClass("smallbutton").text("x").on("click",(function(){a.richTextEditor.removeSection(a)})).appendTo(o),o},l.prototype.buildSectionOperationsBar=function(){var e=this,i=t("<div />").width(25);return t("<button />").addClass("smallbutton").text("+").on("click",(function(){e.richTextEditor.addSectionBefore(e)})).appendTo(i),t("<button />").addClass("smallbutton").html("&#x25B2;").on("click",(function(){e.richTextEditor.moveSectionUp(e)&&e.reopenEditor()})).appendTo(i),t("<button />").addClass("smallbutton").html("&#x25BC;").on("click",(function(){e.richTextEditor.moveSectionDown(e)&&e.reopenEditor()})).appendTo(i),t("<button />").addClass("smallbutton").text("+").on("click",(function(){e.richTextEditor.addSectionAfter(e)})).appendTo(i),i},l.prototype.updateViewerFromEditor=function(t){var e=t.getValue(!0);e!==this.$viewer.html()&&(this.$viewer.empty(),this.$viewer.html(e)),""===e&&this.setPlaceholder(this.$viewer),this.data.text=e},l.prototype.setPlaceholder=function(e){e.empty();var i=t("<span></span>").addClass("richTextEditorPlaceholder").text(this.richTextEditor.placeholder||"Click here to start editing the content");e.append(i)},l.prototype.reopenEditor=function(){var t=this;t.$editor.remove(),t.$editor=null,setTimeout((function(){t.openEditor()}))},l.prototype.closeEditor=function(){this.$editor&&(this.$editor.hide(),this.$viewer.show(),this.$element.css({height:"auto"}))},l.prototype.toModel=function(){return{text:this.data.text,styleId:this.data.styles}};var d=function(e){var i=this;if(i.$element=e.parentElement,i.placeholder=e.placeholder,i.simpleRichTextEditor=e.simpleRichTextEditor,i.sections=e.sections||[],i.editable=e.editable,a.call(this,"FocusLost"),i.$richTextEditor=t("<div />").addClass("richTextEditor").appendTo(i.$element),e.editable){if(i.simpleRichTextEditor){var n=new l(i);i.sections.push(n),i.$richTextEditor.append(n.$element)}i.simpleRichTextEditor||(i.$richTextEditor.addClass("richTextEditorFullMode"),i.$richTextEditorBottomActions=t("<div />").addClass("richTextEditorBottomActions").appendTo(i.$element),i.$richTextEditorLeftActions=t("<div />").addClass("richTextEditorLeftActions").appendTo(i.$richTextEditorBottomActions),t("<button />").text("+").on("click",(function(){var t=new l(i);i.sections.push(t),i.$richTextEditor.append(t.$element)})).appendTo(i.$richTextEditorLeftActions)),t(document).on("click",(function(e){var n=t(e.target).closest(".richTextEditorSection"),a=t.grep(i.sections,(function(t){return t.$element[0]!==n[0]}));t.each(a,(function(t,e){e.closeEditor()}))}))}};return d.prototype.addSectionBefore=function(t){var e=this.sections.indexOf(t),i=new l(this);this.sections.splice(e,0,i),t.$element.before(i.$element)},d.prototype.addSectionAfter=function(t){var e=this.sections.indexOf(t)+1,i=new l(this);this.sections.splice(e,0,i),t.$element.after(i.$element)},d.prototype.removeSection=function(t){var e=this.sections.indexOf(t);this.sections.splice(e,1),t.$element.remove()},d.prototype.moveSectionUp=function(t){var e=this.sections.indexOf(t);return 0!==e&&(this.sections.splice(e,1),this.sections.splice(e-1,0,t),this.sections[e].$element.before(t.$element),!0)},d.prototype.moveSectionDown=function(t){var e=this.sections.indexOf(t);return e!==this.sections.length&&(this.sections.splice(e,1),this.sections.splice(e+1,0,t),this.sections[e].$element.after(t.$element),!0)},d.prototype.clearSections=function(){e.forEach(this.sections,(function(t){t.$element.remove()})),this.sections=[]},d.prototype.fromModel=function(t){var i=this;i.clearSections(),t.sections&&e.forEach(t.sections,(function(t){var e=new l(i,t);i.sections.push(e),i.$richTextEditor.append(e.$element)}))},d.prototype.fromString=function(t){if(r(t))this.fromModel(A(t));else{this.clearSections();var e=new l(this,{text:(i=t,("string"!=typeof i?i:i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\t/g,"    ").replace(/  /g,"&nbsp; ").replace(/  /g," &nbsp;").replace(/\r\n|\n|\r/g,"<br />"))||"")});this.sections.push(e),this.$richTextEditor.append(e.$element)}var i},d.prototype.toModel=function(){return{sections:t.map(this.sections,(function(t){return t.toModel()}))}},d.prototype.toString=function(){var t=this.toModel();return s(t)},d.prototype.close=function(){this.$richTextEditor.remove(),this.$richTextEditorBottomActions.remove()},{RichTextEditor:d,isRichTextString:r,modelFromRichTextString:A,modelToRichTextString:s}})),define("drops/dynamicText/dynamicText",["jquery","lq","lq/drop","lq/style","lq/util","lq/richText","lq/html","lq/constants","lq/tooltip","lq/onlongpress"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d={data:{trimTextWithEllipsis:!1,useDynamicWidth:!0,useDynamicHeight:!0,hideWhenEmpty:!1,trimTextWithEllipsisMaxNumberOfLines:1,title:{option:A.hardcoded},role:"default"}},c=i;function u(e){c.call(this,t("<div/>"),d,e),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing)||{},this.$element.addClass("boxToBorderSize drop-text-container dynamic-text"),(new l).applyLongPressOnElement(this.$element,this),this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled&&this.$element.addClass("clickable"),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave"),this.tooltip=new A(this,this.data.title,this.$element)}return c.extend(u),u.typeName="DynamicText",u.prototype.showMockData=function(t){this.setValue({value:this.getMockTextToShow(t),type:s.string})},u.prototype.getMockTextToShow=function(t){return t},u.prototype.updateMockData=function(){this.applyPosition()},u.prototype.preRender=function(){this.tooltip.update(),this.piping.visibility.apply(this),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.data.hideWhenEmpty?this.hide():this.showPlainText(),this.data.mockData&&this.showMockData(this.data.mockData),this.data.containImages&&this.$element.addClass("contain-images"),this.data.removeMarginAndPadding&&this.$element.addClass("remove-margin-and-padding"),this.applyPosition()},u.prototype.clearValue=function(){this.data.hideWhenEmpty?this.hide():this.$label?this.$label.text(""):this.richTextEditor.fromString("")},u.prototype.rerenderLabel=function(){var i=this.text;if(this.data.renderAsHtml){if(i){var n=new RegExp("{{{TenantUrl}}}","g");i=i.replace(n,e.getTenantUrl(""))}var a=t("<div/>").html(r.sanitize(i)||"");this.$label.empty().append(a).css({whiteSpace:"normal",overflowWrap:"break-word"})}else this.data.stripHtml&&i&&(i=r.strip(i)),this.$label.text(i||"").css({whiteSpace:"pre-wrap",overflowWrap:"break-word"});this.data.trimTextWithEllipsis&&this.tooltip.update(i),this.data.hideWhenEmpty&&(null==i||""===i?this.hide():this.show())},u.prototype.setValue=function(t){t.value=null===t.value||void 0===t.value||""===t.value?this.data.defaultValue:t.value,o.isRichTextString(t.value)?(this.hidePlainText(),this.showRichText(),this.richTextEditor.fromString(t.value),this.show()):(this.hideRichText(),this.showPlainText(),this.text=this.formatter.convertFromLicquidFormat(t.type,t.value),this.rerenderLabel())},u.prototype.getValue=function(){return this.$label?this.$label.text():null},u.prototype.hideRichText=function(){this.richTextEditor&&(this.richTextEditor.close(),this.richTextEditor=null)},u.prototype.hidePlainText=function(){this.$label&&(this.$label.remove(),this.$label=null)},u.prototype.showRichText=function(){this.richTextEditor||(this.richTextEditor=new o.RichTextEditor({parentElement:this.$element,sections:this.data.sections,editable:!1}),this.renderStyles())},u.prototype.renderStyles=function(){this.richTextEditor?n.renderStyles(this,null,this.richTextEditor.$element):n.renderStyles(this,null,this.$element)},u.prototype.createLabelElement=function(){return"title"===this.data.role?t("<h1 />").addClass("ignore-default-headings"):"subtitle"===this.data.role?t("<h2 />").addClass("ignore-default-headings"):"label"===this.data.role?t("<label />").attr("for",this.rootDrop.instanceId+"_"+this.data.labelForDropId):t("<div />")},u.prototype.showPlainText=function(){this.$label||(this.data.trimTextWithEllipsis&&!this.data.trimTextWithEllipsisBasedOnLineCount?(this.$labelWrapper=t("<div />").addClass("ellipsis").addClass("boxToBorderSize").css({width:"100%",height:"100%"}).appendTo(this.$element),this.$innerLabelWrapper=t("<div />").appendTo(this.$labelWrapper),this.$label=this.createLabelElement().addClass("drop-text-content").css({whiteSpace:"pre-wrap",marginRight:"10px",margin:"0"}).appendTo(this.$innerLabelWrapper)):(this.$overflowWrapper=t("<div />").addClass("overflow-wrapper").appendTo(this.$element),this.$labelWrapper=t("<div />").css({display:"flex",width:"100%",height:"100%"}).appendTo(this.$overflowWrapper),this.$label=this.createLabelElement().addClass("boxToBorderSize drop-text-content").css({display:"flex",flexDirection:"column",flex:"1 1 100%",width:"100%",height:"100%"}).appendTo(this.$labelWrapper),this.data.trimTextWithEllipsis&&this.data.trimTextWithEllipsisBasedOnLineCount&&(this.$label=this.createLabelElement().css({overflow:"hidden",display:"-webkit-box","-webkit-line-clamp":this.data.trimTextWithEllipsisMaxNumberOfLines.toString(),"-webkit-box-orient":"vertical",width:"100%"}).appendTo(this.$label)),this.data.showScrollbar&&this.$element.css({overflowY:"auto",overflowX:"hidden"})),this.renderStyles())},u.prototype.rerenderDynamicText=function(){this.$element.empty(),this.$label=null,this.showPlainText(),this.rerenderLabel()},u})),define("lq/videoPlayer",["jquery","underscore","lq"],(function(t,e,i){"use strict";var n=["webm","mp4","ogg"],a=["html5","youtube"];function o(t){this.$element=t,this.player=null}return o.prototype.open=function(t){this.close(),t.url&&require(["videojs.youtube"],this.videoLoaded.bind(this,t))},o.prototype.videoLoaded=function(i,n){var o=i.videoType||this.getVideoType(i.url);if(o){var r=t("<source />").attr("type","video/"+this.videoType).attr("src",i.url),s=e.uniqueId("v"),A=t("<video />").attr("id",s).attr("class","video-js vjs-default-skin vjs-big-play-centered").attr("width",this.$element.width()).attr("height",this.$element.height()).attr("data-height","264").attr("controls","false").attr("poster",i.poster).attr("preload","auto").attr("autoplay",i.autoPlay).attr("loop",i.loop).attr("controls",i.controls).attr("videoType",o).append(r);i.autoPlay&&A.attr("muted","").attr("playsinline",""),this.$element.append(A),this.player=n(A.get(0),{techOrder:a,preload:"auto",autoplay:i.autoPlay,loop:i.loop,controls:i.controls,poster:[i.poster],sources:[{type:"video/"+o,src:i.url}]}),this.player.on("error",this.showAsError.bind(this)),i.autoPlay&&n(s).ready((function(){this.play()})),i.onEnded&&this.player.on("ended",i.onEnded)}},o.prototype.close=function(){this.player&&(this.player.dispose(),this.player=null)},o.prototype.hasVideo=function(){return null!==this.player},o.prototype.getVideoType=function(t){var e=t.split(".").pop();if(-1!==n.indexOf(e))return e;if("ogv"===e)return"ogg";var i=t.match(/v=([^&]+)/);return null!=i&&2==i.length?"youtube":null},o.prototype.showAsError=function(){t("<div />").text("The video cannot be player").appendTo(this.$element).css({backgroundColor:"black",position:"absolute",left:0,top:0,right:0,bottom:0}).append(t("<span />").text("The video cannot be played").css({color:"white",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}))},o})),define("drops/dynamicVideo/dynamicVideo",["jquery","lq/drop","lq/util","lq/style","lq/videoPlayer","lq"],(function(t,e,i,n,a,o){"use strict";var r={data:{value:"",loop:!1,controls:!0}};function s(i){e.call(this,t("<div/>"),r,i),this.url=null,this.data.size.x<200&&(this.data.size.x=200),this.data.size.y<100&&(this.data.size.y=100),this.$element.addClass("boxToBorderSize"),n.renderStyles(this)}return e.extend(s,e),s.typeName="DynamicVideo",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},s.prototype.setValue=function(t){var e=i.convertListOfKeyValuesToObject(t.value),n=e.url||e.Url;n&&n.length>0?this.url=o.getTenantUrl("DynamicContent/File/"+n):t.value&&(this.url=t.value),this.isVisible()&&this.openVideoPlayer()},s.prototype.openVideoPlayer=function(){this.player||(this.player=new a(this.$element));var t={url:this.url,autoPlay:this.data.autoPlay,poster:this.data.poster,loop:this.data.loop,controls:this.data.controls};this.isEventEnabled("videoEnded")&&(t.onEnded=this.triggerEventIfEnabled.bind(this,"videoEnded")),this.player.open(t)},s.prototype.clearValue=function(){this.player&&this.player.close()},s.prototype.afterShown=function(){this.url&&this.openVideoPlayer()},s.prototype.afterHidden=function(){this.player&&this.player.close()},s})),define("drops/embed/embed",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{embedCode:""}};function a(a){e.call(this,t('<div class="boxToBorderSize embed-drop" />'),n,a),i.renderStyles(this)}return e.extend(a,e),a.typeName="Embed",a.prototype.preRender=function(){this.piping.visibility.apply(this),this.data.embedCode&&this.$element.html(this.data.embedCode),this.applyPosition()},a})),define("drops/entityFilter/filterInstance",["underscore","lq/constants","lq/eventSource","lq/design/editors/dropExtensionsClicks"],(function(t,e,i){"use strict";var n=function(t,e,n,a){i.call(this,["Removed","EditingSettings","SettingsApplied"]),this.options=n,this.targetDrop=e,this.filter=t,this.dropFactory=e.piping.dropFactory,this.hasInitialValue=a};return n.currentPopup=null,n.prototype.applyFilterToTarget=function(){this.options.modalPopup||this.executeFilterChanges()},n.prototype.applySettingsFromPopup=function(){this.hideSettingsPopup(),this.executeFilterChanges(),this.triggerSettingsApplied()},n.prototype.hideSettingsPopup=function(t){var e=this.dropFactory.findDropByName(this.options.modalPopup);t?e.$element.hide():e.$element.fadeOut({queue:!1,complete:function(){e.$element.show(),e.hide()}})},n.prototype.closeCurrentPopup=function(){n.currentPopup&&(n.currentPopup.hideSettingsPopup(!0),n.currentPopup=null)},n.prototype.showSettingsPopup=function(t){this.closeCurrentPopup(),this.doReverseMappingToShowFilterValuesForCurrentTarget(this.options);var e=this.dropFactory.findDropByName(this.options.modalPopup);e.show(),e.$element.hide().fadeIn({duration:"slow",queue:!1});var i=t.offset(),a=this.filter.rootDrop.$element.offset();e.$element.css({positioning:"absolute",top:i.top-a.top,left:i.left-a.left+t.outerWidth()+10,bottom:"auto",right:"auto",width:e.data.size.x,height:e.data.size.y}),t.addClass("settings-is-open"),n.currentPopup=this,this.triggerEditingSettings()},n.prototype.doReverseMappingToShowFilterValuesForCurrentTarget=function(){var i=this.targetDrop.piping.parameters,n=this;t.each(this.options.mappings,(function(t){n.dropFactory.findDropByName(t.sourceName).setValue({type:e.valueTypes.string,value:i.getValue(t.targetParameter)})}))},n.prototype.executeFilterChanges=function(){var e=this.targetDrop.piping.parameters;if(this.options.filterParameterName&&e.locals.setValue(this.options.filterParameterName,this.options.filterParameterValue),this.options.modalPopup){var i=this;t.each(this.options.mappings,(function(t){var n=i.dropFactory.findDropByName(t.sourceName);e.locals.setValue(t.targetParameter,n.getValue())}))}this.filter.triggerEventForTargetIfEnabled(this.options,"applyFilter"),this.options.executeQuery&&this.targetDrop.executeQuery()},n.prototype.resetFilter=function(){var e=this.targetDrop.piping.parameters;this.options.filterParameterName&&e.locals.setValue(this.options.filterParameterName,this.options.filterParameterResetValue),this.options.modalPopup&&(this.hideSettingsPopup(),t.each(this.options.mappings,(function(t){e.locals.setValue(t.targetParameter,null)}))),this.filter.triggerEventForTargetIfEnabled(this.options,"resetFilter")},n.prototype.remove=function(t){this.resetFilter(),this.options.executeQuery&&!t&&this.targetDrop.executeQuery(),this.triggerRemoved()},n})),define("drops/entityFilter/entityFilter",["jquery","underscore","lq/drop","lq/style","lq/util","lq/eventSource","drops/entityFilter/filterInstance","lq/design/editors/dropExtensionsClicks"],(function(t,e,i,n,a,o,r){"use strict";var s=i,A=function(e){s.call(this,t("<div>"),e),o.call(this,["FilterAdded"]),this.$element.addClass("entity-filter-drop boxToBorderSize drop-text-container"),this.$title=t("<span>").addClass("title").addClass("drop-text-content").text(this.data.title).css({display:"flex",flexDirection:"column",flex:"1 1 100%",width:"100%"}),this.$element.append(t("<div />").css({cursor:"pointer",display:"flex",whiteSpace:"pre-wrap",height:"100%",width:"100%"}).append(this.$title)),n.renderStyles(this),this.initialPosition=a.cloneData(this.data.position),this.clicks({drag:!0,revertWhenDroppedOffTarget:!0,getDropTargets:this.getDropTargets.bind(this),droppedOnTarget:this.applyFilterToTarget.bind(this)})};return s.extend(A),A.typeName="EntityFilter",A.currentPopup=null,A.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},A.prototype.getDropTargets=function(){if(!this.targetsCached){var t=this.piping.dropFactory;this.targetsCached=e.map(this.data.targets,(function(e){return t.findDropByName(e.drop)}))}return this.targetsCached},A.prototype.getOptionsForTarget=function(t){return e.findWhere(this.data.targets,{drop:t.data.name})},A.prototype.removeAppliedFilters=function(){e.each(this.getDropTargets(),this.removeAppliedFilter.bind(this))},A.prototype.removeAppliedFilter=function(t){e.each(this.getMyActiveFiltersForTarget(t),(function(t){t.resetFilter(),t.remove(!0)}))},A.prototype.applyFilterToTarget=function(t){this.closeCurrentPopup();var i=this.getActiveFiltersForTarget(t),n=this;if(e.find(i,(function(t){return t.filter===n})))this.animateBackToStart();else{var a=this.getOptionsForTarget(t);this.removeConflictingFiltersFromTarget(t,a),this.dragToPosition(this.initialPosition),this.$element.hide().fadeIn({duration:"slow",queue:!1});var o=this.createInstance(t,a,!1);o.applyFilterToTarget(),this.addAsActiveFilterToTarget(o)}},A.prototype.createInstance=function(t,e,i){return new r(this,t,e,i)},A.prototype.closeCurrentPopup=function(){A.currentPopup&&this.hideSettingsPopup(A.currentPopup,!0)},A.prototype.removeConflictingFiltersFromTarget=function(t,i){if(i.filterParameterName){var n=e.filter(this.getActiveFiltersForTarget(t),(function(t){return t.options.filterParameterName===i.filterParameterName}));e.each(n,(function(t){t.remove()}))}},A.prototype.getActiveFiltersForTarget=function(t){return t.$element.data("licquid-entity-filters")||[]},A.prototype.getMyActiveFiltersForTarget=function(t){var i=this;return e.filter(this.getActiveFiltersForTarget(t),(function(t){return t.filter===i}))},A.prototype.addAsActiveFilterToTarget=function(t){var e=this.getActiveFiltersForTarget(t.targetDrop).concat(t);t.targetDrop.$element.data("licquid-entity-filters",e),t.withOnceRemoved(this.removeAsActiveFilterFromTarget.bind(this,t)),this.triggerFilterAdded(t)},A.prototype.removeAsActiveFilterFromTarget=function(t){var i=this.getActiveFiltersForTarget(t.targetDrop),n=this,a=e.filter(i,(function(t){return t.filter!==n}));t.targetDrop.$element.data("licquid-entity-filters",a)},A.prototype.getEventDataForTarget=function(t,e){return t&&t.eventing&&t.eventing[e]||{}},A.prototype.triggerEventForTargetIfEnabled=function(t,e){var i=this.getEventDataForTarget(t,e);i.enabled&&this.triggerEvent(i.raisedEventName)},A})),define("tpl!drops/entityFiltersPanel/entityFiltersPanelItem.html",["underscore"],(function(_){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="entity-filters-panel-item applied drop-text-container">\r\n    <span class="remove"></span>\r\n    <span class="settings"></span>\r\n    <span class="settings-ok-button"></span>\r\n    <div class="text-wrapper">\r\n        <span class="title drop-text-content">'+(null==(__t=title)?"":_.escape(__t))+"</span>\r\n    </div>\r\n</div>";return __p}})),define("drops/entityFiltersPanel/entityFiltersPanelItem",["jquery","underscore","tpl!./entityFiltersPanelItem.html"],(function(t,e,i){"use strict";var n=function(e){this.$element=t(i({title:e.filter.data.title})),this.filterInstance=e,this.editingSettings=this.showAsPopupOpen.bind(this),this.settingsApplied=this.showAsPopupApplied.bind(this)};return n.prototype.show=function(){this.filterInstance.withOnEditingSettings(this.editingSettings),this.filterInstance.withOnSettingsApplied(this.settingsApplied),this.$remove=this.$element.find(".remove").on("click",this.removeClicked.bind(this)),this.filterInstance.options.modalPopup&&(this.$element.addClass("has-settings").on("click",this.clicked.bind(this)),this.filterInstance.hasInitialValue||this.showSettingsPopup()),this.$element.addClass("fade-in")},n.prototype.remove=function(){var t=this.$element;this.$element.slideUp({done:function(){t.remove()}}).css("pointer-events","none").find("*").addBack().off("click"),this.filterInstance.withoutOnEditingSettings(this.editingSettings),this.filterInstance.withoutOnSettingsApplied(this.settingsApplied)},n.prototype.clicked=function(t){t.target!==this.$remove[0]&&(this.$element.hasClass("settings-is-open")?(this.hideSettingsPopup(),this.executeFilterChanges()):this.showSettingsPopup())},n.prototype.showSettingsPopup=function(){this.filterInstance.showSettingsPopup(this.$element)},n.prototype.showAsPopupOpen=function(){this.$element.addClass("settings-is-open")},n.prototype.hideSettingsPopup=function(){this.filterInstance.applySettingsFromPopup()},n.prototype.showAsPopupApplied=function(){this.$element.removeClass("settings-is-open")},n.prototype.removeClicked=function(){this.filterInstance.remove()},n.prototype.executeFilterChanges=function(){this.filterInstance.executeFilterChanges()},n})),define("drops/entityFiltersPanel/entityFiltersPanel",["jquery","underscore","lq/drop","lq/style","./entityFiltersPanelItem"],(function(t,e,i,n,a){"use strict";var o={data:{}},r=function(e){i.call(this,t("<div />"),o,e),this.$panel=t('<div class="entity-filters-panel" />').appendTo(this.$element),n.renderStyles(this,null,this.$panel),this.items=[]};return i.extend(r,i),r.typeName="EntityFiltersPanel",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},r.prototype.postRender=function(){var t=this;e.each(this.piping.dropFactory.getAllDrops(),(function(e){"EntityFilter"===e.type&&e.withOnFilterAdded(t.addEntityFilter.bind(t))}))},r.prototype.addEntityFilter=function(t){if(t.targetDrop.data.name===this.data.targetDrop){t.withOnceRemoved(this.removeEntityFilter.bind(this,t));var e=new a(t);n.renderStyles(this,null,e.$element,this.data.itemStyles,"normal"),this.$panel.append(e.$element),e.show(),this.items.push(e)}},r.prototype.removeEntityFilter=function(t){var i=e.find(this.items,(function(e){return e.filterInstance===t}));if(i){i.remove();var n=e.indexOf(this.items,i);this.items.splice(n,1)}},r.prototype.expand=function(){this.$panel.removeClass("collapsed"),this.triggerEventIfEnabled("expanded")},r.prototype.collapse=function(){this.$panel.addClass("collapsed"),this.triggerEventIfEnabled("collapsed")},r})),define("drops/errorHandling/errorHandling",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";function n(n){e.call(this,t("<div/>"),n),this.$element.addClass("boxToBorderSize").css({overflowY:"auto",overflowX:"auto"}),i.renderStyles(this)}return e.extend(n,e),n.typeName="ErrorHandling",n.prototype.preRender=function(){this.applyPosition(),this.hide()},n.prototype.onError=function(t){this.showMessage(t.message),this.piping.busyIndicator.forceHide(),t.handled=!0},n.prototype.showMessage=function(t){this.$element.html(t.replace(/\n/g,"<br />")),this.show()},n.prototype.clearValue=function(){this.$element.html(""),this.hide()},n.prototype.setValue=function(t){this.showMessage(t.value)},n})),define("drops/frame/frame",["jquery","underscore","lq/drop","lq/style"],(function(t,e,i,n){"use strict";var a={data:{hasScrollbars:!1}},o=function(e){i.call(this,t("<div/>"),a,e),this.data.hasScrollbars?(this.$frameContainer=t('<div class="frame-container">').appendTo(this.$element),this.$element.css({overflow:"auto"})):this.$element.css({overflow:"visible"}),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave"),n.renderStyles(this)};return i.extend(o,i),o.typeName="Frame",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},o.prototype.render=function(t){return this.createAndRenderDrops(t)},o.prototype.postRender=function(){this.data.hasScrollbars?(this.$element.css({overflow:"auto"}),this.switchBeetweenAnchorModes(),this.$frameContainer.css({position:"absolute",inset:"0px"}).appendTo(this.$element)):this.$element.css({overflow:"visible"})},o.prototype.addAnchorContainer=function(){var i=this.$element[0].scrollHeight,n=this.$element[0].scrollWidth,a=this;this.$frameContainer||(this.$frameContainer=t('<div class="frame-container">').appendTo(this.$element)),e.each(this.$element.children(),(function(e){t(e).appendTo(a.$frameContainer)})),this.$frameContainer.css({height:i,width:n,position:"absolute",inset:"0px"}).appendTo(this.$element)},o.prototype.removeAnchorContainer=function(){if(this.$frameContainer){var i=this;e.each(this.$frameContainer.children(),(function(e){t(e).appendTo(i.$element)})),this.$frameContainer.remove()}},o.prototype.postWindowResize=function(){this.data.hasScrollbars&&this.switchBeetweenAnchorModes()},o.prototype.createRenderPromiseForChild=function(t){return t.render(this.$frameContainer||this.$element)},o.prototype.renderScrollbars=function(t){t.hasScrollbars?(this.$element.css({overflow:"auto"}),this.addAnchorContainer()):(this.$element.css({overflow:"visible"}),this.removeAnchorContainer())},o.prototype.frameSizesCalculationHelper=function(){return{sH:this.$element[0].scrollHeight-this.$element[0].offsetHeight<=0?this.$element[0].offsetHeight:this.$element[0].scrollHeight,sW:this.$element[0].scrollWidth-this.$element[0].offsetWidth<=0?this.$element[0].offsetWidth:this.$element[0].scrollWidth,hasVerticalScrollbar:this.$element[0].scrollHeight-this.$element[0].offsetHeight<=0,hasHorizontalScrollbar:this.$element[0].scrollWidth-this.$element[0].offsetWidth<=0}},o.prototype.switchBeetweenAnchorModes=function(){var t=this.frameSizesCalculationHelper();t.hasVerticalScrollbar?this.$frameContainer.css({top:0,bottom:0,height:""}):this.$frameContainer.css({height:t.sH,top:"",bottom:""}),t.hasHorizontalScrollbar?this.$frameContainer.css({left:0,right:0,width:""}):this.$frameContainer.css({width:t.sW,left:"",right:""})},o})),define("drops/gauge/gauge",["jquery","lq","lq/drop","lq/windowSize"],(function(t,e,i,n){"use strict";var a={data:{range:{start:-90,end:90},indicatorPosition:{x:"50",y:"50"},indicatorOrigin:{x:"50",y:"95"},indicatorScale:100,rotation:0,input:{type:"degrees",start:0,end:100}}};function o(e){i.call(this,t("<div/>"),a,e),this.$background=t("<img />").css({width:"100%",height:"100%"}),this.$indicator=t("<img />").css({position:"absolute"}),this.$element.append(this.$background,this.$indicator),this.hideIndicator(),this.data.indicatorImage&&this.setIndicatorImage(this.data.indicatorImage),this.data.backgroundImage&&this.setBackgroundImage(this.data.backgroundImage)}return i.extend(o,i),o.typeName="Gauge",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},o.prototype.postRender=function(){this.setupWindowResizeScaling()},o.prototype.setupWindowResizeScaling=function(){if(null!=this.data.bottom&&null!=this.data.top||null!=this.data.left&&null!=this.data.right){var t=this;this.events(n,{Changed:function(){t.updateIndicator(t.value)}})}},o.prototype.setBackgroundImage=function(t){this.$background.attr("src",e.getTenantUploads(t))},o.prototype.setIndicatorImage=function(t){this.$indicator.attr("src",e.getTenantUploads(t))},o.prototype.clearValue=function(){this.hideIndicator()},o.prototype.setValue=function(t){this.updateIndicator(t.value)},o.prototype.updateIndicator=function(t){if(t||0===t){var e=this.getPositionOfIndicator(t);e<this.data.range.start?e=this.data.range.start:e>this.data.range.end&&(e=this.data.range.end),this.positionIndicator(e),this.showIndicator()}else this.hideIndicator();this.value=t},o.prototype.getPositionOfIndicator=function(t){return"range"===this.data.input.type?(t-this.data.input.start)*(this.data.range.end-this.data.range.start)/(this.data.input.end-this.data.input.start)+this.data.range.start:this.data.range.start<this.data.range.end?this.data.range.start+Number(t):this.data.range.start-Number(t)},o.prototype.hideIndicator=function(){this.$indicator.css("visibility","hidden")},o.prototype.showIndicator=function(){this.$indicator.css("visibility","inherit")},o.prototype.positionIndicator=function(t){var e=this.getXScalingFactor(),i=this.getYScalingFactor(),n=this.data.indicatorScale/100*e,a=this.data.indicatorScale/100*i,o="translate("+-1*this.data.indicatorOrigin.x+"%, "+-1*this.data.indicatorOrigin.y+"%) rotate("+t+"deg) scale("+n+", "+a+")",r=this.data.indicatorOrigin.x+"% "+this.data.indicatorOrigin.y+"%";this.$indicator.css({left:this.data.indicatorPosition.x+"%",top:this.data.indicatorPosition.y+"%","-ms-transform":o,"-webkit-transform":o,transform:o,"-webkit-transform-origin":r,"-moz-transform-origin":r,"-o-transform-origin":r,"transform-origin":r})},o.prototype.getXScalingFactor=function(){return this.$element.width()/this.data.size.x},o.prototype.getYScalingFactor=function(){return this.$element.height()/this.data.size.y},o})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("uuid",e):(t="undefined"!=typeof globalThis?globalThis:t||self).uuidv4=e()}(this,(function(){"use strict";var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),e=new Uint8Array(16);function i(){if(!t)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(e)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(t){return"string"==typeof t&&n.test(t)}for(var o=[],r=0;r<256;++r)o.push((r+256).toString(16).substr(1));return function(t,e,n){var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var s=0;s<16;++s)e[n+s]=r[s];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase();if(!a(i))throw TypeError("Stringified UUID is invalid");return i}(r)}})),define("lq/runtimeDispatcher",["jquery","lq","when"],(function(t,e,i){"use strict";var n=function(e,i,n){this.busyIndicator=e,this.actionVersion=i,this.masterPageVersion=n,this.csrfToken=t('input[name="__RequestVerificationToken"]',t("#__AjaxAntiForgeryForm")).val()};return n.prototype.dispatch=function(t,i,n,a,o,r){return t=e.getTenantUrl(t),this.dispatchToAbsoluteUrl(t,i,n,a,o,r)},n.prototype.dispatchToAbsoluteUrl=function(i,n,a,o,r,s){n=n||{},a=a||t.noop,r=r||t.noop,s=s||!1;var A=this;return o=o||{},this.busyIndicator.show(),this.doDispatch(i,n,(function(t){A.busyIndicator.hide(),a(t)}),(function(t){if(401!==t.status||0!==i.indexOf(e.getTenantUrl(""))||s)try{r()}finally{A.busyIndicator.hide()}else window.location.reload()}),o)},n.prototype.backgroundDispatch=function(i,n,a,o,r){return i=e.getTenantUrl(i),this.doDispatch(i,n||{},a||t.noop,r||t.noop,o||{})},n.prototype.doDispatch=function(e,n,a,o,r){var s=r.headers||{};return s.LicquidActionVersion=this.actionVersion,s.LicquidMasterPageVersion=this.masterPageVersion,this.csrfToken&&(s.__RequestVerificationToken=this.csrfToken),i(t.ajax(t.extend({url:e,type:"POST",cache:!1,data:JSON.stringify(n),dataType:"json",contentType:"application/json; charset=utf-8",headers:s,success:function(t,e,i){"VersionMismatch"!==t.status?a(t,e,i):window.location.reload()},error:o},r)))},n.prototype.getMessageFromResponse=function(t){var e;try{e=JSON.parse(t.responseText)}catch(t){}return e&&e.message},n.prototype.refreshCsrfToken=function(i){var n=this;t.get(e.getTenantUrl("LicquidAction/GetCsrfToken"),(function(e){n.csrfToken=t(e).val(),i()}))},n})),define("lq/runtimeBusyIndicator",["jquery","drops/modals","jquery.blockUI"],(function(t,e){"use strict";function i(e){var i;this.showCount=0,this.opacity=0,this.$element=e,t.blockUI.defaults.overlayCSS={backgroundColor:"#FFF",opacity:.7,cursor:"wait"},t.blockUI.defaults.fadeOut=150,t.blockUI.defaults.fadeIn=750,i=window.document.documentMode?'<img width="32" height="32 alt="loading" src="'+require.toUrl("../Lq/loading.gif")+'" />':'<img width="64" height="64" alt="loading" src="'+require.toUrl("../Lq/loading_new.svg")+'" />',this.$description=t("<div />"),this.$indicator=t("<div />").append(t(i)).append(this.$description),this.$container=t("<div />").append(this.$indicator)}return i.prototype.setOpacity=function(t){this.opacity=t},i.prototype.show=function(){var t=this;t.showCount++,1===t.showCount&&t._show(1e3)},i.prototype.hide=function(){var t=this;t.showCount--,t.showCount<1&&(t.showCount=0,this.$element.unblock(),this.$description.text(""),t.timeout&&(clearTimeout(t.timeout),t.timeout=void 0))},i.prototype.showText=function(t){this.showHtml("<p>"+t+"</p>")},i.prototype.showHtml=function(t){this.$description.html(t)},i.prototype.showElement=function(t){this.$indicator.detach(),t.appendTo(this.$container)},i.prototype.removeElement=function(){this.$container.empty(),this.$indicator.appendTo(this.$container)},i.prototype.forceHide=function(){var t=this,e=Number(t.showCount);return t.showCount=0,t.hide(),e},i.prototype.showWithCount=function(t){this.showCount=t,this._show(0)},i.prototype._show=function(t){var i={backgroundColor:"#000",opacity:this.opacity,cursor:"default"},n=e.getNextZIndex();this.$element.block({baseZ:n,showOverlay:!0,message:"",overlayCSS:i}),this.opacity=0;var a=this;this.timeout=setTimeout((function(){a.showCount>0&&a.$element.block({baseZ:n,showOverlay:!0,overlayCSS:i,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"0",cursor:"default"},message:a.$container})}),t)},i})),define("lq/busyIndicator",["jquery","lq/runtimeBusyIndicator"],(function(t,e){"use strict";return new e(t("body"))})),define("lq/dispatcher",["lq/runtimeDispatcher","lq/busyIndicator"],(function(t,e){"use strict";return new t(e)})),define("drops/googleMap/googleMap",["jquery","when","uuid","lq","lq/frontendModules","lq/drop","lq/dispatcher","lq/style"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{zoom:13,selectedlocationOption:"hard coded",address:"Palm Jumeirah",mapType:"roadmap",mapStyle:"default",draggableMarkers:!0,size:{x:500,y:500},zoomAddr:13,zoomCoor:13,estimateDraggedAddress:!1,unknownAddressText:"Unknown address",backgroundColor:"#ea4335",borderColor:"#b31412",glyphColor:"#b31412",defaultMarkerScale:1}},l=/[(](-?[0-9]*.[0-9]*)[,][ ](-?[0-9]*.[0-9]*)[)]/,d={plain:"3409f9b959a3719b"},c=[];function u(i){o.call(this,t("<div/>"),A,i),this.$map=t("<div />").attr("id","map-canvas").css({width:"100%",height:"100%",visibility:"inherit"}).appendTo(this.$element),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),this.mapDeferred=e.defer(),s.renderStyles(this)}return o.extend(u,o),u.typeName="GoogleMap",u.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition();var t=e.defer();return this.loadModule(t),t.promise},u.prototype.loadModule=function(t){var e=this;a.load("googleMap",!1).then((function(i){i.loadGoogleMapsLibraries({libraryNames:["maps","marker"],url:n.getTenantUrl("GoogleMaps/FetchApiKey"),actionId:e.piping.actionId,dropId:e.data.id}).then((function(){e.initMap(),t.resolve()}))}))},u.prototype.initMap=function(){this.createGoogleMap(),this.isEventEnabled("locationSelected")&&this.addClickEventListenerToMap(),this.renderMap()},u.prototype.getMapId=function(){var t=this.data.mapStyle;return"custom"===t&&this.data.customStyleMapId?this.data.customStyleMapId:d[t]||this.data.id+"-"+Math.floor(1e4*Math.random()).toString()},u.prototype.createGoogleMap=function(){var t={mapTypeId:this.getMapType(this.data.mapType),mapId:this.getMapId()};this.basePinElementOptions={scale:this.data.defaultMarkerScale},this.data.useCustomBaseMarkerColors&&(this.basePinElementOptions=Object.assign({},this.basePinElementOptions),this.basePinElementOptions.background=this.data.backgroundColor,this.basePinElementOptions.borderColor=this.data.borderColor,this.basePinElementOptions.glyphColor=this.data.glyphColor),this.map||(this.map=new window.google.maps.Map(this.$map.get(0),t),this.pointerEventsBlocked=!0,this.$map.css("pointer-events","none"))},u.prototype.addClickEventListenerToMap=function(){var t=this;window.google.maps.event.addListener(this.map,"click",(function(e){t.data.latParam&&t.piping.parameters.locals.setValue(t.data.latParam,e.latLng.lat()),t.data.lngParam&&t.piping.parameters.locals.setValue(t.data.lngParam,e.latLng.lng()),t.data.addressParam?r.dispatch("GoogleMaps/Geocode",{actionId:t.piping.actionId,dropId:t.data.id,lat:e.latLng.lat(),lng:e.latLng.lng()}).then((function(i){i.success?i.formatted_address&&(t.piping.parameters.locals.setValue(t.data.addressParam,i.formatted_address),t.triggerEventIfEnabled("locationSelected")):alert("Failed the geocoding of the following lat lng values: "+e.latLng.lat()+" "+e.latLng.lng()+".\nLeave the 'Address parameter' empty in the designer to skip the geocoding.")})):t.triggerEventIfEnabled("locationSelected")}))},u.prototype.renderMap=function(){var t=this;"hard coded"===this.data.selectedlocationOption?this.data.address?this.goToAddress(this.data.address):this.data.lat&&this.data.lng&&this.goToCoordinates(this.data):"datasource addresses"===this.data.selectedlocationOption?this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){if(t.deleteMarkers(t.map),0!==e.results.length)for(var i=0;i<e.results.length;i++){var n=e.results[i][t.data.addressOutput];null!=n&&r.dispatch("GoogleMaps/Geocode",{actionId:t.piping.actionId,dropId:t.data.id,address:n}).then(t.forwardGeoCode.bind(t,e.results[i]))}else t.setDefaults(t.map)})):"datasource coordinates"===this.data.selectedlocationOption&&this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.deleteMarkers(t.map);for(var i=!0,n=0;n<e.results.length;n++)if(e.results[n][t.data.latOutput]&&e.results[n][t.data.lngOutput]){i=!1;var a=t.createMarker(e.results[n]);window.google.maps.event.addListener(a,"click",t.markerClicked.bind(t,e.results[n])),t.data.draggableMarkers&&window.google.maps.event.addListener(a,"dragend",t.markerDragged.bind(t,e.results[n]))}i?t.setDefaults(t.map):t.calculateMarkerBounds(t.map)})),this.mapDeferred.resolve(this.map)},u.prototype.clearValue=t.noop,u.prototype.setValue=function(t){this.goToLocation(t.value)},u.prototype.goToLocation=function(t){var e=this;"query address"===e.data.selectedlocationOption?e.goToAddress(t):"query coordinates"===e.data.selectedlocationOption&&e.goToCoordinates(t)},u.prototype.goToCoordinates=function(t){try{if(void 0!==t.lat&&void 0!==t.lng)this.renderValue(t);else{var e=t.indexOf(";");if(-1!=e){var i=t.substring(0,e),n=t.substring(e+1),a=parseFloat(i),o=parseFloat(n);a<85&&a>-85&&o<180&&o>-180&&this.renderValue({lat:a,lng:o})}}}catch(t){}},u.prototype.goToAddress=function(t){var e=this;r.dispatch("GoogleMaps/Geocode",{actionId:e.piping.actionId,dropId:e.data.id,address:t}).then((function(t){if("OK"==t.status){var i=`(${t.lat}, ${t.lng})`,n=l.exec(i);n.length>=3&&e.renderValue({lat:n[1],lng:n[2]})}else["query address","query coordinates"].includes(e.data.selectedlocationOption)&&e.triggerEventIfEnabled("unknownMapping")}))},u.prototype.renderValue=function(t){var e=this,n=new window.google.maps.LatLng(t.lat,t.lng),a={zoom:this.data.zoom,center:n,mapTypeId:this.getMapType(e.data.mapType)};this.map.setOptions(a);var o=e.createMarker(void 0,n);t.eventArg=i(),window.google.maps.event.addListener(o,"click",e.markerClicked.bind(e,t)),this.data.draggableMarkers&&window.google.maps.event.addListener(o,"dragend",e.markerDragged.bind(e,t)),this.data.mappedMarkerId&&this.piping.parameters.locals.setValue(this.data.mappedMarkerId,t.eventArg),this.unblockPointerEvents()},u.prototype.getMapType=function(t){switch(t){case"terrain":return window.google.maps.MapTypeId.TERRAIN;case"satellite":return window.google.maps.MapTypeId.SATELLITE;case"hybrid":return window.google.maps.MapTypeId.HYBRID;default:return window.google.maps.MapTypeId.ROADMAP}},u.prototype.markerClicked=function(t){this.triggerEventIfEnabled("clicked",t[this.data.eventArg]||t.eventArg)},u.prototype.geocodePosition=function(e,i,n){var a=this,o=t.Deferred();return r.dispatch("GoogleMaps/Geocode",{actionId:a.piping.actionId,dropId:a.data.id,lat:e,lng:i}).then((function(t){"OK"===t.status&&"ZERO_RESULTS"!==t.status?a.piping.parameters.locals.setValue(n,t.formatted_address):a.piping.parameters.locals.setValue(n,a.data.unknownAddressText),o.resolve()})),o.promise()},u.prototype.markerDragged=async function(t,e){var i=this;this.data.draggedLatParam&&this.data.draggedLngParam&&(this.piping.parameters.locals.setValue(this.data.draggedLatParam,e.latLng.lat()),this.piping.parameters.locals.setValue(this.data.draggedLngParam,e.latLng.lng())),this.data.estimateDraggedAddress&&this.data.draggedAddressParam?this.geocodePosition(e.latLng.lat(),e.latLng.lng(),this.data.draggedAddressParam).done((function(){i.triggerEventIfEnabled("pinDragged",t[i.data.eventArg]||t.eventArg)})):i.triggerEventIfEnabled("pinDragged",t[i.data.eventArg]||t.eventArg)},u.prototype.forwardGeoCode=function(t,e){var i=this;if("OK"===e.status){var n=`(${e.lat}, ${e.lng})`,a=l.exec(n);if(a.length>=3){var o=i.createMarker(t,new window.google.maps.LatLng(a[1],a[2]));window.google.maps.event.addListener(o,"click",i.markerClicked.bind(i,t)),i.data.draggableMarkers&&window.google.maps.event.addListener(o,"dragend",i.markerDragged.bind(i,t,o))}i.calculateMarkerBounds(i.map)}else 0===c.length&&this.setDefaults(this.map)},u.prototype.setDefaults=function(t){var e,i,n,a,o;"datasource addresses"===this.data.selectedlocationOption?(o=this.data.showMapAddr,e=parseFloat(this.data.latAddr),i=parseFloat(this.data.lngAddr),n=this.data.addressAddr,a=this.data.zoomAddr):"datasource coordinates"===this.data.selectedlocationOption&&(o=this.data.showMapCoor,e=parseFloat(this.data.latCoor),i=parseFloat(this.data.lngCoor),n=this.data.addressCoor,a=this.data.zoomCoor),this.deleteMarkers(t),o&&(n?r.dispatch("GoogleMaps/Geocode",{actionId:this.piping.actionId,dropId:this.data.id,address:n}).then((function(e){if("OK"===e.status){var i=`(${e.lat}, ${e.lng})`,n=l.exec(i);if(n.length>=3){var o=new window.google.maps.LatLng(n[1],n[2]);t.setCenter(o),t.setZoom(a)}}})):e&&i?(t.setCenter({lat:e,lng:i}),t.setZoom(a)):(t.setCenter({lat:50.503887,lng:4.469936}),t.setZoom(7)),this.unblockPointerEvents())},u.prototype.deleteMarkers=function(){for(var t=0;t<c.length;t++)c[t].setMap(null);c=[]},u.prototype.calculateMarkerBounds=function(t){if(1===c.length)t.setCenter(c[0].position),t.setZoom(14);else if(0!==c.length){for(var e=new window.google.maps.LatLngBounds,i=0;i<c.length;i++)e.extend(c[i].position);t.fitBounds(e)}this.unblockPointerEvents()},u.prototype.getMap=function(){return this.mapDeferred.promise},u.prototype.licquidMethod_deleteMarkers=function(){this.deleteMarkers()},u.prototype.unblockPointerEvents=function(){this.pointerEventsBlocked&&(this.pointerEventsBlocked=!1,this.$map.css("pointer-events",""))},u.prototype.createMarker=function(t,e){if(e||t[this.data.latOutput]&&t[this.data.lngOutput]){var i=new window.google.maps.marker.AdvancedMarkerElement({map:this.map,position:e||new window.google.maps.LatLng(t[this.data.latOutput],t[this.data.lngOutput]),draggable:this.data.draggableMarkers}),n=Object.assign({},this.basePinElementOptions);return t&&(this.data.useDynamicMarkerColorsFromDatasource&&(n.background=t[this.data.backgroundColorOutput]||n.background,n.borderColor=t[this.data.borderColorOutput]||n.borderColor,n.glyphColor=t[this.data.glyphColorOutput]||n.glyphColor),this.data.markerScaleOutput&&(n.scale=t[this.data.markerScaleOutput]||n.scale),this.data.markerTitleOutput&&(i.title=t[this.data.markerTitleOutput])),i.content=new window.google.maps.marker.PinElement(n).element,c.push(i),i}},u})),define("drops/grid/gridPager",["jquery"],(function(t){var e=function(e,i){this.$element=t('<div class="pagerTable" />').appendTo(i),this.$firstDiv=t('<div  class="pagerCell"/>').append(t('<a href="#"/>').on("click",(function(){e.first()})).append(t('<div class="pagerFirst" />'))).appendTo(this.$element),this.$previousDiv=t('<div class="pagerCell" />').append(t('<a href="#"/>').on("click",(function(){e.previous()})).append(t('<div class="pagerPrevious" />'))).appendTo(this.$element),this.$pagerText=t('<div class="pagerText pagerCell" />').appendTo(this.$element),this.$nextDiv=t('<div class="pagerCell"/>').append(t('<a href="#"/>').on("click",(function(){e.next()})).append(t('<div class="pagerNext" />'))).appendTo(this.$element),this.$lastDiv=t('<div class="pagerCell" />').append(t('<a href="#"/>').on("click",(function(){e.last()})).append(t('<div class="pagerLast" />'))).appendTo(this.$element)};return e.prototype.update=function(t,e,i){var n=t*e+1,a=i<(t+1)*e?i:(t+1)*e;1===n&&(this.$firstDiv.hide(),this.$previousDiv.hide()),a===i&&(this.$nextDiv.hide(),this.$lastDiv.hide()),0===i?this.setPagerText(" 0 .. 0 (0) "):this.setPagerText(" "+n+" .. "+a+" ("+i+") ")},e.prototype.setPagerText=function(t){this.$pagerText.text(t)},e})),define("drops/grid/grid",["jquery","lq/drop","lq/style","underscore","lq/util","drops/grid/gridPager","lq/html"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{showNavigationAtTop:!1,showNavigationAtBottom:!0,pageSize:10}};function A(i){e.call(this,t("<div/>"),s,i),this.data.columns=n.map(this.data.columns,(function(t){return a.convertListOfKeyValuesToObject(t)})),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing)||{},this.$element.addClass("boxToBorderSize"),this.$wrapper=t("<div />").css({position:"absolute",top:0,right:0,bottom:0,left:0,whiteSpace:"pre-wrap",overflow:"auto"}).appendTo(this.$element),this.page=0,this.renderStyles(),this.update()}return e.extend(A,e),A.typeName="Grid",A.prototype.preRender=function(){this.piping.visibility.apply(this);var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e)}),(function(e){t.decorateDataSourceData(e)})),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.applyPosition()},A.prototype.renderStyles=function(){var t=this;t.data.styles=t.data.styleId,i.renderStyles(t,"gridstyle-")},A.prototype.decorateDataSourceData=function(t){t.page=this.page,t.pageSize=this.data.pageSize,this.sortParameters&&(t.sortParameters=this.sortParameters)},A.prototype.dispatchQuery=function(){var t=this;this.piping.queryDispatcher.dispatch(this.data.dataSource,(function(e){t.update(e,t)}),(function(e){t.decorateDataSourceData(e)}))},A.prototype.groupColumnsFromLeftToRight=function(t,e,i,n,a){if(!(a>n.length-1))for(var o=n[a].output,r=i;r>=e;)r>e&&t[r][o]===t[r-1][o]?(t[r][o]=null,r-=1):(this.groupColumnsFromLeftToRight(t,r,i,n,a+1),i=r-=1)},A.prototype.update=function(e){var i=this;i.selectedRowIndex=null,null==e&&((e={}).totalResults=0,e.results=[]);var a=n.map(e.results,(function(e){return t.extend({},e)})),s=n.filter(i.data.columns,(function(t){return t.group}));i.groupColumnsFromLeftToRight(a,0,a.length-1,s,0),i.data.totalResults=e.totalResults,i.$wrapper.empty(),this.data.showNavigationAtTop&&new o(this,this.$wrapper).update(this.page,this.data.pageSize,this.data.totalResults);var A=t('<table class="grid">').css({tableLayout:i.data.autoSizeColumns?null:"fixed",width:i.data.autoSizeColumns?"100%":i.calculateColumnWidthSum(),textAlign:"left",borderSpacing:0,lineHeight:1});if(!i.data.autoSizeColumns){var l=t("<colgroup>").appendTo(A);n.each(i.data.columns,(function(t){l.append('<col style="width:'+t.width+'px;"/>')}))}var d=t("<thead>").appendTo(A),c=t("<tr>").appendTo(d);n.each(i.data.columns,(function(e){var n=t("<th>").css("overflow",i.data.autoSizeColumns?null:"hidden").appendTo(c);t('<a href="#">').text(e.alias).on("click",(function(){i.sortByColumn(e)})).appendTo(n)})),A.appendTo(i.$wrapper);var u=this.getEventDataFor("clicked"),h=this.getEventDataFor("selected"),p=this.getEventDataFor("deselected");t.each(a,(function(a,o){var s=t("<tr/>");n.each(i.data.columns,(function(n){var a=e.outputs[n.output],A=i.formatter.convertFromLicquidFormat(a,o[n.output]);null===o[n.output]&&(A="&nbsp;");var l=t("<td/>").html(r.sanitize(A)).appendTo(s);i.data.autoSizeColumns||l.css({overflow:"hidden"})})),(u.enabled||p.enabled||h.enabled)&&s.addClass("clickablerow").on("click",(function(){if(p.enabled||h.enabled){var t=s.hasClass("selectedrow");s.parent().children().removeClass("selectedrow"),t||s.addClass("selectedrow")}i.triggerEventIfEnabled("clicked",o[i.data.eventArg]),i.selectedRowIndex===a?(i.triggerEventIfEnabled("deselected",e.results[i.selectedRowIndex][i.data.eventArg]),i.selectedRowIndex=null):a!==i.selectedRowIndex&&(i.triggerEventIfEnabled("selected",o[i.data.eventArg]),i.selectedRowIndex=a)})),s.appendTo(A)})),this.data.showNavigationAtBottom&&new o(this,this.$wrapper).update(this.page,this.data.pageSize,this.data.totalResults)},A.prototype.first=function(){this.page=0,this.dispatchQuery()},A.prototype.previous=function(){this.page>0&&(this.page--,this.dispatchQuery())},A.prototype.next=function(){this.page<Math.floor(this.data.totalResults/this.data.pageSize)&&(this.page++,this.dispatchQuery())},A.prototype.last=function(){this.page=Math.floor(this.data.totalResults/this.data.pageSize-.01),this.dispatchQuery()},A.prototype.calculateColumnWidthSum=function(){return n.reduce(this.data.columns,(function(t,e){return t+e.width}),0)},A.prototype.sortByColumn=function(t){var e=this,i=e.sortParameters&&e.sortParameters[0].output===t.output&&!e.sortParameters[0].descending;e.sortParameters=[{output:t.output,descending:i}],e.dispatchQuery()},A})),function(t,e){"function"==typeof define&&define.amd?define("ResizeSensor",e):"object"==typeof exports?module.exports=e():t.ResizeSensor=e()}("undefined"!=typeof window?window:this,(function(){if("undefined"==typeof window)return null;var t="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(e){return t.setTimeout(e,20)};function i(t,e){var i=Object.prototype.toString.call(t),n="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"[object Object]"===i||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements,a=0,o=t.length;if(n)for(;a<o;a++)e(t[a]);else e(t)}function n(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}function a(t,e){Object.keys(e).forEach((function(i){t.style[i]=e[i]}))}var o=function(t,r){function s(){var t,e,i=[];this.add=function(t){i.push(t)},this.call=function(n){for(t=0,e=i.length;t<e;t++)i[t].call(this,n)},this.remove=function(n){var a=[];for(t=0,e=i.length;t<e;t++)i[t]!==n&&a.push(i[t]);i=a},this.length=function(){return i.length}}function A(t,i){if(t)if(t.resizedAttached)t.resizedAttached.add(i);else{t.resizedAttached=new s,t.resizedAttached.add(i),t.resizeSensor=document.createElement("div"),t.resizeSensor.dir="ltr",t.resizeSensor.className="resize-sensor";var o={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},r={position:"absolute",left:"0px",top:"0px",transition:"0s"};a(t.resizeSensor,o);var A=document.createElement("div");A.className="resize-sensor-expand",a(A,o);var l=document.createElement("div");a(l,r),A.appendChild(l);var d=document.createElement("div");d.className="resize-sensor-shrink",a(d,o);var c=document.createElement("div");a(c,r),a(c,{width:"200%",height:"200%"}),d.appendChild(c),t.resizeSensor.appendChild(A),t.resizeSensor.appendChild(d),t.appendChild(t.resizeSensor);var u,h,p=window.getComputedStyle(t),g=p?p.getPropertyValue("position"):null;"absolute"!==g&&"relative"!==g&&"fixed"!==g&&(t.style.position="relative");var f=n(t),m=0,v=0,y=!0,w=0,b=function(){if(y){if(0===t.offsetWidth&&0===t.offsetHeight)return void(w||(w=e((function(){w=0,b()}))));y=!1}var i,n;i=t.offsetWidth,n=t.offsetHeight,l.style.width=i+10+"px",l.style.height=n+10+"px",A.scrollLeft=i+10,A.scrollTop=n+10,d.scrollLeft=i+10,d.scrollTop=n+10};t.resizeSensor.resetSensor=b;var B=function(){h=0,u&&(m=f.width,v=f.height,t.resizedAttached&&t.resizedAttached.call(f))},C=function(){f=n(t),(u=f.width!==m||f.height!==v)&&!h&&(h=e(B)),b()},x=function(t,e,i){t.attachEvent?t.attachEvent("on"+e,i):t.addEventListener(e,i)};x(A,"scroll",C),x(d,"scroll",C),e(b)}}i(t,(function(t){A(t,r)})),this.detach=function(e){o.detach(t,e)},this.reset=function(){t.resizeSensor.resetSensor()}};if(o.reset=function(t){i(t,(function(t){t.resizeSensor.resetSensor()}))},o.detach=function(t,e){i(t,(function(t){t&&(t.resizedAttached&&"function"==typeof e&&(t.resizedAttached.remove(e),t.resizedAttached.length())||t.resizeSensor&&(t.contains(t.resizeSensor)&&t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached))}))},"undefined"!=typeof MutationObserver){var r=new MutationObserver((function(t){for(var e in t)if(t.hasOwnProperty(e))for(var i=t[e].addedNodes,n=0;n<i.length;n++)i[n].resizeSensor&&o.reset(i[n])}));document.addEventListener("DOMContentLoaded",(function(t){r.observe(document.body,{childList:!0,subtree:!0})}))}return o})),define("drops/gridLayout/gridLayout",["jquery","underscore","lq/drop","ResizeSensor"],(function(t,e,i,n){"use strict";var a={data:{rows:[{value:1,unit:"fr",isAspectRatioEnabled:!1,ratioHeight:1}],columns:[{value:1,unit:"fr"}],spaceBetweenRows:{value:0,unit:"px"},spaceBetweenColumns:{value:0,unit:"px"},isDynamiclySizedContainer:!1}},o=function(e){return i.call(this,t("<div/>"),a,e),this.cellElements=[],this};return i.extend(o,i),o.typeName="GridLayout",o.prototype.preRender=function(){this.data.autoHeight=void 0!==e.findWhere(this.data.rows,{isAspectRatioEnabled:!0}),this.piping.visibility.apply(this),this.applyPosition(),this.calculateRowAndColumnCssDimensions(),this.createCells()},o.prototype.render=function(t){return this.createAndRenderDrops(t)},o.prototype.postRender=function(){this.calculateSizeBasedOnRatio(),this.setupDynamicCells()},o.prototype.createRenderPromiseForChild=function(e){var i=this.getCellElementForChild(e),n=i.cellElement;if("dy"===this.data.rows[i.rowIndex].unit||"dy"===this.data.columns[i.columnIndex].unit){var a=t("<div/>").addClass("dyn-cell-child").css({width:"auto",height:"auto",display:"table","pointer-events":"none"});return e.$wrapper=a,e.$element.css("pointer-events","auto"),e.$element.css("position","relative"),e.$element.css("inset",""),e.$wrapper.appendTo(n),e.isInsideADynamicCell=!0,e.render(e.$wrapper)}return e.render(n)},o.prototype.getCellElementForChild=function(t){var e=Math.max(Math.min((t.data.gridlayout_row||1)-1,this.data.rows.length-1),0),i=Math.max(Math.min((t.data.gridlayout_column||1)-1,this.data.columns.length-1),0);return{cellElement:this.cellElements[e][i],rowIndex:e,columnIndex:i}},o.prototype.createCells=function(){var t=this;this.cellElements=[],e.each(t.data.rows,(function(i,n){var a=[],o=t.rowCssDimensions[n];e.each(t.data.columns,(function(e,i){var r=t.columnCssDimensions[i],s=t.createCell("dy"===t.data.columns[i].unit||"dy"===t.data.rows[n].unit?"":r.size,"dy"===t.data.rows[n].unit||"dy"===t.data.columns[i].unit?"":o.size,r.position,o.position,i,n);a.push(s)})),t.cellElements.push(a)}))},o.prototype.calculateRowAndColumnCssDimensions=function(){this.rowCssDimensions=this.calculateCssDimensions(this.data.rows,this.data.spaceBetweenRows),this.columnCssDimensions=this.calculateCssDimensions(this.data.columns,this.data.spaceBetweenColumns),this.$element.css({minHeight:this.getUnitSum(this.data.rows,this.data.spaceBetweenRows,"px")+"px"}),this.$element.css({minWidth:this.getUnitSum(this.data.columns,this.data.spaceBetweenColumns,"px")+"px"})},o.prototype.calculateCssDimensions=function(t,i){var n=this,a=[],o=this.getUnitSum(t,i,"fr"),r=this.getUnitSum(t,i,"px"),s=0,A=0;return e.each(t,(function(t,e){var l=n.getCssSize(t,o,r),d=n.getCssPosition(s,A,o,r);a.push({size:l,position:d}),s+=n.getUnitValue(t,"fr")+n.getUnitValue(i,"fr"),A+=n.getUnitValue(t,"px")+n.getUnitValue(i,"px")})),a},o.prototype.getCssSize=function(t,e,i){return"fr"===t.unit?"calc((100% - "+i+"px) * "+t.value/e+")":t.value+"px"},o.prototype.getCssPosition=function(t,e,i,n){return 0==t?e+"px":"calc((100% - "+n+"px) * "+t/i+" + "+e+"px)"},o.prototype.getUnitValue=function(t,e){return t.unit===e?t.value:0},o.prototype.getUnitSum=function(t,i,n){return e.chain(t).filter((function(t){return t.unit===n})).reduce((function(t,e){return t+e.value}),0).value()+(t.length-1)*this.getUnitValue(i,n)},o.prototype.createCell=function(e,i,n,a){return t("<div/>").css({position:"absolute",boxSizing:"border-box",height:i,width:e,top:a,left:n}).appendTo(this.$element)},o.prototype.setupDynamicCells=function(){if(this.hasDynamicCell()){this.data.isDynamiclySizedContainer=!0;for(var t=0;t<this.data.rows.length;t++)for(var e=0;e<this.data.columns.length;e++)"dy"!==this.data.rows[t].unit&&"dy"!==this.data.columns[e].unit||!this.designData||this.cellElements[t][e].css({minHeight:"20px",minWidth:"20px"}),this.cellElements[t][e].css({top:"",left:"",position:"relative","-ms-grid-row":t+1+"","-ms-grid-column":e+1+"",gridRow:t+1,gridColumn:e+1});(this.hasDynamicColumn()||this.hasDynamicRow())&&this.$element.css({width:"auto",height:"auto"}),this.$element.css({display:window.document.documentMode?"-ms-grid":"grid",rowGap:this.data.spaceBetweenRows.value+this.data.spaceBetweenRows.unit,columnGap:this.data.spaceBetweenColumns.value+this.data.spaceBetweenColumns.unit})}},o.prototype.calculateSizeBasedOnRatio=function(){if(this.data.autoHeight){for(var e=0,i=0,n=0;n<this.data.rows.length;n++){for(var a=0;a<this.cellElements[n].length;a++)this.data.rows[n].isAspectRatioEnabled?(i=this.data.rows[n].ratioHeight/this.data.rows[n].ratioWidth*this.$element.outerWidth(!0),t(this.cellElements[n][a]).css({height:i,top:e})):(i=t(this.cellElements[n][a]).outerHeight(!0),t(this.cellElements[n][a]).css({top:e}));"px"===this.data.spaceBetweenRows.unit?e+=i+this.data.spaceBetweenRows.value:e+=i}this.$element.css({height:e,minHeight:e})}},o.prototype.hasDynamicCell=function(){return this.hasDynamicRow()||this.hasDynamicColumn()},o.prototype.hasDynamicRow=function(){return e.some(this.data.rows,(function(t){return"dy"===t.unit}))},o.prototype.hasDynamicColumn=function(){return e.some(this.data.columns,(function(t){return"dy"===t.unit}))},o.prototype.postWindowResize=function(){this.calculateSizeBasedOnRatio(),this.setupDynamicCells()},o.prototype.resetPositioningForChild=function(t){t.$element.css({left:"auto",right:"auto",top:"auto",bottom:"auto",position:"relative"})},o.prototype.applyPositionForChild=function(t){if(t.isInsideADynamicCell)if(t.applyPositionForChild&&t.data.isDynamiclySizedContainer)t.applyPositionForChild(t);else{this.resetPositioningForChild(t);var e={};e.width=t.data.size.x+"px",e.height=t.data.size.y+"px",t.$element.css(e)}else i.prototype.applyPositionForChild.call(this,t)},o})),define("drops/helper/helper",["jquery","lq/drop","lq/style","lq","lq/util","lq/point"],(function(t,e,i,n,a,o){"use strict";var r={data:{showNavigationAtTop:!1,showNavigationAtBottom:!0,pageSize:10,text:"Helper content",opacity:100,popupPosition:{x:100,y:100},popupSize:{x:100,y:100}}};function s(n){e.call(this,t("<div/>"),r,n),this.data.popupSize=a.convertListOfKeyValuesToObject(this.data.popupSize),this.data.popupPosition=a.convertListOfKeyValuesToObject(this.data.popupPosition),this.popupIsVisible=!1,this.$element.addClass("hide-on-print boxToBorderSize");var o=this;this.$icon=t("<div />").css({cursor:"pointer",width:"100%",height:"100%",backgroundSize:"100% 100%"}).attr("title",this.data.title).attr("tabindex",this.data.tabIndex).on("click",(function(t){o.togglePopup()})).appendTo(this.$element),this.$popup=t("<div />").hide().addClass("boxToBorderSize").width(this.data.popupSize.x).height(this.data.popupSize.y).css({position:"absolute",top:this.data.popupPosition.y+"px",left:this.data.popupPosition.x+"px",overflowX:"hidden",whiteSpace:"pre-wrap",zIndex:6001}).appendTo(t("body")),i.renderStyles(this,null,this.$popup),this.originalWidth=this.$popup.width(),this.originalHeight=this.$popup.height(),this.setValue({value:this.data.text})}return e.extend(s,e),s.typeName="Helper",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.setIcon(this.data.physicalFile),this.setOpacity(this.data.opacity),this.applyPosition()},s.prototype.setIcon=function(t){var e=t?n.getTenantUploads(t):null;e&&this.$icon.css("background-image","url("+e+")")},s.prototype.postRender=function(){var e=this;t(document).on("click",(function(t){t.target!==e.$icon.get(0)&&e.popupIsVisible&&e.closePopup()}))},s.prototype.convertToHtmlContent=function(t){return t.split("  ").join(" &nbsp;").split("/r/n").join("&nbsp;").replace(/(\r\n|\n|\r)/gm,"<br />")},s.prototype.getStartAndEndPositionForOpeningThePopup=function(){var t=(new o).fromPositionXAndY(this.data.position).subtract(new o(this.$icon.offset().left,this.$icon.offset().top)),e=(new o).fromPositionXAndY(this.data.popupPosition).subtract(t);return{start:{top:this.$icon.offset().top+this.data.size.y/2,left:this.$icon.offset().left+this.data.size.x/2,width:0,height:0},end:{top:e.y,left:e.x,width:this.data.popupSize.x,height:this.data.popupSize.y}}},s.prototype.getEndPositionForClosingThePopup=function(){return{top:this.$icon.offset().top+this.data.size.y/2,left:this.$icon.offset().left+this.data.size.x/2,width:0,height:0}},s.prototype.togglePopup=function(){this.popupIsVisible?this.closePopup():this.openPopup()},s.prototype.closePopup=function(){this.popupIsVisible=!1;var t=this.getEndPositionForClosingThePopup(),e=this;this.$popup.stop().animate(t,150,(function(){e.$popup.hide().css({width:e.originalWidth,height:e.originalHeight})}))},s.prototype.openPopup=function(){this.popupIsVisible=!0;var t=this.getStartAndEndPositionForOpeningThePopup();this.$popup.stop().css(t.start).show().animate(t.end,150)},s.prototype.hide=function(){e.prototype.hide.call(this),this.popupIsVisible&&this.closePopup()},s.prototype.clearValue=function(){this.setValue({value:null})},s.prototype.setValue=function(t){if(this.popupIsVisible&&this.closePopup(),t.value){var e=this.convertToHtmlContent(t.value);this.$popup.html(e),this.$icon.show()}else this.$icon.hide(),this.$popup.html("")},s.prototype.getValue=function(){return null},s.prototype.setOpacity=function(t){this.$icon.css({opacity:(t||100)/100})},s.prototype.unsubscribeEventHandlers=function(){this.$popup.remove()},s})),MagicWandClass=function(){var t={};return t.floodFill=function(t,e,i,n,a){var o,r,s,A,l,d,c,u,h,p,g=t.data,f=t.width,m=t.height,v=t.bytes,y=-1,w=f+1,b=-1,B=m+1,C=i*f+e,x=new Uint8Array(f*m),D=new Uint8Array(a||f*m);if(1===D[C])return null;var T=[g[C*=v],g[C+1],g[C+2],g[C+3]],I=[{y:i,left:e-1,right:e+1,dir:1}];do{for(p=!1,r=(A=I.shift()).left+1;r<A.right;r++)if(C=((c=A.y*f)+r)*v,1!==D[c+r]&&!((o=g[C]-T[0])>n||o<-n||(o=g[C+1]-T[1])>n||o<-n||(o=g[C+2]-T[2])>n||o<-n)){for(p=!0,x[c+r]=1,D[c+r]=1,d=r-1;d>-1&&(C=(u=c+d)*v,1!==D[u])&&!((o=g[C]-T[0])>n||o<-n)&&!((o=g[C+1]-T[1])>n||o<-n)&&!((o=g[C+2]-T[2])>n||o<-n);)x[u]=1,D[u]=1,d--;for(l=r+1;l<f&&(C=(h=c+l)*v,1!==D[h])&&!((o=g[C]-T[0])>n||o<-n)&&!((o=g[C+1]-T[1])>n||o<-n)&&!((o=g[C+2]-T[2])>n||o<-n);)x[h]=1,D[h]=1,l++;d<w&&(w=d+1),l>y&&(y=l-1),(s=A.y-A.dir)>=0&&s<m&&(d<A.left&&I.push({y:s,left:d,right:A.left,dir:-A.dir}),A.right<l&&I.push({y:s,left:A.right,right:l,dir:-A.dir})),(s=A.y+A.dir)>=0&&s<m&&d<l&&I.push({y:s,left:d,right:l,dir:A.dir})}p&&(A.y<B&&(B=A.y),A.y>b&&(b=A.y))}while(I.length>0);return{data:x,width:t.width,height:t.height,bounds:{minX:w,minY:B,maxX:y,maxY:b}}},t.gaussBlur=function(t,e){for(var i,n,a,o,r,s,A=2*e+1,l=e*e,d=new Float32Array(A),c=0,u=t.width,h=t.height,p=t.data,g=t.bounds.minX,f=t.bounds.maxX,m=t.bounds.minY,v=t.bounds.maxY,y=0;y<e;y++){var w=(e-y)*(e-y),b=Math.exp(-w/(2*l))/(2*Math.PI*l);d[e+y]=d[e-y]=b,c+=2*b}for(y=0;y<A;y++)d[y]/=c;var B=new Uint8Array(u*h),C=e+u,x=e+h;for(o=m;o<v+1;o++)for(a=g;a<f+1;a++){for(r=0,s=C-a<A?C-a:A,n=(i=o*u+a)-e,y=e-a>0?e-a:0;y<s;y++)r+=p[n+y]*d[y];for(s=x-o<A?x-o:A,n=i-e*u,y=e-o>0?e-o:0;y<s;y++)r+=p[n+y*u]*d[y];B[i]=r>.5?1:0}return{data:B,width:u,height:h,bounds:{minX:g,minY:m,maxX:f,maxY:v}}},t.gaussBlurOnlyBorder=function(t,e,i){for(var n,a,o,r,s,A,l,d,c,u=function(t,e,i){var n,a,o,r,s,A,l,d=t.width,c=t.height,u=t.data,h=new Uint8Array(u),p=t.bounds.minX,g=t.bounds.maxX,f=t.bounds.minY,m=t.bounds.maxY,v=d*c,y=new Uint8Array(v),w=[],b=Math.max(p,1),B=Math.min(g,d-2),C=Math.max(f,1),x=Math.min(m,c-2);if(i&&i.length>0)for(s=0;s<v;s++)1===i[s]&&(h[s]=1);for(r=C;r<x+1;r++)for(n=b;n<B+1;n++)0!==u[s=r*d+n]&&(A=s+d,l=s-d,(0===h[s+1]||0===h[s-1]||0===h[A]||0===h[A+1]||0===h[A-1]||0===h[l]||0===h[l+1]||0===h[l-1])&&w.push(s));if(0==p)for(r=f;r<m+1;r++)1===u[r*d]&&w.push(r*d);if(g==d-1)for(r=f;r<m+1;r++)1===u[r*d+g]&&w.push(r*d+g);if(0==f)for(n=p;n<g+1;n++)1===u[n]&&w.push(n);if(m==c-1)for(n=p;n<g+1;n++)1===u[m*d+n]&&w.push(m*d+n);var D,T=[],I=e+d,E=e+c,S=2*e+1;for(v=w.length,o=0;o<v;o++){for(y[s=w[o]]=1,T.push(s),r=(s-(n=s%d))/d,D=I-n<S?I-n:S,A=s-e,a=e-n>0?e-n:0;a<D;a++)0===y[l=A+a]&&(y[l]=1,T.push(l));for(D=E-r<S?E-r:S,A=s-e*d,a=e-r>0?e-r:0;a<D;a++)0===y[l=A+a*d]&&(y[l]=1,T.push(l))}return T}(t,e,i),h=2*e+1,p=2*e*e,g=new Float32Array(h),f=0,m=t.width,v=t.height,y=t.data,w=t.bounds.minX,b=t.bounds.maxX,B=t.bounds.minY,C=t.bounds.maxY,x=u.length,D=0;D<e;D++)a=(e-D)*(e-D),n=Math.exp(-a/p)/Math.PI,g[e+D]=g[e-D]=n,f+=2*n;for(D=0;D<h;D++)g[D]/=f;var T=new Uint8Array(y),I=e+m,E=e+v;for(D=0;D<x;D++){for(d=0,l=((r=u[D])-(A=r%m))/m,c=I-A<h?I-A:h,s=r-e,o=e-A>0?e-A:0;o<c;o++)d+=y[s+o]*g[o];if(d>.5)T[r]=1,A<w&&(w=A),A>b&&(b=A),l<B&&(B=l),l>C&&(C=l);else{for(c=E-l<h?E-l:h,s=r-e*m,o=e-l>0?e-l:0;o<c;o++)d+=y[s+o*m]*g[o];d>.5?(T[r]=1,A<w&&(w=A),A>b&&(b=A),l<B&&(B=l),l>C&&(C=l)):T[r]=0}}return{data:T,width:m,height:v,bounds:{minX:w,minY:B,maxX:b,maxY:C}}},t.createBorderMask=function(t){for(var e,i,n,a,o=t.width,r=t.height,s=t.data,A=t.bounds.minX,l=t.bounds.maxX,d=t.bounds.minY,c=t.bounds.maxY,u=l-A+1,h=c-d+1,p=new Uint8Array(u*h),g=Math.max(A,1),f=Math.min(l,o-2),m=Math.max(d,1),v=Math.min(c,r-2),y=m;y<v+1;y++)for(e=g;e<f+1;e++)0!==s[i=y*o+e]&&(n=i+o,a=i-o,0!==s[i+1]&&0!==s[i-1]&&0!==s[n]&&0!==s[n+1]&&0!==s[n-1]&&0!==s[a]&&0!==s[a+1]&&0!==s[a-1]||(p[(y-d)*u+(e-A)]=1));if(0==A)for(y=d;y<c+1;y++)1===s[y*o]&&(p[(y-d)*u]=1);if(l==o-1)for(y=d;y<c+1;y++)1===s[y*o+l]&&(p[(y-d)*u+(l-A)]=1);if(0==d)for(e=A;e<l+1;e++)1===s[e]&&(p[e-A]=1);if(c==r-1)for(e=A;e<l+1;e++)1===s[c*o+e]&&(p[(c-d)*u+(e-A)]=1);return{data:p,width:u,height:h,offset:{x:A,y:d}}},t.getBorderIndices=function(t){for(var e,i,n,a,o=t.width,r=t.height,s=t.data,A=[],l=o-1,d=r-1,c=1;c<d;c++)for(e=1;e<l;e++)0!==s[i=c*o+e]&&(n=i+o,a=i-o,(0===s[i+1]||0===s[i-1]||0===s[n]||0===s[n+1]||0===s[n-1]||0===s[a]||0===s[a+1]||0===s[a-1])&&A.push(i));for(c=0;c<r;c++)1===s[c*o]&&A.push(c*o);for(e=0;e<o;e++)1===s[e]&&A.push(e);for(i=o-1,c=0;c<r;c++)1===s[c*o+i]&&A.push(c*o+i);for(i=(r-1)*o,e=0;e<o;e++)1===s[i+e]&&A.push(i+e);return A},t.traceContours=function(t){for(var e,i,n,a,o,r,s,A,l,d,c,u,h,p,g=function(t){for(var e,i=t.width,n=t.data,a=t.bounds.minX,o=t.bounds.maxX,r=t.bounds.minY,s=t.bounds.maxY,A=o-a+3,l=s-r+3,d=new Uint8Array(A*l),c=r;c<s+1;c++)for(e=a;e<o+1;e++)1===n[c*i+e]&&(d[(c-r+1)*A+(e-a+1)]=1);return{data:d,width:A,height:l,offset:{x:a-1,y:r-1}}}(t),f=[],m=0,v=g.width,y=2*v,w=g.height,b=g.data,B=g.offset.x,C=g.offset.y,x=new Uint8Array(b),D=[[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]],T=1;T<w-1;T++)for(n=1;n<v-1;n++)if(1===b[a=T*v+n])for(e=-v;e<y;e+=y)if(0===b[a+e]&&0===x[a+e]){for(m++,r=[],A=(s=e===v)?2:6,c=u=l={x:n,y:T},d=null;;){for(x[c.y*v+c.x]=m,i=0;i<8;i++){if(p=D[A=(A+1)%8],1===b[o=(h={x:c.x+p[0],y:c.y+p[1]}).y*v+h.x]){x[o]=m;break}x[o]=-1,h=null}if(null===h)break;if(c=h,d){if(u.x===l.x&&u.y===l.y&&c.x===d.x&&c.y===d.y)break}else d=h;r.push({x:u.x+B,y:u.y+C}),u=c,A=(A+4)%8}null!=h&&(r.push({x:l.x+B,y:l.y+C}),f.push({inner:s,label:m,points:r}))}return f},t.simplifyContours=function(t,e,i){for(var n,a,o,r,s,A,l,d,c,u,h,p,g,f,m,v,y,w,b,B,C=t.length,x=[],D=0;D<C;D++)if(r=(o=t[D]).points,(s=o.points.length)<i){for(A=[],a=0;a<s;a++)A.push({x:r[a].x,y:r[a].y});x.push({inner:o.inner,label:o.label,points:A,initialCount:s})}else{l=[0,s-1],d=[{first:0,last:s-1}];do{if(!((c=d.shift()).last<=c.first+1)){for(u=-1,h=c.first,n=c.first+1;n<c.last;n++)w=r[n],b=r[c.first],B=r[c.last],v=w.x-b.x,y=w.y-b.y,g=Math.sqrt(v*v+y*y),v=w.x-B.x,y=w.y-B.y,f=Math.sqrt(v*v+y*y),v=b.x-B.x,y=b.y-B.y,m=Math.sqrt(v*v+y*y),(p=g>=Math.sqrt(f*f+m*m)?f:f>=Math.sqrt(g*g+m*m)?g:Math.abs((y*w.x-v*w.y+b.x*B.y-B.x*b.y)/m))>u&&(h=n,u=p);u>e&&(l.push(h),d.push({first:c.first,last:h}),d.push({first:h,last:c.last}))}}while(d.length>0);for(A=[],s=l.length,l.sort((function(t,e){return t-e})),a=0;a<s;a++)A.push({x:r[l[a]].x,y:r[l[a]].y});x.push({inner:o.inner,label:o.label,points:A,initialCount:o.points.length})}return x},t}(),define("magic-wand-min",(function(){})),define("drops/magicWand/magicWand",["jquery","lq/drop","drops/dynamicImage/dynamicImage","lq/style","magic-wand-min"],(function(t,e,i,n){"use strict";var a={data:{simplifierTolerance:30}},o="selected",r={colorThreshold:15,currentThreshold:15,blurRadius:5,hatchLength:4,hatchOffset:0,simplifierTolerance:a.data.simplifierTolerance,imageInfo:null,cacheInd:null,mask:null,downPoint:null,allowDraw:!1,firstDraw:!0};function s(i){e.call(this,t("<div />"),a,i),r.simplifierTolerance=this.data.simplifierTolerance,this.$image=t("<img />").css({width:"100%",height:"100%",overflow:"hidden"}).appendTo(this.$element),this.$canvas=t("<canvas />").css({position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",overflow:"hidden"}).appendTo(this.$element),n.renderStyles(this,null,this.$image),this.hideWhenNecessary(),this.applyEventTrigger("mouseEnter","mouseenter")}return e.extend(s,i),s.typeName="MagicWand",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition();var t=this;this.isEventEnabled(o)&&(this.$canvas.on("mouseup",(function(e){r.allowDraw=!1,r.currentThreshold=r.colorThreshold,0===e.button&&r.mask&&t.triggerEvent(t.data.eventing[o].raisedEventName,JSON.stringify(t.compressMaskData()))})),this.$canvas.on("mousedown",(function(e){r.firstDraw&&(t.initCanvas(),r.firstDraw=!1),0===e.button?(r.allowDraw=!0,r.downPoint=t.getMousePosition(e),t.drawMask(r.downPoint.x,r.downPoint.y)):r.allowDraw=!1})),this.$canvas.on("mousemove",(function(e){if(r.allowDraw){var i=t.getMousePosition(e);if(i.x!=r.downPoint.x||i.y!=r.downPoint.y){var n=i.x-r.downPoint.x,a=i.y-r.downPoint.y,o=Math.sqrt(n*n+a*a),s=Math.abs(n),A=Math.abs(a),l=s>A?n/s:a/A;l=l<0?l/5:l/3;var d=Math.min(Math.max(r.colorThreshold+Math.floor(l*o),1),255);d!=r.currentThreshold&&(r.currentThreshold=d,t.drawMask(r.downPoint.x,r.downPoint.y))}}})))},s.prototype.compressMaskData=function(){var t=MagicWandClass.traceContours(r.mask);return MagicWandClass.simplifyContours(t,r.simplifierTolerance,0)},s.prototype.drawBorderFromSimplifiedData=function(t,e){r.firstDraw&&(this.initCanvas(),r.firstDraw=!1);var i=r.imageInfo.context;e&&i.clearRect(0,0,r.imageInfo.width,r.imageInfo.height);for(var n=0;n<t.length;++n){i.beginPath();var a=t[n].inner?"red":"blue";this.drawArea(i,t[n].points,a)}},s.prototype.drawArea=function(t,e,i){t.moveTo(e[0].x,e[0].y);for(var n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);i&&(t.strokeStyle=i,t.stroke())},s.prototype.initCanvas=function(){var t=this.$canvas.get(0),e=this.$image.get(0);t.width=e.width,t.height=e.height,r.imageInfo={width:e.width,height:e.height,context:t.getContext("2d")},r.mask=null;var i=document.createElement("canvas").getContext("2d");i.canvas.width=r.imageInfo.width,i.canvas.height=r.imageInfo.height,i.drawImage(e,0,0,e.width,e.height),r.imageInfo.data=i.getImageData(0,0,r.imageInfo.width,r.imageInfo.height)},s.prototype.drawMask=function(t,e){var i={data:r.imageInfo.data.data,width:r.imageInfo.width,height:r.imageInfo.height,bytes:4};r.mask=MagicWandClass.floodFill(i,t,e,r.currentThreshold),r.mask=MagicWandClass.gaussBlurOnlyBorder(r.mask,r.blurRadius),this.drawBorderFromSimplifiedData(this.compressMaskData(),!0)},s.prototype.getMousePosition=function(e){var i=t(e.target).offset();return{x:Math.round((e.clientX||e.pageX)-i.left),y:Math.round((e.clientY||e.pageY)-i.top)}},s.prototype.updateImage=function(t,e){this.$image.attr("alt",e).attr("src",t),this.data.hideWhenEmpty&&this.show()},s.prototype.licquidMethod_select=function(t){this.drawBorderFromSimplifiedData(JSON.parse(t.selection),!0)},s})),define("drops/hotspot/hotspot",["jquery","lq/drop","lq/style","drops/magicWand/magicWand","underscore"],(function(t,e,i,n,a){"use strict";var o=[],r="selectionClicked";function s(n){e.call(this,t("<div />"),null,n),this.$image=t("<img />").css({width:"100%",height:"100%",overflow:"hidden"}).appendTo(this.$element),this.$canvas=t("<canvas />").css({position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",overflow:"hidden"}).appendTo(this.$element),i.renderStyles(this,null,this.$image),this.hideWhenNecessary(),this.applyEventTrigger("mouseEnter","mouseenter")}return e.extend(s,n),s.typeName="Hotspot",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition();var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t._update(e)})),this.addEventHandlers()},s.prototype._update=function(e){var i=this;t.each(e.Results,(function(t,e){o.push(e),i.drawBorderFromSimplifiedData(JSON.parse(e[i.data.selectedColumn||"Path"]))}))},s.prototype.addEventHandlers=function(){if(this.isEventEnabled(r)){this.$canvas.css({cursor:"pointer"});var t=this;this.$canvas.on("click",(function(e){var i=t.getMousePosition(e),n=t.$canvas.get(0).getContext("2d");n.clearRect(0,0,t.$image.get(0).width,t.$image.get(0).height),a.each(o,(function(e){var a=JSON.parse(e.Mask);if(!a.inner)for(var o=0;o<a.length;o++){n.beginPath();var s=a[o].inner?"red":"blue";if(t.drawArea(n,a[o].points,s),n.isPointInPath(i.x,i.y))return n.fillStyle="red",n.fill(),void t.triggerEvent(t.data.eventing[r].raisedEventName,e[t.data.eventArg||"Id"])}}))}))}},s})),define("drops/iframe/iframe",["jquery","lq","lq/drop","lq/style"],(function(t,e,i,n){"use strict";var a={data:{source:"text",url:"",actionId:"",parameters:[],eventsToCatch:[],scrolling:"auto"}};function o(e){i.call(this,t("<div/>"),a,e);var o=this;return this.$iframe=t("<iframe />").attr("scrolling",o.data.scrolling).css({width:"100%",height:"100%",border:0}).appendTo(o.$element),o.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),n.renderStyles(o),this.listenForMessage((function(t){var e=t.args?t.args[0]:null;o.triggerEvent(o.data.id+"."+t.eventName,e)})),o}return i.extend(o,i),o.typeName="Iframe",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},o.prototype.postRender=function(){this.$iframe.attr("src",this.getIframeUrl())},o.prototype.getIframeUrl=function(){if("text"===this.data.source)return this.data.url;var t=this.getParametersForIframe();return e.getTenantUrl("LicquidAction/Get/"+this.data.actionId)+"?parameters="+encodeURIComponent(JSON.stringify(t))},o.prototype.getParametersForIframe=function(){if(!this.data.parameters)return{};var t=this.piping.parameters,e={};return _.each(this.data.parameters,(function(i){e[i]=t.getValue(i)})),e},o.prototype.listenForMessage=function(t){var e=window.addEventListener?"addEventListener":"attachEvent",i=window.addEventListener?"message":"onmessage",n=this;window[e](i,(function(e){if(e.source===n.$iframe.get(0).contentWindow)try{var i=JSON.parse(e.data);t(i)}catch(t){}}),!1)},o.prototype.triggerEventForChild=function(t){this.$iframe.get(0).contentWindow.postMessage(JSON.stringify(t),"*")},o.prototype.show=function(){this.$iframe.css("display","inherit"),i.prototype.show.call(this)},o.prototype.hide=function(){this.$iframe.attr("src","").css("display","none"),i.prototype.hide.call(this)},o})),define("drops/image/image",["jquery","lq/drop","lq/style","lq","lq/util","lq/onlongpress","lq/tooltip"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{selectedResizeOption:"fill",openInline:!1,cropImageWidth:150,cropImageHeight:150,cropPositionX:0,cropPositionY:0,backgroundRepeat:!0,opacity:100,notOptimise:!1,optimisationLevel:0,title:{option:r.hardcoded}}};function A(n){e.call(this,t("<div/>"),s,n),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing),this.$image=t("<div />").css({width:"100%",height:"100%",overflow:"hidden"}).attr("tabindex",this.data.tabIndex).appendTo(this.$element),this.$element.addClass("boxToBorderSize"),this.tooltip=new r(this,this.data.title,this.$image),i.renderStyles(this,null,this.$image),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave")}return e.extend(A,e),A.typeName="Image",A.prototype.preRender=function(){this.piping.visibility.apply(this),this.tooltip.update(),this.setImageScaling(this.data.selectedResizeOption);var t=this.getImagePath();t&&this.setImage(t),100!==this.data.opacity&&this.setOpacity(this.data.opacity),this.initialize(),this.applyPosition()},A.prototype.getImagePath=function(){return this.data.physicalFile?n.getTenantUploads(this.data.physicalFile):this.data.cdnPath?n.getCdnUrl(this.data.cdnPath):null},A.prototype.setImage=function(t){this.$image.css("background-image","url("+t+")")},A.prototype.initialize=function(){var t=this;this.data.hyperlink&&(this.data.hyperlink=a.convertRelativeHyperlinkToHostName(this.data.hyperlink),this.$image.addClass("clickable").on("click",(function(e){window.open(t.data.hyperlink,t.data.openInline?"_self":"_blank"),e.stopPropagation()}))),this.data.hyperlink?(this.data.hyperlink=a.convertRelativeHyperlinkToHostName(this.data.hyperlink),(new o).applyLongPressOnElement(this.$element,this,null,(function(e){window.open(t.data.hyperlink,t.data.openInline?"_self":"_blank"),e.stopPropagation()}))):(new o).applyLongPressOnElement(this.$element,this),!this.designData&&this.isEventEnabled("onLongPress")&&this.$image.addClass("clickable"),this.data.eventing&&this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled&&this.$image.addClass("clickable").on("keypress",(function(e){13===e.keyCode&&t.triggerEvent(t.data.eventing.clicked.raisedEventName)}))},A.prototype.setOpacity=function(t){this.$image.css({opacity:t/100})},A.prototype.setImageScaling=function(t){"fill"===t?this.$image.css("background-size","100% 100%"):"fillKeepRatio"===t?this.$image.css("background-size","cover"):"crop"===t?this.$image.css("background-size",this.data.cropImageWidth+"px "+this.data.cropImageHeight+"px"):"completeImageKeepRatio"===t&&this.$image.css({"background-size":"contain","background-repeat":"no-repeat","background-position":this.data.horizontalImageAlignment+" "+this.data.verticalImageAlignment});var e="calc("+this.getPercentage(this.data.backgroundAnchorX)+" + "+this.data.cropPositionX+"px) calc("+this.getPercentage(this.data.backgroundAnchorY)+" + "+this.data.cropPositionY+"px)";this.$image.css("background-position",e),this.$image.css("background-repeat",this.data.backgroundRepeat?"repeat":"no-repeat")},A.prototype.getPercentage=function(t){switch(t){case"left":case"top":return"0%";case"center":default:return"50%";case"right":case"bottom":return"100%"}},A})),define("drops/imageKpi/imageKpi",["jquery","lq","lq/drop","lq/style","lq/util","underscore"],(function(t,e,i,n,a,o){"use strict";var r={data:{notOptimise:!1,optimisationLevel:0}};function s(e){i.call(this,t("<div/>"),r,e);var o=this;o.data.eventing=a.convertListOfKeyValuesToObject(o.data.eventing),o.value=this.data.nullImage?null:0,o.images=[],o.$element.addClass("boxToBorderSize").css({overflow:"hidden"}),o.$image=t("<img />").hide().appendTo(o.$element),n.renderStyles(o)}return i.extend(s,i),s.typeName="ImageKpi",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.loadImages()},s.prototype.loadImages=function(){var i=this,n=this.data.images;this.data.nullImage&&(n=n.concat([{fileName:this.data.nullImage,from:null,to:null}])),o.forEach(n,(function(i){var n=e.getTenantUploads(i.fileName);t("<img/>").on("load",(function(){a(this,n,i.fileName,i.to,i.from)})).attr("src",n)}));var a=function(t,e,n,a,o){var r={};r.url=e,r.fileName=n,r.width=t.width,r.height=t.height,r.to=a,r.from=o,i.images.push(r),i.isTheImageWereLookingFor(r)&&i.replaceImage(r)}},s.prototype.updateImage=function(){var t=this,e=o.find(this.images,(function(e){return t.isTheImageWereLookingFor(e)}));this.replaceImage(e)},s.prototype.isTheImageWereLookingFor=function(t){return null!==this.value&&this.value>=t.from&&this.value<t.to||this.value===t.from},s.prototype.replaceImage=function(t){if(t){if(t.url!==this.$image.attr("src")){if("FillKeepRatio"===t.resizeOption){var e=t.width/t.height,i=this.$element.width(),n=this.$element.height(),a=i,o=i/e;o<n&&(a=n*e,o=n),this.$image.width(a).height(o)}else this.$image.width(this.$element.width()).height(this.$element.height());this.$image.attr("src",t.url).show()}}else this.$image.attr("src","")},s.prototype.clearValue=function(){this.value=null,this.updateImage()},s.prototype.setValue=function(t){var e=parseFloat(t.value);this.value=isNaN(e)?null:e,this.updateImage()},s.prototype.getNullImageUrl=function(){return this.data.nullImage?e.getTenantUploads(this.data.nullImage):e.getCdnUrl("Drops/ImageKPI/no_image.png")},s.prototype.getUploadUrl=function(t){return t?e.getTenantUploads(t):e.getCdnUrl("Drops/ImageKPI/no_image.png")},s})),define("drops/input/input",["jquery","underscore","lq/drop","lq/style","lq/constants","lq/util","lq/tooltip","jquery.placeholder","lq/required","lq"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d={data:{title:{option:r.hardcoded},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},useCustomImage:!1,changedDelay:500,autocomplete:"on"}};function c(s){i.call(this,t("<div/>"),d,s),this.data.eventing=o.convertListOfKeyValuesToObject(this.data.eventing)||{},this.typeOfCurrentValue=a.valueTypes.string;var A=this.data.maskedInput?"password":"text";this.$input=t("<input type="+A+" />").addClass("boxToBorderSize").attr("name",this.data.name).attr("tabindex",this.data.tabIndex).attr("placeholder",this.data.watermark).attr("autocomplete",this.data.autocomplete).val(this.data.defaultValue||"").css({width:"100%",height:"100%"}).appendTo(this.$element),this.data.maskedInput?(this.addTogglePassword(),this.changeOpenEyeIcon()):this.removeTogglePassword(),this.$input[0].setAttribute("value",""),this.tooltip=new r(this,this.data.title,this.$input);var l=this,c=this.getEventDataFor("focusLost");c.enabled&&this.$input.on("blur",(function(){l.triggerEvent(c.raisedEventName)}));var u=this.getEventDataFor("enterPressed");u.enabled&&this.$input.on("keyup",(function(t){13===t.keyCode&&l.triggerEvent(u.raisedEventName)}));var h=this.getEventDataFor("changed");h.enabled&&(this.subscribeEventHandler(this.$input,"keydown",(function(){e.has(l,"lastChangedEventValue")||(l.lastChangedEventValue=l.getValue())})),this.subscribeEventHandler(this.$input,"keypress input",e.debounce((function(){l.lastChangedEventValue!==l.getValue()&&(l.lastChangedEventValue=l.getValue(),l.triggerEvent(h.raisedEventName))}),this.data.changedDelay))),this.$element.css({whiteSpace:"pre-wrap"}),n.renderStyles(this,null,this.$input)}return i.extend(c,i),c.typeName="Input",c.prototype.preRender=function(){this.$input.attr("id",this.rootDrop.instanceId+"_"+this.data.id),this.tooltip.update(),this.piping.visibility.apply(this),this.piping.required.apply(this),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),A.prototype.addRemoveRequiredIndicator(this),this.applyPosition(),this.initialize()},c.prototype.postRender=function(){this.$input.placeholder()},c.prototype.initialize=function(){var t=this;this.$input.on("keyup",(function(){t.updateRequiredIndicator(),this.setAttribute("value",this.value)})),this.data.readOnly&&this.$input.prop("readonly",!0),this.data.hasMaxLength&&this.$input.attr("maxlength",this.data.maxLength)},c.prototype.focus=function(){this.$input.trigger("focus")},c.prototype.getDefaultEventArg=function(){return this.getValue()},c.prototype.getValue=function(){return this.formatter.convertToLicquidFormat(this.typeOfCurrentValue,this.$input.val())},c.prototype.clearValue=function(){this.$input.val(""),this.$input[0].setAttribute("value",""),this.lastChangedEventValue="",this.updateRequiredIndicator()},c.prototype.setValue=function(t){var e=this.formatter.convertFromLicquidFormat(t.type,null===t.value?"":t.value);this.$input.val(e),this.$input[0].setAttribute("value",e),this.typeOfCurrentValue=t.type,this.lastChangedEventValue=t.value,this.updateRequiredIndicator()},c.prototype.addTogglePassword=function(){var e=this;this.$togglePassword=t('<div class = "input-fa input-fa-eye">').prop("title","Show password").css({position:"absolute",top:"50%",right:"5px",transform:"translateY(-50%)"}).on("click",(function(){"password"===e.$input[0].type?e.changeClosedEyeIcon():e.changeOpenEyeIcon()})).appendTo(this.$element)},c.prototype.removeTogglePassword=function(){this.$togglePassword&&(this.$togglePassword.remove(),delete this.$togglePassword)},c.prototype.getOpenEyeImagePath=function(){return this.data.physicalFileOpenEye?l.getTenantUploads(this.data.physicalFileOpenEye):null},c.prototype.getClosedEyeImagePath=function(){return this.data.physicalFileClosedEye?l.getTenantUploads(this.data.physicalFileClosedEye):null},c.prototype.changeOpenEyeIcon=function(){this.$togglePassword||this.addTogglePassword();var t="open",e=this.getOpenEyeImagePath();e&&this.data.maskedInput&&this.data.useCustomImage?this.setCustomEyeImage(e,t):this.data.maskedInput&&this.clearCustomEyeImage(t),this.$input[0].type="password"},c.prototype.changeClosedEyeIcon=function(){this.$togglePassword||this.addTogglePassword();var t="closed",e=this.getClosedEyeImagePath();e&&this.data.maskedInput&&this.data.useCustomImage?this.setCustomEyeImage(e,t):this.data.maskedInput&&this.clearCustomEyeImage(t),this.$input[0].type="text"},c.prototype.setCustomEyeImage=function(e,i){this.$togglePassword.css({width:"16px",height:"16px",backgroundImage:"url("+require.toUrl(e)+")",backgroundSize:"100% 100%"}).removeClass("input-fa-eye input-fa-eye-slash"),"closed"===i?t(this.$togglePassword).prop("title","Hide password"):"open"===i&&t(this.$togglePassword).prop("title","Show password")},c.prototype.clearCustomEyeImage=function(e){t(this.$togglePassword).css({width:"",height:"",backgroundImage:"",backgroundSize:""}),"closed"===e?t(this.$togglePassword).prop("title","Hide password").addClass("input-fa-eye-slash").removeClass("input-fa-eye"):"open"===e&&t(this.$togglePassword).prop("title","Show password").addClass("input-fa-eye").removeClass("input-fa-eye-slash")},c.prototype.setPlaceholder=function(t){this.$input.attr("placeholder",t)},c})),define("drops/jitsiMeeting/jitsiMeeting",["jquery","when","lq","lq/drop","lq/style"],(function(t,e,i,n,a){"use strict";var o={data:{meetingHasName:!1}};function r(e){n.call(this,t("<div/>"),o,e);var i=this;return i.meetingDataIsUpdated=!1,i.isRendered=!1,i.JitsiMeetExternalAPI=void 0,i.runningMeetingAPI=void 0,i.$meeting=t("<div />").css({width:"100%",height:"100%",border:0}).appendTo(i.$element),i.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),a.renderStyles(i),i}return n.extend(r,n),r.typeName="JitsiMeeting",r.prototype.preRender=function(){var t=this;this.piping.visibility.apply(this),this.applyPosition(),this.piping.datasources.registerDatasourceListener(this.data.meetingDatasource,(function(e){t.meetingData=e,t.meetingDataIsUpdated=!0,t.tryStartMeeting()}));var i=t.data.jitsiServer||"meet.jit.si",n=e.defer();return require(["https://"+i+"/external_api.js"],(function(e){n.resolve(),t.JitsiMeetExternalAPI=e,t.tryStartMeeting()})),n.promise},r.prototype.postRender=function(){this.isRendered=!0,this.tryStartMeeting()},r.prototype.tryStartMeeting=function(){var t=this;t.meetingDataIsUpdated&&t.isRendered&&t.JitsiMeetExternalAPI&&(t.meetingDataIsUpdated=!1,window.cordova&&window.cordova.plugins&&window.cordova.plugins.diagnostic&&window.cordova.plugins.diagnostic.requestRuntimePermissions?window.cordova.plugins.diagnostic.requestRuntimePermissions((function(){t.startMeeting()}),(function(t){console.error("The following error occurred: "+t)}),[window.cordova.plugins.diagnostic.permission.CAMERA,window.cordova.plugins.diagnostic.permission.RECORD_AUDIO]):t.startMeeting())},r.prototype.startMeeting=function(){var t=this,e=t.meetingData.results[0];this.runningMeetingAPI&&this.runningMeetingAPI.dispose();var i=t.data.jitsiServer||"meet.jit.si",n={roomName:"LicquidMeeting-"+e[t.data.meetingIdOutput],parentNode:t.$meeting[0],userInfo:{displayName:e[t.data.fullNameOutput]},configOverwrite:{disableDeepLinking:!0,disableInviteFunctions:!0,doNotStoreRoom:!0},interfaceConfigOverwrite:{SHOW_CHROME_EXTENSION_BANNER:!1}},a=new t.JitsiMeetExternalAPI(i,n);t.runningMeetingAPI=a,t.data.meetingHasName&&a.executeCommand("subject",e[t.data.meetingNameOutput]);var o=e[t.data.fullNameavaterURLOutputOutput];o&&a.executeCommand("avatarUrl",o),a.addEventListener("readyToClose",(function(){t.triggerEventIfEnabled("meetingEnded")}))},r})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("sortable",e):(t=t||self).Sortable=e()}(this,(function(){"use strict";function t(t,e){var i,n=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)),n}function e(e){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?t(Object(n),!0).forEach((function(t){var i,a;i=e,t=n[a=t],a in i?Object.defineProperty(i,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[a]=t})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i,n=arguments[e];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function a(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(i="Object"===i&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function r(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var s=r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),A=r(/Edge/i),l=r(/firefox/i),d=r(/safari/i)&&!r(/chrome/i)&&!r(/android/i),c=r(/iP(ad|od|hone)/i),u=r(/chrome/i)&&r(/android/i),h={capture:!1,passive:!1};function p(t,e,i){t.addEventListener(e,i,!s&&h)}function g(t,e,i){t.removeEventListener(e,i,!s&&h)}function f(t,e){if(e&&(">"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function m(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===i)&&f(t,e)||n&&t===i)return t}while(t!==i&&(t=(a=t).host&&a!==document&&a.host.nodeType?a.host:a.parentNode))}var a;return null}var v,y=/\s+/g;function w(t,e,i){var n;t&&e&&(t.classList?t.classList[i?"add":"remove"](e):(n=(" "+t.className+" ").replace(y," ").replace(" "+e+" "," "),t.className=(n+(i?" "+e:"")).replace(y," ")))}function b(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];n[e=e in n||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=i+("string"==typeof i?"":"px")}}function B(t,e){var i="";if("string"==typeof t)i=t;else do{var n=b(t,"transform")}while(n&&"none"!==n&&(i=n+" "+i),!e&&(t=t.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(i)}function C(t,e,i){if(t){var n=t.getElementsByTagName(e),a=0,o=n.length;if(i)for(;a<o;a++)i(n[a],a);return n}return[]}function x(){return document.scrollingElement||document.documentElement}function D(t,e,i,n,a){if(t.getBoundingClientRect||t===window){var o,r,A,l,d,c,u=t!==window&&t.parentNode&&t!==x()?(r=(o=t.getBoundingClientRect()).top,A=o.left,l=o.bottom,d=o.right,c=o.height,o.width):(A=r=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,window.innerWidth);if((e||i)&&t!==window&&(a=a||t.parentNode,!s))do{if(a&&a.getBoundingClientRect&&("none"!==b(a,"transform")||i&&"static"!==b(a,"position"))){var h=a.getBoundingClientRect();r-=h.top+parseInt(b(a,"border-top-width")),A-=h.left+parseInt(b(a,"border-left-width")),l=r+o.height,d=A+o.width;break}}while(a=a.parentNode);return n&&t!==window&&(n=(e=B(a||t))&&e.a,t=e&&e.d,e&&(l=(r/=t)+(c/=t),d=(A/=n)+(u/=n))),{top:r,left:A,bottom:l,right:d,width:u,height:c}}}function T(t,e,i){for(var n=k(t,!0),a=D(t)[e];n;){var o=D(n)[i];if(!("top"===i||"left"===i?o<=a:a<=o))return n;if(n===x())break;n=k(n,!1)}return!1}function I(t,e,i,n){for(var a=0,o=0,r=t.children;o<r.length;){if("none"!==r[o].style.display&&r[o]!==Lt.ghost&&(n||r[o]!==Lt.dragged)&&m(r[o],i.draggable,t,!1)){if(a===e)return r[o];a++}o++}return null}function E(t,e){for(var i=t.lastElementChild;i&&(i===Lt.ghost||"none"===b(i,"display")||e&&!f(i,e));)i=i.previousElementSibling;return i||null}function S(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Lt.clone||e&&!f(t,e)||i++;return i}function F(t){var e=0,i=0,n=x();if(t)do{var a=(o=B(t)).a,o=o.d}while(e+=t.scrollLeft*a,i+=t.scrollTop*o,t!==n&&(t=t.parentNode));return[e,i]}function k(t,e){if(!t||!t.getBoundingClientRect)return x();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var a=b(i);if(i.clientWidth<i.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!i.getBoundingClientRect||i===document.body)return x();if(n||e)return i;n=!0}}}while(i=i.parentNode);return x()}function _(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function U(t,e){return function(){var i;v||(1===(i=arguments).length?t.call(this,i[0]):t.apply(this,i),v=setTimeout((function(){v=void 0}),e))}}function Q(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function P(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function L(t,e){b(t,"position","absolute"),b(t,"top",e.top),b(t,"left",e.left),b(t,"width",e.width),b(t,"height",e.height)}function H(t){b(t,"position",""),b(t,"top",""),b(t,"left",""),b(t,"width",""),b(t,"height","")}var O="Sortable"+(new Date).getTime();var M=[],N={initializeByDefault:!0},R={mount:function(t){for(var e in N)!N.hasOwnProperty(e)||e in t||(t[e]=N[e]);M.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),M.push(t)},pluginEvent:function(t,i,n){var a=this;this.eventCanceled=!1,n.cancel=function(){a.eventCanceled=!0};var o=t+"Global";M.forEach((function(a){i[a.pluginName]&&(i[a.pluginName][o]&&i[a.pluginName][o](e({sortable:i},n)),i.options[a.pluginName]&&i[a.pluginName][t]&&i[a.pluginName][t](e({sortable:i},n)))}))},initializePlugins:function(t,e,i,a){for(var o in M.forEach((function(a){var o=a.pluginName;(t.options[o]||a.initializeByDefault)&&((a=new a(t,e,t.options)).sortable=t,a.options=t.options,t[o]=a,n(i,a.defaults))})),t.options){var r;t.options.hasOwnProperty(o)&&void 0!==(r=this.modifyOption(t,o,t.options[o]))&&(t.options[o]=r)}},getEventProperties:function(t,e){var i={};return M.forEach((function(a){"function"==typeof a.eventProperties&&n(i,a.eventProperties.call(e[a.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return M.forEach((function(a){t[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[e]&&(n=a.optionListeners[e].call(t[a.pluginName],i))})),n}};function $(t){var i=t.sortable,n=t.rootEl,a=t.name,o=t.targetEl,r=t.cloneEl,l=t.toEl,d=t.fromEl,c=t.oldIndex,u=t.newIndex,h=t.oldDraggableIndex,p=t.newDraggableIndex,g=t.originalEvent,f=t.putSortable,m=t.extraEventProperties;if(i=i||n&&n[O]){var v,y=i.options;t="on"+a.charAt(0).toUpperCase()+a.substr(1);!window.CustomEvent||s||A?(v=document.createEvent("Event")).initEvent(a,!0,!0):v=new CustomEvent(a,{bubbles:!0,cancelable:!0}),v.to=l||n,v.from=d||n,v.item=o||n,v.clone=r,v.oldIndex=c,v.newIndex=u,v.oldDraggableIndex=h,v.newDraggableIndex=p,v.originalEvent=g,v.pullMode=f?f.lastPutMode:void 0;var w,b=e(e({},m),R.getEventProperties(a,i));for(w in b)v[w]=b[w];n&&n.dispatchEvent(v),y[t]&&y[t].call(i,v)}}function q(t,i){var n=(a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).evt,a=function(t,e){if(null==t)return{};var i,n=function(t,e){if(null==t)return{};for(var i,n={},a=Object.keys(t),o=0;o<a.length;o++)i=a[o],0<=e.indexOf(i)||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols)for(var a=Object.getOwnPropertySymbols(t),o=0;o<a.length;o++)i=a[o],0<=e.indexOf(i)||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i]);return n}(a,V);R.pluginEvent.bind(Lt)(t,i,e({dragEl:K,parentEl:W,ghostEl:G,rootEl:Y,nextEl:j,lastDownEl:X,cloneEl:J,cloneHidden:Z,dragStarted:ut,putSortable:ot,activeSortable:Lt.active,originalEvent:n,oldIndex:tt,oldDraggableIndex:it,newIndex:et,newDraggableIndex:nt,hideGhostForTarget:_t,unhideGhostForTarget:Ut,cloneNowHidden:function(){Z=!0},cloneNowShown:function(){Z=!1},dispatchSortableEvent:function(t){z({sortable:i,name:t,originalEvent:n})}},a))}var V=["evt"];function z(t){$(e({putSortable:ot,cloneEl:J,targetEl:K,rootEl:Y,oldIndex:tt,oldDraggableIndex:it,newIndex:et,newDraggableIndex:nt},t))}var K,W,G,Y,j,X,J,Z,tt,et,it,nt,at,ot,rt,st,At,lt,dt,ct,ut,ht,pt,gt,ft,mt=!1,vt=!1,yt=[],wt=!1,bt=!1,Bt=[],Ct=!1,xt=[],Dt="undefined"!=typeof document,Tt=c,It=A||s?"cssFloat":"float",Et=Dt&&!u&&!c&&"draggable"in document.createElement("div"),St=function(){if(Dt){if(s)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ft=function(t,e){var i=b(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),a=I(t,0,e),o=I(t,1,e),r=a&&b(a),s=o&&b(o),A=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+D(a).width;t=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+D(o).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":a&&r.float&&"none"!==r.float?(e="left"===r.float?"left":"right",!o||"both"!==s.clear&&s.clear!==e?"horizontal":"vertical"):a&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||n<=A&&"none"===i[It]||o&&"none"===i[It]&&n<A+t)?"vertical":"horizontal"},kt=function(t){function e(t,i){return function(n,a,o,r){var s=n.options.group.name&&a.options.group.name&&n.options.group.name===a.options.group.name;return!(null!=t||!i&&!s)||null!=t&&!1!==t&&(i&&"clone"===t?t:"function"==typeof t?e(t(n,a,o,r),i)(n,a,o,r):(a=(i?n:a).options.group.name,!0===t||"string"==typeof t&&t===a||t.join&&-1<t.indexOf(a)))}}var n={},a=t.group;a&&"object"==i(a)||(a={name:a}),n.name=a.name,n.checkPull=e(a.pull,!0),n.checkPut=e(a.put),n.revertClone=a.revertClone,t.group=n},_t=function(){!St&&G&&b(G,"display","none")},Ut=function(){!St&&G&&b(G,"display","")};function Qt(t){if(K){t=t.touches?t.touches[0]:t;var e=(a=t.clientX,o=t.clientY,yt.some((function(t){if((n=t[O].options.emptyInsertThreshold)&&!E(t)){var e=D(t),i=a>=e.left-n&&a<=e.right+n,n=o>=e.top-n&&o<=e.bottom+n;return i&&n?r=t:void 0}})),r);if(e){var i,n={};for(i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[O]._onDragOver(n)}}var a,o,r}function Pt(t){K&&K.parentNode[O]._isOutsideThisEl(t.target)}function Lt(t,i){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=i=n({},i),t[O]=this;var a,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ft(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Lt.supportPointer&&"PointerEvent"in window&&!d,emptyInsertThreshold:5};for(a in R.initializePlugins(this,t,r),r)a in i||(i[a]=r[a]);for(o in kt(i),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!i.forceFallback&&Et,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?p(t,"pointerdown",this._onTapStart):(p(t,"mousedown",this._onTapStart),p(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(p(t,"dragover",this),p(t,"dragenter",this)),yt.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),n(this,function(){var t,i=[];return{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){var n,a;"none"!==b(t,"display")&&t!==Lt.ghost&&(i.push({target:t,rect:D(t)}),n=e({},i[i.length-1].rect),!t.thisAnimationDuration||(a=B(t,!0))&&(n.top-=a.f,n.left-=a.e),t.fromRect=n)}))},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(i,{target:t}),1)},animateAll:function(e){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof e&&e());var a=!1,o=0;i.forEach((function(t){var e=0,i=t.target,r=i.fromRect,s=D(i),A=i.prevFromRect,l=i.prevToRect,d=t.rect,c=B(i,!0);c&&(s.top-=c.f,s.left-=c.e),i.toRect=s,i.thisAnimationDuration&&_(A,s)&&!_(r,s)&&(d.top-s.top)/(d.left-s.left)==(r.top-s.top)/(r.left-s.left)&&(t=d,c=A,A=l,l=n.options,e=Math.sqrt(Math.pow(c.top-t.top,2)+Math.pow(c.left-t.left,2))/Math.sqrt(Math.pow(c.top-A.top,2)+Math.pow(c.left-A.left,2))*l.animation),_(s,r)||(i.prevFromRect=r,i.prevToRect=s,e=e||n.options.animation,n.animate(i,d,s,e)),e&&(a=!0,o=Math.max(o,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),a?t=setTimeout((function(){"function"==typeof e&&e()}),o):"function"==typeof e&&e(),i=[]},animate:function(t,e,i,n){var a,o;n&&(b(t,"transition",""),b(t,"transform",""),a=(o=B(this.el))&&o.a,o=o&&o.d,a=(e.left-i.left)/(a||1),o=(e.top-i.top)/(o||1),t.animatingX=!!a,t.animatingY=!!o,b(t,"transform","translate3d("+a+"px,"+o+"px,0)"),this.forRepaintDummy=t.offsetWidth,b(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),b(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){b(t,"transition",""),b(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n))}}}())}function Ht(t,e,i,n,a,o,r,l){var d,c,u=t[O],h=u.options.onMove;return!window.CustomEvent||s||A?(d=document.createEvent("Event")).initEvent("move",!0,!0):d=new CustomEvent("move",{bubbles:!0,cancelable:!0}),d.to=e,d.from=t,d.dragged=i,d.draggedRect=n,d.related=a||e,d.relatedRect=o||D(e),d.willInsertAfter=l,d.originalEvent=r,t.dispatchEvent(d),h?h.call(u,d,r):c}function Ot(t){t.draggable=!1}function Mt(){Ct=!1}function Nt(t){return setTimeout(t,0)}function Rt(t){return clearTimeout(t)}Dt&&!u&&document.addEventListener("click",(function(t){if(vt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),vt=!1}),!0),Lt.prototype={constructor:Lt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,K):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,a=n.preventOnFilter,o=t.type,r=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(r||t).target,A=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,l=n.filter;if(function(t){xt.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&xt.push(n)}}(i),!K&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!A.isContentEditable&&(this.nativeDraggable||!d||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=m(s,n.draggable,i,!1))&&s.animated||X===s)){if(tt=S(s),it=S(s,n.draggable),"function"==typeof l){if(l.call(this,t,s,this))return z({sortable:e,rootEl:A,name:"filter",targetEl:s,toEl:i,fromEl:i}),q("filter",e,{evt:t}),void(a&&t.cancelable&&t.preventDefault())}else if(l=l&&l.split(",").some((function(n){if(n=m(A,n.trim(),i,!1))return z({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),q("filter",e,{evt:t}),!0})))return void(a&&t.cancelable&&t.preventDefault());n.handle&&!m(A,n.handle,i,!1)||this._prepareDragStart(t,r,s)}}},_prepareDragStart:function(t,e,i){var n,a=this,o=a.el,r=a.options,d=o.ownerDocument;i&&!K&&i.parentNode===o&&(n=D(i),Y=o,W=(K=i).parentNode,j=K.nextSibling,X=i,at=r.group,rt={target:Lt.dragged=K,clientX:(e||t).clientX,clientY:(e||t).clientY},dt=rt.clientX-n.left,ct=rt.clientY-n.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,K.style["will-change"]="all",n=function(){q("delayEnded",a,{evt:t}),Lt.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!l&&a.nativeDraggable&&(K.draggable=!0),a._triggerDragStart(t,e),z({sortable:a,name:"choose",originalEvent:t}),w(K,r.chosenClass,!0))},r.ignore.split(",").forEach((function(t){C(K,t.trim(),Ot)})),p(d,"dragover",Qt),p(d,"mousemove",Qt),p(d,"touchmove",Qt),p(d,"mouseup",a._onDrop),p(d,"touchend",a._onDrop),p(d,"touchcancel",a._onDrop),l&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),q("delayStart",this,{evt:t}),!r.delay||r.delayOnTouchOnly&&!e||this.nativeDraggable&&(A||s)?n():Lt.eventCanceled?this._onDrop():(p(d,"mouseup",a._disableDelayedDrag),p(d,"touchend",a._disableDelayedDrag),p(d,"touchcancel",a._disableDelayedDrag),p(d,"mousemove",a._delayedDragTouchMoveHandler),p(d,"touchmove",a._delayedDragTouchMoveHandler),r.supportPointer&&p(d,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(n,r.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t,Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Ot(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;g(t,"mouseup",this._disableDelayedDrag),g(t,"touchend",this._disableDelayedDrag),g(t,"touchcancel",this._disableDelayedDrag),g(t,"mousemove",this._delayedDragTouchMoveHandler),g(t,"touchmove",this._delayedDragTouchMoveHandler),g(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?p(document,"pointermove",this._onTouchMove):p(document,e?"touchmove":"mousemove",this._onTouchMove):(p(K,"dragend",this),p(Y,"dragstart",this._onDragStart));try{document.selection?Nt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var i;mt=!1,Y&&K?(q("dragStarted",this,{evt:e}),this.nativeDraggable&&p(document,"dragover",Pt),i=this.options,t||w(K,i.dragClass,!1),w(K,i.ghostClass,!0),Lt.active=this,t&&this._appendGhost(),z({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(st){this._lastX=st.clientX,this._lastY=st.clientY,_t();for(var t=document.elementFromPoint(st.clientX,st.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(st.clientX,st.clientY))!==e;)e=t;if(K.parentNode[O]._isOutsideThisEl(t),e)do{if(e[O]&&e[O]._onDragOver({clientX:st.clientX,clientY:st.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Ut()}},_onTouchMove:function(t){if(rt){var e=(s=this.options).fallbackTolerance,i=s.fallbackOffset,n=t.touches?t.touches[0]:t,a=G&&B(G,!0),o=G&&a&&a.a,r=G&&a&&a.d,s=Tt&&ft&&F(ft);o=(n.clientX-rt.clientX+i.x)/(o||1)+(s?s[0]-Bt[0]:0)/(o||1),r=(n.clientY-rt.clientY+i.y)/(r||1)+(s?s[1]-Bt[1]:0)/(r||1);if(!Lt.active&&!mt){if(e&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))<e)return;this._onDragStart(t,!0)}G&&(a?(a.e+=o-(At||0),a.f+=r-(lt||0)):a={a:1,b:0,c:0,d:1,e:o,f:r},a="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")"),b(G,"webkitTransform",a),b(G,"mozTransform",a),b(G,"msTransform",a),b(G,"transform",a),At=o,lt=r,st=n),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!G){var t=this.options.fallbackOnBody?document.body:Y,e=D(K,!0,Tt,!0,t),i=this.options;if(Tt){for(ft=t;"static"===b(ft,"position")&&"none"===b(ft,"transform")&&ft!==document;)ft=ft.parentNode;ft!==document.body&&ft!==document.documentElement?(ft===document&&(ft=x()),e.top+=ft.scrollTop,e.left+=ft.scrollLeft):ft=x(),Bt=F(ft)}w(G=K.cloneNode(!0),i.ghostClass,!1),w(G,i.fallbackClass,!0),w(G,i.dragClass,!0),b(G,"transition",""),b(G,"transform",""),b(G,"box-sizing","border-box"),b(G,"margin",0),b(G,"top",e.top),b(G,"left",e.left),b(G,"width",e.width),b(G,"height",e.height),b(G,"opacity","0.8"),b(G,"position",Tt?"absolute":"fixed"),b(G,"zIndex","100000"),b(G,"pointerEvents","none"),Lt.ghost=G,t.appendChild(G),b(G,"transform-origin",dt/parseInt(G.style.width)*100+"% "+ct/parseInt(G.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,a=i.options;q("dragStart",this,{evt:t}),Lt.eventCanceled?this._onDrop():(q("setupClone",this),Lt.eventCanceled||((J=P(K)).removeAttribute("id"),J.draggable=!1,J.style["will-change"]="",this._hideClone(),w(J,this.options.chosenClass,!1),Lt.clone=J),i.cloneId=Nt((function(){q("clone",i),Lt.eventCanceled||(i.options.removeCloneOnHide||Y.insertBefore(J,K),i._hideClone(),z({sortable:i,name:"clone"}))})),e||w(K,a.dragClass,!0),e?(vt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(g(document,"mouseup",i._onDrop),g(document,"touchend",i._onDrop),g(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",a.setData&&a.setData.call(i,n,K)),p(document,"drop",i),b(K,"transform","translateZ(0)")),mt=!0,i._dragStartId=Nt(i._dragStarted.bind(i,e,t)),p(document,"selectstart",i),ut=!0,d&&b(document.body,"user-select","none"))},_onDragOver:function(t){var i,n,a,o,r=this.el,s=t.target,A=this.options,l=A.group,d=Lt.active,c=at===l,u=A.sort,h=ot||d,p=this,g=!1;if(!Ct){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=m(s,A.draggable,r,!0),L("dragOver"),Lt.eventCanceled)return g;if(K.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return M(!1);if(vt=!1,d&&!A.disabled&&(c?u||(n=W!==Y):ot===this||(this.lastPutMode=at.checkPull(this,d,K,t))&&l.checkPut(this,d,K,t))){if(a="vertical"===this._getDirection(t,s),i=D(K),L("dragOverValid"),Lt.eventCanceled)return g;if(n)return W=Y,H(),this._hideClone(),L("revert"),Lt.eventCanceled||(j?Y.insertBefore(K,j):Y.appendChild(K)),M(!0);if(!(B=E(r,A.draggable))||function(t,e,i){return i=D(E(i.el,i.options.draggable)),e?t.clientX>i.right+10||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+10}(t,a,this)&&!B.animated){if(B===K)return M(!1);if((s=B&&r===t.target?B:s)&&(C=D(s)),!1!==Ht(Y,r,K,i,s,C,t,!!s))return H(),B&&B.nextSibling?r.insertBefore(K,B.nextSibling):r.appendChild(K),W=r,N(),M(!0)}else if(B&&function(t,e,i){return i=D(I(i.el,0,i.options,!0)),e?t.clientX<i.left-10||t.clientY<i.top&&t.clientX<i.right:t.clientY<i.top-10||t.clientY<i.bottom&&t.clientX<i.left}(t,a,this)){if((_=I(r,0,A,!0))===K)return M(!1);if(C=D(s=_),!1!==Ht(Y,r,K,i,s,C,t,!1))return H(),r.insertBefore(K,_),W=r,N(),M(!0)}else if(s.parentNode===r){var f,v,y,B,C=D(s),x=K.parentNode!==r,F=(F=K.animated&&K.toRect||i,P=s.animated&&s.toRect||C,k=(o=a)?F.left:F.top,l=o?F.right:F.bottom,B=o?F.width:F.height,_=o?P.left:P.top,F=o?P.right:P.bottom,P=o?P.width:P.height,!(k===_||l===F||k+B/2===_+P/2)),k=a?"top":"left",_=(B=T(s,"top","top")||T(K,"top","top"))?B.scrollTop:void 0;if(ht!==s&&(v=C[k],wt=!1,bt=!F&&A.invertSwap||x),0!==(f=function(t,e,i,n,a,o,r,s){var A=n?t.clientY:t.clientX,l=n?i.height:i.width;t=n?i.top:i.left,n=n?i.bottom:i.right,i=!1;if(!r)if(s&&gt<l*a){if(wt=!wt&&(1===pt?t+l*o/2<A:A<n-l*o/2)||wt)i=!0;else if(1===pt?A<t+gt:n-gt<A)return-pt}else if(t+l*(1-a)/2<A&&A<n-l*(1-a)/2)return function(t){return S(K)<S(t)?1:-1}(e);return(i=i||r)&&(A<t+l*o/2||n-l*o/2<A)?t+l/2<A?1:-1:0}(t,s,C,a,F?1:A.swapThreshold,null==A.invertedSwapThreshold?A.swapThreshold:A.invertedSwapThreshold,bt,ht===s)))for(var U=S(K);(y=W.children[U-=f])&&("none"===b(y,"display")||y===G););if(0===f||y===s)return M(!1);pt=f;var P=(ht=s).nextElementSibling;x=!1;if(!1!==(F=Ht(Y,r,K,i,s,C,t,x=1===f)))return 1!==F&&-1!==F||(x=1===F),Ct=!0,setTimeout(Mt,30),H(),x&&!P?r.appendChild(K):s.parentNode.insertBefore(K,x?P:s),B&&Q(B,0,_-B.scrollTop),W=K.parentNode,void 0===v||bt||(gt=Math.abs(v-D(s)[k])),N(),M(!0)}if(r.contains(K))return M(!1)}return!1}function L(o,A){q(o,p,e({evt:t,isOwner:c,axis:a?"vertical":"horizontal",revert:n,dragRect:i,targetRect:C,canSort:u,fromSortable:h,target:s,completed:M,onMove:function(e,n){return Ht(Y,r,K,i,e,D(e),t,n)},changed:N},A))}function H(){L("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function M(e){return L("dragOverCompleted",{insertion:e}),e&&(c?d._hideClone():d._showClone(p),p!==h&&(w(K,(ot||d).options.ghostClass,!1),w(K,A.ghostClass,!0)),ot!==p&&p!==Lt.active?ot=p:p===Lt.active&&ot&&(ot=null),h===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){L("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===r&&!s.animated)&&(ht=null),A.dragoverBubble||t.rootEl||s===document||(K.parentNode[O]._isOutsideThisEl(t.target),e||Qt(t)),!A.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function N(){et=S(K),nt=S(K,A.draggable),z({sortable:p,name:"change",toEl:r,newIndex:et,newDraggableIndex:nt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){g(document,"mousemove",this._onTouchMove),g(document,"touchmove",this._onTouchMove),g(document,"pointermove",this._onTouchMove),g(document,"dragover",Qt),g(document,"mousemove",Qt),g(document,"touchmove",Qt)},_offUpEvents:function(){var t=this.el.ownerDocument;g(t,"mouseup",this._onDrop),g(t,"touchend",this._onDrop),g(t,"pointerup",this._onDrop),g(t,"touchcancel",this._onDrop),g(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;et=S(K),nt=S(K,i.draggable),q("drop",this,{evt:t}),W=K&&K.parentNode,et=S(K),nt=S(K,i.draggable),Lt.eventCanceled||(wt=bt=mt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Rt(this.cloneId),Rt(this._dragStartId),this.nativeDraggable&&(g(document,"drop",this),g(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&b(document.body,"user-select",""),b(K,"transform",""),t&&(ut&&(t.cancelable&&t.preventDefault(),i.dropBubble||t.stopPropagation()),G&&G.parentNode&&G.parentNode.removeChild(G),(Y===W||ot&&"clone"!==ot.lastPutMode)&&J&&J.parentNode&&J.parentNode.removeChild(J),K&&(this.nativeDraggable&&g(K,"dragend",this),Ot(K),K.style["will-change"]="",ut&&!mt&&w(K,(ot||this).options.ghostClass,!1),w(K,this.options.chosenClass,!1),z({sortable:this,name:"unchoose",toEl:W,newIndex:null,newDraggableIndex:null,originalEvent:t}),Y!==W?(0<=et&&(z({rootEl:W,name:"add",toEl:W,fromEl:Y,originalEvent:t}),z({sortable:this,name:"remove",toEl:W,originalEvent:t}),z({rootEl:W,name:"sort",toEl:W,fromEl:Y,originalEvent:t}),z({sortable:this,name:"sort",toEl:W,originalEvent:t})),ot&&ot.save()):et!==tt&&0<=et&&(z({sortable:this,name:"update",toEl:W,originalEvent:t}),z({sortable:this,name:"sort",toEl:W,originalEvent:t})),Lt.active&&(null!=et&&-1!==et||(et=tt,nt=it),z({sortable:this,name:"end",toEl:W,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){q("nulling",this),Y=K=W=G=j=J=X=Z=rt=st=ut=et=nt=tt=it=ht=pt=ot=at=Lt.dragged=Lt.ghost=Lt.clone=Lt.active=null,xt.forEach((function(t){t.checked=!0})),xt.length=At=lt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":K&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,a=i.length,o=this.options;n<a;n++)m(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||function(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){m(e=n.children[e],this.options.draggable,n,!1)&&(i[t]=e)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return m(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=R.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&kt(i)},destroy:function(){q("destroy",this);var t=this.el;t[O]=null,g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart),g(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),yt.splice(yt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){Z||(q("hideClone",this),Lt.eventCanceled||(b(J,"display","none"),this.options.removeCloneOnHide&&J.parentNode&&J.parentNode.removeChild(J),Z=!0))},_showClone:function(t){"clone"===t.lastPutMode?Z&&(q("showClone",this),Lt.eventCanceled||(K.parentNode!=Y||this.options.group.revertClone?j?Y.insertBefore(J,j):Y.appendChild(J):Y.insertBefore(J,K),this.options.group.revertClone&&this.animate(K,J),b(J,"display",""),Z=!1)):this._hideClone()}},Dt&&p(document,"touchmove",(function(t){(Lt.active||mt)&&t.cancelable&&t.preventDefault()})),Lt.utils={on:p,off:g,css:b,find:C,is:function(t,e){return!!m(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:U,closest:m,toggleClass:w,clone:P,index:S,nextTick:Nt,cancelNextTick:Rt,detectDirection:Ft,getChild:I},Lt.get=function(t){return t[O]},Lt.mount=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];(i=i[0].constructor===Array?i[0]:i).forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Lt.utils=e(e({},Lt.utils),t.utils)),R.mount(t)}))},Lt.create=function(t,e){return new Lt(t,e)};var $t,qt,Vt,zt,Kt,Wt,Gt=[],Yt=!(Lt.version="1.15.0");function jt(){Gt.forEach((function(t){clearInterval(t.pid)})),Gt=[]}function Xt(){clearInterval(Wt)}var Jt,Zt=U((function(t,e,i,n){if(e.scroll){var a,o=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,A=e.scrollSpeed,l=x(),d=!1;qt!==i&&(qt=i,jt(),$t=e.scroll,a=e.scrollFn,!0===$t&&($t=k(i,!0)));var c=0,u=$t;do{var h=u,p=(E=D(h)).top,g=E.bottom,f=E.left,m=E.right,v=E.width,y=E.height,w=void 0,B=h.scrollWidth,C=h.scrollHeight,T=b(h),I=h.scrollLeft,E=h.scrollTop,S=h===l?(w=v<B&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),y<C&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(w=v<B&&("auto"===T.overflowX||"scroll"===T.overflowX),y<C&&("auto"===T.overflowY||"scroll"===T.overflowY));I=w&&(Math.abs(m-o)<=s&&I+v<B)-(Math.abs(f-o)<=s&&!!I),E=S&&(Math.abs(g-r)<=s&&E+y<C)-(Math.abs(p-r)<=s&&!!E);if(!Gt[c])for(var F=0;F<=c;F++)Gt[F]||(Gt[F]={});Gt[c].vx==I&&Gt[c].vy==E&&Gt[c].el===h||(Gt[c].el=h,Gt[c].vx=I,Gt[c].vy=E,clearInterval(Gt[c].pid),0==I&&0==E||(d=!0,Gt[c].pid=setInterval(function(){n&&0===this.layer&&Lt.active._onTouchMove(Kt);var e=Gt[this.layer].vy?Gt[this.layer].vy*A:0,i=Gt[this.layer].vx?Gt[this.layer].vx*A:0;"function"==typeof a&&"continue"!==a.call(Lt.dragged.parentNode[O],i,e,t,Kt,Gt[this.layer].el)||Q(Gt[this.layer].el,i,e)}.bind({layer:c}),24))),c++}while(e.bubbleScroll&&u!==l&&(u=k(u,!1)));Yt=d}}),30);u=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,a=t.activeSortable,o=t.dispatchSortableEvent,r=t.hideGhostForTarget;t=t.unhideGhostForTarget;e&&(a=i||a,r(),e=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,e=document.elementFromPoint(e.clientX,e.clientY),t(),a&&!a.el.contains(e)&&(o("spill"),this.onSpill({dragEl:n,putSortable:i})))};function te(){}function ee(){}te.prototype={startIndex:null,dragStart:function(t){t=t.oldDraggableIndex,this.startIndex=t},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState(),(t=I(this.sortable.el,this.startIndex,this.options))?this.sortable.el.insertBefore(e,t):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:u},n(te,{pluginName:"revertOnSpill"}),ee.prototype={onSpill:function(t){var e=t.dragEl;(t=t.putSortable||this.sortable).captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),t.animateAll()},drop:u},n(ee,{pluginName:"removeOnSpill"});var ie,ne,ae,oe,re,se=[],Ae=[],le=!1,de=!1,ce=!1;function ue(t,e){Ae.forEach((function(i,n){(n=e.children[i.sortableIndex+(t?Number(n):0)])?e.insertBefore(i,n):e.appendChild(i)}))}function he(){se.forEach((function(t){t!==ae&&t.parentNode&&t.parentNode.removeChild(t)}))}return Lt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){t=t.originalEvent,this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):this.options.supportPointer?p(document,"pointermove",this._handleFallbackAutoScroll):t.touches?p(document,"touchmove",this._handleFallbackAutoScroll):p(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){t=t.originalEvent,this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):(g(document,"pointermove",this._handleFallbackAutoScroll),g(document,"touchmove",this._handleFallbackAutoScroll),g(document,"mousemove",this._handleFallbackAutoScroll)),Xt(),jt(),clearTimeout(v),v=void 0},nulling:function(){Kt=qt=$t=Yt=Wt=Vt=zt=null,Gt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i,n=this,a=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(a,o);Kt=t,e||this.options.forceAutoScrollFallback||A||s||d?(Zt(t,this.options,r,e),i=k(r,!0),!Yt||Wt&&a===Vt&&o===zt||(Wt&&Xt(),Wt=setInterval((function(){var r=k(document.elementFromPoint(a,o),!0);r!==i&&(i=r,jt()),Zt(t,n.options,r,e)}),10),Vt=a,zt=o)):this.options.bubbleScroll&&k(r,!0)!==x()?Zt(t,this.options,k(r,!1),!1):jt()}},n(t,{pluginName:"scroll",initializeByDefault:!0})}),Lt.mount(ee,te),Lt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){t=t.dragEl,Jt=t},dragOverValid:function(t){var e=t.completed,i=t.target,n=t.onMove,a=t.activeSortable,o=t.changed,r=t.cancel;a.options.swap&&(t=this.sortable.el,a=this.options,i&&i!==t&&(t=Jt,Jt=!1!==n(i)?(w(i,a.swapClass,!0),i):null,t&&t!==Jt&&w(t,a.swapClass,!1)),o(),e(!0),r())},drop:function(t){var e,i,n=t.activeSortable,a=t.putSortable,o=t.dragEl,r=a||this.sortable,s=this.options;Jt&&w(Jt,s.swapClass,!1),Jt&&(s.swap||a&&a.options.swap)&&o!==Jt&&(r.captureAnimationState(),r!==n&&n.captureAnimationState(),i=Jt,t=(e=o).parentNode,s=i.parentNode,t&&s&&!t.isEqualNode(i)&&!s.isEqualNode(e)&&(a=S(e),o=S(i),t.isEqualNode(s)&&a<o&&o++,t.insertBefore(i,t.children[a]),s.insertBefore(e,s.children[o])),r.animateAll(),r!==n&&n.animateAll())},nulling:function(){Jt=null}},n(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Jt}}})}),Lt.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?p(document,"pointerup",this._deselectMultiDrag):(p(document,"mouseup",this._deselectMultiDrag),p(document,"touchend",this._deselectMultiDrag))),p(document,"keydown",this._checkKeyDown),p(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,i){var n="";se.length&&ne===t?se.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){t=t.dragEl,ae=t},delayEnded:function(){this.isMultiDrag=~se.indexOf(ae)},setupClone:function(t){var e=t.sortable;t=t.cancel;if(this.isMultiDrag){for(var i=0;i<se.length;i++)Ae.push(P(se[i])),Ae[i].sortableIndex=se[i].sortableIndex,Ae[i].draggable=!1,Ae[i].style["will-change"]="",w(Ae[i],this.options.selectedClass,!1),se[i]===ae&&w(Ae[i],this.options.chosenClass,!1);e._hideClone(),t()}},clone:function(t){var e=t.sortable,i=t.rootEl,n=t.dispatchSortableEvent;t=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||se.length&&ne===e&&(ue(!0,i),n("clone"),t()))},showClone:function(t){var e=t.cloneNowShown,i=t.rootEl;t=t.cancel;this.isMultiDrag&&(ue(!1,i),Ae.forEach((function(t){b(t,"display","")})),e(),re=!1,t())},hideClone:function(t){var e=this,i=(t.sortable,t.cloneNowHidden);t=t.cancel;this.isMultiDrag&&(Ae.forEach((function(t){b(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),re=!0,t())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&ne&&ne.multiDrag._deselectMultiDrag(),se.forEach((function(t){t.sortableIndex=S(t)})),se=se.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ce=!0},dragStarted:function(t){var e,i=this;t=t.sortable;this.isMultiDrag&&(this.options.sort&&(t.captureAnimationState(),this.options.animation&&(se.forEach((function(t){t!==ae&&b(t,"position","absolute")})),e=D(ae,!1,!0,!0),se.forEach((function(t){t!==ae&&L(t,e)})),le=de=!0)),t.animateAll((function(){le=de=!1,i.options.animation&&se.forEach((function(t){H(t)})),i.options.sort&&he()})))},dragOver:function(t){var e=t.target,i=t.completed;t=t.cancel;de&&~se.indexOf(e)&&(i(!1),t())},revert:function(t){var e,i,n=t.fromSortable,a=t.rootEl,o=t.sortable,r=t.dragRect;1<se.length&&(se.forEach((function(t){o.addAnimationState({target:t,rect:de?D(t):r}),H(t),t.fromRect=r,n.removeAnimationState(t)})),de=!1,e=!this.options.removeCloneOnHide,i=a,se.forEach((function(t,n){(n=i.children[t.sortableIndex+(e?Number(n):0)])?i.insertBefore(t,n):i.appendChild(t)})))},dragOverCompleted:function(t){var e,i=t.sortable,n=t.isOwner,a=t.insertion,o=t.activeSortable,r=t.parentEl,s=t.putSortable;t=this.options;a&&(n&&o._hideClone(),le=!1,t.animation&&1<se.length&&(de||!n&&!o.options.sort&&!s)&&(e=D(ae,!1,!0,!0),se.forEach((function(t){t!==ae&&(L(t,e),r.appendChild(t))})),de=!0),n||(de||he(),1<se.length?(n=re,o._showClone(i),o.options.animation&&!re&&n&&Ae.forEach((function(t){o.addAnimationState({target:t,rect:oe}),t.fromRect=oe,t.thisAnimationDuration=null}))):o._showClone(i)))},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner;t=t.activeSortable;se.forEach((function(t){t.thisAnimationDuration=null})),t.options.animation&&!i&&t.multiDrag.isMultiDrag&&(oe=n({},e),e=B(ae,!0),oe.top-=e.f,oe.left-=e.e)},dragOverAnimationComplete:function(){de&&(de=!1,he())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,a=t.sortable,o=t.dispatchSortableEvent,r=t.oldIndex,s=t.putSortable,A=s||this.sortable;if(e){var l,d,c,u=this.options,h=n.children;if(!ce)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),w(ae,u.selectedClass,!~se.indexOf(ae)),~se.indexOf(ae))se.splice(se.indexOf(ae),1),ie=null,$({sortable:a,rootEl:i,name:"deselect",targetEl:ae,originalEvent:e});else{if(se.push(ae),$({sortable:a,rootEl:i,name:"select",targetEl:ae,originalEvent:e}),e.shiftKey&&ie&&a.el.contains(ie)){var p=S(ie);t=S(ae);if(~p&&~t&&p!==t)for(var g,f=p<t?(g=p,t):(g=t,p+1);g<f;g++)~se.indexOf(h[g])||(w(h[g],u.selectedClass,!0),se.push(h[g]),$({sortable:a,rootEl:i,name:"select",targetEl:h[g],originalEvent:e}))}else ie=ae;ne=A}ce&&this.isMultiDrag&&(de=!1,(n[O].options.sort||n!==i)&&1<se.length&&(l=D(ae),d=S(ae,":not(."+this.options.selectedClass+")"),!le&&u.animation&&(ae.thisAnimationDuration=null),A.captureAnimationState(),le||(u.animation&&(ae.fromRect=l,se.forEach((function(t){var e;t.thisAnimationDuration=null,t!==ae&&(e=de?D(t):l,t.fromRect=e,A.addAnimationState({target:t,rect:e}))}))),he(),se.forEach((function(t){h[d]?n.insertBefore(t,h[d]):n.appendChild(t),d++})),r===S(ae)&&(c=!1,se.forEach((function(t){t.sortableIndex!==S(t)&&(c=!0)})),c&&o("update"))),se.forEach((function(t){H(t)})),A.animateAll()),ne=A),(i===n||s&&"clone"!==s.lastPutMode)&&Ae.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ce=!1,Ae.length=0},destroyGlobal:function(){this._deselectMultiDrag(),g(document,"pointerup",this._deselectMultiDrag),g(document,"mouseup",this._deselectMultiDrag),g(document,"touchend",this._deselectMultiDrag),g(document,"keydown",this._checkKeyDown),g(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ce&&ce||ne!==this.sortable||t&&m(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;se.length;){var e=se[0];w(e,this.options.selectedClass,!1),se.shift(),$({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},n(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[O];e&&e.options.multiDrag&&!~se.indexOf(t)&&(ne&&ne!==e&&(ne.multiDrag._deselectMultiDrag(),ne=e),w(t,e.options.selectedClass,!0),se.push(t))},deselect:function(t){var e=t.parentNode[O],i=se.indexOf(t);e&&e.options.multiDrag&&~i&&(w(t,e.options.selectedClass,!1),se.splice(i,1))}},eventProperties:function(){var t=this,e=[],i=[];return se.forEach((function(n){var a;e.push({multiDragElement:n,index:n.sortableIndex}),a=de&&n!==ae?-1:de?S(n,":not(."+t.options.selectedClass+")"):S(n),i.push({multiDragElement:n,index:a})})),{items:a(se),clones:[].concat(Ae),oldIndicies:e,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),Lt})),define("lq/dropSortable",["jquery","sortable"],(function(t,e){"use strict";return{setUpSortable:function(i){e.create(i.$element[0],{animation:i.animation,ghostClass:i.ghostClass,forceFallback:i.forceFallback,scroll:i.scrolling,scrollSensitivity:i.scrollSensitivity,scrollSpeed:i.scrollSpeed,handle:i.handle,onStart:function(e){var n=t(e.item).data("id");i.drop.triggerEventIfEnabled("dragStart",n),t(".sortable-fallback").css("opacity","")},onMove:function(t){return t.related.matches(i.moveable)},onEnd:function(e){var n=t(e.item.previousElementSibling).data("id");n?i.drop.triggerEventIfEnabled("dragEnd",n):i.drop.triggerEventIfEnabled("dragEnd",void 0)}})}}})),define("drops/list/list",["jquery","underscore","lq/drop","lq/style","lq/util","lq/eventSource","when","lq/windowSize","lq/nestingContext","lq/onlongpress","lq/dropSortable","lq/required"],(function(t,e,i,n,a,o,r,s,A,l,d,c){"use strict";var u=["float","height","left","top","marginLeft","marginTop","marginRight","marginBottom","paddingLeft","paddingTop"],h={data:{size:{x:200,y:150},childPositionX:10,childPositionY:10,childSizeX:100,childSizeY:50,layout:"Vertical",selectionMode:"single",selectionBehavior:"ctrl+leftclick",required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},pagingEnabled:!1,pageSize:128,infiniteScroll:!1,stopAutoLoadPages:10,onlyLoadFirstPage:!1,groupByColumns:[],listItemAlignment:"left",isParentIdEnabled:!1,isAspectRatioEnabled:!1,ratioWidth:3,ratioHeight:3,longPressDelay:1e3,eventThreshold:90,stayThreshold:60,reverseScrolling:!1,listItemAutoSize:!1,horAlignDirection:"Left",verAlignDirection:"Top",enableSorting:!1,handlerDropName:"",enableScrollingWithSorting:!0,animationTime:300,scrollSensitivity:100,scrollSpeed:15,useCustomDragPreview:!1}},p=null,g=null,f=null,m=!1;function v(r){i.call(this,t("<div/>"),h,r),o.call(this,["PageOpened"]);var A=this;A.data.eventing=a.convertListOfKeyValuesToObject(A.data.eventing),A.initializeTemplates(),A.scrollTop=0,A.scrollLeft=0,A.rendered=!1,A.loading=!1,A.rendering=!1,A.afterRendering=[],A.loadedPages=0,A.groupingLoss=0,A.queuedData=null,A.loadedAllData=!1,A.newItems=0,A.$element.addClass("boxToBorderSize list-drop").css({whiteSpace:"pre-wrap"}),A.$list=t("<div />").attr("tabindex","-1").css({outline:"none",fontSize:0,borderRadius:"inherit"}).appendTo(A.$element),this.$scrollableElement=A.$list,this.hasInfiniteScrollEnabled()&&this.events(s,{Changed:e.throttle(this.checkScrollAndLoadNextPageIfNeeded.bind(this),50)}),n.renderStyles(A),A.$list.on("touchstart MSPointerDown pointerdown",(function(t){var e=A.$list.get(0);(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&t.stopPropagation()})),"Horizontal"===this.data.layout&&this.$element.css("white-space","nowrap"),this.subscribeEventHandler(t(window),"resize",(function(){A.setWidthOfListItems(),A.updateAlignContainerResize()})),A.allowSwipe=!0}function y(t){t.preventDefault()}i.extend(v),v.typeName="List",v.prototype.setWidthOfListItems=function(){if("Continuous"===this.data.layout&&this.data.listItemAutoSize){var i=t(this.$element.children().first()).width()-this.data.childPositionX,n=this.data.childSizeX,a=n+this.data.childPositionX;if(this.pool.length*a>i){var o=Math.floor(i/a);(n=i/o-this.data.childPositionX)>a-this.data.childPositionX&&(n=i/(o+1)-this.data.childPositionX)}e.each(this.pool,(function(t){t.$element.css("width",n+"px")}))}},v.prototype.decorateQueryParams=function(t){this.data.pagingEnabled&&(this.keepPagingInformation()?(t.page=0,t.pageSize=this.data.pageSize*this.loadedPages):(t.page=0,t.pageSize=this.data.pageSize),t.doNotExecuteCountQuery=this.data.infiniteScroll)},v.prototype.unsubscribeEventHandlers=function(){this.datasourceListenerId&&this.piping.datasources.unregisterDatasourceListener(this.datasourceListenerId)},v.prototype.preRender=function(){var t=this;if(this.piping.visibility.apply(this),this.piping.required.apply(this),c.prototype.addRemoveRequiredIndicator(this),this.data.useParentGroupData||(this.datasourceListenerId=this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e,i){return t.setData(e,i)}),(function(e){setTimeout((function(){t.scrollTop=t.$scrollableElement.scrollTop(),t.scrollLeft=t.$scrollableElement.scrollLeft()}),0),t.decorateQueryParams(e)}),this.deleteItem.bind(this))),this.nestingContext=new A(this.piping),this.data.isParentIdEnabled){var e=this.getNestingContext();e&&e.addDataSource(this.data.dataSource)}this.applyPosition(),this.relativePositioned=this.data.autoHeight||this.makesItGrow(),this.relativePositioned?("Horizontal"===this.data.layout&&this.$list.css({overflowX:"auto",overflowY:"hidden"}),this.$list.css({position:"relative"}),this.hasInfiniteScrollEnabled()&&(window.addEventListener&&window.addEventListener("mousewheel",(function(t){1===t.deltaY&&t.preventDefault()})),this.subscribeEventHandler(this.piping.$actionWrapper,"scroll",this.checkScrollAndLoadNextPageIfNeeded.bind(this))),this.$scrollableElement=this.piping.$actionWrapper):(this.$list.css({overflowX:"Horizontal"===this.data.layout?"auto":"hidden",overflowY:"Horizontal"===this.data.layout?"hidden":"auto",position:"absolute",top:0,right:0,bottom:0,left:0}),this.hasInfiniteScrollEnabled()&&this.subscribeEventHandler(this.$list,"scroll",this.checkScrollAndLoadNextPageIfNeeded.bind(this)),this.subscribeEventHandler(this.$list,"scroll",(function(){t.allowSwipe=!1,t.preventScrollEvent?t.preventScrollEvent=!1:t.scrolledByUser=!0})),this.subscribeEventHandler(this.$list,"touchend mouseup",(function(){t.allowSwipe=!0})),this.subscribeEventHandler(this.$list,"mousedown",(function(){t.mouseDown=!0})),this.subscribeEventHandler(this.$list,"mouseup",(function(){t.mouseDown=!1})))},v.prototype.setScrollTop=function(t){this.preventScrollEvent=!0,this.$list.scrollTop(t)},v.prototype.deleteItem=function(t){var i=e.findWhere(this.pool,{id:t});i&&(i.unsubscribeEventHandlersRecursive(),i.$element.remove(),this.removeDrop(i))},v.prototype.applyRelativePositioning=function(){this.data.autoHeight=!0};var w=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){w=!0}}))}catch(t){}var b=!!w&&{passive:!1},B="onwheel"in document.createElement("div")?"wheel":"mousewheel";v.prototype.disableScroll=function(){window.addEventListener("DOMMouseScroll",y,!1),window.addEventListener(B,y,b),window.addEventListener("touchmove",y,b)},v.prototype.enableScroll=function(){window.removeEventListener("DOMMouseScroll",y,!1),window.removeEventListener(B,y,b),window.removeEventListener("touchmove",y,b)},v.prototype.applyPositionForChild=function(t){var e=this.getItemOffset(),i=this.getItemSize(),n={position:"relative"};"Dynamic Vertical"===this.data.layout?(n.height="auto",n.width="auto",n.minHeight=i.y+"px",n.marginTop=e.y+"px",n.marginLeft=e.x+"px",n.marginRight=e.x+"px"):(this.data.reverseScrolling?n["Top"===this.data.verAlignDirection?"marginBottom":"marginTop"]=e.y+"px":n["Top"===this.data.verAlignDirection?"marginTop":"marginBottom"]=e.y+"px",n.height=i.y+"px",null!==t.data.left&&void 0!==t.data.left&&null!==t.data.right&&void 0!==t.data.right?(n.display="block",n.marginLeft=t.data.left+"px",n.marginRight=t.data.right+"px"):(n.display="Vertical"===this.data.layout?"block":"inline-block",n["Left"===this.data.horAlignDirection?"marginLeft":"marginRight"]=e.x+"px",n.width=i.x+"px")),"Horizontal"===this.data.layout&&"center"===this.data.listItemAlignment&&(t.data.isFirst?n.marginLeft="":t.data.isLast&&(n.marginRight="")),t.$element.css(n)},v.prototype.setData=function(t,e){var i=this;if(e){this.scrollTop=this.$scrollableElement.scrollTop(),this.scrollLeft=this.$scrollableElement.scrollLeft(),this.newItems++,i.newItems===i.data.pageSize&&(i.loadedPages++,i.newItems=0);var n=this.groupData(t);this.groupingLoss+=t.results.length-n.results.length,this.renderData(t,n,!1,e)}else{if(i.rendered&&!i.rendering)return i.update(t);i.queuedData=t}},v.prototype.postRender=function(){if(this.rendered=!0,this.data.mockData&&!this.queuedData&&!this.data.dataSource){var t=this.data.mockData.split("\n");if(t.length>1){var i=e.map(t.shift().split(","),(function(t){return t.trim()})),n=e.map(t,(function(t){return e.map(t.split(","),(function(t){return t.trim()}))})),a={outputs:e.object(e.map(i,(function(t){return[t,"System.String"]}))),results:e.map(n,(function(t){return e.object(e.map(t,(function(t,e){return[i[e]||t,t]})))})),totalResults:n.length};this.setData(a)}}return this.renderQueuedData()},v.prototype.renderQueuedData=function(){if(this.queuedData){var t=this.update(this.queuedData);return this.queuedData=null,t}},v.prototype.focus=function(){this.$list.trigger("focus")},v.prototype.initializeTemplates=function(){var t=this;e.chain(t.childDrops).filter((function(t){return void 0===t.data.itemTemplateType})),t.itemTemplatesData=e.filter(t.childDrops,(function(t){return"item"===t.data.itemTemplateType})),0===t.itemTemplatesData.length&&(t.itemTemplatesData=[t.getDefaultItemTemplate()]),t.headerTemplatesData=e.filter(t.childDrops,(function(t){return"header"===t.data.itemTemplateType})),t.swipeTemplatesData=e.filter(t.childDrops,(function(t){return"rightSwipeItem"===t.data.itemTemplateType||"leftSwipeItem"===t.data.itemTemplateType})),t.nextPageTemplateData=e.find(t.childDrops,(function(t){return"nextPage"===t.data.itemTemplateType}))||t.getDefaultNextPageTemplate(),t.preloaderTemplateData=e.find(t.childDrops,(function(t){return"preloader"===t.data.itemTemplateType}))||t.getDefaultPreloaderTemplate(),t.childDrops=t.headerTemplatesData.concat(t.itemTemplatesData).concat(t.swipeTemplatesData).concat([t.nextPageTemplateData,t.preloaderTemplateData])},v.prototype.getDefaultItemTemplate=function(){return{data:{type:"ListItem",itemTemplateType:"item",position:{x:10,y:10},size:{x:100,y:50},zIndex:0,color:"#3C3"},childDrops:[]}},v.prototype.getDefaultNextPageTemplate=function(){return{data:{type:"ListItem",itemTemplateType:"nextPage",position:{x:10,y:10},size:{x:100,y:50}},childDrops:[{data:{type:"Button",text:"Load more",size:{x:100,y:25},position:{x:0,y:0}}},{data:{type:"DynamicText",name:"total",size:{x:65,y:25},position:{x:0,y:25},styles:{normal:{text:{align:"right"},enabled:!0}}}},{data:{type:"Text",text:"total",size:{x:30,y:25},position:{x:70,y:25}}}]}},v.prototype.getDefaultPreloaderTemplate=function(){return{data:{type:"ListItem",itemTemplateType:"preloader",position:{x:10,y:10},size:{x:100,y:50}},childDrops:[{data:{type:"Image",cdnPath:"Drops/List/loading.gif",size:{x:100,y:25},position:{x:0,y:0}}}]}},v.prototype.supportsManyToManyData=function(){return"multiple"===this.data.selectionMode},v.prototype.getValue=function(){return this.selectedItems?"single"===this.data.selectionMode?1===this.selectedItems.length?this.selectedItems[0].id:null:e.pluck(this.selectedItems,"id"):null},v.prototype.setValue=function(e){if(!this.selectedItems||this.rendering)this.afterRendering.push(this.setValue.bind(this,e));else if(e.value){var i=t.isArray(e.value)?e.value:[e.value];"single"===this.data.selectionMode&&i.length>0&&(i=[i[0]]),this.updateSelection(i)}else this.clearValue();this.updateRequiredIndicator()},v.prototype.clearValue=function(){if(this.selectedItems){var t=this;e.each(t.pool,(function(i){-1!==e.indexOf(t.selectedItems,i)&&t.renderStyleIfEnabled("normal",i)})),t.selectedItems=[],this.updateRequiredIndicator()}},v.prototype.isValid=function(){return!this.data.required||!this.data.required.isRequired||!!this.selectedItems&&this.selectedItems.length>=1},v.prototype.updateSelection=function(t){var i=this,n=this.selectedItems,a=[];e.each(this.pool,(function(o){-1!==e.indexOf(t,o.id)?(a.push(o),i.renderStyleIfEnabled("selected",o)):-1!==e.indexOf(n,o)&&i.renderStyleIfEnabled("normal",o)})),this.selectedItems=a};var C=function(t,e){return null==t?e:t};v.prototype.getItemOffset=function(){return{x:C(this.data.childPositionX,this.itemTemplatesData[0].data.position.x),y:C(this.data.childPositionY,this.itemTemplatesData[0].data.position.y)}},v.prototype.getItemSize=function(){return{x:C(this.data.childSizeX,this.itemTemplatesData[0].data.size.x),y:C(this.data.childSizeY,this.itemTemplatesData[0].data.size.y)}},v.prototype.clear=function(){e.forEach(this.pool,(function(t){t.unsubscribeEventHandlersRecursive()})),this.$list.empty(),this.removeAllDrops(),this.nextPageItem=null,this.$alignContainer=null},v.prototype.update=function(i){if(this.clear(),this.updateAlignContainer(),i){var n=this;n.rendering=!0,n.selectedItems=[],n.resetItemCounters(),n.totalResults=i.totalResults,n.triggerPageOpened(i.totalResults,n.loadedPages-1,n.data.pageSize),n.data.infiniteScroll&&(n.loadedAllData=i.totalResults<n.data.pageSize);var a=n.piping.dropFactory.createDrops(n.headerTemplatesData,{dynamic:!0}),o=[];return e.each(a,(function(e){n.addDrop(e),n.setTotalData(e),n.setItemCounters(e),(new l).applyLongPressOnElement(e.$element,n,e.defaultEventArg,t.noop,null,n.$list,t.noop),o.push(e.render(n.$alignContainer,n.data.reverseScrolling)),n.incrementItemCounters(e)})),o.push(n.renderData(i)),setTimeout((function(){var t=n.calcTheWidthOfContainer(n.data.childPositionX,n.data.childSizeX,parseFloat(n.$list.css("width")),n.isListItemSizeDynamic);n.$alignContainer.css({width:t}),"left"!==n.data.listItemAlignment&&"Horizontal"===n.data.layout&&e.defer((function(){var t=0;"center"===n.data.listItemAlignment?t=(n.$list[0].scrollWidth-n.$list.width())/2:"right"===n.data.listItemAlignment&&(t=n.$list[0].scrollWidth-n.$list.width()),n.$list.scrollLeft(t)}))})),r.all(o)}},v.prototype.keepPagingInformation=function(){return this.data.pagingEnabled&&this.data.keepPagerPositionOnQueryReload&&0!==this.loadedPages},v.prototype.resetItemCounters=function(){this.currentRow=0,this.currentColumn=0,this.itemCounter=0,this.groupingLoss=0,this.loadedAllData=!1,this.keepPagingInformation()||(this.loadedPages=1)},v.prototype.incrementItemCounters=function(t){this.itemCounter++},v.prototype.decrementItemCounters=function(){this.itemCounter--};v.prototype.createDataItemForGroup=function(t,i){var n=e.pick(e.first(t),this.data.groupByColumns);return n.$groupData={results:t,outputs:i.outputs,totalResults:t.length},n};v.prototype.groupData=function(t){var i=this,n=i.data.groupByColumns;if(!n||0===n.length)return t;var a,o,r,s,A,l=(a=t.results,o=function(t){return function(t,i){return e.map(i,(function(e){return t[e]})).join("$")}(t,n)},r=e.map(a,(function(t){return{key:o(t),value:t}})),s={},A=[],e.each(r,(function(t){var e=s[t.key];e||(e=[],s[t.key]=e,A.push(e)),e.push(t.value)})),A),d=e.map(l,(function(e){return i.createDataItemForGroup(e,t)}));return{totalResults:t.totalResults,outputs:e.pick(t.outputs,n),results:d}},v.prototype.setItemCounters=function(t){var e=this;t.itemCounter=e.itemCounter,t.currentRow=e.currentRow,t.currentColumn=e.currentColumn},v.prototype.removeLastListItem=function(t){this.decrementItemCounters(),this.removeDrop(t),t.$element.remove()},v.prototype.getLastListItem=function(){for(var t=this,e=t.pool.length-1;e>=0;e--)if("item"===t.pool[e].data.itemTemplateType)return t.pool[e];return null},v.prototype.getFirstListItem=function(){for(var t=0;t<this.pool.length;t++)if("item"===this.pool[t].data.itemTemplateType)return this.pool[t];return null},v.prototype.isGroupingEnabled=function(){return this.data.groupByColumns&&this.data.groupByColumns.length>0};var x=5;if(window.location.search.length){var D=a.parseUriQuery(window.location.search.substring(1));if(D.listBatchSize){var T=parseInt(D.listBatchSize,10);T>0&&T<1024&&(x=T)}}return v.prototype.calcTheWidthOfContainer=function(e,i,n,a){if(a||"Continuous"===this.data.layout&&this.data.listItemAutoSize)return"center"!==this.data.listItemAlignment?(this.$alignContainer.css({float:this.data.listItemAlignment}),""):"Dynamic Vertical"!==this.data.layout&&"Vertical"!==this.data.layout?"fit-content":"";var o,r=this.$element[0].firstChild,s=this.itemTemplatesData[0].data,A=null!==s.left&&void 0!==s.left,l=null!==s.right&&void 0!==s.right;if(A||l){if(r.clientHeight<r.scrollHeight){var d=r.offsetWidth-r.clientWidth-parseInt(t(r).css("border-left-width"))-parseInt(t(r).css("border-right-width"));o=this.$element[0].getBoundingClientRect().width-d}else o=this.$element[0].getBoundingClientRect().width}else{var c;c="left"===this.data.listItemAlignment?e+i:2*e+i,"Vertical"===this.data.layout&&(o=c);var u=this.renderedItemsCount;if("Horizontal"===this.data.layout){for(var h=0;h<u-1;)c=c+e+i,h++;o="center"===this.data.listItemAlignment?c-2*e:c}else if("Continuous"===this.data.layout){u!==this.itemCounter&&(u=this.itemCounter);for(h=0;c+e+i<=n&&h<u-1;)c=c+e+i,h++;this.isNextPageLinkNeeded()&&this.nextPageItem&&(c+=this.nextPageItem.$element.outerWidth(!0)),o=c}else if("Dynamic Vertical"===this.data.layout){u+=this.itemCounter,o="";d=r.clientHeight<r.scrollHeight?r.offsetWidth-r.clientWidth-parseInt(t(r).css("border-left-width"))-parseInt(t(r).css("border-right-width")):0;o=this.$element[0].getBoundingClientRect().width-d}}return parseFloat(o)},v.prototype.updateAlignContainer=function(){this.$alignContainer||(this.$alignContainer=t("<div/>").appendTo(this.$list),this.data.enableSorting&&d.setUpSortable({drop:this,$element:this.$alignContainer,moveable:".sortable-list-item",ghostClass:"drag-ghost",forceFallback:this.data.useCustomDragPreview,handle:this.data.handlerDropName?".sortable-list-handler":null,animation:this.data.animationTime,scrolling:!!this.data.enableScrollingWithSorting&&this.$list[0],scrollSensitivity:this.data.scrollSensitivity,scrollSpeed:this.data.scrollSpeed})),this.setTheAlignContWidthAndMargins()},v.prototype.updateAlignContainerResize=function(){this.$alignContainer&&this.setTheAlignContWidthAndMargins()},v.prototype.setTheAlignContWidthAndMargins=function(){var t=this;setTimeout((function(){var e=t.calcTheWidthOfContainer(t.data.childPositionX,t.data.childSizeX,parseFloat(t.$list.css("width")),t.isListItemSizeDynamic);"left"===t.data.listItemAlignment?t.$alignContainer.css({width:e,marginRight:"auto"}):"center"===t.data.listItemAlignment?t.$alignContainer.css({width:e,margin:"0 auto"}):"right"===t.data.listItemAlignment&&t.$alignContainer.css({width:e,marginLeft:"auto"})}))},v.prototype.renderData=function(i,n,o,s){if(this.parent){var A=this;A.updateAlignContainer(),A.$element.removeClass("momentum-scrolling"),A.rendering=!0,n=n||A.groupData(i),A.totalResults=n.totalResults;var d=A.data.keyColumn||"Id",c=A.getLastListItem(),h=c&&c.getData(),p=e.first(n.results);A.isGroupingEnabled()&&h&&p&&e.isEqual(e.pick(h,A.data.groupByColumns),e.pick(p,A.data.groupByColumns))&&(p.$groupData.results=h.$groupData.results.concat(p.$groupData.results),A.removeLastListItem(c));var g=n.outputs,f=n.results;return A.data.useParentGroupData&&A.data.skipItemsWithEmptyId?f=e.filter(f,(function(t){return void 0!==t[d]&&null!==t[d]})):A.data.isParentIdEnabled&&(f=e.filter(f,(function(t){return A.piping.idOfItem===t[A.data.parentIdOutput]}))),e.each(f,(function(t){var i=e.findWhere(A.pool,{id:t[d]});i&&(i.setData(g,t),i.reapplyData(),f=e.filter(f,(function(e){return e!==t})))})),r.map(f,(function(t){var e=A.piping.fork(t,A,A.data.keyColumn);return A.itemTemplatesData.length>1?r.reduce(A.itemTemplatesData,(function(i,n,o){return i||(jQuery.isEmptyObject(n.data.condition)?a.cloneData(n):e.conditions.getConditionEvaluator(n.data.condition).evaluate(e,!0,{[A.data.dataSource]:t}).then((function(t){if(t.conditionResult)return a.cloneData(n)})))}),null):a.cloneData(A.itemTemplatesData[0])})).then((function(i){A.renderedItemsCount=0;var n=A.piping.dropFactory.createDrops(i,{dynamic:!0}),a=function(t,e){for(var i=0,n=0,a=[],o=[a];i<t.length;)n===e&&(n=0,a=[],o.push(a)),a.push(t[i]),i++,n++;return o}(n,x);return r.reduce(a,(function(t,i,a){var l=[];return e.each(i,(function(t,e){var i=a*x+e;0===i?t.data.isFirst=!0:i+1===f.length&&(t.data.isLast=!0),i>0&&A.incrementItemCounters(n[i-1]),A.addDrop(t);var o=f[i];t.id=o[d],t.piping=A.piping.fork(o,A,A.data.keyColumn),t.defaultEventArg=o[A.data.eventArg],t.setData(g,o),A.data.enableSorting&&(t.$element.data("id",o[A.data.eventArg]),"item"===t.data.itemTemplateType&&t.$element.addClass("sortable-list-item")),t.$element.css("overflow",""),t.$element.css("vertical-align","top"),A.data.isParentIdEnabled&&A.piping.idOfItem!==o[A.data.parentIdOutput]||(A.setItemCounters(t),l.push(t.render(A.$alignContainer,A.data.reverseScrolling,s)),A.renderedItemsCount++)})),r.all(l).then((function(){if(A.data.reverseScrolling&&A.oldScrollHeight&&o&&(A.data.onlyLoadFirstPage||A.hasInfiniteScrollEnabled())){var t=A.$list.prop("scrollHeight");A.setScrollTop(t-A.oldScrollHeight)}}))}),null).yield(n).then((function(i){i.length>0&&(A.incrementItemCounters(i[i.length-1]),1===i[0].childDrops.length&&"Stack"===i[0].childDrops[0].data.type&&(A.isListItemSizeDynamic=!0),A.setWidthOfListItems()),e.each(i,(function(i,n){if(A.isListItemSizeDynamic&&i.$element.css({overflow:"hidden"}),"Vertical"===A.data.layout&&A.swipeTemplatesData.length>0){for(var a=[],o=0;o<A.swipeTemplatesData.length;o++)a.push(A.piping.dropFactory.createDrop(A.swipeTemplatesData[o]));var r=t('<div class = "swipe-wrapper">'),s=t('<div class = "swipe-container">');if(e.each(u,(function(t){r.css(t,i.$element.css(t||""))})),r.css({position:"relative"}),s.css({overflow:"hidden",position:"",height:i.$element.outerHeight()+A.data.childPositionY+"px"}).appendTo(r),i.$element.css({position:"relative",margin:0}).appendTo(s),2===a.length&&a[0].data.itemTemplateType.includes("left")){var d=a[1];a[1]=a[0],a[0]=d}for(o=0;o<a.length;o++){var c=a[o].data.itemTemplateType;c.includes("left")?(A.addDrop(a[o]),a[o].render(s).then((function(t){var e=A.getSwipeItemByType(a,"leftSwipeItem","left-swipe");e.$element.addClass("left-swipe");var n=1===a.length?-i.$element.outerHeight()+"px":-2*i.$element.outerHeight()+"px";e.$element.css({position:"relative",zIndex:1,left:-i.$element.outerWidth()+"px",top:n,margin:0,visibility:"hidden",overflow:"hidden",height:i.$element.outerHeight()+"px",width:i.$element.outerWidth()+"px"}),A.addSwipingToListItem(e)}))):c.includes("right")&&(A.addDrop(a[o]),a[o].render(s).then((function(t){var e=A.getSwipeItemByType(a,"rightSwipeItem","right-swipe");e.$element.addClass("right-swipe"),e.$element.css({position:"relative",zIndex:1,top:-i.$element.outerHeight()+"px",left:i.$element.outerWidth()+"px",margin:0,visibility:"hidden",overflow:"hidden",height:i.$element.outerHeight()+"px",width:i.$element.outerWidth()+"px"}),A.addSwipingToListItem(e)})));var h=f[n];a[o].defaultEventArg=h[A.data.eventArg]}A.data.reverseScrolling?r.prependTo(A.$alignContainer):r.appendTo(A.$alignContainer),A.addSwipingToListItem(i),i.$element.addClass("center-swipe")}(A.getEventDataFor("selected").enabled||A.getEventDataFor("clicked").enabled)&&i.$element.css({cursor:"pointer"}),(new l).applyLongPressOnElement(i.$element,A,i.defaultEventArg,(function(t){A.handleListItemClick(i,t)}),null,A.$list,(function(t){A.handleListItemSelection(i,t)}))})),A.rendering=!1,e.each(A.afterRendering,(function(t){t()})),A.afterRendering=[],A.addNextPageLinkIfNeeded(),A.hasInfiniteScrollEnabled()&&A.checkScrollAndLoadNextPageIfNeeded(),A.nestingContext.executeDataSources(),A.oldScrollHeight=A.$list.prop("scrollHeight")-(A.data.onlyLoadFirstPage||A.hasInfiniteScrollEnabled()?0:A.data.childSizeY+A.data.childPositionY)})).then((function(){return e.defer((function(){1===A.loadedPages&&A.scrollTop<A.$list[0].scrollHeight&&A.$scrollableElement.scrollTop(A.scrollTop),1===A.loadedPages&&A.scrollLeft<A.$list[0].scrollWidth&&A.$scrollableElement.scrollLeft(A.scrollLeft),A.data.reverseScrolling&&!o&&A.setScrollTop(A.$list.prop("scrollHeight"))})),A.$element.addClass("momentum-scrolling"),A.renderQueuedData()})).catch((function(t){A.piping.errorHandler.showErrorDialog(t)}))}))}},v.prototype.getSwipeItemByType=function(t,i,n){return e.find(t,(function(t){return t.data.itemTemplateType===i&&t.$element&&!t.$element.hasClass(n)}))},v.prototype.addSwipingToListItem=function(t){t.$element.on("touchstart mousedown",null,null,this.handleTouchStart.bind(this)),t.$element.on("touchend mouseup",this.handleTouchEnd.bind(this,t)),t.$element.on("touchmove mousemove",this.handleTouchMove.bind(this))},v.prototype.getTouches=function(t){return t.touches||t.originalEvent.touches||[{clientX:t.clientX,clientY:t.clientY}]},v.prototype.handleTouchStart=function(e){var i=this.getTouches(e)[0];m=!0,p=i.clientX,g=i.clientY;var n=t(e.currentTarget),a=this.data.childPositionX;n.hasClass("center-swipe")||(n.hasClass("right-swipe")&&0===parseInt(n.css("left"))?t(n.siblings(".center-swipe")[0]).css({left:-n.width()-a+"px"}):0===parseInt(n.css("left"))&&t(n.siblings(".center-swipe")[0]).css({left:n.width()+a+"px"})),e.stopPropagation()},v.prototype.resetStayed=function(t){if(this.stayedElements&&t[0]!==this.stayedElements.center[0]){this.stayedElements.center.animate({left:"0px"});var e=this.stayedElements.center.outerWidth(),i=this.stayedElements.left,n=this.stayedElements.right;i.animate({left:-e+"px"},{complete:function(){i.css({visibility:"hidden"})}}),n.animate({left:e+"px"},{complete:function(){n.css({visibility:"hidden"})}}),this.stayedElements=null}},v.prototype.handleTouchMove=function(e){var i,n=t(e.currentTarget),a=(i=n.hasClass("center-swipe")?n:t(n.siblings(".center-swipe")[0])).siblings(".right-swipe"),o=i.siblings(".left-swipe");parseInt(t(".swipe-container").css("width"));if(m&&this.allowSwipe){var r,s;this.resetStayed(i),f||(f=i.css("left")),e.touches?(r=e.touches[0].clientX,s=e.touches[0].clientY):(r=e.clientX,s=e.clientY);var A=p-r,l=g-s;if(Math.abs(A)>Math.abs(l)||this.alreadySwiping){var d=parseInt(f)+(r-p),c=d+"px",u=this.data.childPositionX;if((d>=0&&o.length>0||d<=0&&a.length>0)&&i.css("left",c),!p||!g)return;d<0?(this.disableScroll(),this.alreadySwiping=!0,a.css({left:d+u+a.outerWidth()+"px",visibility:""}),o.css({visibility:"hidden"})):d>0&&(this.disableScroll(),this.alreadySwiping=!0,o.css({left:d-u-o.outerWidth()+"px",visibility:""}),a.css({visibility:"hidden"}))}}},v.prototype.handleTouchEnd=function(e,i){this.enableScroll(),this.alreadySwiping=!1,this.allowSwipe=!0,m=!1,f=null;var n,a=t(i.currentTarget);n=a.hasClass("center-swipe")?a:t(a.siblings(".center-swipe")[0]);var o=parseInt(n.css("left")),r=parseInt(n.outerWidth()),s=this.data.stayThreshold/100,A=this.data.eventThreshold/100,l=n.siblings(".right-swipe"),d=n.siblings(".left-swipe"),c=this.data.childPositionX;Math.abs(o)/r>=A?o>=0?(this.triggerEventIfEnabled("swipeRight",e.defaultEventArg),n.animate({left:r+c+"px"}),d.animate({left:"0px"})):(this.triggerEventIfEnabled("swipeLeft",e.defaultEventArg),n.animate({left:-r-c+"px"}),l.animate({left:"0px"})):Math.abs(o)/r>=s?(o>=0?(n.animate({left:r*s+c+"px"}),d.animate({left:r*s-r+"px"})):(n.animate({left:-r*s-c+"px"}),l.animate({left:-r*s+r+"px"})),this.stayedElements={center:n,right:l,left:d}):(n.animate({left:"0px"}),o>=0?d.animate({left:-r+"px"},{complete:function(){d.css({visibility:"hidden"})}}):l.animate({left:r+"px"},{complete:function(){l.css({visibility:"hidden"})}}),this.stayedElements=null)},v.prototype.isNextPageLinkNeeded=function(){return!(!this.data.pagingEnabled||!this.hasNextPage()||this.data.onlyLoadFirstPage)},v.prototype.addNextPageLinkIfNeeded=function(){if(this.isNextPageLinkNeeded()){var t=this.calcTheWidthOfContainer(this.data.childPositionX,this.data.childSizeX,parseFloat(this.$list.css("width")),this.isListItemSizeDynamic);this.$alignContainer.css({width:t}),this.data.infiniteScroll&&!this.autoLoadLimitReached()||this.addNextPageLink()}},v.prototype.autoLoadLimitReached=function(){return this.data.stopAutoLoadPages>0&&this.loadedPages%this.data.stopAutoLoadPages==0},v.prototype.setTotalData=function(t){t.setData({total:"System.Int32"},{total:this.totalResults})},v.prototype.addNextPageLink=function(){var t=this,e=t.piping.dropFactory.createDrop(a.cloneData(t.nextPageTemplateData),{dynamic:!0});t.loading||t.rendering||t.nextPageItem||(t.nextPageItem=e,t.addDrop(e),t.setTotalData(e),t.setItemCounters(e),e.render(t.$alignContainer,t.data.reverseScrolling).then((function(){if(e.$element.addClass("list-nextPage-item").css("cursor","pointer").on("click",(function(){t.offsetScrollPosition=t.$list.scrollTop(),t.removeDrop(e),e.$element.remove(),t.nextPageItem=null,t.loadNextPage()})),t.reverseScrolling&&t.oldScrollHeight&&!t.data.onlyLoadFirstPage){var i=t.$list.prop("scrollHeight")+(t.data.onlyLoadFirstPage?0:t.data.childSizeY+t.data.childPositionY);t.setScrollTop(i-t.oldScrollHeight+t.offsetScrollPosition)}})))},v.prototype.hasInfiniteScrollEnabled=function(){return this.data.pagingEnabled&&this.data.infiniteScroll},v.prototype.checkScrollAndLoadNextPageIfNeeded=function(){if(this.hasNextPage()&&!this.autoLoadLimitReached()&&this.rendered&&(this.data.dataSource||!this.data.mockData)&&this.piping)if(this.relativePositioned)if(this.data.reverseScrolling)0===this.piping.$actionWrapper.scrollTop()&&this.loadNextPage();else{if("Horizontal"===this.data.layout)return;var t=this.data.bottom||0,e=this.piping.$actionView.outerHeight(),i=this.piping.$actionWrapper.outerHeight(),n=e-i-this.piping.$actionWrapper.scrollTop();(e===i||n<150+t)&&this.loadNextPage()}else if(this.data.reverseScrolling)0===this.$list.scrollTop()&&this.loadNextPage();else if("Horizontal"===this.data.layout){this.$list[0].scrollWidth-this.$list[0].clientWidth-this.$scrollableElement.scrollLeft()<150&&this.loadNextPage()}else{var a=this.$list[0].clientHeight;if(0===a)return;this.$list[0].scrollHeight-a-this.$scrollableElement.scrollTop()<150&&this.loadNextPage()}},v.prototype.executeQuery=function(){var t=this;this.piping.queryDispatcher.dispatch(this.data.dataSource,(function(i){e.each(t.getDatasourceListenersWithSameParams(),(function(t){t.handler(i)}))}),(function(e){t.decorateQueryParams(e)}))},v.prototype.getDatasourceListenersWithSameParams=function(){var t=this,i=t.piping.queryDispatcher.getDefaultQueryParams();t.decorateQueryParams(i);var n=t.piping.datasources.getDatasourceListenersThatListenFor(t.data.dataSource);return e.filter(n,(function(n){var a=t.piping.queryDispatcher.getDefaultQueryParams();return"function"==typeof n.decorateDataFunc&&n.decorateDataFunc(a),e.isEqual(i,a)}))},v.prototype.hasNextPage=function(){var t=this;return!t.data.useParentGroupData&&(t.data.infiniteScroll?!t.loadedAllData:t.totalResults-t.groupingLoss>t.loadedPages*t.data.pageSize)},v.prototype.loadNextPage=function(){var t=this;t.loading||t.rendering||(t.loading=!0,t.renderPreloader(),t.mouseDown?setTimeout((function(){t.queryNextPage()}),300):t.queryNextPage())},v.prototype.queryNextPage=function(){var t=this;t.piping.queryDispatcher.backgroundDispatch(t.data.dataSource,(function(e){var i=t.groupData(e);t.groupingLoss+=e.results.length-i.results.length,t.loadedAllData=e.results.length<t.data.pageSize,t.loadedPages++,t.loading=!1,t.newItems=0,t.removePreloader(),t.renderData(e,i,t.scrolledByUser,!1),t.scrolledByUser=!1}),(function(e){e.page=t.loadedPages,e.pageSize=t.data.pageSize,e.doNotExecuteCountQuery=t.data.onlyLoadFirstPage||t.data.infiniteScroll}),(function(e){t.loading=!1,t.removePreloader(),t.addNextPageLinkIfNeeded()}))},v.prototype.renderPreloader=function(){var t=this;if(t.loading&&!t.preloaderItem){var e=t.piping.dropFactory.createDrop(a.cloneData(t.preloaderTemplateData),{dynamic:!0});t.loading&&!t.preloaderItem&&(t.preloaderItem=e,t.addDrop(e),t.setItemCounters(e),e.render(t.$list,t.data.reverseScrolling))}},v.prototype.removePreloader=function(){var t=this;t.preloaderItem&&(t.removeDrop(t.preloaderItem),t.preloaderItem.$element.remove(),t.preloaderItem=null)},v.prototype.handleListItemSelection=function(t,e){var i=this;if("multiple"===i.data.selectionMode){if(e&&i.handleLeftClickAsMultiSelect(e)){var n=i.selectedItems.indexOf(t);-1===n?(i.selectedItems.push(t),i.renderStyleIfEnabled("selected",t)):(i.selectedItems.splice(n,1),i.renderStyleIfEnabled("normal",t))}}else if(-1===i.selectedItems.indexOf(t)){if(0===i.selectedItems.length)i.selectedItems.push(t);else{var a=i.selectedItems[0];i.renderStyleIfEnabled("normal",a),i.selectedItems[0]=t}i.renderStyleIfEnabled("selected",t)}else i.handleLeftClickAsMultiSelect(e)&&(i.selectedItems=[],i.renderStyleIfEnabled("normal",t));i.updateRequiredIndicator()},v.prototype.handleListItemClick=function(t,e){var i=this;"multiple"===i.data.selectionMode?e&&i.handleLeftClickAsMultiSelect(e)?-1!==i.selectedItems.indexOf(t)?(1===i.selectedItems.length&&i.triggerEventIfEnabled("selected",t.defaultEventArg),i.triggerEventIfEnabled("itemSelected",t.defaultEventArg)):(0===i.selectedItems.length&&i.triggerEventIfEnabled("deselected",t.defaultEventArg),i.triggerEventIfEnabled("itemDeselected",t.defaultEventArg)):i.triggerEventIfEnabled("clicked",t.defaultEventArg):(1===i.selectedItems.length?i.triggerEventIfEnabled("selected",t.defaultEventArg):e&&i.handleLeftClickAsMultiSelect(e)&&i.triggerEventIfEnabled("deselected",t.defaultEventArg),i.triggerEventIfEnabled("clicked",t.defaultEventArg))},v.prototype.handleLeftClickAsMultiSelect=function(t){return"leftclick"===this.data.selectionBehavior||"ctrl+leftclick"===this.data.selectionBehavior&&(t.ctrlKey||t.metaKey)},v.prototype.renderStyleIfEnabled=function(t,e){n.renderStyles(e,null,null,null,t)},v.prototype.openPage=function(t){if(!this.loading){this.loading=!0;var e=this;this.piping.queryDispatcher.backgroundDispatch(this.data.dataSource,(function(i){e.page=t,e.loadedPages=t+1,e.totalResults=i.totalResults,e.loadedAllData=e.totalResults<=e.loadedPages*e.data.pageSize,e.loading=!1,e.$list.empty().scrollTop(0),e.$list.empty().scrollLeft(0),e.pool=[],e.$alignContainer=null,e.nextPageItem=null,e.renderData(i,null,!0,!1),e.triggerPageOpened(i.totalResults,e.page,e.data.pageSize)}),(function(i){i.page=t,i.pageSize=e.data.pageSize,i.doNotExecuteCountQuery=!1,i.sortParameters=e.sortParameters}),(function(){e.loading=!1,e.addNextPageLinkIfNeeded()}))}},v.prototype.licquidMethod_selectFirstItem=function(){if(this.rendering)this.afterRendering.push(this.licquidMethod_selectFirstItem.bind(this));else{var t=this.getFirstListItem();t&&this.handleListItemClick(t)}},v.prototype.licquidMethod_jumpToItem=function(t){if(this.rendering)this.afterRendering.push(this.licquidMethod_jumpToItem.bind(this));else{var i=e.findWhere(this.pool,{id:t.itemId});if(i){var n=i.$element.offset(),a=this.$scrollableElement.offset(),o={top:n.top-a.top+this.$scrollableElement.scrollTop(),left:n.left-a.left+this.$scrollableElement.scrollLeft()};"Horizontal"===this.data.layout?this.$scrollableElement.scrollLeft(o.left):this.$scrollableElement.scrollTop(o.top)}}},v})),define("drops/listItem/listItem",["jquery","underscore","lq/drop","lq/style","lq/util","when"],(function(t,e,i,n,a,o){"use strict";var r={data:{styles:{normal:{},enabled:!0},randomRotateOffset:0,conditionalRendering:!1,condition:{}}};function s(e){i.call(this,t("<div/>"),r,e),this.data.positioning="relative",this.data.styles=a.convertListOfKeyValuesToObject(this.data.styles),this.$element.addClass("boxToBorderSize has-states").css({whiteSpace:"pre-wrap"}),n.renderStyles(this,void 0,void 0,void 0,"normal"),this.addListener("ChildAdded",this.applyDataAndVisibilityToChild.bind(this)),this.children=[]}return i.extend(s),s.typeName="ListItem",s.prototype.applyDataAndVisibilityToChild=function(t){if("List"===t.type&&t.data.useParentGroupData&&this.dataRow&&this.dataRow.$groupData)t.setData(this.dataRow.$groupData);else{var e=this;t.addListener("ChildAdded",(function(t){e.applyDataAndVisibilityToChild(t)})),this.children.push(t),t.licquidMethod_load&&t.licquidMethod_load()}},s.prototype.setData=function(t,i){if(this.outputs=t,this.dataRow){var n=this;e.forEach(e.keys(t),(function(t){n.dataRow[t]=i[t]}))}else this.dataRow=i},s.prototype.getData=function(){return this.dataRow},s.prototype.createChildren=function(){var t=this.piping.dropFactory.createDrops(this.childDrops,{dynamic:!0}),i=this;e.each(t,(function(t){t.defaultEventArg=i.defaultEventArg,i.addDrop(t)}))},s.prototype.preRender=function(){return"Horizontal"===this.parent.data.layout?(this.left=void 0,this.right=void 0):"Vertical"===this.parent.data.layout?(this.top=void 0,this.bottom=void 0):(this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0),this.applyPosition(),this.createChildren()},s.prototype.render=function(t,i,n){var a=this;return o(a.preRender()).then((function(){if(!a.removed){i&&!n?a.$element.prependTo(t):a.$element.appendTo(t);var r=[];return e.forEach(a.pool,(function(t){r.push(a.createRenderPromiseForChild(t))})),o.all(r)}})).then((function(){return a.postRender()}))},s.prototype.postRender=function(){var t=this.data.randomRotateOffset;if(t){var e=0,i=this.$element.css("transform");if(i&&"none"!==i){var n=i.split("(")[1].split(")")[0].split(",");e=Math.round(Math.atan2(n[1],n[0])*(180/Math.PI))}var a=e+Math.floor(Math.random()*t*2-t);this.$element.css("-webkit-transform","rotate("+a+"deg)"),this.$element.css("-moz-transform","rotate("+a+"deg)"),this.$element.css("-o-transform","rotate("+a+"deg)"),this.$element.css("-ms-transform","rotate("+a+"deg)"),this.$element.css("transform","rotate("+a+"deg)")}this.calculateSizeBasedOnRatio(),this.reapplyData()},s.prototype.reapplyData=function(){if(this.dataRow){var t=this;e.each(this.children,(function(i){i.setValue&&t.outputs&&e.has(t.dataRow,i.data.name)&&i.setValue({type:t.outputs[i.data.name],value:t.dataRow[i.data.name]}),i.informListeners("DatasourceApplied",t.dataRow)})),this.applyHandlerClassForSortable()}},s.prototype.applyPositionForChild=function(t){if("Dynamic Vertical"===this.parent.data.layout&&t.data.isDynamiclySizedContainer){var e=this.getPositionCss(t.data);e.position="static",t.$element.css(e)}else t.$element.css(this.getPositionCss(t.data));this.parent.data.enableSorting&&t.data.name===this.parent.data.handlerDropName&&t.$element.addClass("sortable-list-handler")},s.prototype.getStates=function(){return[{key:"normal",value:"Normal"},{key:"hover",value:"Hover"},{key:"selected",value:"Selected"}]},s.prototype.calculateSizeBasedOnRatio=function(){if(this.parent.data.isAspectRatioEnabled){var t=this;setTimeout((function(){var e=0;t.$element[0].parentElement.parentElement.scrollHeight>t.$element[0].parentElement.parentElement.clientHeight&&(e=t.getScrollbarWidth(t.$element[0].parentElement.parentElement));var i=t.parent.data.ratioHeight/t.parent.data.ratioWidth*(t.$element[0].offsetWidth+e);t.$element.css({height:i})}),10)}},s.prototype.postWindowResize=function(){this.calculateSizeBasedOnRatio()},s.prototype.getScrollbarWidth=function(t){return t.offsetWidth-t.clientWidth-parseFloat(getComputedStyle(t).borderLeftWidth)-parseFloat(getComputedStyle(t).borderRightWidth)},s.prototype.applyHandlerClassForSortable=function(){var t=this;if(this.parent.data.enableSorting&&this.parent.data.handlerDropName){var e=this.children.find((function(e){return e.data.name===t.parent.data.handlerDropName}));e&&e.$element.addClass("sortable-list-handler")}},s.prototype.unsubscribeEventHandlers=function(){this.piping.cleanUp()},s})),define("drops/matrix/matrixTablesSynchronizer",["jquery"],(function(t){var e=function(t,e){this.$rowsOfFirst=t.find("tr"),this.$rowsOfSecond=e.find("tr"),this.heightOfFirst=[],this.heightOfSecond=[];var i=this;this.$rowsOfFirst.each((function(t){i.heightOfFirst[t]=this.getBoundingClientRect().height})),this.$rowsOfSecond.each((function(t){i.heightOfSecond[t]=this.getBoundingClientRect().height}))};e.prototype.sync=function(){var e=this;this.$rowsOfFirst.each((function(i,n){var a=t(n),o=t(e.$rowsOfSecond.get(i)),r=e.heightOfFirst[i],s=e.heightOfSecond[i];r>s?(a.height(r),o.height(r)):s>r&&(a.height(s),o.height(s))}))};var i=function(e,i){this.$columnOfFirst=e.find("tr:first").find("td, th"),this.$columnOfSecond=i.find("tr:first").find("td"),this.widthOfFirst=[],this.widthOfSecond=[];var n=this;this.$columnOfFirst.each((function(e){n.widthOfFirst[e]={outerWidth:this.getBoundingClientRect().width,width:t(this).width()+1}})),this.$columnOfSecond.each((function(e){n.widthOfSecond[e]={outerWidth:this.getBoundingClientRect().width,width:t(this).width()+1}}))};return i.prototype.sync=function(){var e=this;this.$columnOfFirst.each((function(i,n){var a=t(n),o=t(e.$columnOfSecond.get(i)),r=e.widthOfFirst[i].width,s=e.widthOfSecond[i].width,A=e.widthOfFirst[i].outerWidth,l=e.widthOfSecond[i].outerWidth;if(A>l){var d=Math.ceil(A-(l-s));o.css({"min-width":d+"px","max-width":d+"px"}),a.css({"min-width":d+"px","max-width":d+"px"})}else if(l>A){d=Math.ceil(l-(A-r));a.css({"min-width":d+"px","max-width":d+"px"}),o.css({"min-width":d+"px","max-width":d+"px"})}}))},{syncFor:function(t){var n=[new e(t.$fixedHeaders,t.$dynamicHeaders),new e(t.$fixedRows,t.$dynamicRows),new i(t.$fixedHeaders,t.$fixedRows),new i(t.$dynamicHeaders,t.$dynamicRows)];_.each(n,(function(t){t.sync()}))}}})),define("drops/matrix/matrix",["jquery","underscore","lq","lq/drop","lq/style","drops/matrix/matrixTablesSynchronizer","lq/html","lq/onlongpress"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{rowHeaders:[],rowHeadersSort:[],columnHeaders:[{}],columnHeadersSort:[],columnContentAlignment:"center",dataItems:[{}],fixedColumnHeaderTextOrientation:"horizontal",columnHeaderTextOrientation:"horizontal"}},l=function(e,i){var n=t("<col>").appendTo(e);i&&n.css("width",i)},d=function(e){n.call(this,t("<div>"),A,e),this.$fixedHeaders=t("<table/>").addClass("fixed-headers"),this.$fixedHeadersWrapper=t("<div/>").css({float:"left",overflow:"hidden"}).append(this.$fixedHeaders),this.$fixedRows=t("<table/>").addClass("fixed-rows").css("margin-bottom","100px"),this.$fixedRowsWrapper=t("<div/>").css({position:"absolute",top:0,left:0,bottom:0,overflow:"hidden"}).append(this.$fixedRows),this.$dynamicHeaders=t("<table/>").addClass("dynamic-headers"),this.$dynamicHeadersWrapper=t("<div />").css("overflow","hidden").append(t("<div />").css({float:"left","padding-right":"40px"}).append(this.$dynamicHeaders)),this.$dynamicRows=t("<table/>").addClass("dynamic-rows"),this.$dynamicRowsWrapper=t("<div/>").css({"overflow-x":"auto",position:"absolute",top:0,left:0,right:0,bottom:0}).append(this.$dynamicRows),this.$matrix=t("<div />").css({overflow:"hidden",width:"100%",height:"100%"}).append(this.$fixedHeadersWrapper,this.$dynamicHeadersWrapper).append(t("<div />").css("clear","both")).append(this.$fixedRowsWrapper,this.$dynamicRowsWrapper),this.$element.addClass("boxToBorderSize").append(this.$matrix),a.renderStyles(this,"gridstyle-"),this.loadedPages=0,this.allData=null;var i=this;this.$dynamicRowsWrapper.on("scroll",(function(){console.log(i.$dynamicRowsWrapper.scrollTop()),i.$fixedRowsWrapper.scrollTop(i.$dynamicRowsWrapper.scrollTop()),i.$dynamicHeadersWrapper.scrollLeft(i.$dynamicRowsWrapper.scrollLeft())})),this.update()};n.extend(d),d.typeName="Matrix",d.prototype.preRender=function(){this.piping.visibility.apply(this);var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.loadedPages=1,t.allData=e,t.update(e)}),(function(e){t.decorateDataSourceData(e)})),this.applyPosition()},d.prototype.decorateDataSourceData=function(t,e){this.data.pageSize&&(t.pageSize=this.data.pageSize,t.page=e||0)},d.prototype.setColumnWidthBasedOnSettings=function(i){var n=e.reject(this.data.rowHeaders,(function(t){return t.hide})),a=t("<colgroup>").appendTo(this.$fixedRows),o=t("<colgroup>").appendTo(this.$fixedHeaders);e.each(n,(function(t){l(a,t.width),l(o,t.width)}));var r=t("<colgroup>").appendTo(this.$dynamicRows),s=t("<colgroup>").appendTo(this.$dynamicHeaders),A=this;if(e(i).times((function(){l(r,A.data.columnWidth),l(s,A.data.columnWidth)})),this.data.columnWidth){var d={"table-layout":"fixed",width:i*this.data.columnWidth};this.$dynamicHeaders.css(d),this.$dynamicRows.css(d)}else{var c={"table-layout":"auto",width:"auto"};this.$dynamicHeaders.css(c),this.$dynamicRows.css(c)}},d.prototype.update=function(i){var n=this,a=this.data;i=i||{outputs:[],results:[],totalResults:0},this.$matrix.detach(),this.$fixedHeaders.empty(),this.$fixedRows.empty(),this.$dynamicHeaders.empty(),this.$dynamicRows.empty();var o=e.reject(a.rowHeaders,(function(t){return t.hide})),A=e.groupBy(i.results,(function(t){return n.getRowKey(t)})),l=e.groupBy(i.results,(function(t){return n.getColumnKey(t)})),d=e.keys(l).length;n.setColumnWidthBasedOnSettings(d);var c=e.pluck(a.columnHeaders,"output"),u=e.compact(e.pluck(a.columnHeadersSort,"output")).concat(c),h=e.keys(l).sort((function(t,e){var i=l[t][0],a=l[e][0];return n.compareDataItems(i,a,u)}));t("<tr>").append(e.chain(a.rowHeaders).reject((function(t){return t.hide})).map((function(e){var i=t("<span />").text(e.label);return"vertical"===n.data.fixedColumnHeaderTextOrientation&&(i.addClass("vertical-matrix-header"),n.data.enableHeadersHeight&&i.css("height",n.data.headersHeight+"px")),t("<th>").append(i)})).value()).appendTo(this.$fixedHeaders),t("<tr>").append(e.map(h,(function(i){var o=l[i][0],r=e.chain(a.columnHeaders).filter((function(t){return!t.hide})).pluck("output").map((function(t){return o[t]})).value().join(" "),s=t("<span />").text(r);return"vertical"===n.data.columnHeaderTextOrientation&&(s.addClass("vertical-matrix-header"),n.data.enableHeadersHeight&&s.css("height",n.data.headersHeight+"px")),t("<th>").append(s)}))).appendTo(this.$dynamicHeaders);var p=e.pluck(a.rowHeaders,"output"),g=e.compact(e.pluck(a.rowHeadersSort,"output")).concat(p),f=e.keys(A).sort((function(t,e){var i=A[t][0],a=A[e][0];return n.compareDataItems(i,a,g)})),m=this.getEventDataFor("clicked"),v=this.getEventDataFor("fixedColumnClicked");e.each(f,(function(i){var l=A[i],d=l[0];t("<tr>").append(e.map(o,(function(e){var i=d[e.output],o=t("<td>").text(i),r=a.eventArgFixedColumn?d[a.eventArgFixedColumn]:null;return n.applyEventTrigger("fixedColumnClicked","click",o,r),v.enabled&&o.addClass("clickable"),o}))).appendTo(n.$fixedRows),t("<tr>").append(e.map(h,(function(i){var o=e.find(l,(function(t){return n.getColumnKey(t)===i})),A=t("<td>").css("text-align",n.data.columnContentAlignment).text(o&&o[a.dataItems[0].output]||""),d=o&&o[a.backgroundColorOutput];d&&A.css("background-color",d);var c=o&&o[a.tooltipOutput];c&&A.attr("title",r.strip(c));var u=o&&o[a.eventArg];return(new s).applyLongPressOnElement(A,n,u),(m.enabled&&(void 0!==u||!a.eventArg)||n.isEventEnabled("onLongPress"))&&A.addClass("clickable"),A}))).appendTo(n.$dynamicRows)})),this.$element.append(this.$matrix),i.results.length>0&&this.postUpdate(),i.totalResults>i.results.length&&this.renderLoadMoreButton(h.length)},d.prototype.postUpdate=function(){o.syncFor(this),this.$dynamicHeadersWrapper.css("margin-left",this.$fixedHeadersWrapper.outerWidth()+"px"),this.$dynamicRowsWrapper.css({top:this.$dynamicHeadersWrapper.outerHeight()+"px",left:this.$fixedHeadersWrapper.outerWidth()+"px"}),this.$fixedRowsWrapper.css({top:this.$dynamicHeadersWrapper.outerHeight()+"px",width:this.$fixedHeadersWrapper.outerWidth()+"px"}).scrollTop(0),this.$dynamicHeadersWrapper.scrollLeft(0)},d.prototype.renderLoadMoreButton=function(e){var i=this,n=t("<tr>").appendTo(this.$dynamicRows),o=t("<td>").attr("colspan",e).appendTo(n);this.$loadMoreButton=t("<span>").addClass("paging-button clickable").text(this.data.nextPageText||"Load more...").on("click",(function(){i.loadNextPage()})).appendTo(o),a.renderStyles(this,null,this.$loadMoreButton,this.data.nextPageStyle)},d.prototype.loadNextPage=function(){if(!this.loading){this.loading=!0;var t=this;this.piping.queryDispatcher.dispatch(t.data.dataSource,(function(i){t.loadedPages++,t.loading=!1;var n=t.allData.results.concat(i.results);e.extend(t.allData,i,{results:n}),t.update(t.allData)}),(function(e){t.decorateDataSourceData(e,t.loadedPages)}),(function(e){t.loading=!1}))}};var c=function(t,i){return e.map(i,(function(e){return t[e]})).join("$")};return d.prototype.getRowKey=function(t){var i=e.pluck(this.data.rowHeaders,"output");return c(t,i)},d.prototype.getColumnKey=function(t){var i=e.pluck(this.data.columnHeaders,"output");return c(t,i)},d.prototype.compareDataItems=function(t,i,n){return e.reduce(n,(function(e,n){return 0!==e?e:t[n]===i[n]?0:t[n]<i[n]?-1:1}),0)},d})),define("drops/milestones/milestones",["jquery","lq/drop","lq/util"],(function(t,e,i){"use strict";var n;function a(n){e.call(this,t("<div/>"),n);var a=this;a.data.eventing=i.convertListOfKeyValuesToObject(a.data.eventing),a.milestonesList=[],a.selectedDataSourceOutput="",a.TimeLine=new Object,a.currentDateRec=null,a.selectedData=null,a.timeLineFormats=["Jaren","Kwartalen","Maanden","Weken","Dagen (maandbasis)","Dagen (weekbasis)"],a.rectTopList=[],a.rectBottomList=[],a.beschrijvingList=[],a.$element.addClass("boxToBorderSize").css({overflowX:"auto",overflowY:"hidden","background-color":a.data.color}),a.$dropDown=t("<select />").on("change",(function(t){a.data.selectedFormat=a.$dropDown.val(),a.resizeCanvas(),a.buildTimeLine(),a._render()})).css({position:"absolute",top:"5px",left:"20px",margin:0,padding:0}).appendTo(a.$element),a._canvas=t("<canvas />").appendTo(a.$element);for(var o=0;o<a.timeLineFormats.length;o++){var r=t("<option />").val(a.timeLineFormats[o]).text(a.timeLineFormats[o]).appendTo(a.$dropDown);a.data.selectedFormat===a.timeLineFormats[o]&&r.prop("selected",!0)}}return e.extend(a,e),a.typeName="Milestones",a.prototype.preRender=function(){this.piping.visibility.apply(this);var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e)})),this.formatter=this.piping.formatting.createFormatter(),this.applyPosition()},a.prototype.postRender=function(){this.buildCanvas()},a.prototype.update=function(t){for(var e=this,i=[],n=0;n<t.results.length;n++){var a=t.results[n],o={id:a[e.data.idOutput],naam:a[e.data.naamOutput],beschrijving:a[e.data.beschrijvingOutput],datumPlanning:a[e.data.datumPlanningOutput]?e.formatter.parseLicquidDate(a[e.data.datumPlanningOutput]):null,datumWerkelijk:a[e.data.datumWerkelijkOutput]?e.formatter.parseLicquidDate(a[e.data.datumWerkelijkOutput]):null};i.push(o)}e.milestonesList=i;for(var r=0;r<e.milestonesList.length;r++)e.milestonesList[r].datumPlanning&&e.milestonesList[r].datumPlanning.setHours(12),e.milestonesList[r].datumWerkelijk&&e.milestonesList[r].datumWerkelijk.setHours(12);e.buildTimeLine(),e._render()},a.prototype._getMinAndMaxDate=function(){for(var t=this.milestonesList,e=Number.MAX_VALUE,i=Number.MIN_VALUE,n=0;n<t.length;n++){var a=t[n];a.datumPlanning&&(e=Math.min(e,a.datumPlanning.getTime()),i=Math.max(i,a.datumPlanning.getTime())),a.datumWerkelijk&&(e=Math.min(e,a.datumWerkelijk.getTime()),i=Math.max(i,a.datumWerkelijk.getTime()))}return{min:new Date(e),max:new Date(i)}},a.prototype.buildTimeLine=function(){var t=this,e=t._getMinAndMaxDate(),i=e.min,n=e.max;switch(t.TimeLine.cellText=[],t.TimeLine.dates=[],t.data.selectedFormat){case"Jaren":i=new Date(i.getFullYear(),0),o=parseInt(n.getFullYear()+1),t.TimeLine.amount=o-i.getFullYear(),n=new Date(o,0);for(var a=0;a<t.TimeLine.amount;a++)t.TimeLine.cellText[a]=i.getFullYear()+a;break;case"Kwartalen":i=new Date(i.getFullYear(),0),o=parseInt(n.getFullYear()+1),t.getYears(i,o);var o=parseInt(n.getFullYear()+1);t.TimeLine.amount=4*o-4*i.getFullYear(),n=new Date(o,0);var r=0;for(a=0;a<t.TimeLine.amount;a++)4===r&&(r=0),r++,t.TimeLine.cellText[a]="Q"+r;break;case"Maanden":i=new Date(i.getFullYear(),i.getMonth()),n=new Date(n.getFullYear(),n.getMonth()+1),t.getYears(i,parseInt(n.getFullYear()+1),n),t.TimeLine.amount=n.getMonth()-i.getMonth()+12*(n.getFullYear()-i.getFullYear());for(var s=0;s<t.TimeLine.amount;s++){var A=t.getMonthText(new Date(i.getFullYear(),i.getMonth()+s).getMonth());t.TimeLine.cellText[s]=A.letter}break;case"Weken":i=new Date(i.getFullYear(),i.getMonth(),i.getDate()-i.getDay()),n=new Date(n.getFullYear(),n.getMonth(),n.getDate()+7-n.getDay()),t.getYears(i,parseInt(n.getFullYear()+1),n),t.TimeLine.amount=Math.round(n/6048e5)-Math.round(i/6048e5),t.calcWeeks(i);break;case"Dagen (maandbasis)":i=new Date(i.getFullYear(),i.getMonth(),i.getDate()),n=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1),t.getMonths(i,n),t.TimeLine.amount=Math.round(n/864e5)-Math.round(i/864e5);for(var l=0;l<t.TimeLine.amount;l++)t.TimeLine.cellText[l]=new Date(i.getFullYear(),i.getMonth(),i.getDate()+l).getDate();break;case"Dagen (weekbasis)":i=new Date(i.getFullYear(),i.getMonth(),i.getDate()),n=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1),t.TimeLine.amount=Math.round(n/864e5)-Math.round(i/864e5),t.getWeeks(i,n);for(l=0;l<t.TimeLine.amount;l++)t.TimeLine.cellText[l]=t.getWeekDayText(new Date(i.getFullYear(),i.getMonth(),i.getDate()+l).getDay())}t.TimeLine.largestDate=n,t.TimeLine.smallestDate=i,t.TimeLine.lineWidth=25,t.buildCells()},a.prototype.getMonths=function(t,e){for(var i=e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())+1,n=0;n<i;n++){var a=new Date(t.getFullYear(),t.getMonth()+n),o=new Date(t.getFullYear(),t.getMonth()+n+1,0,0,-1);a.getTime()<t.getTime()&&(a=t),e.getTime()<o.getTime()&&(o=e);var r={text:this.getMonthText(a.getMonth()).text+" "+a.getFullYear(),low:a,high:o};this.TimeLine.dates[n]=r}},a.prototype.getYears=function(t,e,i){for(var n=e-t.getFullYear(),a=0;a<n;a++){var o=new Date(t.getFullYear()+a,0),r=new Date(t.getFullYear()+a+1,0,0,0,-1);o.getTime()<t.getTime()&&(o=t),i&&i.getTime()<r.getTime()&&(r=i);var s={text:t.getFullYear()+a,low:o,high:r};this.TimeLine.dates[a]=s}},a.prototype.getWeeks=function(t,e){for(var i=new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay()),n=new Date(i.getFullYear(),0).getDay(),a=new Date(i.getFullYear(),0,1-n),o=Math.round(i/6048e5)-Math.round(a/6048e5),r=Math.round(e/6048e5)-Math.round(t/6048e5)+1,s=0;s<r;s++){(o>52||0===o)&&(o=1);var A=new Date(i.getFullYear(),i.getMonth(),i.getDate()+7*s),l=new Date(i.getFullYear(),i.getMonth(),i.getDate()+7*(s+1));A.getTime()<t.getTime()&&(A=t),l.getTime()>e.getTime()&&(l=e);var d={text:o+"/"+new Date(i.getFullYear(),i.getMonth(),i.getDate()+7*s).getFullYear(),low:A,high:l};this.TimeLine.dates[s]=d,o++}},a.prototype.calcWeeks=function(t){for(var e=new Date(t.getFullYear(),0).getDay(),i=new Date(t.getFullYear(),0,1-e),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),a=Math.round(n/6048e5)-Math.round(i/6048e5),o=0;o<this.TimeLine.amount;o++)(a>52||0===a)&&(a=1),this.TimeLine.cellText[o]=a,a++},a.prototype.buildCells=function(){var t=this;t.resizeCanvas(),t.TimeLine.cells=[];for(var e=0;e<t.TimeLine.amount;e++){var i={text:t.TimeLine.cellText[e],fontSizeLimit:"12",milestonesPlanning:[],milestonesWerkelijk:[],colorStroke:"rgba(20,20,20,1)",colorFill:"rgba(240,240,240,1)"};t.TimeLine.cells[e]=i}},a.prototype.canvasClick=function(t){var e=this,i={x:t.offsetX,y:t.offsetY},n=!1;!n&&e.beschrijvingList.length>0&&(n=e.toggleDescription(e.beschrijvingList,i,"close")),!n&&e.rectTopList.length>0&&(n=e.toggleDescription(e.rectTopList,i,"build")),!n&&e.rectBottomList.length>0&&e.toggleDescription(e.rectBottomList,i,"build"),e.drawAll()},a.prototype.resizeCanvas=function(){var t=this;if(t._canvas&&void 0!==t._canvas){t._canvas.width=t.data.size.x,t._canvas.height=t.data.size.y;var e=t.TimeLine.amount*t.canvasCellWidth(t.selectedFormat);e>14e3&&(e=14e3),e>t.data.size.x&&(t._canvas.width=e),t._canvas.attr("height",t._canvas.height),t._canvas.attr("width",t._canvas.width)}},a.prototype.buildCanvas=function(){var t=this;t._canvas.on("click",(function(e){t.canvasClick(e)})),t.resizeCanvas(),n=t._canvas[0].getContext("2d")},a.prototype._render=function(){var t=this;if(t._canvas&&void 0!==t._canvas){t.TimeLine.buffer=100;for(var e=(t._canvas.width-200)/t.TimeLine.amount,i=0;i<t.TimeLine.amount;i++)t.TimeLine.cells[i].x=100+i*e,t.TimeLine.cells[i].y=t._canvas.height/2-t.TimeLine.lineWidth/2,t.TimeLine.cells[i].w=e,t.TimeLine.cells[i].h=t.TimeLine.lineWidth,t.TimeLine.cells[i].loc=t.TimeLine.cells[i].x+t.TimeLine.cells[i].w/2;t.buildMilestones(),t.buildCurrentDate(),t.buildTimeLineDates(),t.drawAll()}},a.prototype.buildCurrentDate=function(){var t=this,e=new Date;if(e<=t.TimeLine.largestDate&&e>=t.TimeLine.smallestDate){var i=t.getLoc(e),a={text:"Current Date",date:e.toLocaleDateString(),x:i-n.measureText("Current Date").width/2-15,y:t._canvas.height/2.9,w:n.measureText("Current Date").width+30,h:t._canvas.height/12,colorFill:"rgba(240,240,240,1)",colorStroke:"rgba(190,90,90,1)",fontSizeLimit:11};t.currentDateRec={rec:a,loc:i}}else t.currentDateRec=null},a.prototype.buildTimeLineDates=function(){var t=this;if(void 0!==t.TimeLine.dates[0]&&null!==t.TimeLine.dates[0])for(var e=0;e<t.TimeLine.dates.length;e++){var i=t.TimeLine.dates[e],n=t.getLoc(i.low),a=t.getLoc(i.high);t.TimeLine.dates[e].loc=Math.round((n+a)/2)}},a.prototype.getLoc=function(t){var e,i=this;return e=(i._canvas.width-2*i.TimeLine.buffer)/((i.TimeLine.largestDate.getTime()-i.TimeLine.smallestDate.getTime())/(t.getTime()-i.TimeLine.smallestDate.getTime())),e+=i.TimeLine.buffer},a.prototype.toggleDescription=function(t,e,i){for(var a=this,o=t.length-1;o>=0;o--)if(e.x>=t[o].x&&e.x<=t[o].x+t[o].w&&e.y>=t[o].y&&e.y<=t[o].y+t[o].h){if(t!==a.beschrijvingList){var r=t[o].id;a.triggerEvent(a.data.eventing.clicked.raisedEventName,r)}if("build"===i){for(var s=0;s<a.beschrijvingList.length;s++)if(a.beschrijvingList[s].rec===t[o])return!1;if(void 0===t[o].beschrijving||""===t[o].beschrijving)return!1;n.font="12px Tahoma";var A=t[o].beschrijving?t[o].beschrijving.split(/[\n\s]/):"",l=[],d=t[o].w+20,c=t[o].y,u=0;l[u]="Beschrijving:",l[++u]="";for(var h=0;h<A.length;h++)n.measureText(l[u]).width>=d&&(l[++u]=""),l[u]+=A[h]+" ";var p={text:l,x:t[o].x-30,y:c,w:d+40,h:25*l.length,colorFill:"rgba(240,240,240,0.95)",colorStroke:"rgba(0,0,110,1)",rec:t[o]};if(p.h+c>a._canvas.height){var g=p.h+c-a._canvas.height;p.y=c-g}if(p.x<0&&(p.x=0),p.x+p.w>a._canvas.width){var f=p.w+t[o].x-a._canvas.width;p.x=t[o].x-f}return a.beschrijvingList.push(p),!0}if("close"===i)return a.beschrijvingList.splice(o,1),!0}return!1},a.prototype.buildMilestones=function(){var t=this;n.lineWidth=1,t.rectTopList=[],t.milestonesList.forEach((function(e){if(null!=e.datumPlanning){var i,a=t.getLoc(e.datumPlanning);i=""===e.naam||void 0===e.naam?n.measureText(e.datumPlanning.toLocaleDateString()).width+40:n.measureText(e.naam).width+40;var o={id:e.id,text:e.naam,beschrijving:e.beschrijving,date:e.datumPlanning.toLocaleDateString(),x:a-i/2,y:t._canvas.height/4,w:i,h:t._canvas.height/12,location:a,colorFill:"rgba(240,240,245,1)",colorStroke:"rgba(0,0,110,1)",type:"p",fontSizeLimit:10,yIndex:1};t.rectTopList.push(o),t.rectTopList.length>0&&t.detectCollision(t.rectTopList,o)}})),t.rectBottomList=[],t.milestonesList.forEach((function(e){if(null!=e.datumWerkelijk){var i,a=t.getLoc(e.datumWerkelijk);i=""===e.naam||void 0===e.naam?n.measureText(e.datumWerkelijk.toLocaleDateString()).width+40:n.measureText(e.naam).width+40;var o={id:e.id,text:e.naam,beschrijving:e.beschrijving,date:e.datumWerkelijk.toLocaleDateString(),location:a,x:a-i/2,y:t._canvas.height-t._canvas.height/2.5,w:i,h:t._canvas.height/12,colorFill:"rgba(255,245,240,1)",colorStroke:"rgba(160,0,0,1)",type:"w",fontSizeLimit:10,yIndex:1};t.rectBottomList.push(o),t.rectBottomList.length>0&&t.detectCollision(t.rectBottomList,o)}}))},a.prototype.getMonthText=function(t){switch(t){case 0:return{letter:"J",text:"Januari"};case 1:return{letter:"F",text:"Februari"};case 2:return{letter:"M",text:"Maart"};case 3:return{letter:"A",text:"April"};case 4:return{letter:"M",text:"Mei"};case 5:return{letter:"J",text:"Juni"};case 6:return{letter:"J",text:"Juli"};case 7:return{letter:"A",text:"Augustus"};case 8:return{letter:"S",text:"September"};case 9:return{letter:"O",text:"Oktober"};case 10:return{letter:"N",text:"November"};case 11:return{letter:"D",text:"December"}}},a.prototype.getWeekDayText=function(t){switch(t){case 1:return"M";case 2:case 4:return"D";case 3:return"W";case 5:return"V";default:return"Z"}},a.prototype.detectCollision=function(t,e){for(var i=this,n=e.y,a=t.length-1;a>=0;a--){var o=t[a];if(e.x<=o.x+o.w&&o.x<=e.x+e.w&&o!==e){switch(o.yIndex){case 1:e.yIndex=2,"p"==e.type?e.y=o.y-o.h-i._canvas.height/50:e.y=o.y+o.h+i._canvas.height/50;break;case 2:e.yIndex=3,"p"==e.type?e.y=o.y-o.h-i._canvas.height/50:e.y=o.y+o.h+i._canvas.height/50;break;case 3:e.yIndex=1,e.y=n}break}}},a.prototype.drawAll=function(){var t=this;t.clearCanvas(),t.currentDateRec&&t.drawLine(t.currentDateRec.rec,t.currentDateRec.loc);for(var e=0;e<t.TimeLine.dates.length;e++)t.drawDate(t.TimeLine.dates[e]);for(var i=0;i<t.TimeLine.cells.length;i++)t.drawBox(t.TimeLine.cells[i]);for(var n=0;n<t.rectTopList.length;n++)t.drawLine(t.rectTopList[n],t.rectTopList[n].location);for(var a=0;a<t.rectTopList.length;a++)t.drawBox(t.rectTopList[a],t.rectTopList[a].location);for(var o=0;o<t.rectBottomList.length;o++)t.drawLine(t.rectBottomList[o],t.rectBottomList[o].location);for(var r=0;r<t.rectBottomList.length;r++)t.drawBox(t.rectBottomList[r],t.rectBottomList[r].location);t.currentDateRec&&t.drawBox(t.currentDateRec.rec,t.currentDateRec.loc);for(var s=0;s<t.beschrijvingList.length;s++)t.drawDescription(t.beschrijvingList[s])},a.prototype.drawDate=function(t){n.fillStyle="rgba(20,20,20,1)",n.strokeStyle="rgba(20,20,20,1)",n.font="13pt Tahoma",n.textAlign="center",n.lineWidth=1;var e=n.measureText(t.text).width;n.fillText(t.text,t.loc,this._canvas.height/2.15,2*e)},a.prototype.drawLine=function(t,e){var i=this,a=i._canvas.height/2+i.TimeLine.lineWidth/2;"p"===t.type&&(a=i._canvas.height/2-i.TimeLine.lineWidth/2),n.lineWidth=1,n.beginPath(),n.strokeStyle=t.colorStroke,n.moveTo(e,a),n.lineTo(e,t.y),n.stroke()},a.prototype.drawDescription=function(t){n.lineWidth=1,n.font="10pt Tahoma",n.fillStyle=t.colorFill,n.strokeStyle=t.colorStroke,n.strokeRect(t.x,t.y,t.w,t.h),n.fillRect(t.x,t.y,t.w,t.h),n.fillStyle="rgba(20,20,20,1)",n.textAlign="center";for(var e=0;e<t.text.length;e++)n.fillText(t.text[e],t.x+t.w/2,t.y+20*(e+1),t.w)},a.prototype.drawBox=function(t,e){e||(e=t.x+t.w/2),n.lineWidth=1,n.fillStyle=t.colorFill,n.strokeStyle=t.colorStroke,n.fillRect(t.x,t.y,t.w,t.h),n.strokeRect(t.x,t.y,t.w,t.h),n.textAlign="center";var i=Math.round(this.data.size.x/110);i<10&&(i=10),i>16&&(i=16),i>t.fontSizeLimit&&(i=t.fontSizeLimit),n.font=i+"pt Tahoma",n.fillStyle="rgba(20,20,20,1)",t.date?(n.fillText(t.text,e,t.y+t.h/3,t.w,t.h/3),n.fillText(t.date,e,t.y+t.h-t.h/3,t.w,t.h/3)):n.fillText(t.text,e,t.y+t.h-t.h/3,t.w,t.h),n.closePath()},a.prototype.clearCanvas=function(){n.clearRect(0,0,this._canvas.width,this._canvas.height)},a.prototype.canvasCellWidth=function(t){switch(t){case"Jaren":return 600;case"Kwartalen":case"Maanden":return 150;case"Weken":return 130;default:return 30}},a.prototype.canSave=function(){return this.dirtyCheck().isDirty()&&""!=t.trim(this.name)},a})),define("drops/mockList/mockList",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{mockData:"Header 1, Header 2, Header 3\nCell 1, Cell 2, Cell 3\nCell 4, Cell 5, Cell 6\n{1,2,1}",size:{x:320,y:90}}};function a(i){e.call(this,t('<div class="mock-list" />'),n,i)}return e.extend(a,e),a.typeName="MockList",a.prototype.applyStyles=function(){this.applyStyle(this.$element,""),this.applyStyle(this.$element.find("thead > tr"),"header"),this.applyStyle(this.$element.find("tbody > tr:even"),"even"),this.applyStyle(this.$element.find("tbody > tr:odd"),"odd")},a.prototype.applyStyle=function(t,e,n){null==n?i.renderStyles(this,null,t,this.data.styles,e):i.renderStyles(this,null,t,this.data.styles,e,n)},a.prototype.postRender=function(){this.applyPosition(),this.renderTable(),this.applyStyles()},a.prototype.rerenderTable=function(){this.$element.empty(),this.renderTable(),this.applyStyles()},a.prototype.renderTable=function(){if(this.data.mockData){var e=this.parseMockData();this.$element.append(t("<table />").append(t("<thead>").append(t("<tr />").append(_.map(e.headers,(function(e){return t("<th />").text(e.text.trim()).css("width",e.width>0?e.width+"%":"auto")}))))).append(t("<tbody>").append(_.map(e.lines,(function(e){return t("<tr />").append(_.map(e,(function(e){return t("<td>").text(e.trim())})))})))))}},a.prototype.parseMockData=function(){var t=this.data.mockData.split("\n"),e=null;if(1!==t.length)if(e=_.last(t).match(/^\{(.*)\}$/)||null){t.pop(),e=_.map(e[1].split(","),(function(t){return new Number(t)}));var i=_.reduce(e,(function(t,e){return t+e}),0);e=_.map(e,(function(t){return 0===t||0===i?0:t/i*100}))}else e=[];t=_.map(t,(function(t){return t.split(",")}));var n=_.chain(t).map((function(t){return t.length})).max((function(t){return t})).value();return _.each(t,(function(t){if(t.length!==n)for(var e=t.length;e<n;e++)t.push("")})),{headers:_.map(t.shift(),(function(t,i){return{text:t,width:e[i]||0}})),lines:t}},a})),define("lq/modalblur",["jquery"],(function(t){var e=function(e){if(this.data.centered){var i=this.piping.$app.children(".licquid-action-wrapper");setTimeout((function(){navigator.userAgent.search("Firefox")>-1&&(0===e?i.css({animation:"zoom-out 600ms forwards"}):i.css({animation:"zoom-in 600ms forwards"}));var n=e>0?"blur("+e+"px)":"none";i.children().each((function(){t(this).css("backdrop-filter",n),t(this).children().each((function(){t(this).css("filter",n)}))}))}))}};return{applyBlur:function(){null!==this.data.blur&&void 0!==this.data.blur&&this.data.hasBlur?e.call(this,this.data.blur):this.data.hasBlur&&e.call(this,0)},setBlurValue:e,updateModalLayerHeight:function(){this.$modalLayer&&this.$scrollContainer&&this.$modalLayer.css({height:this.$scrollContainer.prop("scrollHeight")})}}})),define("drops/modalAction/ModalActionMpa",["jquery","lq"],(function(t,e){"use strict";var i=function(t){this.modalAction=t,this.onMessageReceived=this.receivedMessage.bind(this),this.sizeUpdateIntervaldId=null};return i.prototype.setUp=function(){this.$iframe=t("<iframe />").attr("scrolling",this.modalAction.data.scrolling).css({width:"100%",height:"100%",border:0,display:"none",allowtransparency:!0}).appendTo(this.modalAction.$element),window.addEventListener("message",this.onMessageReceived,!1)},i.prototype.show=function(e){if(this.$iframe.attr("src",this.getIframeUrl(e)).css("display","inherit"),!this.sizeUpdateIntervaldId&&"relative"===this.modalAction.$element.css("position")){var i=this;this.$iframe.on("load",(function(){i.sizeUpdateIntervaldId||(i.sizeUpdateIntervaldId=setInterval((function(){if(i.$iframe[0].contentWindow){var e=t(i.$iframe[0].contentWindow.document.body).find(".licquid-action-wrapper");if(e.children(".licquid-action-view").css("min-height","auto"),0!==e.length){e.css("overflow","hidden"),i.$iframe.width(e[0].scrollWidth),i.modalAction.$element.width(e[0].scrollWidth);var n=0;e.children().filter((function(e,i){if(t(i).hasClass("licquid-action-view"))return!0;var n=t(i).find("iframe")[0];return!!n&&!!t(n.contentWindow.document.body).find(".licquid-action-wrapper").length})).each((function(t,e){n=Math.max(n,e.scrollHeight)})),e.css("height",n+"px"),i.$iframe.height(e[0].scrollHeight),i.modalAction.$element.height(e[0].scrollHeight)}}}),300))}))}},i.prototype.hide=function(){this.$iframe&&(this.sizeUpdateIntervaldId&&(clearInterval(this.sizeUpdateIntervaldId),this.sizeUpdateIntervaldId=null),this.$iframe.attr("src","").css("display","none"))},i.prototype.getIframeUrl=function(t){if(!t)return"about:blank";var i=e.getTenantUrl("LicquidAction/Get/"+t),n={},a=this.modalAction.piping.parameters.globals.getAll();_.keys(a).length>0&&(n.globals=JSON.stringify(a));var o=this.modalAction.getParametersForIframe();return _.keys(o).length>0&&(n.parameters=JSON.stringify(o)),this.modalAction.piping.url.prepare(i,n)},i.prototype.receivedMessage=function(t){var e=this.getEventFromMessage(t);if(e)if("EmbeddedActionLoaded"===e.eventName&&this.modalAction.data.useSelectedActionSize)this.modalAction.setElementSizeBasedOnAnchoring(this.modalAction.data,e);else{var i=e.args?e.args[0]:null;this.modalAction.triggerEvent(this.modalAction.data.id+"."+e.eventName,i)}},i.prototype.getEventFromMessage=function(t){if(t.source===this.$iframe.get(0).contentWindow)try{return JSON.parse(t.data)}catch(t){}},i.prototype.triggerEventForChild=function(t){var e=this.modalAction.rootDrop.data.embeddable?"*":window.location.protocol+"//"+window.location.host;this.$iframe.get(0).contentWindow.postMessage(JSON.stringify(t),e)},i.prototype.onError=t.noop,i.prototype.dispose=function(){window.removeEventListener("message",this.onMessageReceived)},i})),define("lq/navigationHistory",["lq"],(function(t){"use strict";var e="trace_"+t.getTenantName()+"_"+t.getTenantApplicationName(),i=function(t){try{var e=sessionStorage.getItem(t);return e?JSON.parse(e):[]}catch(t){return[]}},n=function(t,e){try{e.length>50&&e.splice(50,50-e.length);var i=JSON.stringify(e);sessionStorage.setItem(t,i)}catch(t){}},a=function(t,i,n){this.storeTrace=i,this.retrieveTrace=n,this.stateKey=e+"_"+t,this.trace=this.retrieveTrace(this.stateKey)};return a.withLocalStorage=function(t){return new a(t,n,i)},a.inMemory=function(t){var e=[];return new a(t,(function(t){e=t}),(function(t){return e}))},a.prototype.push=function(t){var e=t.indexOf("?");e>-1&&(t=t.substring(0,e)),this.trace.push(t),this.storeTrace(this.stateKey,this.trace)},a.prototype.pop=function(){if(0===this.trace.length)return null;var t=this.trace.pop();return this.storeTrace(this.stateKey,this.trace),t},a})),define("lq/navigatorSpa",["lq","./navigationHistory"],(function(t,e){"use strict";var i=function(t,e,i,n){this.currentActionId=t,this.url=e,this.onNavigate=n,this.history=i};return i.withLocalStorage=function(t,n,a){return new i(t,n,e.withLocalStorage("spa"),a)},i.inMemory=function(t,n,a){return new i(t,n,e.inMemory("spa"),a)},i.prototype.openAction=function(e,i,n,a){if(a){var o=t.getTenantUrl("LicquidAction/Get/"+e),r={};_.keys(i).length&&(r.globals=JSON.stringify(i)),_.keys(n).length&&(r.parameters=JSON.stringify(n));var s=this.url.prepare(o,r);this.url.openUrl(s,a)}else this.history.push(this.currentActionId),this.currentActionId=e,this.onNavigate(e,i,n)},i.prototype.goToPrevious=function(t,e){var i=this.history.pop();i&&(this.currentActionId=i,this.onNavigate(i,t,e))},i})),define("lq/validatorGateway",["underscore"],(function(t){var e=[];return{isEnabled:function(){return!!window.validator},publishEvent:function(t){window.validator&&window.validator.gateway.publishEvent(t)},registerListener:function(t,e){window.validator&&window.validator.gateway.registerListener(t,e)},unregisterListener:function(t){window.validator&&window.validator.gateway.unregisterListener(t)},whenEnabled:function(t){e.push(t)},callCallbacks:function(){e.forEach((function(t){t()})),e=[]},removeCallback:function(t){e=e.filter((function(e){return e!==t}))}}})),define("lq/actionLoader",["lq","jquery","underscore"],(function(t,e,i){var n=function(t){this.url=t,this.requestId=0,this.listeners=[]};return n.prototype.addListener=function(t){this.listeners.push(t)},n.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},n.prototype.load=function(i,n,a,o,r){this.requestId+=1,e.ajax({type:"POST",url:this.url.prepare(t.getTenantUrl("LicquidAction/Navigate")),cache:!1,data:JSON.stringify({id:i,insertionPoints:r}),dataType:"json",contentType:"application/json; charset=utf-8"}).then(this.receivedData.bind(this,i,n,a,o,this.requestId))},n.prototype.receivedData=function(e,n,a,o,r,s){if(r===this.requestId)if(s.requiresLogin){var A="LicquidAction/Get/"+e,l={};i.keys(n).length&&(l.globals=JSON.stringify(n)),i.keys(a).length&&(l.parameters=JSON.stringify(a));var d=this.url.prepare(t.getTenantUrl(A),l);this.url.openUrl(d)}else i.forEach(this.listeners,(function(t){t(s,{globals:n,locals:a,system:s.systemParameters},o)}))},n})),define("lq/layouting",[],(function(){"use strict";var t=void 0;return{applyLayout:function(e,i){e.removeClass((function(t,e){return 0!==e.lastIndexOf("using-layout-",0)})),i&&(e.addClass("with-layout using-layout-"+i.id),t||(t=document.createElement("style"),document.body.appendChild(t)),t.innerHTML=".with-layout.using-layout-"+i.id+" .layout-specific:not(.supports-layout-"+i.id+") {   visibility: hidden !important;}")}}})),define("lq/highlighter",["jquery"],(function(t){"use strict";var e;return{highlight:function(i){e?e.removeClass("highlighter-flash"):e=t("<div />").addClass("highlighter").appendTo(t("body")),setTimeout((function(){var t=i[0].getBoundingClientRect();e.addClass("highlighter-flash").css({top:t.top+"px",left:t.left+"px",height:t.height+"px",width:t.width+"px"})}))}}})),define("drops/modalAction/ModalActionSpa",["jquery","lq","when","drops/action/action","lq/navigatorSpa","lq/validatorGateway","lq/actionLoader","lq/layouting","lq/responsive","lq/highlighter"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d=function(t){this.modalAction=t,this.onActionLoaded=this.showAction.bind(this),this.onEventReceived=this.receiveEvent.bind(this)};return d.prototype.setUp=function(){if(this.$wrapper=t('<div class="licquid-action-wrapper" />').appendTo(this.modalAction.$element).css({width:"100%",height:"100%",border:0,display:"none",overflow:"auto"===this.modalAction.data.scrolling?"auto":"hidden"}),this.$view=t('<div class="licquid-action-view" />').appendTo(this.$wrapper),this.$modals=t("<div />").css({width:"100%",height:"100%"}).appendTo(this.modalAction.piping.$app),!o.isEnabled()){var e=this;this.gatewayCallback=function(){e.action&&e.informValidator(e.action)},o.whenEnabled(this.gatewayCallback)}},d.prototype.show=function(t){if(t){var e=this.modalAction.piping.parameters.globals.getAll(),i=this.modalAction.getParametersForIframe();this.navigator=a.inMemory(t,this.modalAction.piping.url,this.openNewAction.bind(this)),this.actionLoader=new r(this.modalAction.piping.url),this.actionLoader.addListener(this.onActionLoaded),this.openNewAction(t,e,i)}},d.prototype.showAction=function(e,i){if(this.$wrapper.css("display","inherit"),this.$modals.css("display","inherit"),e.view.insertionPoint){var a=this.insertionPoints.indexOf(e.view.insertionPoint);this.insertionPoints=this.insertionPoints.slice(0,a+1),this.insertionPoints=this.insertionPoints.concat(_.map(e.view.actions,(function(t){return t.action.id}))),this.action.setContent(e.view.actions,i.locals,e.view.insertionPoint)}else{this.insertionPoints=_.map(e.view.actions,(function(t){return t.action.id}));var r=e.view.actions[0].action,l=e.view.actions[0].systemParameters,d=e.view.actions.length>1?{}:i.locals,c=new n(r.view,this.modalAction.piping.application.options);c.loadData(r),c.piping=this.modalAction.piping.createChildPiping(r,c,d,l,this.$wrapper,this.$view,!1),c.piping.runtime=this,c.piping.navigator=this.navigator,c.piping.eventing.addIntercept(this.onEventReceived),c.piping.$modals=this.$modals,c.globals=_.clone(i.globals),c.locals=_.clone(i.locals);var u=A.getCurrentLayout(c);if(s.applyLayout(this.$view,u),c.applyLayout(u),c.createAndRenderDrops(t()),o.isEnabled()&&this.informValidator(c),"relative"===this.modalAction.$element.css("position")||this.modalAction.data.useSelectedActionSize){if(this.modalAction.$element.height("auto"),this.modalAction.data.useSelectedActionSize){if(!c.canGrow()){var h=(c.data.top||0)+c.data.size.y+(c.data.bottom||0);this.modalAction.$element.height(h)}var p=(c.data.left||0)+c.data.size.x+(c.data.right||0);this.modalAction.$element.width(p)}t.isNumeric(this.modalAction.data.left)&&t.isNumeric(this.modalAction.data.right)&&t.isNumeric(r.view.data.left)&&t.isNumeric(r.view.data.right)?this.modalAction.$element.css("width","300px"):this.modalAction.data.useSelectedActionSize||this.modalAction.$element.width("auto")}this.cleanupCurrentAction(),this.action=c,c.setContent(e.view.actions.slice(1),i.locals),this.$wrapper.scrollTop(0)}this.action.piping.busyIndicator.forceHide()},d.prototype.informValidator=function(t){o.registerListener(t.instanceId,this.receiveMessage.bind(this)),o.publishEvent({type:"ACTION_INSTANCE_LOADED",action:t,parentInstanceId:this.modalAction.rootDrop.instanceId,canReload:!1})},d.prototype.receiveMessage=function(t){switch(t.type){case"RELOAD_ACTION_INSTANCE":this.openNewAction(this.action.data.id,this.action.globals,this.action.locals);break;case"HIGHLIGHT_ACTION_INSTANCE":l.highlight(this.$wrapper)}},d.prototype.openNewAction=function(t,e,i){this.actionLoader.load(t,e,i,null,this.insertionPoints)},d.prototype.hide=function(){this.$wrapper&&(this.$wrapper.css("display","none"),this.$modals.css("display","none"))},d.prototype.triggerEventForChild=function(t){this.action&&this.action.triggerEvent(t.eventName,t.args[0])},d.prototype.onError=function(t){this.action&&this.action.onError(t)},d.prototype.receiveEvent=function(t){if(this.modalAction.data.eventsToCatch&&-1!==this.modalAction.data.eventsToCatch.indexOf(t.eventName)){var e=i.defer(),n=t.args?t.args[0]:null;return this.modalAction.piping.eventing.publish(this.modalAction.data.id+"."+t.eventName,void 0,n,(function(){e.resolve()}),t.parentEventAction),e.promise}},d.prototype.cleanupCurrentAction=function(){this.action&&(o.isEnabled()&&o.publishEvent({type:"ACTION_INSTANCE_UNLOADING",action:this.action}),this.action.piping.eventing.removeIntercept(this.onEventReceived),this.action.piping.cleanUp(),this.action.unsubscribeEventHandlersRecursive(),o.isEnabled()&&o.unregisterListener(this.action.instanceId),this.action=null)},d.prototype.dispose=function(){this.cleanupCurrentAction(),this.actionLoader&&(this.actionLoader.removeListener(this.onActionLoaded),this.actionLoader=null),this.gatewayCallback&&o.removeCallback(this.gatewayCallback)},d})),define("drops/modalAction/modalAction",["jquery","lq/drop","lq/modalblur","drops/modals","./ModalActionMpa","./ModalActionSpa","lq/style"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{size:{x:200,y:80},actionId:"",scrolling:"auto",parameters:[],eventsToCatch:[],lightBoxOpacity:100,animation:"none",minWidth:null,minHeight:null,useSelectedActionSize:!0,actionSource:"selectAction"}},A=function(n){e.call(this,t('<div class="modal-action" />'),s,n),this.data.centered&&this.subscribeEventHandler(t(window),"resize",i.updateModalLayerHeight.bind(this)),r.renderStyles(this)};return e.extend(A,e),A.typeName="ModalAction",A.prototype.preRender=function(){this.implementation=this.piping.application.singlePage?new o(this):new a(this),this.implementation.setUp(),this.piping.visibility.apply(this),this.useSelectedActionSize?this.resetMinimumDimensions():this.applyMinimumDimensions(),this.applyPosition(),this.centerInsideParent(),this.applyZIndex(),this.applyAnimation()},A.prototype.setElementSizeBasedOnAnchoring=function(t,e){null!==t.top&&void 0!==t.top&&null!==t.bottom&&void 0!==t.bottom||this.$element.height(e.sizeY),null!==t.left&&void 0!==t.left&&null!==t.right&&void 0!==t.right||this.$element.width(e.sizeX)},A.prototype.applyAnimation=function(){"zoomin"===this.data.animation&&this.$element.addClass("modal-animated-zoomin")},A.prototype.applyMinimumDimensions=function(){this.data.minHeight&&this.$element.css("minHeight",this.data.minHeight+"px"),this.data.minWidth&&this.$element.css("minWidth",this.data.minWidth+"px")},A.prototype.resetMinimumDimensions=function(){this.$element.css({minHeight:"",minWidth:""})},A.prototype.applyZIndex=function(){this.$element.css("zIndex",6001+this.data.zIndex)},A.prototype.postRender=function(){e.prototype.postRender.apply(this,arguments),this.renderModalLayer(this.data),this.isVisible()&&this.show(),this.designData||(this.isScrollable()?this.$scrollContainer.css({overflow:"auto"}).append(this.$element):this.data.centered&&this.$element.appendTo(this.piping.$modals))},A.prototype.centerInsideParent=function(){this.data.centered&&(null!=this.data.top||null!=this.data.bottom?(this.$element.css({left:null,right:null,margin:"auto"}),null!=this.data.top&&this.$element.css("top",this.data.top+(this.getRootDrop().data.top||0)),null!=this.data.bottom&&this.$element.css("bottom",this.data.bottom+(this.getRootDrop().data.bottom||0))):this.$element.css({top:this.getVerticalCenterPosition()+"px",bottom:null,left:null,right:null,margin:"auto"}))},A.prototype.getHorizontalCenterPosition=function(){var e=t(window).width();return(e-this.data.size.x)/2>=0?(e-this.data.size.x)/2:0},A.prototype.getVerticalCenterPosition=function(){var e=t(window).height();return(e-this.data.size.y)/2>=0?(e-this.data.size.y)/2:0},A.prototype.show=function(){var t=this.getActionId();this.implementation.show(t),this.$element.addClass("open"),e.prototype.show.call(this),this.$scrollContainer&&(this.updateScrollContainerZIndex(),this.$scrollContainer.show()),this.$modalLayer&&(i.updateModalLayerHeight.call(this),this.$modalLayer.show(),this.$modalLayer.removeClass("closed")),i.applyBlur.call(this),this.addBackgroundClickHandler()},A.prototype.hide=function(){this.$element.removeClass("open"),this.implementation.hide(),this.removeBackgroundClickHandler(),e.prototype.hide.call(this);var t=this;setTimeout((function(){t.$modalLayer&&(t.$modalLayer.addClass("closed"),t.$modalLayer.hide())})),this.$scrollContainer&&this.$scrollContainer.hide(),this.data.hasBlur&&i.setBlurValue.call(this,0)},A.prototype.addBackgroundClickHandler=function(){this.removeBackgroundClickHandler();var e=this,i=Date.now();this.backgroundClickHandler=function(n){Date.now()-i<50||e.$element[0]===n.target||t.contains(e.$element[0],n.target)||t(n.target).is(":visible")&&(e.removeBackgroundClickHandler(),e.data.closeWhenBackgroundClicked&&e.hide(),e.triggerEventIfEnabled("backgroundClicked"))},this.piping.$app.on("click touchstart",this.backgroundClickHandler)},A.prototype.removeBackgroundClickHandler=function(){this.backgroundClickHandler&&(this.piping.$app.off("click touchstart",this.backgroundClickHandler),this.backgroundClickHandler=null)},A.prototype.renderModalLayer=function(){(this.data.hasLightBox||this.data.centered)&&(this.$scrollContainer=this.$scrollContainer||t("<div />").hide(),this.$modalLayer=this.$modalLayer||t("<div />").appendTo(this.$scrollContainer),this.applyModalLayerLayout(),this.data.centered?this.$scrollContainer.appendTo(this.piping.$modals):this.data.toBrowser?this.$scrollContainer.appendTo(this.piping.$actionWrapper):this.$scrollContainer.appendTo(this.rootDrop.$element))},A.prototype.applyModalLayerLayout=function(){(this.data.hasLightBox||this.data.centered)&&(this.$scrollContainer.css({position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:0,overflowY:"hidden"}),this.$modalLayer.css({position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:0,backgroundColor:this.data.hasLightBox?this.data.lightBoxColor:"rgba(0, 0, 0, 0)",opacity:this.data.lightBoxOpacity/100}),this.isVisible()&&this.updateScrollContainerZIndex(),"none"!==this.data.animation&&this.$modalLayer.addClass("modal-animated-modallayer closed"))},A.prototype.updateScrollContainerZIndex=function(){this.piping.application.singlePage?(this.$scrollContainer.css("zIndex",n.getNextZIndex()),this.designData||this.isScrollable()||this.$element.css("zIndex",n.getNextZIndex())):(this.$scrollContainer.css("zIndex",6e3+this.data.zIndex),this.$modalLayer&&this.$modalLayer.css("zIndex",6e3+this.data.zIndex-1))},A.prototype.getActionId=function(){return"fromParameter"===this.data.actionSource?this.piping.parameters.getValue(this.data.actionIdParameter):"selectAction"===this.data.actionSource?this.data.actionId:"fromMapping"===this.data.actionSource?this.mappedActionId:void 0},A.prototype.getParametersForIframe=function(){if(!this.data.parameters)return{};var t=this,e={};return _.each(this.data.parameters,(function(i){e[i]=t.piping.parameters.getValue(i)})),e},A.prototype.triggerEventForChild=function(t){this.implementation.triggerEventForChild(t)},A.prototype.isScrollable=function(){return this.data.centered&&this.$scrollContainer},A.prototype.onError=function(t){this.implementation.onError(t)},A.prototype.unsubscribeEventHandlers=function(){this.removeBackgroundClickHandler(),i.setBlurValue.call(this,0),this.implementation&&this.implementation.dispose(),this.$scrollContainer&&this.$scrollContainer.remove()},A.prototype.setValue=function(t){t.value&&"fromMapping"===this.data.actionSource&&(this.mappedActionId=t.value,this.isVisible()&&this.show())},A.prototype.getDefaultEventArg=function(){},A.prototype.clearValue=t.noop,A})),define("drops/modalPopup/modalPopup",["jquery","lq/drop","lq/modalblur","drops/modals","lq/style"],(function(t,e,i,n,a){"use strict";var o={data:{size:{x:200,y:80},lightBoxOpacity:100,hasBlur:!1,blur:0,scrolling:"auto",boxShadow:{enabled:!1,color:"rgb(136, 136, 136)",x:0,y:0,blur:0,spread:0},roundedCorners:{enabled:!1,leftTopRadius:0,rightTopRadius:0,rightBottomRadius:0,leftBottomRadius:0},initialVisibility:!1,initialVisibilityOption:"Hard Coded"}},r=function(n){e.call(this,t("<div />"),o,n),this.data.centered&&this.subscribeEventHandler(t(window),"resize",i.updateModalLayerHeight.bind(this)),a.renderStyles(this)};return e.extend(r,e),r.typeName="ModalPopup",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.centerInsideParent(),this.applyZIndex()},r.prototype.applyZIndex=function(){this.$element.css("zIndex",6001+this.data.zIndex)},r.prototype.postRender=function(){e.prototype.postRender.apply(this,arguments),this.renderModalLayer(this.data)},r.prototype.centerInsideParent=function(){this.data.centered&&(null!==this.data.top&&void 0!==this.data.top||null!==this.data.bottom&&void 0!==this.data.bottom?(this.$element.css({left:null,right:null,margin:"auto"}),this.renderInBackground||(null!==this.data.top&&this.$element.css("top",this.data.top+(this.getRootDrop().data.top||0)),null!==this.data.bottom&&this.$element.css("bottom",this.data.bottom+(this.getRootDrop().data.bottom||0)))):this.$element.css({top:this.getVerticalCenterPosition()+"px",bottom:null,left:null,right:null,margin:"auto"}))},r.prototype.getHorizontalCenterPosition=function(){var e=t(window).width();return(e-this.data.size.x)/2>=0?(e-this.data.size.x)/2:0},r.prototype.getVerticalCenterPosition=function(){var e=t(window).height();return(e-this.data.size.y)/2>=0?(e-this.data.size.y)/2:0},r.prototype.autoPositionAt=function(e){this.$element.css({left:null===e.left?"auto":e.left+"px",top:null===e.top?"auto":e.top+"px",right:null===e.right?"auto":e.right+"px",bottom:null===e.bottom?"auto":e.bottom+"px"}),this.$scrollContainer||this.$element.appendTo(t("body"))},r.prototype.show=function(){e.prototype.show.call(this),this.$scrollContainer&&(this.$scrollContainer.css({height:"100%",overflow:this.isScrollable()?"auto":""}),this.updateScrollContainerZIndex(),this.$scrollContainer.show()),this.$modalLayer&&(i.updateModalLayerHeight.call(this),this.$modalLayer.show()),i.applyBlur.call(this),this.addBackgroundClickHandler()},r.prototype.hide=function(){this.removeBackgroundClickHandler(),e.prototype.hide.call(this);var t=this;setTimeout((function(){t.$modalLayer&&t.$modalLayer.hide()})),this.$scrollContainer&&this.$scrollContainer.hide(),this.data.hasBlur&&i.setBlurValue.call(this,0)},r.prototype.addBackgroundClickHandler=function(){this.removeBackgroundClickHandler();var e=this,i=Date.now();this.backgroundClickHandler=function(n){Date.now()-i<50||e.$element[0]===n.target||t.contains(e.$element[0],n.target)||t(n.target).is(":visible")&&(e.removeBackgroundClickHandler(),e.data.closeWhenBackgroundClicked&&e.hide(),e.triggerEventIfEnabled("backgroundClicked"))},this.piping.$app.on("click touchstart",this.backgroundClickHandler)},r.prototype.removeBackgroundClickHandler=function(){this.backgroundClickHandler&&(this.piping.$app.off("click touchstart",this.backgroundClickHandler),this.backgroundClickHandler=null)},r.prototype.renderModalLayer=function(){(this.data.hasLightBox||this.data.centered)&&(this.$scrollContainer=this.$scrollContainer||t("<div />").hide(),this.$modalLayer=this.$modalLayer||t("<div />").appendTo(this.$scrollContainer),this.applyModalLayerLayout(),this.data.centered||this.data.autoPosition&&this.data.autoPosition.enabled?this.$scrollContainer.appendTo(this.piping.$modals):this.data.toBrowser?this.$scrollContainer.appendTo(this.piping.$actionWrapper):this.$scrollContainer.appendTo(this.rootDrop.$element),this.$scrollContainer.append(this.$element))},r.prototype.applyModalLayerLayout=function(){(this.data.hasLightBox||this.data.centered)&&(this.$scrollContainer.css({position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:0,overflowY:"hidden"}),this.$modalLayer.css({position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:0,backgroundColor:this.data.hasLightBox?this.data.lightBoxColor:"rgba(0, 0, 0, 0)",opacity:this.data.lightBoxOpacity/100}),this.isVisible()&&this.updateScrollContainerZIndex())},r.prototype.updateScrollContainerZIndex=function(){this.piping.application.singlePage?this.$scrollContainer.css("zIndex",n.getNextZIndex()):(this.$scrollContainer.css("zIndex",6e3+this.data.zIndex),this.$modalLayer&&this.$modalLayer.css("zIndex",6e3+this.data.zIndex-1))},r.prototype.render=function(t){var e=this;return this.createAndRenderDrops(t).then((function(){e.isVisible()&&e.show()}))},r.prototype.isScrollable=function(){return this.data.centered&&this.$scrollContainer},r.prototype.unsubscribeEventHandlers=function(){this.removeBackgroundClickHandler(),i.setBlurValue.call(this,0),this.$scrollContainer&&this.$scrollContainer.remove()},r})),define("drops/multiSelect/checkboxList",["jquery","underscore"],(function(t,e){"use strict";var i=function(e){this.drop=e,this.$el=t("<div />").addClass("multi-checkbox").appendTo(e.$element)};return i.prototype.render=t.noop,i.prototype.setItems=function(t){this.createAllOption(),this.createCells(t),this.fillList(),this.updateSelection(),this.setTabIndex()},i.prototype.createCells=function(t){var i=this;this.cells=e.chain(t).map((function(t){return{id:t[i.drop.data.idOutput],label:t[i.drop.data.displayedOutput]}})).map((function(t){return i.createCell(t)})).value()},i.prototype.createCell=function(i){var n=t('<input type="checkbox" id="'+e.uniqueId("multiselect_")+'" />').prop("checked",this.drop.data.selectAllByDefault);this.drop.data.selectAllByDefault&&n.addClass("multi-checkbox-checked");var a={id:i.id,checked:!!this.drop.data.selectAllByDefault,$el:t('<div class="multi-checkbox-option" />'),check:function(){a.checked=!0,n.prop("checked",!0).addClass("multi-checkbox-checked")},uncheck:function(){a.checked=!1,n.prop("checked",!1).addClass("multi-checkbox-unchecked")}};this.drop.data.readOnly&&n.prop("disabled",!0);var o=this;return n.on("change",(function(){a.$el.toggleClass("multi-checkbox-checked"),a.checked=n.prop("checked"),o.drop.updateRequiredIndicator(),o.drop.triggerEventIfEnabled("changed"),a.checked?o.drop.triggerEventIfEnabled("itemSelected",a.id):o.drop.triggerEventIfEnabled("itemDeselected",a.id),o.updateAllOption()})),this.buildItemTable(n,i.label).appendTo(a.$el),a},i.prototype.buildItemTable=function(e,i){var n=this.drop.data.useBuiltInStyle?t('<label class="checkbox-wrapper" />').append(e).append(t('<div class="custom-icon" />')):t('<label class="customCheckState" />').append(e).append(t('<div class="drop-text-content customCheckState-tick"></div>').append(t("<div>&#x2714</div>")));return t("<div />").css({display:"flex",whiteSpace:"pre-wrap"}).append(t("<div />").css({display:"flex",flexFlow:"row"}).append(t("<div />").css({display:"flex",flexDirection:"column",alignItems:"flex-start"}).append(n)).append(t("<div />").css({display:"flex",flexDirection:"column"}).addClass("drop-text-content").append(t('<label for="'+e.attr("id")+'" />').text(i))))},i.prototype.updateAllOption=function(){if(this.$all){var t=this.$all.find("input");e.findWhere(this.cells,{checked:!1})?t.prop("checked",!1):t.prop("checked",!0)}},i.prototype.fillList=function(){var i=this.drop,n=e.pluck(this.cells,"$el");this.$all&&(n=[this.$all].concat(n));var a=e.chain(n).groupBy((function(t,e){return Math.floor(e/i.data.numberOfColumns)})).map((function(e){return t("<div />").css({width:"100%",display:"table",tableLayout:"fixed"}).append(e)})).value();this.$el.empty();for(var o=n.length%this.drop.data.numberOfColumns,r=this.drop.data.numberOfColumns-o,s=0;s<r&&o>0;s++)a[a.length-1].append(t("<div />"));this.$el.append(t("<div />").addClass("multi-checkbox-options").append(a))},i.prototype.clear=function(){e.each(this.cells,(function(t){t.uncheck()})),this.drop.updateRequiredIndicator(),this.updateAllOption()},i.prototype.setTabIndex=function(){this.$el.find("input").first().attr("tabindex",this.drop.data.tabIndex)},i.prototype.setValue=function(t){this.selection=t,this.updateSelection()},i.prototype.createAllOption=function(){if(this.drop.data.addAllOption){var i=this,n=t('<input type="checkbox" id="'+e.uniqueId("multiselect_")+'" />').prop("checked",this.drop.data.selectAllByDefault).on("change",(function(){var n=t(this).prop("checked");e.each(i.cells,(function(t){n&&!t.checked?(t.check(),i.drop.triggerEventIfEnabled("itemSelected",t.id)):!n&&t.checked&&(t.uncheck(),i.drop.triggerEventIfEnabled("itemDeselected",t.id))})),i.drop.updateRequiredIndicator(),i.drop.triggerEventIfEnabled("changed")}));this.drop.data.readOnly&&n.prop("disabled",!0),this.$all=this.buildItemTable(n,this.drop.data.allOptionLabel)}},i.prototype.updateSelection=function(){if(this.selection){var t=this;e.each(this.cells,(function(e){-1!==t.selection.indexOf(e.id)?e.check():e.uncheck()})),this.drop.updateRequiredIndicator(),this.updateAllOption()}},i.prototype.getValue=function(){return e.chain(this.cells).where({checked:!0}).map((function(t){return t.id})).value()},i.prototype.dispose=t.noop,i})),define("drops/multiSelect/dropdownitem",["jquery","underscore"],(function(t,e){"use strict";var i=function(e,i,n,a){this.list=e,this.id=i,this.label=n,this.checked=!!a,this.$checkbox=t('<input type = "checkbox" />').addClass("userstyle-"+e.drop.data.styles).prop("checked",this.checked).on("change",this.onCheckboxToggled.bind(this));var o=t('<label class="checkbox-wrapper" />').append(this.$checkbox).append(t('<div class="custom-icon" />'));this.$element=t("<tr />").append(t("<td />").append(o))};return i.prototype.setReadOnly=function(){this.$checkbox.prop("disabled",!0)},i.prototype.addExtraColumns=function(t){this.$element.append(e.map(t,this.createExtraColumn.bind(this)))},i.prototype.createExtraColumn=function(e){return t("<td />").text(e).on("click",this.onRowClicked.bind(this))},i.prototype.onCheckboxToggled=function(){this.updated(),this.triggerEvents()},i.prototype.onRowClicked=function(){this.toggle(),this.updated(),this.triggerEvents()},i.prototype.triggerEvents=function(){this.list.triggerEventIfEnabled("changed"),this.checked?this.list.triggerEventIfEnabled("itemSelected",this.id):this.list.triggerEventIfEnabled("itemDeselected",this.id)},i.prototype.updated=function(){this.checked=this.$checkbox.is(":checked"),this.list.updateSummary(),this.list.updateRequiredIndicator()},i.prototype.toggle=function(){this.checked?this.uncheck():this.check()},i.prototype.uncheck=function(){this.$checkbox.prop("checked",!1),this.updated()},i.prototype.check=function(){this.$checkbox.prop("checked",!0),this.updated()},i})),define("drops/multiSelect/dropDownMultiSelect",["jquery","underscore","lq/style","./dropdownitem","drops/modals"],(function(t,e,i,n,a){"use strict";var o=function(e){this.drop=e,this.$el=t("<div />"),this.$list=t("<div />"),this.togglePlaceholder(!0)};return o.prototype.render=function(){this.$el.addClass("multi-drop-down collapsed"),this.$label=t("<div />").addClass("multi-drop-down-label");var e=this;this.drop.data.readOnly||(this.$button=t("<div />").addClass("multi-drop-down-button").attr("tabindex",this.drop.data.tabIndex).on("keydown",(function(t){40!==t.which||e.isOpen()?38===t.which&&e.isOpen()&&(e.close(),t.preventDefault()):(e.open(),t.preventDefault())})),this.$el.on("click",(function(){e.isOpen()?e.close():e.open()}))),this.$el.append(this.$label,this.$button).appendTo(this.drop.$element),this.$list.hide().addClass("multi-drop-down-list").appendTo(this.drop.piping.$app),this.drop.data.gridStyleId&&this.$list.addClass(this.getGridStyleClassName()),this.onClicked=this.handleClickOnDocument.bind(this),this.onScrolled=this.scrolledInApp.bind(this),t(document).on("click",this.onClicked),this.drop.piping.$actionWrapper.on("scroll",this.onScrolled)},o.prototype.handleClickOnDocument=function(e){if(this.isOpen()){var i=0===t(e.target).closest(this.drop.$element).length,n=0===t(e.target).closest(this.$list).length;i&&n&&this.close()}},o.prototype.scrolledInApp=function(){this.$list.hide()},o.prototype.getGridStyleClassName=function(){return i.getClassNameFromStyleId("gridstyle-",this.drop.data.gridStyleId)},o.prototype.isOpen=function(){return this.$list.is(":visible")},o.prototype.open=function(){this.$el.removeClass("collapsed").addClass("expanded");var t=this.drop.$element,e=this.drop.piping.$app,i=t.offset().top-e.offset().top+t.outerHeight(),n=t.offset().left-e.offset().left,o=e.height()-i;this.$list.css({top:i,left:n,maxHeight:(o>100?o:"100")+"px",width:t.outerWidth(),zIndex:a.getZIndexForPopups()}).show()},o.prototype.close=function(){this.$el.removeClass("expanded").addClass("collapsed"),this.$list.hide(),this.drop.triggerEventIfEnabled("collapsed")},o.prototype.updateRequiredIndicator=function(){this.drop.updateRequiredIndicator()},o.prototype.triggerEventIfEnabled=function(t,e){this.drop.triggerEventIfEnabled(t,e)},o.prototype.setItems=function(i,a){this.$list.empty();var o=this;if(this.drop.data.addAllOption){var r=e.uniqueId("select_all_");this.$list.append(t("<div />").css({display:"flex",flexFlow:"row"}).append(t('<label class="checkbox-wrapper" />').append(t('<input type="checkbox" id="'+r+'" />').addClass("userstyle-"+o.drop.data.styles).prop("checked",this.drop.data.selectAllByDefault).on("change",(function(){t(this).prop("checked")?o.selectAll():o.clear()}))).append(t('<div class="custom-icon" />'))).append(t('<label for="'+r+'" />').text(this.drop.data.allOptionLabel)))}a=e.difference(a,e.union(this.drop.data.hiddenColumns,[this.drop.data.idOutput]));var s=t("<table />");if(a.length>1){var A=t("<th />").addClass("checkbox-column").addClass("gridHeader"),l=e.map(a,(function(e){return t("<th />").addClass("gridHeader").text(e)}));s.append(t("<tr />").append(A).append(l))}var d=a[0],c=this.drop.data.idOutput;this.rows=e.map(i,(function(t){var i=new n(o,t[c],t[d],o.drop.selectAllByDefault);return i.addExtraColumns(e.map(a,(function(e){return t[e]}))),i})),this.drop.data.selectAllByDefault&&this.selectAll();var u=e.pluck(this.rows,"$element");s.append(u),this.$list.append(s),this.updateUi()},o.prototype.clear=function(){e.each(this.rows,(function(t){t.uncheck()}))},o.prototype.selectAll=function(){e.each(this.rows,(function(t){t.check()}))},o.prototype.setValue=function(t){this.selection=t,this.updateUi()},o.prototype.updateUi=function(){if(this.selection){var t=this;e.each(this.rows,(function(e){-1!==t.selection.indexOf(e.id)?e.check():e.uncheck()}))}},o.prototype.updateSummary=function(){var t=e.chain(this.rows).where({checked:!0}).pluck("label").value().join(", ");this.togglePlaceholder(!t),this.$label.text(t)},o.prototype.getValue=function(){return e.chain(this.rows).where({checked:!0}).pluck("id").value()},o.prototype.togglePlaceholder=function(t){var e=t?this.drop.data.placeholder:"";this.$el.text(e),this.$el.append(this.$label,this.$button)},o.prototype.dispose=function(){this.$list.remove(),t(document).off("click",this.onClicked),this.drop.piping.$actionWrapper.off("scroll",this.onScrolled)},o})),define("drops/multiSelect/multiSelect",["jquery","lq/drop","lq/style","lq/util","underscore","drops/multiSelect/checkboxList","drops/multiSelect/dropDownMultiSelect","lq/required"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{hiddenColumns:[],idOutput:"Id",numberOfColumns:1,addAllOption:!1,allOptionLabel:"All",useBuiltInStyle:!0,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},selectAllByDefault:!1,placeholder:""}};function l(i){e.call(this,t("<div/>"),A,i),this.defaultStyleSettings={text:{verticalAlign:"middle"}},this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.checkedItemIds=[],this.items=null,this.columns=null,this.$element.addClass("boxToBorderSize drop-text-container").css({whiteSpace:"pre-wrap"}),this.createControl(),this.renderStyles()}return e.extend(l,e),l.typeName="MultiSelect",l.prototype.supportsManyToManyData=function(){return!0},l.prototype.createControl=function(){this.data.isNormalDropdown?this.control=new r(this):this.control=new o(this)},l.prototype.renderStyles=function(){i.renderStyles(this,null,this.$element)},l.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this);var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.control.setItems(e.results,a.keys(e.outputs))})),s.prototype.addRemoveRequiredIndicator(t),this.applyPosition()},l.prototype.postRender=function(){this.renderControl()},l.prototype.renderControl=function(){this.control.render()},l.prototype.getValue=function(){return this.control.getValue()},l.prototype.clearValue=function(){this.control.clear()},l.prototype.setValue=function(t){this.control.setValue(t.value)},l.prototype.unsubscribeEventHandlers=function(){this.control.dispose()},l})),define("lq/numeric",["jquery"],(function(t){var e={minValue:null,maxValue:null,valueChanged:t.noop,valid:t.noop,invalid:t.noop,decimalSeperator:".",groupSeperator:","};t.fn.numericVal=function(e){return arguments.length?this.each((function(){t(this).val(e.toString())})):null===t(this).val()||void 0===t(this).val()||""===t(this).val()?null:new Number(t(this).val())},t.fn.numericInput=function(i){return i=t.extend({},e,i),this.each((function(){var e=t(this),n=e.val(),a=i.valueChanged,o=i.valid,r=i.invalid,s=i.decimalSeperator,A=i.groupSeperator;e.on("keydown",(function(e){-1!==t.inArray(e.keyCode,[46,8,9,27,13,188,110,190,109,189])||65==e.keyCode&&!0===e.ctrlKey||67==e.keyCode&&!0===e.ctrlKey||86==e.keyCode&&!0===e.ctrlKey||e.keyCode>=35&&e.keyCode<=39||e.shiftKey&&(e.keyCode<48||e.keyCode>57)&&(e.keyCode<96||e.keyCode>105)&&e.preventDefault()})).on("keyup",(function(){var l=e.val().replace(A,"").replace(s,".");if(""===l||"-"===l)return n=l,a(null),void(""===l?o():r());if(!t.isNumeric(l))return e.val(n),void o();var d=new Number(l);null!=i.minValue&&d<i.minValue?(n=d,a(null),r()):null!=i.maxValue&&d>i.maxValue?(n=i.maxValue,e.val(i.maxValue),a(i.maxValue),o()):(n=d,a(d),o())})).on("blur",(function(){var t=e.val().replace(A,"").replace(s,".");if(t&&isNaN(t))e.val(""),a(null),o();else if(null!=i.minValue&&t){new Number(t)<i.minValue&&(n=i.minValue,e.val(i.minValue),a(i.minValue)),o()}}))}))}})),define("drops/numericInput/numericInput",["jquery","lq","lq/drop","lq/style","jquery.numpadDecSeparator","lq/util","lq/constants","lq/tooltip","lq/numeric","lq/required"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d={data:{title:{option:s.hardcoded},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded",autocomplete:"on"},changedDelay:500}};function c(e){i.call(this,t("<div/>"),d,e),this.data.eventing=o.convertListOfKeyValuesToObject(this.data.eventing)||{},this.typeOfCurrentValue=r.valueTypes.decimal}return i.extend(c,i),c.typeName="NumericInput",c.prototype.hasMaxValue=function(){return this.data.hasMaxValue||this.data.hasMaxLength},c.prototype.hasMinValue=function(){return!!this.data.hasMinValue},c.prototype.getMaxLength=function(){return this.data.hasMaxLength?this.data.maxLength:this.data.maxValue.toString().length},c.prototype.getMinValue=function(){return this.data.minValue},c.prototype.getMaxValue=function(){return this.data.hasMaxValue?this.data.maxValue:Math.pow(10,new Number(this.data.maxLength))-1},c.prototype.updatePrefix=function(){null!==this.data.prefix||""!==this.data.prefix?this.$prefix.text(this.data.prefix):this.$prefix.text("")},c.prototype.renderStyles=function(){n.renderStyles(this,null,this.$input)},c.prototype.createInput=function(){if(!0===this.data.enableNumericKeypad){var e=t('<input type="number" />');return this.hasMaxValue()&&e.attr("max",this.getMaxValue()),this.hasMinValue()&&e.attr("min",this.getMinValue()),e}var i=this.data.maskedInput?"password":"text",n=t("<input type="+i+" />").numericInput({maxValue:this.hasMaxValue()?this.getMaxValue():void 0,minValue:this.hasMinValue()?this.getMinValue():void 0,groupSeperator:this.formatter.groupSeperator,decimalSeperator:this.formatter.decimalSeperator}).numpadDecSeparator({separator:this.formatter.decimalSeperator});return this.hasMaxValue()&&n.attr("max",this.getMaxLength()),n},c.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),l.prototype.addRemoveRequiredIndicator(this),this.$prefix=t("<span />").css({float:"left",paddingRight:"4px",fontFamily:"Verdana, Geneva, sans-serif",fontSize:"14px",lineHeight:"1"}).appendTo(this.$element),this.$span=t("<span />").css({display:"block"}).appendTo(this.$element),this.$input=this.createInput().attr("name",this.data.name).attr("id",this.rootDrop.instanceId+"_"+this.data.id).attr("tabindex",this.data.tabIndex).attr("placeholder",this.data.watermark).attr("autocomplete",this.data.autocomplete).addClass("boxToBorderSize").css({width:"100%",height:this.data.size.y+"px"}).appendTo(this.$span),this.data.maskedInput?(this.addTogglePassword(),this.changeOpenEyeIcon()):this.removeTogglePassword(),this.tooltip=new s(this,this.data.title,this.$input),this.tooltip.update(),this.applyEventTrigger("focusLost","blur",this.$input);var e=this,i=this.getEventDataFor("changed");i.enabled&&(this.subscribeEventHandler(this.$input,"keydown",(function(){_.has(e,"lastChangedEventValue")||(e.lastChangedEventValue=e.getValue())})),this.subscribeEventHandler(this.$input,"keypress input",_.debounce((function(){e.lastChangedEventValue!==e.getValue()&&(e.lastChangedEventValue=e.getValue(),e.triggerEvent(i.raisedEventName))}),this.data.changedDelay))),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap",width:this.data.size.x+"px",height:this.data.size.y+"px"}),this.renderStyles(),this.$input.on("keyup",(function(t){e.cutDecimals(),e.updateRequiredIndicator(),13===t.keyCode&&e.triggerEventIfEnabled("enterPressed")})),this.data.readOnly&&this.$input.prop("readonly",!0),this.updatePrefix(),this.applyPosition()},c.prototype.focus=function(){this.$input.trigger("focus")},c.prototype.getDefaultEventArg=function(){return this.getValue()},c.prototype.getValue=function(){return""===this.$input.val()?null:!0===this.data.enableNumericKeypad?this.$input.val():this.formatter.convertToLicquidFormat(this.typeOfCurrentValue,this.$input.val())},c.prototype.clearValue=function(){this.$input.val(""),this.updateRequiredIndicator(),this.lastChangedEventValue=this.getValue()},c.prototype.setValue=function(t){if(t.type!==r.valueTypes.string&&t.type?this.typeOfCurrentValue=t.type:this.typeOfCurrentValue=r.valueTypes.decimal,!0===this.data.enableNumericKeypad)this.$input.val(t.value),this.lastChangedEventValue=t.value;else{var e=this.formatter.convertFromLicquidFormat(this.typeOfCurrentValue,t.value);this.$input.val(e),this.lastChangedEventValue=this.getValue()}this.updateRequiredIndicator()},c.prototype.hasValue=function(){var e=this.getValue();return null!=e&&(0!==e.length&&!!t.isNumeric(e))},c.prototype.addTogglePassword=function(){var e=this;this.$togglePassword=t('<div class = "input-fa input-fa-eye">').prop("title","Show password").css({position:"relative",top:"-50%",left:"-5px",marginTop:"-8px",float:"right"}).on("click",(function(){"password"===e.$input[0].type?e.changeClosedEyeIcon():e.changeOpenEyeIcon()})).appendTo(this.$element)},c.prototype.removeTogglePassword=function(){this.$togglePassword&&(this.$togglePassword.remove(),delete this.$togglePassword)},c.prototype.getOpenEyeImagePath=function(){return this.data.physicalFileOpenEye?e.getTenantUploads(this.data.physicalFileOpenEye):null},c.prototype.getClosedEyeImagePath=function(){return this.data.physicalFileClosedEye?e.getTenantUploads(this.data.physicalFileClosedEye):null},c.prototype.changeOpenEyeIcon=function(){this.$togglePassword||this.addTogglePassword();var t="open",e=this.getOpenEyeImagePath();e&&this.data.maskedInput&&this.data.useCustomImage?this.setCustomEyeImage(e,t):this.data.maskedInput&&this.clearCustomEyeImage(t),this.$input[0].type="password"},c.prototype.changeClosedEyeIcon=function(){this.$togglePassword||this.addTogglePassword();var t="closed",e=this.getClosedEyeImagePath();e&&this.data.maskedInput&&this.data.useCustomImage?this.setCustomEyeImage(e,t):this.data.maskedInput&&this.clearCustomEyeImage(t),this.$input[0].type="text"},c.prototype.setCustomEyeImage=function(e,i){this.$togglePassword.css({width:"16px",height:"16px",backgroundImage:"url("+require.toUrl(e)+")",backgroundSize:"100% 100%"}).removeClass("input-fa-eye input-fa-eye-slash"),"closed"===i?t(this.$togglePassword).prop("title","Hide password"):"open"===i&&t(this.$togglePassword).prop("title","Show password")},c.prototype.clearCustomEyeImage=function(e){t(this.$togglePassword).css({width:"",height:"",backgroundImage:"",backgroundSize:""}),"closed"===e?t(this.$togglePassword).prop("title","Hide password").addClass("input-fa-eye-slash").removeClass("input-fa-eye"):"open"===e&&t(this.$togglePassword).prop("title","Show password").addClass("input-fa-eye").removeClass("input-fa-eye-slash")},c.prototype.cutDecimals=function(){if(this.$input.val()&&this.data.hasMaxDecimals){var t=parseInt(this.formatter.decimalPrecision),e=this.$input.val().split(this.formatter.decimalSeperator);"number"==typeof t&&t>-1&&(e.length>1&&e[1].length>t?this.$input.val(e[0]+this.formatter.decimalSeperator+e[1].substring(0,t)):0===t&&this.$input.val(e[0]))}},c})),define("drops/pagination/pagination",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{showFirst:!0,firstLabel:"❮❮",showPrevious:!0,previousLabel:"❮",showNext:!0,nextLabel:"❯",showLast:!0,lastLabel:"❯❯",showLabel:!0,labelTemplate:"${currentPage}/${totalNumberOfPages}",verticalAlignment:"top"}};function a(a){e.call(this,t('<div class="pagination-drop boxToBorderSize" />'),n,a),i.renderStyles(this)}return e.extend(a,e),a.typeName="Pagination",a.prototype.postRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.targetDrop=this.piping.dropFactory.findDropByName(this.data.targetDrop),this.targetDrop&&this.targetDrop.withOnPageOpened(this.pageOpened.bind(this))},a.prototype.createPager=function(){if(this.$pager=t('<div class="pager-container" />'),this.data.showFirst||this.data.showPrevious){var e=t('<div class="back-buttons" />');this.data.showFirst&&(this.$first=t('<span class="show-first clickable" />').text(this.data.firstLabel).on("click",this.goToFirstPage.bind(this)).appendTo(e),i.renderStyles(this,null,this.$first,this.data.styles,"navigation","navigationHover")),this.data.showPrevious&&(this.$previous=t('<span class="show-previous clickable" />').text(this.data.previousLabel).on("click",this.goToPreviousPage.bind(this)).appendTo(e),i.renderStyles(this,null,this.$previous,this.data.styles,"navigation","navigationHover")),this.$pager.append(e)}if(this.data.showLabel&&(this.$label=t('<div class="paging-info" />').appendTo(this.$pager),i.renderStyles(this,null,this.$label,this.data.styles,"label","")),this.data.showLast||this.data.showNext){var n=t('<div class="forward-buttons" />');this.data.showNext&&(this.$next=t('<span class="show-next clickable" />').text(this.data.nextLabel).on("click",this.goToNextPage.bind(this)).appendTo(n),i.renderStyles(this,null,this.$next,this.data.styles,"navigation","navigationHover")),this.data.showLast&&(this.$last=t('<span class="show-last clickable" />').text(this.data.lastLabel).on("click",this.goToLastPage.bind(this)).appendTo(n),i.renderStyles(this,null,this.$last,this.data.styles,"navigation","navigationHover")),this.$pager.append(n)}"middle"===this.data.verticalAlignment?this.$element.css({display:"flex",flexDirection:"column",justifyContent:"center"}):"bottom"===this.data.verticalAlignment?this.$element.css({display:"flex",flexDirection:"column",justifyContent:"flex-end"}):this.$element.css({display:"inherit",flexDirection:"",justifyContent:""}),this.$pager.appendTo(this.$element)},a.prototype.goToFirstPage=function(){this.targetDrop&&this.targetDrop.openPage(0)},a.prototype.goToPreviousPage=function(){this.targetDrop&&this.targetDrop.openPage(this.currentPage-1)},a.prototype.goToNextPage=function(){this.targetDrop&&this.targetDrop.openPage(this.currentPage+1)},a.prototype.goToLastPage=function(){this.targetDrop&&this.targetDrop.openPage(this.totalNumberOfPages)},a.prototype.pageOpened=function(t,e,i){this.totalNumberOfResults=t,this.currentPage=e,this.sizeOfPage=i,this.totalNumberOfPages=Math.floor(t/i-.01),this.$pager||this.createPager();var n=0===e,a=e===this.totalNumberOfPages,o=e*i+1,r=a?o+t%i-1:(e+1)*i;this.$first&&this.$first.toggleClass("not-visible",n),this.$previous&&this.$previous.toggleClass("not-visible",n),this.$next&&this.$next.toggleClass("not-visible",a),this.$last&&this.$last.toggleClass("not-visible",a),this.$label&&this.$label.text(this.data.labelTemplate.replace(/\${currentPage}/g,e+1).replace(/\${totalNumberOfPages}/g,this.totalNumberOfPages+1).replace(/\${firstRecordCurrentPage}/g,o).replace(/\${lastRecordCurrentPage}/g,r).replace(/\${totalNumberOfRecords}/g,t))},a})),define("drops/pattern/pattern",["jquery","lq/drop"],(function(t,e){"use strict";var i={data:{selectedPattern:"weave"}};function n(n){e.call(this,t("<div/>"),i,n),this.$element.addClass(this.data.selectedPattern)}return e.extend(n,e),n.typeName="Pattern",n.prototype.preRender=function(){this.applyPosition()},n})),define("drops/payment/payment",["jquery","lq","lq/drop"],(function(t,e,i){"use strict";function n(e){var n=t('<form method="post" action="https://secure.ogone.com/ncol/prod/orderstandard.asp" id="paymentform" name="paymentform"></form>');i.call(this,t(n),e)}return i.extend(n),n.typeName="Payment",n.prototype.preRender=function(){var i={actionId:this.parent.data.id,morphId:this.data.id,parameters:this.piping.parameters.getNonSystemParameters()},n=this;this.piping.dispatcher.dispatch("Query/GetPaymentInfo",i).done((function(i){var a=t("#paymentform");t('<input type="hidden" id="PSPID" name="PSPID">').val(i.OGONE_PSPID).appendTo(a),t('<input type="hidden" id="ORDERID" name="ORDERID">').val(i.OGONE_ORDERID).appendTo(a),t('<input type="hidden" id="AMOUNT" name="AMOUNT">').val(i.OGONE_AMOUNT).appendTo(a),t('<input type="hidden" id="CURRENCY" name="CURRENCY">').val(i.OGONE_CURRENCY).appendTo(a),t('<input type="hidden" id="LANGUAGE" name="LANGUAGE">').val(i.OGONE_LANGUAGE).appendTo(a);var o=location.protocol+"//"+location.host+e.getTenantUrl("LicquidAction/AcceptPayment/")+n.data.id+"?ORDERID="+i.OGONE_ORDERID;t('<input type="hidden" id="ACCEPTURL" name="ACCEPTURL">').val(o).appendTo(a);var r=location.protocol+"//"+location.host+e.getTenantUrl("LicquidAction/Get/")+n.data.cancelRedirect;t('<input type="hidden" id="DECLINEURL" name="DECLINEURL">').val(r).appendTo(a),t('<input type="hidden" id="EXCEPTIONURL" name="EXCEPTIONURL">').val(r).appendTo(a),t('<input type="hidden" id="CANCELURL" name="CANCELURL">').val(r).appendTo(a)}))},n.prototype.executePayment=function(){t("#paymentform").submit()},n})),define("lq/dayTime",["jquery"],(function(t){"use strict";var e=function(t,e,i){return Math.max(e,Math.min(t,i))},i=function(e){if(null==(e=e||null))return null;var i,n,a=e.split(":",2);if(1==a.length?(i=e.substr(0,Math.min(e.length,2)),n=e.length>2?e.substr(2,Math.min(e.length-2,2)):"00"):(i=a[0],n=a[1]),t.isNumeric(i));else{if(0!=i.length)return null;i=0}if(t.isNumeric(n));else{if(0!=n.length)return null;n=0}return{hours:i=t.isNumeric(i)?i:0,minutes:n=t.isNumeric(n)?n:0}},n=function(t,e){var i=function(t){for(var e=t.toString();e.length<2;)e="0"+e;return e};return i(t)+":"+i(e)};return{fromTicks:function(t){if(!t&&0!==t)return"--:--";var e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60);return n(e,i)},fromDate:function(t,e){if(!e)return"--:--";var i=t.formatting.createFormatter().parseLicquidDate(e);if(null==i)throw"The value '"+e+"' is not a valid date/time";return n(i.getHours(),i.getMinutes())},toTicks:function(t){var n=i(t);return null==n?null:3600*e(n.hours,0,23)+60*e(n.minutes,0,59)},toDate:function(t,e){var n=i(e);if(null==n)return null;var a=new Date(1753,1,1,n.hours,n.minutes,0);return t.formatting.createFormatter().formatLicquidDate(a)}}})),define("drops/planningGraph/planninggraphimpl",["jquery","lq/dayTime"],(function(t,e){"use strict";function i(t,e){this.container=t,this.graphData={},this.system={},this.parameters=e.parameters,this.formatter=e.formatting.createFormatter()}return i.prototype.planningGraphMouseUp=function(){t(document).off("mousemove"),t(document).off("touchmove"),t("body").css("cursor","default")},i.prototype.planningGraphMouseDown=function(e){this.system.cursorX=e.clientX;var i=this,n=t(t(e.target||e.srcElement)[0]);if(n.hasClass("selected")||n.parent().hasClass("selected")){var a=n.attr("barType"),o=n.attr("resizeDirection");switch(this.system.draggingDiv=t(e.target||e.srcElement)[0],a){case"dragHandle":this.system.currentLeft=parseFloat(this.system.draggingDiv.style.left),this.system.currentRight=parseFloat(this.system.draggingDiv.style.right),t(document).on("mousemove",(function(t){i.divMove(t)})),t(document).on("touchmove",(function(t){t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i.divMove(t)}));break;case"resizeHandle":if(t("body").css("cursor",t(this.system.draggingDiv).css("cursor")),this.system.currentLeft=parseFloat(t(this.system.draggingDiv).parent()[0].style.left),this.system.currentRight=parseFloat(t(this.system.draggingDiv).parent()[0].style.right),"left"==o){t(document).on("mousemove",(function(t){i.divResizeLeft(t)})),t(document).on("touchmove",(function(t){t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i.divResizeLeft(t)}));break}"right"==o&&(t(document).on("mousemove",(function(t){i.divResizeRight(t)})),t(document).on("touchmove",(function(t){t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i.divResizeRight(t)})))}}},i.prototype.getLeftLimit=function(t,e){for(var i=this.graphData.rangeMin,n=this.graphData.barValues[t].Plannings[e].Start,a=0;a<this.graphData.barValues[t].Plannings.length;a++)if(a!=e){var o=this.graphData.barValues[t].Plannings[a].End;o>i&&o<=n+.5*this.graphData.interval&&(i=o)}return(i-=this.graphData.rangeMin)*this.system.itemWidth},i.prototype.getRightLimit=function(t,e){for(var i=this.graphData.rangeMax,n=this.graphData.barValues[t].Plannings[e].End,a=0;a<this.graphData.barValues[t].Plannings.length;a++)if(a!=e){var o=this.graphData.barValues[t].Plannings[a].Start;o<i&&o>=n-.5*this.graphData.interval&&(i=o)}return(i=this.graphData.rangeMax-i)*this.system.itemWidth},i.prototype.divResizeLeft=function(e){var i=t(this.container).find(".colPlanner").width(),n=t(this.system.draggingDiv).parent().parent().parent().attr("arId"),a=t(this.system.draggingDiv).parent().attr("arId"),o=(e.clientX-this.system.cursorX)/i*100;o=Math.round(o/(this.system.itemWidth*this.graphData.interval))*(this.system.itemWidth*this.graphData.interval);var r=this.getLeftLimit(n,a),s=100-parseFloat(t(this.system.draggingDiv).parent()[0].style.right)-this.system.itemWidth*this.graphData.interval;r<0&&(r=0),s>100&&(s=100);var A=this.system.currentLeft+o;A<r&&(A=r),A>s&&(A=s),t(this.system.draggingDiv).parent()[0].style.left=A+"%",this.setNewTotal(t(this.system.draggingDiv).parent())},i.prototype.divResizeRight=function(e){var i=t(this.container).find(".colPlanner").width(),n=t(this.system.draggingDiv).parent().parent().parent().attr("arId"),a=t(this.system.draggingDiv).parent().attr("arId"),o=(e.clientX-this.system.cursorX)/i*100;o=Math.round(o/(this.system.itemWidth*this.graphData.interval))*(this.system.itemWidth*this.graphData.interval);var r=this.getRightLimit(n,a),s=100-parseFloat(t(this.system.draggingDiv).parent()[0].style.left)-this.system.itemWidth*this.graphData.interval;r<0&&(r=0),s>100&&(s=100);var A=this.system.currentRight-o;A<r&&(A=r),A>s&&(A=s),t(this.system.draggingDiv).parent()[0].style.right=A+"%",this.setNewTotal(t(this.system.draggingDiv).parent())},i.prototype.divMove=function(e){var i=t(this.container).find(".colPlanner").width(),n=t(this.system.draggingDiv).parent().parent().attr("arId"),a=t(this.system.draggingDiv).attr("arId"),o=(e.clientX-this.system.cursorX)/i*100;o=Math.round(o/(this.system.itemWidth*this.graphData.interval))*(this.system.itemWidth*this.graphData.interval);var r=this.getRightLimit(n,a),s=this.getLeftLimit(n,a);s<0&&(s=0),r<0&&(r=0);var A=t(this.system.draggingDiv);this.round(this.system.currentLeft+o)<this.round(s)||this.round(this.system.currentRight-o)<this.round(r)||(this.system.draggingDiv=A.find("[resizeDirection=right]")[0],this.divResizeRight(e),this.system.draggingDiv=A.find("[resizeDirection=left]")[0],this.divResizeLeft(e),this.system.draggingDiv=A[0])},i.prototype.round=function(e){var i=t(this.container).find(".colPlanner").width(),n=this.system.itemWidth*this.graphData.interval,a=Math.round(e/100*i)/i*100;return a=Math.round(a/n)*n},i.prototype.setNewTotal=function(i){var n=(parseFloat(i[0].style.left)/this.system.itemWidth+this.graphData.rangeMin).toFixed(this.graphData.decimalPrecision),a=((100-parseFloat(i[0].style.right))/this.system.itemWidth+this.graphData.rangeMin).toFixed(this.graphData.decimalPrecision);n=Math.round(n/this.graphData.interval)*this.graphData.interval,a=Math.round(a/this.graphData.interval)*this.graphData.interval;var o=t(i).parent().parent().attr("arId"),r=t(i).attr("arId");this.graphData.barValues[o].Plannings[r].Start=this.system.usingDateTime?this.gridLinePosToDate(n):n,this.graphData.barValues[o].Plannings[r].End=this.system.usingDateTime?this.gridLinePosToDate(a):a;var s,A=this.graphData.barValues[o].Total();s=1==this.graphData.showAsTime?e.fromTicks(A):A,t(i).parent().parent().find(".itemTotal").text(s)},i.prototype.deleteGraph=function(){t(this.container).children().remove()},i.prototype.createGraph=function(){var e="<div class='header row'><div class='itemName descriptionHeader'>"+this.graphData.descriptionLabel+"</div><div class='itemPlanningBar colPlanner'></div><div class='itemTotal totalHeader'>"+this.graphData.totalLabel+"</div></div><div class='tablePlanningItems'><div class='tablePlanningGridLabels tablePlanningGrid' style='margin-left:-8px; margin-right:30px;'></div><div class='rowItems'><div class='rowitms' style='Position:relative;min-height:100%;'><div class='tablePlanningGridLines tablePlanningGrid'></div></div></div></div>";t(this.container).append(e);for(var i=0;i<this.graphData.barValues.length;i++)this.addRow(this.graphData.barValues[i],i);1==this.graphData.showGrid&&this.drawLines();var n=this;t(document).on("mouseup",(function(){n.planningGraphMouseUp()})),t(document).on("touchend",(function(){n.planningGraphMouseUp()}))},i.prototype.addRow=function(i,n){var a;a=this.graphData.showAsTime?e.fromTicks(i.Total().toFixed(this.graphData.decimalPrecision)):i.Total().toFixed(this.graphData.decimalPrecision);var o="";null!=i.SelectedTextColor&&(o=o+" color:"+i.SelectedTextColor+"; ");var r="<div class='row' arId='"+n+"'><div class='scrollable'></div><div class='itemName' style='z-index:4; "+o+"' itemId='"+i.Id+"' title='"+i.SelectedToolTip+"'>"+i.SelectedName+"</div><div class='itemPlanningBar' id='"+i.Id+"'>";if(null!=i.Boundary1start&&null!=i.Boundary1stop){var s=(i.Boundary1start-this.graphData.rangeMin)*this.system.itemWidth,A=100-(i.Boundary1stop-this.graphData.rangeMin)*this.system.itemWidth;r+="<div class='planningPeriodBoundary1Start' style='left:0;width:"+s.toString()+"%;'></div>",r+="<div class='planningPeriodBoundary1Start' style='right:0;width:"+A.toString()+"%;'></div>"}if(null!=i.Boundary2start&&null!=i.Boundary2stop){var l=(i.Boundary2start-this.graphData.rangeMin)*this.system.itemWidth,d=100-(i.Boundary2stop-this.graphData.rangeMin)*this.system.itemWidth;r+="<div class='planningPeriodBoundary2Start' style='left:0;width:"+l.toString()+"%;'></div>",r+="<div class='planningPeriodBoundary2Start' style='right:0;width:"+d.toString()+"%;'></div>"}for(var c=0;c<this.system.diffInDays;c++){var u=this.system.oneDayRange*c,h=this.system.oneDayRange*(c+1),p=u*this.system.itemWidth,g=100-(u+(i.Start-this.graphData.rangeMin))*this.system.itemWidth,f=(u+(i.End-this.graphData.rangeMin))*this.system.itemWidth,m=100-h*this.system.itemWidth;r+="<div class='planningPeriodUnavailableStart' style='left:"+p.toString()+"%;right:"+g.toString()+"%;'></div>",r+="<div class='planningPeriodUnavailableEnd' style='left:"+f.toString()+"%;right:"+m.toString()+"%;'></div>"}for(c=0;c<i.Plannings.length;c++)if(null!=i.Plannings[c].Start){var v=this.getGridLinePos(i.Plannings[c].Start),y=this.getGridLinePos(i.Plannings[c].End);if(v===y)continue;var w=v*this.system.itemWidth,b=(this.system.range-y)*this.system.itemWidth,B=i.Plannings[c].Id,C="";i.Plannings[c].isPreference&&(C=" isPreferenceBar"),i.Plannings[c].isSpecial&&(C=" specialBar"),i.Plannings[c].isFlagged&&(C=" flaggedBar"),B==this.morph.selectedBarId&&(C+=" selected");o="";null!=i.Plannings[c].dynamicBarColor&&(o=o+" background:"+i.Plannings[c].dynamicBarColor+"; "),null!=i.Plannings[c].dynamicTextColor&&(o=o+" color:"+i.Plannings[c].dynamicTextColor+"; "),r+="<div unselectable='on' barType='dragHandle' class='planningPeriodActual"+C+"' arId='"+c+"' itemId='"+B+"' total='"+i.Total()+"' style='left:"+w.toString()+"%; "+o+" right:"+b.toString()+"%;' title='"+i.Plannings[c].Tooltip+"' alt='"+i.Plannings[c].Tooltip+"'><div barType='resizeHandle' resizeDirection='left'  class='resizeHandleLeft' parentId='"+i.Id+"'></div>"+i.Plannings[c].Text+"<div barType='resizeHandle' resizeDirection='right' class='resizeHandleRight' parentId='"+i.Id+"'></div></div>"}var x=t(r+="</div><div class='itemTotal'>"+a+"</div></div>");if(t(this.container).find(".rowitms").append(x),!0!==this.graphData.readOnly){var D=this;x.on("mousedown",(function(t){D.planningGraphMouseDown(t)})),x.on("touchstart",(function(t){t.originalEvent.touches&&(t=t.originalEvent.touches[0]),D.planningGraphMouseDown(t)})),x.find(".planningPeriodActual").on("click",(function(){D.clickedSelection(t(this).attr("itemId"))})),x.find(".planningPeriodActual").on("touchend",(function(){D.clickedSelection(t(this).attr("itemId"))})),x.find(".itemName").on("click",(function(){D.clickedOnDescription(t(this).attr("itemId"))}))}},i.prototype.getGridLinePos=function(t){var e=(this.system.usingDateTime?this.dateToGridLinePos(t):t)-this.graphData.rangeMin;return e<0?0:e>this.system.range?this.system.range:e},i.prototype.dateToGridLinePos=function(t){return(new Date(t)-this.system.fromDate)/1e3},i.prototype.gridLinePosToDate=function(t){var e=new Date(this.system.fromDate);return e.setSeconds(e.getSeconds()+t),e},i.prototype.drawLines=function(){for(var i=0;i<=this.system.range/this.graphData.intervalGrid;i++){var n="<div class='gridLine' style='left:"+(s=this.round(this.system.itemWidth*this.graphData.intervalGrid*i))+"%; right:"+(A=this.round(this.system.itemWidth*this.graphData.intervalGrid*(this.system.range/this.graphData.intervalGrid-i-1)))+"%'>";i%this.graphData.intervalGridMajor==0&&(n=n.replace("'gridLine'","'gridLine mainInterval'")),n+="</div>",t(this.container).find(".tablePlanningGridLines").append(n);var a="";if(this.graphData.showAxisLabels||this.graphData.showAxisLabelsTop)if(1==this.graphData.showAsTime){if(i%this.graphData.intervalGridLabel==0){for(var o=this.graphData.rangeMin+i*this.graphData.intervalGrid;o>=this.system.oneDayRange;)o-=this.system.oneDayRange;a+="<span class='gridLabel gridLabelBottom'>"+e.fromTicks(o)+"</span>"}}else a+="<span class='gridLabel gridLabelBottom'>"+(this.graphData.rangeMin+i*this.graphData.intervalGrid)+"</span>";else 1==this.graphData.showAsTime&&(this.graphData.rangeMin+i*this.graphData.intervalGrid)%3600==0&&(a+="<span class='gridLabel gridLabelBottom'></span>");""!==a&&this.graphData.showAxisLabels&&t(this.container).find(".tablePlanningGridLabels").append("<div class='gridLineLabelBox' style='left:"+s+"%; right:"+A+"%'>"+a+"</div>"),""!==a&&this.graphData.showAxisLabelsTop&&t(this.container).find(".tablePlanningGridLabels").append("<div class='gridLineLabelBox' style='left:"+s+"%; right:"+A+"%'>"+a.replace("gridLabelBottom","gridLabelTop")+"</div>")}if(t(this.container).find(".gridLine .gridLabel").each((function(){var e=t(this);e.css("left",e.width()/2*-1+"px")})),1==this.graphData.showAsTime){for(i=0;i<this.system.diffInDays;i++){n="<div class='gridLine dailyInterval' style='left:"+(s=this.round(this.system.itemWidth*this.system.oneDayRange*i))+"%; right:"+(A=this.round(this.system.itemWidth*this.system.oneDayRange*(this.system.range/this.system.oneDayRange-i-1)))+"%;'></div>";t(this.container).find(".tablePlanningGridLines").append(n);a="<div class='gridLineLabelBox' style='left:"+s+"%; right:"+A+"%;'><span class='gridLabel gridLabelBottom Day'>"+this.getDateLabel(i)+"</span></div>";this.graphData.showAxisLabels&&t(this.container).find(".tablePlanningGridLabels").append(a),this.graphData.showAxisLabelsTop&&t(this.container).find(".tablePlanningGridLabels").append(a.replace("gridLabelBottom","gridLabelTop"))}n="<div class='gridLine dailyInterval' style='left:"+(s=this.round(this.system.itemWidth*this.system.oneDayRange*i))+"%; width:1px;'></div>";t(this.container).find(".tablePlanningGridLines").append(n)}for(var r=0;r<this.graphData.gridLines.length;r++){var s,A;i=this.graphData.gridLines[r].Value/this.graphData.intervalGrid,n="<div class='gridLine customInterval' style='left:"+(s=this.round(this.system.itemWidth*this.graphData.intervalGrid*i))+"%; right:"+(A=this.round(this.system.itemWidth*this.graphData.intervalGrid*(this.system.range/this.graphData.intervalGrid-i-1)))+"%;'></div>";t(this.container).find(".tablePlanningGridLines").append(n);a="<div class='gridLineLabelBox' style='left:"+s+"%; right:"+A+"%;'><span class='gridLabel gridLabelBottom custom'>"+e.fromTicks(this.graphData.gridLines[r].Value)+"</span></div>";this.graphData.showAxisLabels&&t(this.container).find(".tablePlanningGridLabels").append(a),this.graphData.showAxisLabelsTop&&t(this.container).find(".tablePlanningGridLabels").append(a.replace("gridLabelBottom","gridLabelTop"))}},i.prototype.getDateLabel=function(t){if(!this.system.usingDateTime)return"";if(isNaN(this.system.fromDate))return"";var e=new Date(this.system.fromDate);return e.setDate(this.system.fromDate.getDate()+t),this.formatter.formatDate(e)},i.prototype.clickedSelection=function(t){},i.prototype.clickedOnDescription=function(t){},i.prototype.hasUnsavedChanges=function(){for(var t=0;t<this.graphData.barValues.length;t++)for(var e=0;e<this.graphData.barValues[t].Plannings.length;e++){var i=this.graphData.barValues[t].Plannings[e].Start,n=this.graphData.barValues[t].Plannings[e]._origStart,a=this.graphData.barValues[t].Plannings[e].End,o=this.graphData.barValues[t].Plannings[e]._origEnd;if(null!==i&&i instanceof Date&&(i=i.toISOString()),null!==n&&n instanceof Date&&(n=n.toISOString()),null!==a&&a instanceof Date&&(a=a.toISOString()),null!==o&&o instanceof Date&&(o=o.toISOString()),i!==n||a!==o)return!0}return!1},i.prototype.getOutputData=function(){var t=[];if(null==this.graphData||null==this.graphData.barValues)return t;for(var e=0;e<this.graphData.barValues.length;e++)for(var i=0;i<this.graphData.barValues[e].Plannings.length;i++)if(this.graphData.barValues[e].Plannings[i].Start!=this.graphData.barValues[e].Plannings[i]._origStart||this.graphData.barValues[e].Plannings[i].End!=this.graphData.barValues[e].Plannings[i]._origEnd){var n={Id:this.graphData.barValues[e].Plannings[i].Id,Start:this.system.usingDateTime?this.formatter.formatLicquidDate(this.graphData.barValues[e].Plannings[i].Start):this.graphData.barValues[e].Plannings[i].Start,End:this.system.usingDateTime?this.formatter.formatLicquidDate(this.graphData.barValues[e].Plannings[i].End):this.graphData.barValues[e].Plannings[i].End};this.graphData.barValues[e].Plannings[i]._origStart=this.graphData.barValues[e].Plannings[i].Start,this.graphData.barValues[e].Plannings[i]._origEnd=this.graphData.barValues[e].Plannings[i].End,t.push(n)}return t},i.prototype.draw=function(t,e){this.deleteGraph(),this.system.range=0,this.system.oneDayRange=0,this.system.diffInDays=1,this.system.itemWidth=0,this.system.cursorX=null,this.system.draggingDiv=null,this.system.currentLeft=null,this.system.currentRight=null,this.graphData=e,this.morph=t,this.system.usingDateTime=this.graphData.usingDateTime,this.system.oneDayRange=this.graphData.rangeMax-this.graphData.rangeMin,this.system.fromDate=this.formatter.parseLicquidDate(this.parameters.getValue(this.graphData.fromDateParameter)),this.system.toDate=this.formatter.parseLicquidDate(this.parameters.getValue(this.graphData.toDateParameter)),isNaN(this.system.toDate)&&(this.system.toDate=this.formatter.parseLicquidDate(this.parameters.getValue(this.graphData.fromDateParameter))),this.system.diffInDays=Math.round((this.system.toDate-this.system.fromDate)/864e5+1),isNaN(this.system.diffInDays)&&(this.system.diffInDays=1),this.system.range=this.system.oneDayRange*this.system.diffInDays,this.system.itemWidth=100/this.system.range,this.createGraph(e)},i})),define("drops/planningGraph/planningGraph",["jquery","lq/drop","drops/planningGraph/planninggraphimpl","underscore","lq/util","lq/style"],(function(t,e,i,n,a,o){"use strict";function r(i){e.call(this,t("<div/>"),i),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing),this.$element.addClass("boxToBorderSize"),this.boundaries1=[],this.boundaries2=[],o.renderStyles(this,"planninggraph-")}return e.extend(r,e),r.typeName="PlanningGraph",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.formatter=this.piping.formatting.createFormatter();var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){null!=t.data.selectedBoundary1DataSource&&t.piping.queryDispatcher.dispatch(t.data.selectedBoundary1DataSource,(function(i){t.boundaries1=i.results,t.update(e)}),(function(t){t.pageSize=1024})),null!=t.data.selectedBoundary1DataSource&&t.piping.queryDispatcher.dispatch(t.data.selectedBoundary2DataSource,(function(i){t.boundaries2=i.results,t.update(e)}),(function(t){t.pageSize=1024})),t.update(e)})),this.prepareUi(),this.applyPosition()},r.prototype.prepareUi=function(){var e=t("<div />").addClass("planningGraphContainer").appendTo(this.$element);this.graph=new i(e[0],this.piping)},r.prototype.getBatchOfCommands=function(){if(!this.graph)return[];var t=this;return{eventActionType:"Batch",command:t.data.id,batch:n.map(this.graph.getOutputData(),(function(e){var i={};return i[t.data.startAttribute]=e.Start,i[t.data.stopAttribute]=e.End,{entityId:e.Id,data:i}}))}},r.prototype.update=function(e){var i=this,a=n.chain(e.results).groupBy((function(t){return t[i.data.beschrijvingIdOutput]})).map((function(t){var e=t[0],a=n.find(i.boundaries1,(function(t){return t[i.data.boundary1idOutput]==e[i.data.beschrijvingIdOutput]})),o=n.find(i.boundaries2,(function(t){return t[i.data.boundary2idOutput]==e[i.data.beschrijvingIdOutput]}));return{Id:e[i.data.idOutput],Start:e[i.data.beginOutput],End:e[i.data.eindeOutput],SelectedTextColor:e[i.data.beschrijvingTextColorOutput],SelectedToolTip:e[i.data.beschrijvingTooltipOutput]||e[i.data.beschrijvingOutput],SelectedName:e[i.data.beschrijvingOutput],SelectedId:e[i.data.beschrijvingIdOutput],SelectedDescription:e[i.data.naamOutput],Boundary1start:null==a?null:a[i.data.boundary1startOutput],Boundary1stop:null==a?null:a[i.data.boundary1stopOutput],Boundary2start:null==o?null:o[i.data.boundary2startOutput],Boundary2stop:null==o?null:o[i.data.boundary2stopOutput],Plannings:n.map(t,(function(t){return{Id:t[i.data.idSelectieOutput],Text:t[i.data.naamOutput],_origStart:i.data.usingDateTime?i.formatter.parseLicquidDate(t[i.data.startSelectieOutput]):t[i.data.startSelectieOutput],_origEnd:i.data.usingDateTime?i.formatter.parseLicquidDate(t[i.data.stopSelectieOutput]):t[i.data.stopSelectieOutput],isPreference:t[i.data.isPreference],isFlagged:t[i.data.isFlagged],isSpecial:t[i.data.isSpecial],dynamicBarColor:t[i.data.dynamicBarColor],dynamicTextColor:t[i.data.dynamicTextColor],Tooltip:void 0===i.data.tooltip?"":t[i.data.tooltip],Start:i.data.usingDateTime?i.formatter.parseLicquidDate(t[i.data.startSelectieOutput]):t[i.data.startSelectieOutput],End:i.data.usingDateTime?i.formatter.parseLicquidDate(t[i.data.stopSelectieOutput]):t[i.data.stopSelectieOutput],EventArgument:t[i.data.eventArgument]}})),Total:function(){return n.reduce(this.Plannings,(function(t,e){var i=t+e.End-e.Start;return isNaN(i)?t+(new Date(e.End)-new Date(e.Start))/1e3:i}),0)}}})).value();if(this.planningList=a,1==t(this.graph.container).find(".rowItems").length)var o=t(this.graph.container).find(".rowItems")[0].scrollTop;this.drawPlanningGraph(),null!=o&&(t(this.graph.container).find(".rowItems")[0].scrollTop=o)},r.prototype.drawPlanningGraph=function(){if(this.graph.draw(this,this.retrievePlanningGraphData()),this.data.eventing&&this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled){var e=this;this.graph.clickedSelection=function(i){var a=n.chain(e.planningList).map((function(t){return t.Plannings})).flatten().find((function(t){return t.Id===i})).value();e.graph.hasUnsavedChanges()?e.data.eventing&&e.data.eventing.changed&&!0===e.data.eventing.changed.enabled&&e.triggerEvent(e.data.eventing.changed.raisedEventName,a.EventArgument):e.data.eventing&&e.data.eventing.clicked&&!0===e.data.eventing.clicked.enabled&&e.triggerEvent(e.data.eventing.clicked.raisedEventName,a.EventArgument),e.selectedBarId=i,t(".planningPeriodActual.selected").removeClass("selected"),t(".planningPeriodActual[itemid='"+i+"']").addClass("selected")}}if(this.data.eventing&&this.data.eventing.clickedOnDescription&&!0===this.data.eventing.clickedOnDescription.enabled){e=this;this.graph.clickedOnDescription=function(t){var i=n.chain(e.planningList).find((function(e){return e.Id==t})).value();e.triggerEvent(e.data.eventing.clickedOnDescription.raisedEventName,i.SelectedId)}}this.fixHeight()},r.prototype.fixHeight=function(){var t,e=parseInt(this.$element.find(".row").css("height"));if(this.data.visibleRows>0)t=this.data.visibleRows*(e+1);else{var i=this.$element.find(".gridLabel").css("font-size");t=this.data.size.y-e-1,t-=2*parseInt(i),t-=2*parseInt(i),t=Math.floor(t/e)*(e+1)}this.$element.find(".tablePlanningItems").css({height:t+"px"})},r.prototype.convertToNumber=function(t){return"number"==typeof t?t:parseFloat(t)},r.prototype.convertToBoolean=function(t){return"boolean"==typeof t?t:"true"==t},r.prototype.retrievePlanningGraphData=function(){return{readOnly:this.data.readOnly,testData:this.convertToBoolean(this.data.testData),showAsTime:this.convertToBoolean(this.data.showAsTime),usingDateTime:this.data.usingDateTime,fromDateParameter:this.data.fromDateParameter,toDateParameter:this.data.toDateParameter,rangeMin:this.convertToNumber(this.data.rangeMin),rangeMax:this.convertToNumber(this.data.rangeMax),interval:this.convertToNumber(this.data.interval),intervalGrid:this.convertToNumber(this.data.intervalGrid),intervalGridMajor:this.convertToNumber(this.data.intervalGridMajor),intervalGridLabel:this.convertToNumber(this.data.intervalGridLabel),decimalPrecision:this.convertToNumber(this.data.decimalPrecision),descriptionLabel:this.data.descriptionLabel,totalLabel:this.data.totalLabel,visibleRows:this.convertToNumber(this.data.visibleRows),barValues:this.getPlanningData(),gridLines:this.getGridData(this.data.intervalRedGrid),showGrid:this.convertToBoolean(this.data.showGrid),showAxisLabels:this.convertToBoolean(this.data.showAxisLabels),showAxisLabelsTop:this.convertToBoolean(this.data.showAxisLabelsTop),isWithPreferredValues:this.convertToBoolean(this.data.isWithPreferredValues)}},r.prototype.getGridData=function(t){var e=[];try{for(var i=t.split(";"),n=0;n<i.length;n++)e[n]=JSON.parse(JSON.stringify({Value:3600*this.convertToNumber(i[n])}))}catch(t){}return e},r.prototype.getPlanningData=function(){var t=[];if(!this.data.testData||0===this.data.testData.length)return this.planningList;var e={Id:"test\\0",Start:28800,End:64800,SelectedName:"John. ",SelectedDescription:"Item",Plannings:new Array};e.Plannings[0]={Id:"\\plan\\01",Text:"Item",_origStart:28800,_origEnd:39600,Start:28800,End:39600},e.Plannings[1]={Id:"\\plan\\02",Text:"Niet Item",_origStart:46800,_origEnd:61200,Start:46800,End:61200};for(var i=10;i<25;i++){var n=JSON.parse(JSON.stringify(e));n.Total=function(){for(var t=0,e=0;e<this.Plannings.length;e++)t+=this.Plannings[e].End-this.Plannings[e].Start;return t},i%5==0&&(n.Plannings[0].isFlagged=1),n.Id+=i,n.SelectedName+=i-9,t[i-10]=n,n.Plannings[0].Id=n.Id+n.Plannings[0].Id,n.Plannings[1].Id=n.Id+n.Plannings[1].Id}return t},r})),define("drops/progressBar/progressBar",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{minValue:0,maxValue:100}};function a(a){e.call(this,t("<div/>"),n,a),this.$element.addClass("boxToBorderSize"),this.$progress=t("<div />").addClass("boxToBorderSize").css({height:"100%"}).appendTo(this.$element),i.renderStyles(this),i.renderStyles(this,null,this.$progress,null,"progress"),this.$progress.css({width:"0%"})}return e.extend(a,e),a.typeName="ProgressBar",a.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},a.prototype.setValue=function(t){this.setProgress(t.value)},a.prototype.clearValue=function(){this.setProgress(0)},a.prototype.setProgress=function(t){var e=(Math.max(this.data.minValue,Math.min(parseFloat(t),this.data.maxValue))-this.data.minValue)/(this.data.maxValue-this.data.minValue)*100;this.$progress.css({width:e+"%"})},a})),define("lq/webPushNotifications",["underscore","lq/main","lq/dispatcher"],(function(t,e,i){"use strict";var n,a,o="notifications.firebase_token",r="notifications.user_id",s=[],A=[],l=[];if(e.areWebNotificationsEnabled()){var d={apiKey:e.getFirebaseApiKey(),projectId:e.getFirebaseProjectId(),messagingSenderId:e.getFirebaseSenderId(),appId:e.getFirebaseAppId()};firebase.initializeApp(d),navigator.serviceWorker.getRegistration().then((function(t){a=t,n=firebase.messaging(),a&&a.active&&a.active.postMessage({type:"FIREBASE_CONFIG",config:d,icon:e.getNotificationIcon(),url:e.getNotificationsEntryPage()})}))}var c=function(e){t.each(A,(function(t){t(Notification.permission,e)})),A=[]},u=function(d){new BroadcastChannel("notifications").onmessage=function(e){var i=e.data;l.push(i),t.each(s,(function(t){t(i)}))},n.getToken({serviceWorkerRegistration:a,vapidKey:e.getFirebaseWPCert()}).then((function(t){var e=localStorage.getItem(o),n=localStorage.getItem(r);e!==t||n!==d?i.dispatch("LicquidAction/RegisterMobileDevice",{deviceId:t,messenger:"fcm",platform:"web"}).done((function(){localStorage.setItem(o,t),localStorage.setItem(r,d),c(t)}),$.noop):c(t)})).catch((function(t){"messaging/permission-blocked"===t.code&&A.length>0?c():console.error(t)})),n.onMessage((function(e){var i=e.data;i.foreground=!0,l.push(i),t.each(s,(function(t){t(i)}))}))};return{enableNotifications:function(t,e){n&&"Notification"in window&&(A.push(e),u())},startReceivingNotifications:function(t,e){n&&"Notification"in window&&(A.push(e),"granted"===Notification.permission&&u(t))},hasReceivedNotifications:function(){return l.length>0},getAllReceivedNotifications:function(){return l},addListener:function(t){s.push(t)},removeListener:function(e){s=t.filter(s,(function(t){return t!==e}))}}})),define("drops/pushNotificationReceiver/pushNotificationReceiver",["jquery","underscore","lq/main","lq/drop","lq/webPushNotifications"],(function(t,e,i,n,a){"use strict";function o(e){n.call(this,t("<div />"),e),this.listener=this.handleNotification.bind(this,!1)}return n.extend(o),o.typeName="PushNotificationReceiver",o.prototype.postRender=function(){i.areWebNotificationsEnabled()&&this.piping.eventing.onPageLoad(this.initializeForWeb.bind(this))},o.prototype.initializeForWeb=function(t){var e=this;if(a.startReceivingNotifications(this.piping.application.userId,(function(t,i){"granted"===t&&e.triggerEventIfEnabled("receiverLoaded",i)})),a.hasReceivedNotifications()){var i=a.getAllReceivedNotifications();this.piping.eventing.onPageLoad(this.handleNotifications.bind(this,!0,i))}a.addListener(this.listener),t()},o.prototype.handleNotifications=function(t,i,n){e.each(i,this.handleNotification.bind(this,t)),n()},o.prototype.handleNotification=function(t,i){var n=this;e.each(e.keys(i),(function(t){n.piping.parameters.locals.setValue(t,i[t])})),t?this.triggerEventIfEnabled("backgroundNotificationReceived"):this.triggerEventIfEnabled("foregroundNotificationReceived")},o.prototype.unsubscribeEventHandlers=function(){a.removeListener(this.listener)},o})),define("drops/qrCode/qrCode",["jquery","lq","lq/drop"],(function(t,e,i){"use strict";var n={data:{contentType:"applicationUrl",content:{}}};function a(e){i.call(this,t("<div />"),n,e),this.$element.addClass("boxToBorderSize").css({"background-repeat":"no-repeat","background-size":"contain"})}return i.extend(a,i),a.typeName="QrCode",a.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.setImage(this.getImageUrl())},a.prototype.setImage=function(t){this.$element.css("background-image","url("+t+")")},a.prototype.getImageUrl=function(){return e.getTenantUrl("GeneratedContent/QrCode/?actionId="+this.rootDrop.data.id+"&qrCodeId="+this.data.id+"&parameters="+encodeURIComponent(JSON.stringify(this.piping.parameters.getNonSystemParameters()))+"&width="+this.data.size.x+"&height="+this.data.size.y)},a})),define("drops/radioButton/radioButton",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{useBuiltInStyle:!0}};function a(a){e.call(this,t("<div/>"),n,a),this.renderRadioButton(),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),i.renderStyles(this)}return e.extend(a,e),a.typeName="RadioButton",a.prototype.renderRadioButton=function(){var e=this;this.$input=t('<input type = "radio" />').attr("value",this.data.value).attr("tabindex",this.data.tabIndex).on("change",(function(){e.updateParent(),t(this).is(":checked")&&e.triggerSelectedEvent()})),this.data.useBuiltInStyle?this.$input.appendTo(this.$element):this.$wrapper=t('<label class="customCheckState" />').append(this.$input).append(t('<div class="customCheckState-tick"></div>')).appendTo(this.$element),this.$label=t("<span />").text(this.data.text).appendTo(this.$element)},a.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition();var t=this.getDefaultEventArg();if(this.$input.attr("name",t?this.parent.data.id+"_"+t:this.parent.data.id),this.parent.value===this.data.value&&this.$input.prop("checked",!0),this.parent.data.readOnly)this.$input.prop("disabled",!0);else{var e=this;this.$label.on("click",(function(){e.select(),e.updateParent()}))}},a.prototype.triggerSelectedEvent=function(){this.data.eventing&&this.data.eventing.selected&&!0===this.data.eventing.selected.enabled&&this.triggerEvent(this.data.eventing.selected.raisedEventName)},a.prototype.updateParent=function(){var t=this.data.value;this.parent.radioButtonSelectionChanged(t)},a.prototype.select=function(){this.$input.is(":checked")||(this.$input.prop("checked",!0),this.triggerSelectedEvent())},a.prototype.unselect=function(){this.$input.prop("checked",!1)},a})),define("drops/radioButtonGroup/radioButtonGroup",["jquery","lq/drop","lq/util","underscore"],(function(t,e,i,n){"use strict";var a={data:{required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function o(n){e.call(this,t("<div/>"),a,n),this.data.eventing=i.convertListOfKeyValuesToObject(this.data.eventing),this.value=this.data.value}return e.extend(o,e),o.typeName="RadioButtonGroup",o.prototype.applyPosition=t.noop,o.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this),this.$element.css({position:"absolute",zIndex:this.getZIndex()})},o.prototype.postRender=function(){this.addRequiredIndicator(),this.updateRequiredIndicator()},o.prototype.addRequiredIndicator=function(){0!==this.pool.length&&(this.data.required?this.pool[0].$element.addClass("isRequiredField"):this.pool[0].$element.removeClass("isRequiredField"))},o.prototype.updateRequiredIndicator=function(){0!==this.pool.length&&(this.isValid()?this.pool[0].$element.addClass("hasValidValue"):this.pool[0].$element.removeClass("hasValidValue"))},o.prototype.render=function(t){return this.createAndRenderDrops(t)},o.prototype.radioButtonSelectionChanged=function(t){this.value!==t&&(this.value=t,this.triggerEventIfEnabled("selected",t),this.triggerEventIfEnabled("changed",t),this.updateRequiredIndicator())},o.prototype.getValue=function(){return this.value},o.prototype.setValue=function(t){var e=null===t.value||void 0===t.value?t.value:t.value.toString(),i=n.find(this.pool,(function(t){return t.data.value===e}));i?(this.value=e,i.select()):this.clearValue(),this.updateRequiredIndicator()},o.prototype.clearValue=function(){this.value=null,n.each(this.pool,(function(t){t.unselect()})),this.updateRequiredIndicator()},o})),define("drops/radioButtonGroupV2/radioButtonGroupV2",["jquery","lq/drop","lq/util","underscore"],(function(t,e,i,n){"use strict";var a={data:{required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},top:0,left:0}};function o(n){e.call(this,t("<div/>"),a,n),this.data.eventing=i.convertListOfKeyValuesToObject(this.data.eventing),this.value=this.data.value}return e.extend(o,e),o.typeName="RadioButtonGroupV2",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.required.apply(this),this.applyPosition()},o.prototype.postRender=function(){this.addRequiredIndicator(),this.updateRequiredIndicator()},o.prototype.addRequiredIndicator=function(){0!==this.pool.length&&(this.data.required?this.pool[0].$element.addClass("isRequiredField"):this.pool[0].$element.removeClass("isRequiredField"))},o.prototype.updateRequiredIndicator=function(){0!==this.pool.length&&(this.isValid()?this.pool[0].$element.addClass("hasValidValue"):this.pool[0].$element.removeClass("hasValidValue"))},o.prototype.render=function(t){return this.createAndRenderDrops(t)},o.prototype.radioButtonSelectionChanged=function(t){this.value!==t&&(this.value=t,this.triggerEventIfEnabled("selected",t),this.triggerEventIfEnabled("changed",t),this.updateRequiredIndicator())},o.prototype.getValue=function(){return this.value},o.prototype.setValue=function(t){var e=null===t.value||void 0===t.value?t.value:t.value.toString(),i=n.find(this.pool,(function(t){return t.data.value===e}));i?(this.value=e,i.select()):this.clearValue(),this.updateRequiredIndicator()},o.prototype.clearValue=function(){this.value=null,n.each(this.pool,(function(t){t.unselect()})),this.updateRequiredIndicator()},o})),define("drops/radioButtonList/radioButtonList",["jquery","lq/drop","lq/style","lq/required"],(function(t,e,i,n){"use strict";var a={data:{layout:"horizontal",useBuiltInStyle:!0,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function o(n){e.call(this,t("<div/>"),a,n),this.value=null,this.$radiobuttons=t("<span />"),this.$element.addClass("boxToBorderSize").append(t("<div />").css({whiteSpace:"pre-wrap",overflow:"auto",width:"100%",height:"100%"}).append(this.$radiobuttons)),i.renderStyles(this)}return e.extend(o,e),o.typeName="RadioButtonList",o.prototype.preRender=function(){var t=this;this.piping.visibility.apply(this),this.piping.required.apply(this),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e)})),n.prototype.addRemoveRequiredIndicator(t),this.applyPosition()},o.prototype.update=function(e){if(this.$radiobuttons.empty(),e){var i=this;t.each(e.results,(function(e,n){var a=i.data.id+"_"+n[i.data.keyOutput],o=t('<input type="radio" />').attr("name",i.data.id).attr("id",a).attr("value",n[i.data.keyOutput]).on("change",(function(){i.data.value=o.val(),i.updateRequiredIndicator(),i.triggerEventIfEnabled("selected",i.data.value),i.triggerEventIfEnabled("changed",i.data.value)})),r=i.data.useBuiltInStyle?o:t('<label class="customCheckState" />').append(o).append(t('<div class="customCheckState-tick"></div>')),s=t("<label />").attr("for",a).text(n[i.data.labelOutput]),A=t("<span />").css({display:"inline-block"}).append(r).append(s);"horizontal"===i.data.layout?i.$radiobuttons.append(A):i.$radiobuttons.append(t("<div />").append(A))})),this._updateRadioButtonSelection(this.data.value)}},o.prototype.getValue=function(){return this.data.value},o.prototype.clearValue=function(){this._updateRadioButtonSelection(null),this.updateRequiredIndicator()},o.prototype.setValue=function(t){this._updateRadioButtonSelection(t.value),this.updateRequiredIndicator()},o.prototype._updateRadioButtonSelection=function(t){this.data.value=t,t?this.$radiobuttons.children().find('input[value="'+t+'"]').prop("checked",!0):this.$radiobuttons.children().find('input[type="radio"]:checked').prop("checked",!1)},o})),define("drops/rectangle/rectangle",["jquery","lq/drop","lq/style","lq/tooltip"],(function(t,e,i,n){"use strict";var a={data:{title:{option:n.hardcoded}}};function o(o){e.call(this,t("<div/>"),a,o),this.$element.addClass("boxToBorderSize"),this.tooltip=new n(this,this.data.title,this.$element),i.renderStyles(this)}return e.extend(o,e),o.typeName="Rectangle",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.tooltip.update()},o.prototype.setValue=function(t){this.setBackgroundColor(t.value)},o.prototype.clearValue=function(){this.setBackgroundColor("")},o.prototype.setBackgroundColor=function(t){this.$element.css("background-color",t)},o})),define("drops/requirementsGraph/monotoniccubicspline",[],(function(){"use strict";function t(t,e){var i,n,a,o,r,s,A,l,d,c,u,h,p,g,f,m,v;for(a=[],s=[],i=[],n=[],o=[],l=[],r=0,g=(A=t.length)-1;0<=g?r<g:r>g;0<=g?r+=1:r-=1)a[r]=(e[r+1]-e[r])/(t[r+1]-t[r]),r>0&&(s[r]=(a[r-1]+a[r])/2);for(s[0]=a[0],s[A-1]=a[A-2],d=[],r=0,f=A-1;0<=f?r<f:r>f;0<=f?r+=1:r-=1)0===a[r]&&d.push(r);for(c=0,h=d.length;c<h;c++)s[r=d[c]]=s[r+1]=0;for(r=0,m=A-1;0<=m?r<m:r>m;0<=m?r+=1:r-=1)i[r]=s[r]/a[r],n[r]=s[r+1]/a[r],o[r]=Math.pow(i[r],2)+Math.pow(n[r],2),l[r]=3/Math.sqrt(o[r]);for(d=[],r=0,v=A-1;0<=v?r<v:r>v;0<=v?r+=1:r-=1)o[r]>9&&d.push(r);for(u=0,p=d.length;u<p;u++)s[r=d[u]]=l[r]*i[r]*a[r],s[r+1]=l[r]*n[r]*a[r];this.x=t.slice(0,A),this.y=e.slice(0,A),this.m=s}return t.prototype.interpolate=function(t){var e,i,n,a,o,r,s,A,l;for(o=l=this.x.length-2;(l<=0?o<=0:o>=0)&&!(this.x[o]<=t);l<=0?o+=1:o-=1);return e=this.x[o+1]-this.x[o],r=(t-this.x[o])/e,s=Math.pow(r,2),n=(A=Math.pow(r,3))-2*s+r,i=-2*A+3*s,a=A-s,(2*A-3*s+1)*this.y[o]+n*e*this.m[o]+i*this.y[o+1]+a*e*this.m[o+1]},t})),define("drops/requirementsGraph/barvalue",[],(function(){"use strict";function t(t,e,i,n){this.id=t,this.xValue=e,this.selectedValue=i,this.preferredValue=void 0===n?i:n,this.originalSelectedValue=this.selectedValue,this.originalPreferredValue=this.preferredValue}return t.prototype.hasChanged=function(){return this.originalSelectedValue!=this.selectedValue||this.originalPreferredValue!=this.preferredValue},t})),define("drops/requirementsGraph/requirementsgraphimpl",["jquery","underscore","drops/requirementsGraph/monotoniccubicspline","lq/dayTime","drops/requirementsGraph/barvalue"],(function(t,e,i,n,a){"use strict";function o(t){this.container=t,this.isMouseDown=!1,this.previousMouseMovePosition=void 0,this.graphData=null,this.graphModel=null}return o.prototype.roundFloat=function(t){return Math.round(100*t)/100},o.prototype.compareFloats=function(t,e){return Math.round(100*t)/100==Math.round(100*e)/100},o.prototype.getYPosition=function(t){return e.find(this.graphModel.yIntervals,(function(e){return e.real==t})).percentual},o.prototype.getXPosition=function(t){return e.find(this.graphModel.xIntervals,(function(e){return e.real==t})).percentual},o.prototype.getRealYPosition=function(t){var i=this;return e.find(i.graphModel.yIntervals,(function(e){return i.compareFloats(e.percentual,t)})).real},o.prototype.getRealXPosition=function(t){var i=this;return e.find(i.graphModel.xIntervals,(function(e){return i.compareFloats(e.percentual,t)})).real},o.prototype.calculateYPosition=function(t){return(t-this.graphData.yAxisFrom)/(this.graphData.yAxisTo-this.graphData.yAxisFrom)*100},o.prototype.calculateXPosition=function(t){return(t-this.graphData.xAxisFrom)/(this.graphData.xAxisTo-this.graphData.xAxisFrom)*100},o.prototype.getBarValue=function(t){return e.find(this.graphModel.barValues,(function(e){return e.xValue==t}))},o.prototype.createGraphModel=function(){this.graphModel={xSubIntervalWidth:this.calculateXPosition(this.graphData.xAxisFrom+this.graphData.xAxisSubInterval),xIntervalWidth:this.calculateXPosition(this.graphData.xAxisFrom+this.graphData.xAxisInterval),ySubIntervalWidth:this.calculateYPosition(this.graphData.yAxisFrom+this.graphData.yAxisSubInterval),yIntervalWidth:this.calculateYPosition(this.graphData.yAxisFrom+this.graphData.yAxisInterval),xIntervals:this.generateXIntervals(),yIntervals:this.generateYIntervals(),barValues:null==this.graphData.barValues?[]:this.graphData.barValues}},o.prototype.generateXIntervals=function(){for(var t=[],e=this.graphData.xAxisFrom;e<=this.graphData.xAxisTo;e+=this.graphData.xAxisSubInterval)t.push({real:e,percentual:this.calculateXPosition(e)});return t},o.prototype.generateYIntervals=function(){for(var t=[],e=this.graphData.yAxisFrom;e<=this.graphData.yAxisTo;e+=this.graphData.yAxisSubInterval)t.push({real:e,percentual:this.calculateYPosition(e)});return t},o.prototype.createGraph=function(){var e=t("<div>",{class:"graph"});this.createGraphContainer(e),this.graphData.showAxisLabels&&(this.createXAxis(e),this.createYAxis(e)),e.appendTo(t(this.container))},o.prototype.createXAxis=function(e){for(var i=t("<ul>").addClass("xAxis"),a=this.graphData.xAxisFrom;a<this.graphData.xAxisTo;a+=this.graphData.xAxisInterval)t("<li>",{css:{width:this.graphModel.xIntervalWidth+"%","margin-left":-this.graphModel.xIntervalWidth/2+"%","margin-right":this.graphModel.xIntervalWidth/2+"%"},text:this.graphData.xAxisShowAsTime?n.fromTicks(a):a}).appendTo(i);e.append(i)},o.prototype.createYAxis=function(e){for(var i=t("<ul>").addClass("yAxis"),a=this.graphData.yAxisTo;a>=this.graphData.yAxisFrom;a-=this.graphData.yAxisInterval)t("<li>",{css:{height:this.graphModel.yIntervalWidth+"%"},text:this.graphData.yAxisShowAsTime?n.fromTicks(a):a}).appendTo(i);e.append(i)},o.prototype.createGraphContainer=function(e){var i=t("<div>").addClass("graphContainer").addClass("outerGraphContainer").css({width:"100%",height:"100%"}).appendTo(e),n=t("<div>").addClass("graphContainer").addClass("innerGraphContainer").css({width:"100%",height:"100%",cursor:this.graphData.readOnly?"default":"pointer"});this.graphData.readOnly||this.addChangeBarListeners(n),this.createGridLines(n),this.createGraphBars(n),n.appendTo(i)},o.prototype.createGridLines=function(t){for(var e=this.graphData.xAxisFrom;e<this.graphData.xAxisTo;e+=this.graphData.xAxisSubInterval)(e+this.graphData.xAxisSubInterval)%this.graphData.xAxisInterval==0?this.createVerticalGridDiv(t,e).addClass("intervalGrid"):this.createVerticalGridDiv(t,e).addClass("subIntervalGrid");for(var i=this.graphData.yAxisFrom;i<this.graphData.yAxisTo;i+=this.graphData.yAxisSubInterval)(i+this.graphData.yAxisSubInterval)%this.graphData.yAxisInterval==0?this.createHorizontalGridDiv(t,i).addClass("intervalGrid"):this.createHorizontalGridDiv(t,i).addClass("subIntervalGrid")},o.prototype.createHorizontalGridDiv=function(t,e){return this.createGridDiv(t,100-this.getYPosition(e+this.graphData.yAxisSubInterval),0,this.getYPosition(e),0)},o.prototype.createVerticalGridDiv=function(t,e){return this.createGridDiv(t,0,100-this.getXPosition(e+this.graphData.xAxisSubInterval),0,this.getXPosition(e)).addClass("vertical")},o.prototype.createGridDiv=function(e,i,n,a,o){return t("<div>",{class:"gridBar",css:{top:i+"%",right:n+"%",left:o+"%",bottom:a+"%"}}).appendTo(e)},o.prototype.addChangeBarListeners=function(t){var e=this;t.on("mousedown",(function(t){e.onMouseMoveStart(t,this)})),t.on("mouseleave",(function(t){e.onMouseMoveEnd(t,this)})),t.on("mouseup",(function(t){e.onMouseMoveEnd(t,this)})),t.on("mousemove",(function(t){e.onMouseMove(t,this)}))},o.prototype.onMouseMove=function(t,e){this.isMouseDown&&this.locateAndChangeBar({x:t.pageX,y:t.pageY},e)},o.prototype.onMouseMoveEnd=function(t,e){this.isMouseDown&&this.locateAndChangeBar({x:t.pageX,y:t.pageY},e),this.isMouseDown=!1,this.previousMouseMovePosition=void 0},o.prototype.onMouseMoveStart=function(t,e){this.isMouseDown=!0},o.prototype.calculateRelativeMousePosition=function(e,i){var n={x:0,y:0},a=t(i).offset();n.x=(e.x-a.left)/i.scrollWidth*100;var o=e.y<a.top?a.top:e.y>a.top+i.scrollHeight?a.top+i.scrollHeight:e.y;return n.y=Math.abs((o-a.top)/i.scrollHeight*100-100),n},o.prototype.locateAndChangeBar=function(t,e){var n=this.calculateRelativeMousePosition(t,e);if(null!=this.previousMouseMovePosition){var a=Math.round(Math.abs(n.x-this.previousMouseMovePosition.x)/this.graphModel.xSubIntervalWidth);if(a>0){var o,r;n.x-this.previousMouseMovePosition.x<=0?(o=new i([n.x,this.previousMouseMovePosition.x],[n.y,this.previousMouseMovePosition.y]),r=-1):(o=new i([this.previousMouseMovePosition.x,n.x],[this.previousMouseMovePosition.y,n.y]),r=1);for(var s=1;s<=a;s++){var A=this.previousMouseMovePosition.x+s*r*this.graphModel.xSubIntervalWidth,l=o.interpolate(A);if(!isNaN(l)){var d={x:this.snapXCoordinateToLowestSubInterval(A),y:this.snapYCoordinateToClosestSubInterval(l)};this.renderBarChange(e,d.x,d.y)}}}}this.previousMouseMovePosition={x:n.x,y:n.y};var c=this.snapXCoordinateToLowestSubInterval(n.x),u=this.snapYCoordinateToClosestSubInterval(n.y);this.renderBarChange(e,c,u)},o.prototype.snapXCoordinateToLowestSubInterval=function(t){var i=this,n=e.find(this.graphModel.xIntervals,(function(e){var n=i.roundFloat(t-e.percentual);return n>=0&&n<i.graphModel.xSubIntervalWidth}));if(!n){if(t>100)return 100;if(t<0)return 0}return n.percentual},o.prototype.snapYCoordinateToClosestSubInterval=function(t){var i=this,n=e.filter(this.graphModel.yIntervals,(function(e){var n=i.roundFloat(t-e.percentual);return n>=0&&n<i.graphModel.ySubIntervalWidth||n<=0&&n>-i.graphModel.ySubIntervalWidth}));if(0==n.length){if(t>100)return 100;if(t<0)return 0}return 1==n.length||Math.abs(n[0].percentual-t)<Math.abs(n[1].percentual-t)?n[0].percentual:n[1].percentual},o.prototype.renderBarChange=function(t,e,i){this.graphData.isWithPreferredValues?this.changePreferredBarSize(t,e,i):this.changeBarSize(t,e,i)},o.prototype.changeBarSize=function(e,i,n){var a=this.getRealXPosition(i),o=this.getBarValue(a),r=t(e).children("div.bar.selected[data-xvalue='"+a+"']"),s=t(e).children("div.barsContainer[data-xvalue='"+a+"']");null!=r[0]&&null!=s[0]&&(o.selectedValue=this.getRealYPosition(n),s.prop("title",this.createGraphBarTitle(o)),r.animate({top:100-n+"%"},{duration:150,easing:"swing",queue:!1}),s.animate({top:100-n+"%"},{duration:150,easing:"swing",queue:!1}),0!=n?r.removeClass("collapsed"):r.addClass("collapsed"))},o.prototype.changePreferredBarSize=function(e,i,n){var a=this.getRealXPosition(i),o=this.getBarValue(a),r=(t(e).children("div.bar.selected[data-xvalue='"+a+"']"),t(e).children("div.bar.preferred[data-xvalue='"+a+"']")),s=t(e).children("div.barsContainer[data-xvalue='"+a+"']");o.preferredValue=this.getRealYPosition(n),s.prop("title",this.createGraphBarTitle(o)),r.removeClass("plus"),r.removeClass("minus"),r.removeClass("collapsed");var A=this.getYPosition(o.selectedValue);n<A?(r.addClass("minus"),this.switchToMinusColor(r),r.animate({top:100-A+"%",bottom:n+"%"},{duration:250,easing:"swing",queue:!1}),s.animate({top:100-A+"%"},{duration:250,easing:"swing",queue:!1})):n>A?(r.addClass("plus"),this.switchToPlusColor(r),r.animate({top:100-n+"%",bottom:A+"%"},{duration:250,easing:"swing",queue:!1}),s.animate({top:100-n+"%"},{duration:250,easing:"swing",queue:!1})):(r.addClass("collapsed"),r.animate({top:100-A+"%",bottom:A+"%"},{duration:250,easing:"swing",queue:!1}),s.animate({top:100-A+"%"},{duration:250,easing:"swing",queue:!1}))},o.prototype.createGraphBars=function(t){for(var i=this.graphData.xAxisFrom;i<this.graphData.xAxisTo;i+=this.graphData.xAxisSubInterval)if((i<this.graphData.xAxisMin||i>=this.graphData.xAxisMax)&&this.createInvalidGraphBar(t,new a(null,i,this.graphData.yAxisTo)),e.any(this.graphModel.barValues,(function(t){return t.xValue==i}))){var n=e.find(this.graphModel.barValues,(function(t){return t.xValue==i}));this.createGraphBar(t,n)}else{var o=new a(null,i,this.graphData.yAxisFrom);this.graphModel.barValues.push(o),this.createGraphBar(t,o)}},o.prototype.createGraphBarTitle=function(t){var e="Planning: "+t.selectedValue;return this.graphData.isWithPreferredValues?e+"\nSchedule: "+t.preferredValue:e},o.prototype.createGraphBar=function(e,i){var n=this.getXPosition(i.xValue),a=this.getXPosition(i.xValue+this.graphData.xAxisSubInterval),o=this.getYPosition(i.selectedValue),r=t("<div>",{class:"verticalBar barsContainer","data-xvalue":i.xValue,title:this.createGraphBarTitle(i),css:{left:n+"%",right:100-a+"%",top:100-o+"%",bottom:"0%"}}).appendTo(e);if(r.on("mouseenter",(function(){r.addClass("barSelector")})).on("mouseleave",(function(){r.removeClass("barSelector")})),t("<div>",{class:"verticalBar bar selected"+(0!=o?"":" collapsed"),"data-xvalue":i.xValue,css:{left:n+"%",right:100-a+"%",top:100-o+"%",bottom:"0%"}}).appendTo(e),this.graphData.isWithPreferredValues){var s=this.getYPosition(i.preferredValue),A=s>o,l=A?100-s:100-o,d=A?o:s,c=t("<div>",{class:"verticalBar bar preferred "+(A?"plus":"minus")+(s!=o?"":" collapsed"),"data-xvalue":i.xValue,css:{left:n+"%",right:100-a+"%",top:l+"%",bottom:d+"%"}}).appendTo(e);A&&r.css({top:100-s+"%"}),A?c.addClass("plusPreferred"):c.addClass("minusPreferred")}},o.prototype.createInvalidGraphBar=function(e,i){var n=this.getXPosition(i.xValue),a=this.getXPosition(i.xValue+this.graphData.xAxisSubInterval),o=this.getYPosition(i.selectedValue);t("<div>",{class:"verticalBar bar invalid",css:{left:n+"%",right:100-a+"%",top:100-o+"%",bottom:"0%"}}).appendTo(e)},o.prototype.deleteGraph=function(){t(this.container).children().remove()},o.prototype.getBarValues=function(){return this.graphModel.barValues},o.prototype.draw=function(t){this.deleteGraph(),this.graphData=t,this.createGraphModel(),this.createGraph()},o})),define("drops/requirementsGraph/requirementsGraph",["jquery","underscore","lq/drop","drops/requirementsGraph/requirementsgraphimpl","drops/requirementsGraph/barvalue","lq/style"],(function(t,e,i,n,a,o){"use strict";function r(e){i.call(this,t("<div/>"),e),this.data.styles=this.data.styleId;var a=t("<div />").addClass("requirementsGraphContainer").css({width:"100%",height:"100%"}).appendTo(this.$element);this.graph=new n(a[0]),this.limits=[],this.planningUnits=[],this.scheduleUnits=[],this.barValues=[],this.$element.addClass("boxToBorderSize"),o.renderStyles(this,"requirementgraph-",a)}return i.extend(r,i),r.typeName="RequirementsGraph",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},r.prototype.licquidMethod_load=function(){var t=this;this.data.isWithPreferredValues?this.piping.queryDispatcher.dispatch(this.data.selectedScheduleDataSource,(function(e){t.scheduleUnits=e.results,t.piping.queryDispatcher.dispatch(t.data.selectedLimitsDataSource,(function(e){t.limits=e.results,t.mergeData()}),(function(t){t.pageSize=1024})),t.piping.queryDispatcher.dispatch(t.data.selectedPlanningDataSource,(function(e){t.planningUnits=e.results,t.mergeData()}),(function(t){t.pageSize=1024}))}),(function(t){t.pageSize=1024})):this.piping.queryDispatcher.dispatch(this.data.selectedPlanningDataSource,(function(e){t.planningUnits=e.results,t.piping.queryDispatcher.dispatch(t.data.selectedLimitsDataSource,(function(e){t.limits=e.results,t.mergeData()}),(function(t){t.pageSize=1024}))}),(function(t){t.pageSize=1024}))},r.prototype.mergeData=function(){var t=this;if(t.limits.length>0&&null!=t.planningUnits&&(!t.data.isWithPreferredValues||null!=t.scheduleUnits)){t.limits.length>1&&alert("Multiple axis-limits found, only using first."),t.data.xAxisMin=t.limits[0][t.data.xAxisMinOutput],t.data.xAxisMax=t.limits[0][t.data.xAxisMaxOutput],t.barValues=[];for(var i=t.data.xAxisSubInterval,n=0;n<24*t.data.xAxisInterval;){var o=0,r=e.find(t.planningUnits,(function(e){return e[t.data.xValueOutput]==n}));e.each(t.scheduleUnits,(function(e){e[t.data.xValueStartOutput]<=n&&e[t.data.xValueStopOutput]>n&&o++}));var s=null==r?0:parseInt(r[t.data.yValueOutput]),A=null==r?0:r[t.data.barIdOutput],l=new a(A,n,s,o);t.barValues.push(l),n+=i}t.graph.draw(t.retrieveRequirementsGraphData())}},r.prototype.convertToNumber=function(t){return"number"==typeof t?t:parseFloat(t)},r.prototype.convertToBoolean=function(t){return"boolean"==typeof t?t:"true"===t},r.prototype.retrieveRequirementsGraphData=function(){var t=this.convertToNumber(this.data.yAxisTo),e=this;return this.barValues.forEach((function(i){e.convertToNumber(i.preferredValue)>=t&&(t=e.convertToNumber(i.preferredValue)+1),e.convertToNumber(i.selectedValue)>=t&&(t=e.convertToNumber(i.selectedValue)+1)})),{readOnly:this.data.readOnly,xAxisLabel:this.data.xAxisLabel,xAxisFrom:this.convertToNumber(this.data.xAxisFrom),xAxisTo:this.convertToNumber(this.data.xAxisTo),xAxisInterval:this.convertToNumber(this.data.xAxisInterval),xAxisSubInterval:this.convertToNumber(this.data.xAxisSubInterval),xAxisMin:this.convertToNumber(this.data.xAxisMin),xAxisMax:this.convertToNumber(this.data.xAxisMax),xAxisShowAsTime:this.convertToBoolean(this.data.xAxisShowAsTime),yAxisLabel:this.data.yAxisLabel,yAxisFrom:this.convertToNumber(this.data.yAxisFrom),yAxisTo:t,yAxisInterval:this.convertToNumber(this.data.yAxisInterval),yAxisSubInterval:this.convertToNumber(this.data.yAxisSubInterval),yAxisShowAsTime:this.convertToBoolean(this.data.yAxisShowAsTime),showAxisLabels:this.convertToBoolean(this.data.showAxisLabels),isWithPreferredValues:this.convertToBoolean(this.data.isWithPreferredValues),barValues:this.barValues}},r.prototype.getBatchOfCommands=function(){if(!this.graph)return[];if(!this.data.parentIdParameter)return[];var t=this.piping.parameters.getValue(this.data.parentIdParameter),i=this;return{eventActionType:"Batch",command:this.data.id,batch:e.map(this.graph.getBarValues(),(function(e){var n={};return n[i.data.xValueAttribute]=e.xValue,n[i.data.yValueAttribute]=e.selectedValue,n[i.data.parentIdAttribute]=t,{entityId:e.id?e.id:null,data:n}}))}},r})),define("lq/fileUtil",[],(function(){return{dataUrlToBlob:function(t){for(var e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),a=new Uint8Array(n),o=0;o<e.length;o++)a[o]=e.charCodeAt(o);return new Blob([n],{type:i})}}})),define("lq/fileUpload",["jquery","underscore","when","./fileUtil"],(function(t,e,i,n){var a={action:void 0,accept:void 0,maxFileSizeInKb:void 0,maxImageDimensions:void 0,params:{},multiple:!1,onMaxFileSizeExceeded:t.noop,onInvalidFileExtension:t.noop,onStart:t.noop,onUploadingFile:t.noop,onFileUploading:t.noop,onFileUploaded:t.noop,onFinished:t.noop,onFilesSelected:null},o=function(e){this.config=t.extend({},a,e||{})};return o.prototype.do=function(){var e=t('<input type="file" />').hide();this.config.multiple&&e.attr("multiple","multiple"),this.config.accept&&e.attr("accept",this.config.accept),e.on("change",this.onFilesSelected.bind(this)).appendTo(t("body")).trigger("click")},o.prototype.onFilesSelected=function(t){var e=Array.prototype.slice.call(t.target.files),n=this.tryToFindFileThatExceedsMaxFileSize(e),a=this.isAllowedExtension(e);if(n)this.config.onMaxFileSizeExceeded(n.name);else if(a)this.config.onInvalidFileExtension(a.name,this.config.accept);else if(this.config.onFilesSelected)this.config.onFilesSelected(e);else{this.config.onStart();var o=this;e.reduce((function(t,i,n){return t.then((function(){return o.config.onUploadingFile(e.length,n),o.getDataToSend(i)})).then((function(t){return o.sendFile(t,i.name)})).then((function(t){o.config.onFileUploaded(t)}))}),i.resolve()).then((function(){o.config.onFinished()}))}},o.prototype.tryToFindFileThatExceedsMaxFileSize=function(t){if(this.config.maxFileSizeInKb){var i=1024*this.config.maxFileSizeInKb;return e.find(t,(function(t){return t.size>i}))}},o.prototype.isAllowedExtension=function(t){if(this.config.accept){var i=this.config.accept.split(",").map((function(t){return t.replace("/*","").trim().toLowerCase()}));return e.find(t,(function(t){var n=t.name,a=-1!==n.indexOf(".")?n.replace(/^.*(\.[^.]+)$/,"$1").toLowerCase():"",o=t.type.split("/")[0];return!e.contains(i,a)&&!e.contains(i,o)}))}},o.prototype.sendFile=function(e,n){var a=i.defer(),o=this,r=t.extend({},this.config.params);r.qqfile=n;var s=this.config.action+"?"+t.param(r),A=new XMLHttpRequest;return A.onload=function(){var t=JSON.parse(A.responseText);a.resolve(t)},A.upload.onprogress=function(t){o.config.onFileUploading(Math.round(t.loaded/t.total*100))},A.open("POST",s,!0),A.setRequestHeader("X-Requested-With","XMLHttpRequest"),A.setRequestHeader("X-File-Name",encodeURIComponent(n)),A.setRequestHeader("Content-Type","application/octet-stream"),A.send(e),a.promise},o.prototype.getDataToSend=function(t){if(!this.shouldTryToResize(t))return t;var e=i.defer(),a=this.config.maxImageDimensions.x,o=this.config.maxImageDimensions.y,r=new FileReader;return r.onload=function(i){var r=new Image;r.onload=function(){var i=document.createElement("canvas");if(r.width<=a&&r.height<=o)e.resolve(t);else{var s=r.width,A=r.height;s>a&&(s=a,A=r.height/r.width*a),A>o&&(A=o,s=r.width/r.height*o),i.width=s,i.height=A,i.getContext("2d").drawImage(r,0,0,s,A);var l=i.toDataURL(t.type),d=n.dataUrlToBlob(l);e.resolve(d)}},r.src=i.target.result},r.readAsDataURL(t),e.promise},o.prototype.shouldTryToResize=function(t){return this.config.maxImageDimensions&&t.type.match(/image.*/)},o})),define("lq/uploader",["jquery","lq","lq/fileUpload"],(function(t,e,i){function n(e){this.piping=e,this.targetDiv=t("<div />").hide().appendTo(t("body")),this.onStartingUploadCallback=t.noop,this.onFileUploadedCallback=t.noop,this.onUploadFinishedCallback=t.noop}return n.prototype.withParameters=function(t){return this.params=t,this},n.prototype.toTenantUrl=function(t){return this.url=e.getTenantUrl(t),this},n.prototype.withFileFilter=function(t){return this.filter=t,this},n.prototype.withMaxFileSize=function(t){return this.maxFileSizeInKb=t,this},n.prototype.withSmartphoneMode=function(t){return this.smartphoneMode=t,this},n.prototype.withPhotoQuality=function(t){return this.photoQuality=t,this},n.prototype.withMaxImageDimensions=function(t){return this.maxImageDimensions=t,this},n.prototype.onMaxFileSizeExceeded=function(t){return this.onMaxFileSizeExceededCallback=t,this},n.prototype.onInvalidFileExtension=function(t){return this.onInvalidFileExtensionCallback=t,this},n.prototype.onStartingUpload=function(t){return this.onStartingUploadCallback=t,this},n.prototype.onFileUploaded=function(t){return this.onFileUploadedCallback=t,this},n.prototype.onUploadFinished=function(t){return this.onUploadFinishedCallback=t,this},n.prototype.uploadSingleFile=function(){this._doUpload(!1)},n.prototype.uploadMultipleFiles=function(){this._doUpload(!0)},n.prototype._doUpload=function(t){navigator.camera?this._doSmartphoneUpload(t):this._doNormalUpload(t)},n.prototype._doSmartphoneUpload=function(t){if(navigator.camera){var e=this;this.piping.busyIndicator.showWithCount(0),this.piping.busyIndicator.showText("Uploading..."),e.onStartingUploadCallback();var i="PHOTOLIBRARY"===this.smartphoneMode?Camera.PictureSourceType.PHOTOLIBRARY:Camera.PictureSourceType.CAMERA;navigator.camera.getPicture((function(t){!function(t){var i=new FileUploadOptions;i.fileKey="file",i.fileName=(new Date).valueOf()+".jpg",i.mimeType="text/plain",i.httpMethod="POST";var n=encodeURI(location.protocol+"//"+location.host+e.url+"Smartphone");e.onStartingUploadCallback(),(new FileTransfer).upload(t,n,(function(t){e.onFileUploadedCallback(JSON.parse(t.response)),e.onUploadFinishedCallback()}),(function(t){e.piping.busyIndicator.forceHide()}),i)}(t)}),(function(t){e.piping.busyIndicator.forceHide()}),{destinationType:Camera.DestinationType.FILE_URI,sourceType:i,encodingType:Camera.EncodingType.JPEG,quality:e.photoQuality||50,correctOrientation:!0})}},n.prototype._doNormalUpload=function(e){var n=this,a=0,o=new i({action:this.url,params:this.params,maxFileSizeInKb:this.maxFileSizeInKb,maxImageDimensions:this.maxImageDimensions,accept:this.filter,multiple:e,onMaxFileSizeExceeded:function(t){n.onMaxFileSizeExceededCallback?n.onMaxFileSizeExceededCallback():alert(t+" is too large, maximum file size is  "+n.maxFileSizeInKb+"KB")},onInvalidFileExtension:function(t,e){n.onInvalidFileExtensionCallback?n.onInvalidFileExtensionCallback():alert(t+" has invalid extension. Only "+e+" files are allowed.")},onStart:function(){n.piping.busyIndicator.showWithCount(a),n.$label=t("<span />").text("Uploading"),n.$percentage=t("<span />").text("0%"),n.$progressBar=t('<div class="uploader-progress-foreground" />').css("width","0%"),n.piping.busyIndicator.showElement(t('<div class="uploader-progress-indicator" />').append(t('<div class="uploader-progress-label" />').append(n.$label).append(n.$percentage)).append(t("<div />").append(t('<div class="uploader-progress-background" />').append(n.$progressBar)))),n.onStartingUploadCallback(o)},onUploadingFile:function(t,e){t>1&&n.$label.text(`Uploading (${e+1}/${t})`),n.$progressBar.css("width","0%")},onFileUploading:function(t){n.$percentage.text(`${t}%`),n.$progressBar.css("width",`${t}%`)},onFileUploaded:function(t){n.onFileUploadedCallback(t)},onFinished:function(){n.piping.busyIndicator.removeElement(),n.onUploadFinishedCallback()}});a=this.piping.busyIndicator.forceHide(),o.do()},n})),define("drops/richTextEditor/richTextEditor",["jquery","when","lq/drop","lq/uploader","lq/style","lq","lq/required"],(function(t,e,i,n,a,o,r){"use strict";var s=null,A="{{{TenantUrl}}}",l=["ar","ar_SA","hy","az","eu","be","bn_BD","bs","bg_BG","ca","zh_CN","zh_TW","hr","cs","da","dv","nl","en_CA","en_GB","et","fo","fi","fr_FR","gd","gl","ka_GE","de","de_AT","el","he_IL","hi_IN","hu_HU","is_IS","id","it","ja","kab","kk","km_KH","ko_KR","ku","ku_IQ","lv","lt","lb","ml","ml_IN","mn_MN","nb_NO","fa","fa_IR","pl","pt_BR","pt_PT","ro","ru","sr","si_LK","sk","sl_SI","es","es_MX","sv_SE","tg","ta","ta_IN","tt","th_TH","tr","tr_TR","ug","uk","uk_UA","vi","vi_VN","cy"],d={zh:"zh_CN","en-GB":"en_GB",fr:"fr_FR",hu:"hu_HU",ko:"ko_KR",nb:"nb_NO",pt:"pt_PT",sv:"sv_SE",tr:"tr_TR"},c={data:{readonly:!1,undoRedoEnabled:!0,boldEnabled:!0,italicEnabled:!0,underlineEnabled:!0,stripFormattingOnPaste:!0,spellcheckerEnabled:!1,strikethroughEnabled:!1,formatselectEnabled:!1,removeformatEnabled:!1,fullscreenEnabled:!1,previewEnabled:!1,printEnabled:!1,anchorEnabled:!1,cutEnabled:!1,copyEnabled:!1,pasteEnabled:!1,selectallEnabled:!1,searchreplaceEnabled:!1,superscriptEnabled:!1,subscriptEnabled:!1,lineheightEnabled:!1,wordcountEnabled:!1,runtimeResizeEnabled:!1,size:{x:400,y:250},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},skin:"tinymce-5",watermark:""}};function u(e){i.call(this,t("<div/>"),c,e);var n=this;this.$element.addClass("boxToBorderSize rich-text-editor").css({whiteSpace:"pre-wrap"}).attr("tabindex",this.data.tabIndex).on("focus",(function(){n.focus()})),this.elementId=_.uniqueId("rte_"),this.initialUpdate=null,this.$textarea=t('<textarea id="'+this.elementId+'" />').css({width:"100%",height:"100%"}).appendTo(this.$element),a.renderStyles(this),this.triggerChangedEvent=_.debounce(this.triggerEventIfEnabled.bind(this,"changed"),200)}return i.extend(u,i),u.typeName="RichTextEditor",u.prototype.preRender=function(){if(this.piping.visibility.apply(this),this.piping.required.apply(this),r.prototype.addRemoveRequiredIndicator(this),this.applyPosition(),!s){var t=e.defer();return require(["tinymce"],(function(e){s=e,t.resolve()})),t.promise}},u.prototype.postRender=function(){this.createRichTextEditor()},u.prototype.createRichTextEditor=function(){this.toolbar=this.buildToolbar(),this.toolbar&&this.$element.addClass("with-toolbar");var t=this,e={selector:"textarea#"+this.elementId,body_class:this.getCssClassNameForStyling(),width:"100%",height:"100%",menubar:!1,statusbar:this.data.runtimeResizeEnabled,plugins:this.buildPluginsList(),toolbar:!!this.toolbar&&this.toolbar,paste_as_text:this.data.stripFormattingOnPaste,paste_data_images:this.data.imagesEnabled,images_upload_handler:this.imageUploadHandler,image_dimensions:!this.data.containImagesEnabled,content_style:this.buildContentStyles(),relative_urls:!1,remove_script_host:!1,readonly:this.data.readonly,browser_spellcheck:this.data.spellcheckerEnabled,file_browser_callback:this.openFileBrowser.bind(this),cache_suffix:require_config.urlArgs(null,""),setup:function(e){if(t.isEventEnabled("changed")&&(e.on("change",t.contentChanged.bind(t)),e.on("keyup",t.contentChanged.bind(t))),e.on("init",(function(){t.editor=e,t.initialUpdate&&(t.setValue(t.initialUpdate),t.initialUpdate=null)})),t.data.disableParagraphs&&e.on("keydown",(function(t){return 13!==t.keyCode||!t.shiftKey||(t.preventDefault(),t.stopPropagation(),!1)})),t.data.hasMaxLength){var i=[8,35,36,37,38,39,40,46];e.on("keydown",(function(e){return-1!==i.indexOf(e.keyCode)||(t.getLengthOfContent()+1<=t.data.maxLength||(e.preventDefault(),e.stopPropagation(),!1))}))}},styles:{bold:{inline:"b"},italic:{inline:"i"},underline:{inline:"u"}},text_patterns:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"}],extended_valid_elements:"b,i,u",content_css:o.getTenantUrl("StyleSheet/Get?v="+o.getStylesVersion()),urlconverter_callback:function(t,e,i,n){return"img"===e?t.replace(origin+o.getTenantUrl(""),A):t},file_picker_callback:this.openFileBrowser.bind(this),language:t.getLanguage.call(this)||"en_GB",elementpath:!1,skin:this.getSkin(),content_css:this.getSkin(),placeholder:this.data.watermark};this.data.disableParagraphs&&(e.newline_behavior="linebreak"),this.data.hasMaxLength&&(e.paste_preprocess=function(e,i){t.getLengthOfContent()+i.content.length>t.data.maxLength&&(i.content="")}),this.data.stripFormattingOnPaste&&(e.paste_postprocess=function(t,e){var i=e.node.innerHTML;i&&i.match(/\&nbsp;/g)&&(e.node.innerHTML=i.replace(/\&nbsp;/g,""))}),setTimeout((function(){s.init(e)}),0)},u.prototype.buildContentStyles=function(){var t="";return this.data.containImagesEnabled&&(t+="img { width: 100% !important; height: auto !important; } "),this.data.removeMarginAndPadding&&(t+="p { margin: 0; padding: 0; } "),t},u.prototype.getSkin=function(){return"tinymce-6"===this.data.skin?void 0:this.data.skin},u.prototype.imageUploadHandler=function(t,e){return new Promise((function(i,n){const a=new XMLHttpRequest;a.withCredentials=!1,a.open("POST",o.getTenantUrl("DynamicContent/AddPermanentFile?qqfile="+t.filename())),a.setRequestHeader("x-file-name",encodeURIComponent(t.filename())),a.upload.onprogress=function(t){e(t.loaded/t.total*100)},a.onload=function(){if(403===a.status)return void n({message:"HTTP Error: "+a.status,remove:!0});if(a.status<200||a.status>=300)return void n("HTTP Error: "+a.status);const t=JSON.parse(a.responseText);t&&"string"==typeof t.url?i(o.getTenantUrl("DynamicContent/File/"+t.url)):n("Invalid JSON: "+a.responseText)},a.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+a.status)},a.send(t.blob())}))},u.prototype.getLengthOfContent=function(){return this.editor.getContent({format:"text"}).replace(/(\r\n\t|\n|\r\t)/gm,"").length},u.prototype.contentChanged=function(){var t=this.editor.getContent();t!==this.lastChange&&(this.lastChange=t,this.data.required&&this.updateRequiredIndicator(),this.triggerChangedEvent())},u.prototype.getCssClassNameForStyling=function(){var t=this.data.styles,e="userstyle-";if(t){if("string"==typeof t)return a.getClassNameFromStyleId(e,t)}else{var i=a.getDefaultStyleIdByDropType(this);if(i)return a.getClassNameFromStyleId(e,i)}return""},u.prototype.buildPluginsList=function(){var t="";return this.data.insertLinkEnabled&&(t+=" link"),this.data.imagesEnabled&&(t+=" image"),this.data.insertListEnabled&&(t+=" lists"),this.data.tablesEnabled&&(t+=" table"),this.data.fullscreenEnabled&&(t+=" fullscreen"),this.data.previewEnabled&&(t+=" preview"),this.data.anchorEnabled&&(t+=" anchor"),this.data.searchreplaceEnabled&&(t+=" searchreplace"),this.data.wordcountEnabled&&(t+=" wordcount"),t},u.prototype.buildToolbar=function(){var t="";return this.data.undoRedoEnabled&&(t+=" undo redo"),t&&(t+=" |"),this.data.boldEnabled&&(t+=" bold"),this.data.italicEnabled&&(t+=" italic"),this.data.underlineEnabled&&(t+=" underline"),this.data.strikethroughEnabled&&(t+=" strikethrough"),t&&(t+=" |"),this.data.fontFamilyEnabled&&(t+=" fontfamily"),this.data.fontSizeEnabled&&(t+=" fontsize"),this.data.fontForegroundEnabled&&(t+=" forecolor"),this.data.fontBackgroundEnabled&&(t+=" backcolor"),t&&(t+=" |"),this.data.textAlignEnabled&&(t+=" alignleft aligncenter alignright alignjustify"),t&&(t+=" |"),this.data.insertLinkEnabled&&(t+=" link unlink"),t&&(t+=" |"),this.data.insertListEnabled&&(t+=" bullist numlist"),t&&(t+=" |"),this.data.indentationEnabled&&(t+=" outdent indent"),t&&(t+=" |"),this.data.tablesEnabled&&(t+=" table"),t&&(t+=" |"),this.data.imagesEnabled&&(t+=" image"),this.data.formatselectEnabled&&(t+=" blocks"),this.data.removeformatEnabled&&(t+=" removeformat"),this.data.fullscreenEnabled&&(t+=" fullscreen"),this.data.previewEnabled&&(t+=" preview"),this.data.printEnabled&&(t+=" print"),this.data.anchorEnabled&&(t+=" anchor"),this.data.cutEnabled&&(t+=" cut"),this.data.copyEnabled&&(t+=" copy"),this.data.pasteEnabled&&(t+=" paste"),this.data.selectallEnabled&&(t+=" selectall"),this.data.searchreplaceEnabled&&(t+=" searchreplace"),this.data.superscriptEnabled&&(t+=" superscript"),this.data.subscriptEnabled&&(t+=" subscript"),this.data.lineheightEnabled&&(t+=" lineheight"),this.data.wordcountEnabled&&(t+=" wordcount"),t},u.prototype.focus=function(){if(this.editor)this.editor.focus();else{var t=this;_.defer((function(){t.focus()}))}},u.prototype.getValue=function(){if(!this.editor)return null;var t=this.editor.getContent();return this.data.disableParagraphs?t.replace(/(^<p>)|(<\/p>$)/g,""):t},u.prototype.clearValue=function(){this.editor&&(this.editor.setContent(""),this.lastChange="")},u.prototype.setValue=function(t){if(this.editor){if(t.value){var e=new RegExp(A,"g"),i=t.value.replace(e,o.getTenantUrl(""));this.editor.setContent(i),this.lastChange=i}else this.editor.setContent(""),this.lastChange="";this.updateRequiredIndicator()}else this.initialUpdate=t},u.prototype.hasValue=function(){return!!this.editor&&""!==t.trim(this.editor.getContent({format:"text"}))},u.prototype.openFileBrowser=function(t,e,i){var a=this;new n(this.piping).toTenantUrl("DynamicContent/AddPermanentFile").withFileFilter("image/*").onFileUploaded((function(e){if(!e.success)throw new Error("Upload failed.");var i=o.getTenantUrl("DynamicContent/File?id="+encodeURIComponent(e.url)+"&filename="+encodeURIComponent(e.filename));t(window.location.origin+("/"===i.charAt(0)?i:"/"+i),{title:e.filename})})).onUploadFinished((function(){a.piping.busyIndicator.hide()})).uploadSingleFile()},u.prototype.getLanguage=function(){var t=this.piping.parameters.systems.getAll().CurrentLanguageISOCode;if(t){var e=d[t]||t;if(-1!==l.indexOf(e))return e}for(var i=navigator.languages||(navigator.userLanguage?[navigator.userLanguage]:[]),n=0;n<i.length;n++){var a=i[n].replace("-","_");if(-1!==l.indexOf(a))return a}},u.prototype.unsubscribeEventHandlers=function(){this.editor&&s.remove("#"+this.elementId)},u})),define("drops/richTextTemplateEditor/richTextTemplateEditor",["jquery","lq","lq/drop","lq/style","lq/dispatcher","lq/richText","underscore"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{entity:"RichTextTemplate",nameColumn:"Name",categoryColumn:"Category",modelColumn:"Model",size:{x:450,y:330}}},A=function(e){var i=this;i.richTextTemplateEditor=e,i.data=e.data,i.templates=[],i.$element=t("<div />"),t("<span />").text("Templates: ").appendTo(this.$element),i.$templates=t("<select />").on("change",(function(){var t=0===i.$templates.prop("selectedIndex");i.$load.prop("disabled",t),i.$delete.prop("disabled",t)})).append(t("<option />",{value:null,text:"Choose a template ..."})).appendTo(this.$element),i.$load=t("<button />").text("Load").prop("disabled",!0).on("click",(function(){confirm("Are you sure you want to load the selected template?\nYour current unsaved changes will be lost!")&&a.dispatch("Entity/LoadRichTextTemplate",{actionId:i.piping.actionId,morphId:i.data.id,id:i.$templates.val()},(function(t){e.openTemplate(t.Values)}))})).appendTo(i.$element),i.$delete=t("<button />").text("Delete").prop("disabled",!0).on("click",(function(){confirm("Are you sure you want to delete this template?")&&a.dispatch("Entity/DeleteRichTextTemplate",{actionId:i.piping.actionId,morphId:i.data.id,id:i.$templates.val()},(function(){i.loadTemplates()}))})).appendTo(i.$element),i.loadTemplates()};A.prototype.loadTemplates=function(e){var i=this;this.piping.queryDispatcher.dispatch(i.data.dataSource,(function(n){i.templates=n.results,i.$templates.empty().append(t("<option />",{value:null,text:"Choose a template ..."})),t.each(i.templates,(function(e,n){i.$templates.append(t("<option />",{value:n.Id,text:n[i.data.nameColumn]}))}));var a=!i.tryToSelectItem(e);i.$load.prop("disabled",a),i.$delete.prop("disabled",a)}))},A.prototype.tryToSelectItem=function(t){if(t){var e=r.find(this.templates,t);if(e)return this.$templates.val(e.Id),!0}return!1},A.prototype.findTemplateWithName=function(t){var e=this;return r.find(this.templates,(function(i){return i[e.data.nameColumn]===t}))},A.prototype.clearSelection=function(){this.$templates.val(null)};var l=function(e){var i=this;i.richTextTemplateEditor=e,i.data=e.data,i.$element=t("<div />"),t("<span />").text("Save as template: ").appendTo(this.$element),i.$name=t("<input />").on("keyup",(function(){i.updateButton()})).appendTo(this.$element),i.$button=t("<button />").text(" Save ").prop("disabled",!0).on("click",(function(){i.save()})).appendTo(this.$element)};function d(e){i.call(this,t("<div/>"),s,e);var a=this;a.templateSelector=new A(a),a.templateSaver=new l(a),a.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),n.renderStyles(a);var r=t("<div />").appendTo(a.$element);t("<div />").css({position:"absolute",top:"10px",right:"10px"}).append(a.templateSelector.$element).appendTo(r);var d=t("<div />").css({position:"absolute",top:"40px",bottom:"0",left:"0",right:"0"}).appendTo(r);a.richTextEditor=new o.RichTextEditor({parentElement:d,sections:this.data.sections,placeholder:this.data.placeholder,addDefaultEmptyRow:!1,editable:!0}),t("<div />").css({position:"absolute",bottom:"10px",right:"10px"}).append(a.templateSaver.$element).appendTo(r)}return l.prototype.save=function(){var t=this,e=t.$name.val(),i=t.richTextTemplateEditor.findTemplateWithName(e);if(!i||confirm('Are you sure you want to overwrite the existing template "'+e+'" ?')){var n=t.richTextTemplateEditor.richTextEditor.toModel(),o={actionId:t.piping.actionId,morphId:t.data.id,id:i?i.Id:null,"Values[0].Key":t.data.categoryColumn,"Values[0].Value":t.richTextTemplateEditor.getCategory(),"Values[1].Key":t.data.nameColumn,"Values[1].Value":e,"Values[2].Key":t.data.modelColumn,"Values[2].Value":JSON.stringify(n)};a.dispatch("Entity/SaveRichTextTemplate",o,(function(){t.richTextTemplateEditor.templateSelector.loadTemplates((function(i){return i[t.data.nameColumn]===e}))}))}},l.prototype.setCurrentTemplate=function(t){this.$name.val(t),this.updateButton()},l.prototype.updateButton=function(){this.$name.val()?this.$button.prop("disabled",!1):this.$button.prop("disabled",!0)},l.prototype.clearName=function(){this.$name.val(""),this.updateButton()},i.extend(d,i),d.typeName="RichTextTemplateEditor",d.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},d.prototype.findTemplateWithName=function(t){return this.templateSelector.findTemplateWithName(t)},d.prototype.openTemplate=function(t){this.richTextEditor.fromModel(JSON.parse(t[this.data.modelColumn])),this.templateSaver.setCurrentTemplate(t[this.data.nameColumn])},d.prototype.getCategory=function(){return this.data.categoryIsParameter?this.piping.parameters.getValue(this.data.category):this.data.category},d.prototype.getValue=function(){return this.richTextEditor?this.richTextEditor.toString():null},d.prototype.setValue=function(t){this.templateSelector.clearSelection(),this.templateSaver.clearName(),this.richTextEditor.fromString(t.value)},d.prototype.clearValue=function(t){},d})),define("drops/runtimeQueryBuilder/runtimeQueryBuilder",["jquery","underscore","lq","lq/frontendModules","lq/drop"],(function(t,e,i,n,a){"use strict";var o=null,r=function(e){a.call(this,t("<div>"),e)};return a.extend(r,a),r.typeName="RuntimeQueryBuilder",r.prototype.preRender=function(){this.applyPosition()},r.prototype.postRender=function(){this.data.showEmptyQueryOnPageLoad&&this.setValue({value:"{}"})},r.prototype.getValue=function(){return this.lastDesignState},r.prototype.clearValue=t.noop,r.prototype.setValue=function(t){var e=t.value;n.load("runtimeQueryBuilder",!0).then(this.showComponent.bind(this,e))},r.prototype.showComponent=function(e,n){if(o)this.showQueryBuilder(e,n);else{var a=this;t.get(i.getTenantUrl("Query/BuilderData"),(function(t){o=t,a.showQueryBuilder(e,n)}))}},r.prototype.showQueryBuilder=function(t,e){this.lastDesignState=t;var n=this;e.default({baseUrl:i.getBaseUrl(""),tenant:i.getTenantName(),application:i.getTenantApplicationName(),state:t?JSON.parse(t):{},componentName:i.getNameOfComponent(),ravenLogger:i.getRavenLogger(),frontEndUrl:i.getFrontEndUrl(""),tenantUrl:i.getTenantUrl(""),entities:o.entities,externalData:{availableQueries:[]},save:function(t,e){n.lastDesignState=JSON.stringify(e),n.triggerEventIfEnabled("saveClicked")},cancel:function(){n.triggerEventIfEnabled("cancelClicked")}},this.$element.get(0))},r})),define("drops/simpleSpreadsheet/simpleSpreadsheetRow",["jquery","lq/constants","lq/style","jquery.numpadDecSeparator"],(function(t,e,i,n){"use strict";function a(e){this.spreadsheet=e,this.$cells=_(e.data.columns.length).times(this.createCell.bind(this)),this.$element=t("<div />").on("click",this.rowClicked.bind(this)).append(_.map(this.$cells,(function(e,i){return t("<div />").append(e)})))}return a.prototype.createCell=function(e){var n=t('<input type="text" />').on("change",this.columnUpdated.bind(this,e)).on("input",this.columnUpdated.bind(this,e)).on("keypress",this.keyPressed.bind(this,e)).on("focus",this.focusReceived.bind(this)).on("blur",this.focusLost.bind(this));return this.isNumberColumn(e)&&n.numpadDecSeparator({separator:this.spreadsheet.formatter.decimalSeperator}),i.renderStyles(this.spreadsheet,null,n,this.spreadsheet.data.styles,"input"),n.css("text-align",this.spreadsheet.data.columns[e].alignment),n},a.prototype.isNumberColumn=function(t){return"number"===this.spreadsheet.data.columns[t].type},a.prototype.rowClicked=function(t){t.ctrlKey?this.spreadsheet.updateSelectedRows(this):this.spreadsheet.setSelectedRow(this)},a.prototype.focusReceived=function(e){i.renderStyles(this,null,t(e.target),this.spreadsheet.data.styles,"input selected")},a.prototype.focusLost=function(e){i.renderStyles(this,null,t(e.target),this.spreadsheet.data.styles,"input")},a.prototype.columnUpdated=function(t){this.spreadsheet.columnUpdated(t)},a.prototype.keyPressed=function(t,e){13===e.keyCode&&this.spreadsheet.moveToNextRow(this,t)},a.prototype.highlight=function(){this.$element.addClass("active-row")},a.prototype.isEmpty=function(){var t=this;return _.every(this.spreadsheet.data.columns,(function(e,i){return!t.$cells[i].val()}))},a.prototype.dehighlight=function(){this.$element.removeClass("active-row")},a.prototype.paste=function(t){for(var e=t.split(";"),i=0;i<e.length&&i<this.$cells.length;i++){var n=e[i];this.$cells[i].val(n)}},a.prototype.setValueOf=function(t,e){this.isNumberColumn(t)&&(e=this.convertToNumericValue(e)),this.$cells[t].val(e)},a.prototype.convertToNumericValue=function(t){return this.spreadsheet.formatter.convertFromLicquidFormat(e.valueTypes.decimal,t)},a.prototype.getNumericValueOf=function(t){var i=this.$cells[t].val(),n=this.spreadsheet.formatter.convertToLicquidFormat(e.valueTypes.decimal,i);return NaN===n?null:n},a.prototype.setData=function(t){var e=this;_.each(this.spreadsheet.data.columns,(function(i,n){var a=t[i.attribute];e.setValueOf(n,a)}))},a.prototype.getData=function(){var t={},e=this;return _.each(this.spreadsheet.data.columns,(function(i,n){t[i.attribute]=e.isNumberColumn(n)?e.getNumericValueOf(n):e.$cells[n].val()})),t},a.prototype.focusFirstInputField=function(){this.focusInputField(0)},a.prototype.focusInputField=function(t){this.$element.find("input").eq(t).trigger("focus")},a})),define("drops/simpleSpreadsheet/simpleSpreadsheet",["jquery","lq/drop","lq/style","drops/simpleSpreadsheet/simpleSpreadsheetRow"],(function(t,e,i,n){"use strict";var a={data:{defaultNumberOfRows:100,columns:[]}};function o(n){e.call(this,t('<div class="simple-spreadsheet"/>'),a,n),this.selectedRows=[],this.lastTotal=null,this.deletedRowIds=[],this.$rows=t('<div class="spreadsheet-table" />').appendTo(this.$element),i.renderStyles(this);var o=this;this.columnUpdated=_.debounce((function(t){t===Number(o.data.eventArgumentColumn)&&o.triggerUpdated()}),500)}return e.extend(o,e),o.typeName="SimpleSpreadsheet",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.piping.datasources.registerDatasourceListener(this.data.datasource,this.loadDataFromDatasource.bind(this),t.noop),this.formatter=this.piping.formatting.createFormatter(this.data.formatting),this.applyPosition(),this.createDefaultNumberOfRows(),this.rows.length>0&&this.setSelectedRow(this.rows[0])},o.prototype.createDefaultNumberOfRows=function(){this.rows=_(this.data.defaultNumberOfRows).times(this.createRow.bind(this)),this.$rows.append(_.pluck(this.rows,"$element"))},o.prototype.createRow=function(){var t=new n(this);return _.each(this.data.columns,(function(e,i){if(null!==e.width&&void 0!==e.width){var n=t.$element.children(":eq("+i+")");0===e.width?n.css("display","none"):n.css("width",e.width+"px")}})),t},o.prototype.loadDataFromDatasource=function(t){this.deletedRowIds=[];var e=this.getNumberOfRequiredLines(t);if(this.rows.length<e){var i=_(e-this.rows.length).times(this.createRow.bind(this));this.rows.push.apply(this.rows,i),this.$rows.append(_.pluck(i,"$element"))}else this.rows.length>e&&(this.rows.splice(e),this.$rows.children().filter(":gt("+(e-1)+")").remove());var n=this.rows,a=this.data.rowNumberOutput,o=this.data.idOutput,r=_.sortBy(t.results,a);_.each(r,(function(t,e){n[e].setData(t),n[e].rowId=t[o]}));var s=_.find(n,(function(t){return t.isEmpty()}));s||(s=n[0]),this.setSelectedRow(s),this.triggerUpdated()},o.prototype.getNumberOfRequiredLines=function(t){return 0===t.results.length?this.data.defaultNumberOfRows:t.results.length},o.prototype.setSelectedRow=function(t){if(1!==this.selectedRows.length||this.selectedRows[0]!==t){_.each(this.selectedRows,(function(t){t.dehighlight()})),this.selectedRows=[t],this.updateRowIndexParameter(t),t.highlight();var e=_.first(this.rows)===t?t:this.rows[_.indexOf(this.rows,t)-1],i=this.$element.scrollTop()+e.$element.position().top;(this.$element.scrollTop()>i||i>this.$element.scrollTop()+this.$element.height())&&this.$element.scrollTop(i)}},o.prototype.updateSelectedRows=function(t){this.isRowSelected(t)?(this.selectedRows=_.reject(this.selectedRows,(function(e){return e===t})),t.dehighlight()):(this.selectedRows.push(t),t.highlight(),this.updateRowIndexParameter(t))},o.prototype.isRowSelected=function(t){return-1!==_.indexOf(this.selectedRows,t)},o.prototype.updateRowIndexParameter=function(t){this.data.currentRowParameter&&this.piping.parameters.locals.setValue(this.data.currentRowParameter,_.indexOf(this.rows,t))},o.prototype.triggerUpdated=function(){if(this.isEventEnabled("updated")){var t=this.getTotalForEvent();this.lastTotal!==t&&(this.triggerEvent(this.data.eventing.updated.raisedEventName,t),this.lastTotal=t)}},o.prototype.getTotalForEvent=function(){var t=this.data.eventArgumentColumn;if("sum"===this.data.eventArgumentFunction){var e=Math.pow(10,this.formatter.decimalPrecision),i=_.reduce(this.rows,(function(i,n){return i+(n.getNumericValueOf(t)*e||0)}),0);return i=Math.round(i),i/=e}throw new Error("Invalid function")},o.prototype.setValue=function(t){if(t.value){var e=this.selectedRows.length>0?this.getFirstSelectedIndex():0,i=t.value.split("\n"),n=e+i.length;n>this.rows.length&&this.addExtraRows(n-this.rows.length);for(var a=0;a<i.length;a++){var o=i[a],r=this.rows[a+e];r&&r.paste(o)}var s=this.rows[e+i.length];s?this.setSelectedRow(s):this.setSelectedRow(_.last(this.rows)),this.triggerUpdated()}},o.prototype.getFirstSelectedIndex=function(){return _.chain(this.selectedRows).map(this.getIndexOfRow.bind(this)).min().value()},o.prototype.addExtraRows=function(t){var e=this;_.each(_.range(t),(function(){var t=e.createRow();e.rows.push(t),e.$rows.append(t.$element)}))},o.prototype.getBatchOfCommands=function(){if(!this.rows)return[];var t=this.data.rowNumberAttribute,e=this.data.parentAttribute,i=this.data.parentIdParameter,n=this.piping.parameters;return{eventActionType:"Batch",command:this.data.id,batch:_.map(this.rows,(function(a,o){var r=a.getData();return r[t]=o,a.rowId||(r[e]=n.getValue(i)),{entityId:a.rowId,data:r}})),deletes:this.deletedRowIds}},o.prototype.receiveBatchOfCommandsResult=function(t){var e=this.rows;_.each(t,(function(t,i){e[i].rowId=t}))},o.prototype.moveToNextRow=function(t,e){var i=this.getIndexOfRow(t);if(i!==this.rows.length-1){var n=this.rows[i+1];this.setSelectedRow(n),n.focusInputField(e)}},o.prototype.licquidMethod_insertRow=function(){var t=this.selectedRows.length>0,e=t?this.getIndexOfRow(this.selectedRows[0]):0,i=this.createRow();t&&this.selectedRows[0]===_.last(this.rows)?(this.rows.push(i),this.$rows.children().eq(e).after(i.$element)):(this.rows.splice(e,0,i),0===e?this.$rows.prepend(i.$element):this.$rows.children().eq(e).before(i.$element)),this.setSelectedRow(i),i.focusFirstInputField()},o.prototype.licquidMethod_deleteRow=function(){if(0!==this.selectedRows.length){var t=this.getLastSelectedIndex();if(_.each(this.selectedRows,this.deleteRow.bind(this)),0!==this.rows.length){var e=this.rows.length>t?t:this.rows.length-1,i=this.rows[e];this.setSelectedRow(i),i.focusFirstInputField()}else this.selectedRow=[];this.triggerUpdated()}},o.prototype.getLastSelectedIndex=function(){return _.chain(this.selectedRows).map(this.getIndexOfRow.bind(this)).max().value()},o.prototype.deleteRow=function(t){t.$element.remove(),t.rowId&&this.deletedRowIds.push(t.rowId);var e=this.getIndexOfRow(t);this.rows.splice(e,1)},o.prototype.getIndexOfRow=function(t){return this.rows.indexOf(t)},o.prototype.clearValue=t.noop,o})),define("drops/sketchPad/canvasMorph",["jquery","underscore","lq","lq/util"],(function(t,e,i,n){"use strict";return function(a,o,r,s,A,l,d){var c=this;function u(t){a.readOnly||("paint"===c.curMode||"mark"===c.curMode?(c.paint=!0,B(!1),S()):"grab"===c.curMode?(c.dragStart=c.context.transformedPoint(c.lastX,c.lastY),c.dragged=!1):"delete"===c.curMode&&function(){var t;c.pt=c.context.transformedPoint(c.lastX,c.lastY);var e=-1;for(t=0;t<c.clicks.length;t++)w({x:c.clicks[t].x,y:c.clicks[t].y},c.pt)<c.strokeSelectionSensitivity&&(e<0||w({x:c.clicks[t].x,y:c.clicks[t].y},c.pt)<w({x:c.clicks[e].x,y:c.clicks[e].y},c.pt))&&(e=t);C(e)}())}function h(t){if(!c.paint||"paint"!==c.curMode&&"mark"!==c.curMode)if("grab"===c.curMode){if(c.dragged=!0,c.dragStart){var e=c.context.transformedPoint(c.lastX,c.lastY);c.context.translate(e.x-c.dragStart.x,e.y-c.dragStart.y),P(),S()}}else"delete"===c.curMode&&(c.moveCounter+=1,c.moveCounter>5&&x());else B(!0),S()}function p(t){"paint"===c.curMode||"mark"===c.curMode?c.paint=!1:"grab"===c.curMode?(c.dragStart=null,c.dragged||b(t.shiftKey?-1:1)):"delete"===c.curMode&&(c.strokeSelected&&D(),c.moveCounter=0),c.clicks.length>0&&!c.clicks[c.clicks.length-1].drag&&c.clicks.pop();var e=c.lastStrokeEndInd;S(),c.reqDataFromParent.isOnReleaseEnabled&&e-c.lastStrokeEndInd!=0&&c.reqDataFromParent.triggerOnReleaseEventFunction()}function g(t,e,n){var a="#"+t.id;c.$toolbarButtons.find(a)[0].src=e&&n?i.getCdnUrl(t.srcActOn):e?i.getCdnUrl(t.srcActOff):n?i.getCdnUrl(t.srcDeactOn):i.getCdnUrl(t.srcDeactOff)}function f(e,n,a){var o="#"+e.id,r=function(){n?c.$toolbarButtons.find(o).parent().css("top","0px"):c.$toolbarButtons.find(o).parent().css("top","17.5px")};c.$toolbarButtons.find(o)[0].contentDocument?r():(c.$toolbarButtons.find(o).on("load",(function(){t(c.$toolbarButtons.find(o)[0].contentDocument.getElementsByClassName("color")).attr("fill",a||""),r()})),c.$toolbarButtons.find(o)[0].data=i.getCdnUrl(e.srcActOn))}function m(t){var e=0;do{isNaN(t.offsetLeft)||(e+=t.offsetLeft)}while(t=t.offsetParent);return e}function v(t){var e=0;do{isNaN(t.offsetTop)||(e+=t.offsetTop)}while(t=t.offsetParent);return e}function y(t){var e=parseFloat(c.$actionWrapper.scrollTop()),i=parseFloat(c.$actionWrapper.scrollLeft()),n=parseFloat(c.$canvas.css("border-left-width")),a=parseFloat(c.$canvas.css("border-top-width"));return{x:t.pageX-m(c.canvas)+i-(n||0),y:t.pageY-v(c.canvas)+e-(a||0)}}function w(t,e){var i=e.x-t.x;i*=i;var n=e.y-t.y;return n*=n,Math.sqrt(i+n)}function b(t){if(!c.disableZooming&&c.realCurZoom+t<16&&c.realCurZoom+t>-16){c.realCurZoom=c.realCurZoom+t;var e=c.context.transformedPoint(c.lastX,c.lastY);c.context.translate(e.x,e.y);var i=Math.pow(c.scaleFactor,t);c.context.scale(i,i),c.context.translate(-e.x,-e.y),P(),S()}}function B(t){c.pt=c.context.transformedPoint(c.lastX,c.lastY),c.context.translate(c.pt.x,c.pt.y),c.clicks.length>0&&!t&&!c.clicks[c.clicks.length-1].drag&&c.clicks.pop(),"mark"===c.curMode&&c.clicks.push({x:c.pt.x,y:c.pt.y,drag:t,size:c.lineSizeMarker,color:c.curColorMarker}),"paint"===c.curMode&&c.clicks.push({x:c.pt.x,y:c.pt.y,drag:t,size:c.lineSize,color:c.curColor}),c.showUndo(),c.undoneStrokes.length=0,c.hideRedo(),c.context.translate(-c.pt.x,-c.pt.y)}function C(t){var e;if(t>=0){for(c.deleteFromIndex=t,c.deleteToIndex=t,e=t;c.clicks[e]&&e>=0&&c.clicks[e].drag;e--)c.deleteFromIndex=e-1;for(e=t;c.clicks[e+1]&&c.clicks[e+1].drag;e++)c.deleteToIndex=e+1;c.originalColorSelection=c.clicks[t].color;var i=function(t,e){if("#000000"===t)return"#848484";if("#ffffff"===t)return"#E6E6E6";(t=String(t).replace(/[^0-9a-f]/gi,"")).length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),e=e||0;var i,n,a="#";for(n=0;n<3;n++)i=parseInt(t.substr(2*n,2),16),a+=("00"+(i=Math.round(Math.min(Math.max(0,i+i*e),255)).toString(16))).substr(i.length);return a}(c.clicks[t].color,.4);for(e=c.deleteFromIndex;c.clicks[e]&&e<c.deleteToIndex+1;e++)c.clicks[e].color=i;c.strokeSelected=!0,S()}}function x(){var t;if(c.strokeSelected){for(t=c.deleteFromIndex;c.clicks[t]&&t<c.deleteToIndex+1;t++)c.clicks[t].color=c.originalColorSelection;c.strokeSelected=!1,S()}}function D(){var t;for(c.undoneStrokes.push(c.clicks.splice(c.deleteFromIndex,c.deleteToIndex-c.deleteFromIndex+1)),t=0;t<c.undoneStrokes[c.undoneStrokes.length-1].length;t++)c.undoneStrokes[c.undoneStrokes.length-1][t].color=c.originalColorSelection;c.showRedo(!0),c.strokeSelected=!1,c.completedStrokesInd.length=0,c.lastStrokeEndInd=0,S()}function T(t){var e=new XMLHttpRequest;e.open("GET",i.getTenantUrl("DynamicContent/File/"+t),!1),e.send();for(var n=e.responseXML.firstChild,a=n.childNodes,o=0;o<a.length;o++){var r=a[o];if("path"===r.nodeName){var s=r.getAttribute("stroke-opacity"),A=K(A=r.getAttribute("stroke"),s),l=r.getAttribute("stroke-width"),d=r.getAttribute("d").replace(/([^a-z])\s([^a-z])/gi,"$1,$2").replace(/([A-Z])\s/gi,"$1").split(" "),u=d[0].slice(1).split(",");if(c.clicks.push({x:parseFloat(u[0]),y:parseFloat(u[1]),drag:!1,size:l,color:A}),"line"===r.getAttribute("class"))u=d[1].slice(1).split(","),c.clicks.push({x:parseFloat(u[0]),y:parseFloat(u[1]),drag:!0,size:l,color:A});else if("curve"===r.getAttribute("class"))for(var h=1;h<d.length;h++)0===d[h].indexOf("Q")?(u=d[h].slice(1).split(","),c.clicks.push({x:parseFloat(u[0]),y:parseFloat(u[1]),drag:!0,size:l,color:A}),h===d.length-1&&4===u.length&&c.clicks.push({x:parseFloat(u[2]),y:parseFloat(u[3]),drag:!0,size:l,color:A})):h===d.length-1&&(u=d[h].split(","),c.clicks.push({x:parseFloat(u[0]),y:parseFloat(u[1]),drag:!0,size:l,color:A}))}}if(c.hasBgImage){var p=n.childNodes[0];if(c.sizeAtTheTimeOfLoading=null,"bgData"===p.nodeName){var g=p.getAttribute("bgWidth"),f=p.getAttribute("bgHeight"),m=p.getAttribute("cvWidth"),v=p.getAttribute("cvHeight"),y=p.getAttribute("bgLeft"),w=p.getAttribute("bgTop");c.sizeAtTheTimeOfLoading={bgWidth:g,bgHeight:f,cvWidth:m,cvHeight:v,bgLeft:y,bgTop:w}}}if(n.getAttribute("class")){var b=n.getAttribute("class");b.indexOf("ontop=true")>=0&&!c.gridOnTop&&c.toggleOnTop(),c.gridSize=parseInt(b.replace(/^\D+/g,"")),S(),b.indexOf("grid=true")>=0?c._isGridShown=!0:c._isGridShown=!1}S()}function I(t,e){return t<0?e<0?Math.abs(t)-Math.abs(e):Math.abs(t)+Math.abs(e):e-t}function E(){0!==c.clicks.length?t(o[0].parentElement).addClass("hasValidValue"):t(o[0].parentElement).removeClass("hasValidValue")}function S(t,i,n){c.context&&(F(),e.forEach(U,(function(t){t.isInitialized||("function"==typeof t.initialize&&t.initialize(),Q(t),t.isInitialized=!0)})),function(t,e,i){if(c.cachedBgImg&&!e||!t)c.cachedBgImg&&!i?(_(c.cachedBgImg),k()):(k(),c.cachedBgImg=null);else{var n=new Image;n.onload=function(){_(this),c.cachedBgImg=this,k()},n.src=t}}(t,i,n),E())}function F(){var t=c.context.transformedPoint(0,0),e=c.context.transformedPoint(c.canvas.width,c.canvas.height);c.context.clearRect(t.x,t.y,e.x-t.x,e.y-t.y)}function k(){for(c._isGridShown&&!c.gridOnTop&&H("grid"),c.useBackImage&&!c.backImageOnTop&&c.backImage&&H("uploaded-image"),c.context.lineJoin="round",c.context.lineCap="round",t=c.lastStrokeEndInd;t<c.clicks.length;t++)(void 0!==c.clicks[t+1]&&!1===c.clicks[t+1].drag||!c.paint&&t===c.clicks.length-1)&&(c.completedStrokesInd.push({beg:c.lastStrokeEndInd,end:t}),c.lastStrokeEndInd=t+1);for(t=0;t<c.completedStrokesInd.length;t++)R(c.clicks.slice(c.completedStrokesInd[t].beg,c.completedStrokesInd[t].end+1));for(var t=c.lastStrokeEndInd;t<c.clicks.length;t++)c.context.beginPath(),c.clicks[t].drag&&t?c.context.moveTo(c.clicks[t-1].x,c.clicks[t-1].y):c.context.moveTo(c.clicks[t].x,c.clicks[t].y),c.context.lineTo(c.clicks[t].x,c.clicks[t].y),c.context.moveTo(c.clicks[t].x,c.clicks[t].y),c.context.closePath(),c.context.strokeStyle=q(c.clicks[t].color),c.context.lineWidth=c.clicks[t].size,c.context.stroke();c._isGridShown&&c.gridOnTop&&H("grid"),c.useBackImage&&c.backImageOnTop&&c.backImage&&H("uploaded-image")}function _(e,i){c.sizeAtTheTimeOfSaving=null;var n=c.context;if(e){if(i&&(n=i.context),c.sizeAtTheTimeOfLoading&&c.hasBgImage)return n.drawImage(e,0,0,c.sizeAtTheTimeOfLoading.bgWidth,c.sizeAtTheTimeOfLoading.bgHeight,c.sizeAtTheTimeOfLoading.bgLeft,c.sizeAtTheTimeOfLoading.bgTop,c.sizeAtTheTimeOfLoading.cvWidth,c.sizeAtTheTimeOfLoading.cvHeight),void(c.sizeAtTheTimeOfSaving=c.sizeAtTheTimeOfLoading);if(c.disableMovingBg)!function(t,e){t.css("background-image","url("+e+")"),"Stretch Image"===c.reqDataFromParent.selectedResizeOption?t.css("background-size","100% 100%"):"Keep Ratio, Show Complete Image"===c.reqDataFromParent.selectedResizeOption?t.css({"background-size":"contain","background-repeat":"no-repeat","background-position":"center center"}):"No-Resize"===c.reqDataFromParent.selectedResizeOption?t.css({"background-size":"auto","background-repeat":"no-repeat"}):"fillKeepRatio"===c.reqDataFromParent.selectedResizeOption&&t.css({"background-size":"cover","background-repeat":"no-repeat","background-position":"center center"})}(t(c.canvas),e.src);else{if("Stretch Image"===c.reqDataFromParent.selectedResizeOption)return n.drawImage(e,0,0,e.width,e.height,0,0,c.canvas.width,c.canvas.height),void(c.sizeAtTheTimeOfSaving={bgWidth:e.width,bgHeight:e.height,cvWidth:c.canvas.width,cvHeight:c.canvas.height,bgLeft:0,bgTop:0});if("No-Resize"===c.reqDataFromParent.selectedResizeOption)return n.drawImage(e,0,0),void(c.sizeAtTheTimeOfSaving={bgWidth:e.width,bgHeight:e.height,cvWidth:e.width,cvHeight:e.height,bgLeft:0,bgTop:0});var a=!1,o=e.width/e.height*c.canvas.height,r=e.height/e.width*c.canvas.width;if((r>c.canvas.height&&"Keep Ratio, Show Complete Image"===c.reqDataFromParent.selectedResizeOption||o>c.canvas.width&&"fillKeepRatio"===c.reqDataFromParent.selectedResizeOption)&&(a=!0),a){var s=(c.canvas.width-o)/2;n.drawImage(e,0,0,e.width,e.height,s,0,o,c.canvas.height),c.sizeAtTheTimeOfSaving={bgWidth:e.width,bgHeight:e.height,cvWidth:o,cvHeight:c.canvas.height,bgLeft:s,bgTop:0}}else{s=(c.canvas.height-r)/2;n.drawImage(e,0,0,e.width,e.height,0,s,c.canvas.width,r),c.sizeAtTheTimeOfSaving={bgWidth:e.width,bgHeight:e.height,cvWidth:c.canvas.width,cvHeight:r,bgLeft:0,bgTop:s}}}}}c.$canvas=o,c.$stylePickerContainer=s,c.reqDataFromParent=l,c.parameters=A,c.$actionWrapper=d,c._isUndoShown=!1,c.showUndo=function(){c._isUndoShown=!0,g(c.btnUndo,!0,!1)},c.hideUndo=function(){c._isUndoShown=!1,g(c.btnUndo,!1,!1)},c._isRedoShown=!1,c.showRedo=function(){c._isRedoShown=!0,g(c.btnRedo,!0,!1)},c.hideRedo=function(){c._isRedoShown=!1,g(c.btnRedo,!1,!1)},c._isGridShown=a.showGridInitially,c.showGrid=function(){c._isGridShown=!0,g(c.btnGrid,!0,!0),c.gridOnTop?g(c.btnOnTop,!0,!0):g(c.btnOnTop,!0,!1)},c.hideGrid=function(){c._isGridShown=!1,g(c.btnGrid,!0,!1),c.gridOnTop?g(c.btnOnTop,!1,!0):g(c.btnOnTop,!1,!1)},c.gridSize=a.startingGridSize||3,c.realCurZoom=0,c.curZoom=c.realCurZoom,c.setCurZoom=function(t){c.lastX=c.canvas.width/2,c.lastY=c.canvas.height/2,t>c.realCurZoom?b(Math.abs(t-c.realCurZoom)):b(-Math.abs(t-c.realCurZoom))},c.clicks=new Array,c.undoneStrokes=new Array,c.startingLineSize=a.startingLineSize,a.startingLineSize?c.lineSize=parseInt(a.startingLineSize):c.lineSize=3,c.startingLineSizeMarker=a.startingLineSizeMarker,a.startingLineSizeMarker?c.lineSizeMarker=parseInt(a.startingLineSizeMarker):c.lineSizeMarker=15,c.curColor=a.defaultPenColor,c.curColorMarker=a.defaultMarkerColor,c.lastColor="#000000",c.showPen=a.showPen,c.showMarker=a.showMarker,c.showMove=a.showMove,c.showDelete=a.showDelete,c.showClear=a.showClear,c.showLineSlider=a.showLineSlider,c.showGridSlider=a.showGridSlider,c.showScrollSlider=a.showScrollSlider,c.showGridOnTop=a.showGridOnTop,c.showUndoRedo=a.showUndoRedo,c.showGridInitially=a.showGridInitially,c.useGraphPaper=a.useGraphPaper,c.useGraphPaperScale=a.useGraphPaperScale,c.enablePinchMove=a.enablePinchMove,c.graphPaperScaleParameter=a.graphPaperScaleParameter,c.gridOnTop=a.gridOnTop,c.disableZooming=a.disableZooming,c.startingGridSize=a.startingGridSize,c.startingSensitivity=a.startingSensitivity,c.useBackImage=a.useBackImage,c.backImage=a.backImage,c.backImageOnTop=a.backImageOnTop,c.defaultMarkerColor=a.defaultMarkerColor,c.defaultPenColor=a.defaultPenColor,c.colorIndicesToAllow=a.colorIndicesToAllow,c.hasBgImage=a.useBackImage&&a.backImage,c.disableMovingBg=a.disableMovingBg,c.hasHeader=c.showUndoRedo||c.showGridOnTop||c.showClear||c.showDelete||c.showMove||c.showMarker||c.showPen||c.showGridInitially,c.penOpenedEvent=new CustomEvent("penOpened"),c.markOpenedEvent=new CustomEvent("markOpened"),c.paint=null,c.filenameToLoad="",c.context=null,c.canvas=null,a.showPen?c.curMode="paint":a.showMarker?c.curMode="mark":a.readOnly?c.curMode="":c.curMode="paint",c.lastX=null,c.lastY=null,c.dragStart=null,c.dragged=null,c.scaleFactor=1.1,c.pt=null,c.svg=null,c.lastTouchDistance=0,c.deleteFromIndex=0,c.deleteToIndex=0,c.originalColorSelection="",c.strokeSelected=!1,c.moveCounter=0,c.strokeSelectionSensitivity=50,c.lastStrokeEndInd=0,c.completedStrokesInd=new Array,c.btnDraw={id:"imgDrawObj",srcActOn:"Drops/SketchPad/icons/draw-on.svg"},c.btnMarker={id:"imgMarkerObj",srcActOn:"Drops/SketchPad/icons/marker-on.svg"},c.btnDelete={id:"imgDeleteObj",srcActOn:"Drops/SketchPad/icons/erase-on.svg"},c.btnGrab={id:"imgGrab",srcActOn:"Drops/SketchPad/icons/grab-on.png",srcActOff:"Drops/SketchPad/icons/grab-off.png"},c.btnClear={id:"imgClear",srcActOn:"Drops/SketchPad/icons/clear-on.png",srcActOff:"Drops/SketchPad/icons/clear-on.png"},c.btnUndo={id:"imgUndo",srcActOn:"Drops/SketchPad/icons/undo-act-on.png",srcActOff:"Drops/SketchPad/icons/undo-act-on.png",srcDeactOff:"Drops/SketchPad/icons/undo-deact.png"},c.btnRedo={id:"imgRedo",srcActOn:"Drops/SketchPad/icons/redo-act-on.png",srcActOff:"Drops/SketchPad/icons/redo-act-on.png",srcDeactOff:"Drops/SketchPad/icons/redo-deact.png"},c.btnGrid={id:"imgGrid",srcActOn:"/Drops/SketchPad/icons/grid-on.png",srcActOff:"Drops/SketchPad/icons/grid-off.png"},c.btnOnTop={id:"imgOnTop",srcActOn:"Drops/SketchPad/icons/ontop-act-on.png",srcActOff:"Drops/SketchPad/icons/ontop-act-off.png",srcDeactOn:"Drops/SketchPad/icons/ontop-act-on.png",srcDeactOff:"Drops/SketchPad/icons/ontop-act-off.png"},c.mousedown=function(t){c.lastX=t.offsetX||t.layerX-t.currentTarget.offsetLeft,c.lastY=t.offsetY||t.layerY-t.currentTarget.offsetTop,u(t),t.preventDefault()},c.mousemove=function(t){c.lastX=t.offsetX||t.layerX-t.currentTarget.offsetLeft,c.lastY=t.offsetY||t.layerY-t.currentTarget.offsetTop,h(t)},c.mouseup=function(t){p(t)},c.mouseout=function(t){c.paint=!1,c.dragStart=!1,S()},c.mousewheel=function(t){var e=t.wheelDelta?t.wheelDelta/120:t.detail?-t.detail:0;return e&&b(e),t.preventDefault()&&!1},c.touchstart=function(t){t.preventDefault(),t.touches.length<2&&(c.lastX=y(t.touches[0]).x,c.lastY=y(t.touches[0]).y,u(t)),2===t.touches.length&&(x(),c.lastTouchDistance=w(y(t.touches[0]),y(t.touches[1])),c.lastX=(y(t.touches[0]).x+y(t.touches[1]).x)/2,c.lastY=(y(t.touches[0]).y+y(t.touches[1]).y)/2,c.dragStart=c.context.transformedPoint(c.lastX,c.lastY),c.dragged=!1)},c.touchmove=function(t){if(t.preventDefault(),t.touches.length<2&&(c.lastX=y(t.touches[0]).x,c.lastY=y(t.touches[0]).y,h(t)),2===t.touches.length&&(x(),w(y(t.touches[0]),y(t.touches[1]))>c.lastTouchDistance?b(1):w(y(t.touches[0]),y(t.touches[1]))<c.lastTouchDistance&&b(-1),c.lastTouchDistance=w(y(t.touches[0]),y(t.touches[1])),c.lastX=(y(t.touches[0]).x+y(t.touches[1]).x)/2,c.lastY=(y(t.touches[0]).y+y(t.touches[1]).y)/2,c.dragged=!0,c.dragStart&&c.enablePinchMove)){var e=c.context.transformedPoint(c.lastX,c.lastY);c.context.translate(e.x-c.dragStart.x,e.y-c.dragStart.y),S()}},c.touchend=function(t){t.preventDefault(),t.touches.length<2&&p(t),c.dragStart=null,c.paint=!1},c.touchColorpicker=function(t){return!1},c.selectDraw=function(t){1==W()&&"click"===t.type||(c.curMode="paint",f(c.btnDraw,!0),f(c.btnMarker,!1),f(c.btnDelete,!1),g(c.btnGrab,!0,!1),g(c.btnClear,!0,!1),c.$penTool[0].dispatchEvent(c.penOpenedEvent))},c.selectGrab=function(){c.curMode="grab",f(c.btnDraw,!1),f(c.btnMarker,!1),f(c.btnDelete,!1),g(c.btnGrab,!0,!0),g(c.btnClear,!0,!1)},c.selectDelete=function(){c.curMode="delete",f(c.btnDraw,!1),f(c.btnMarker,!1),f(c.btnDelete,!0),g(c.btnGrab,!0,!1),g(c.btnClear,!0,!1)},c.selectMarker=function(t){1==W()&&"click"===t.type||(c.curMode="mark",f(c.btnDraw,!1),f(c.btnMarker,!0),f(c.btnDelete,!1),g(c.btnGrab,!0,!1),g(c.btnClear,!0,!1),c.$markerTool[0].dispatchEvent(c.markOpenedEvent))},c.clearDrawing=function(){if(c.context)F();else{const t=o[0];c.context=t.getContext("2d"),F()}c.lastStrokeEndInd=0,c.completedStrokesInd=new Array,c.clicks=new Array},c.selectClear=function(){g(c.btnClear,!0,!0),c.reqDataFromParent.isClearEventEnabled||(c.clearDrawing(),S()),c.reqDataFromParent.triggerClearEventFunction(),setTimeout((function(){g(c.btnClear,!0,!1)}),100)},c.toggleGrid=function(t){1==W()&&"click"===t.type||(c._isGridShown?c.hideGrid():c.showGrid(),S())},c.toggleOnTop=function(t){1==W()&&"click"===t.type||c._isGridShown&&(c.gridOnTop?(c.gridOnTop=!1,g(c.btnOnTop,!0,!1)):(c.gridOnTop=!0,g(c.btnOnTop,!0,!0)),S())},c.undo=function(){c._isUndoShown&&(C(c.clicks.length-1),D(),c.showRedo(),0===c.clicks.length&&c.hideUndo(),S(),c.reqDataFromParent.isOnUndoEventEnabled&&c.reqDataFromParent.triggerOnUndoEventFunction())},c.undoMouseDown=function(){c._isUndoShown&&g(c.btnUndo,!0,!0)},c.undoMouseUpOrOut=function(){c._isUndoShown&&g(c.btnUndo,!0,!1)},c.undoTouch=function(){c.undo(),c.undoMouseDown()},c.redo=function(){if(c._isRedoShown){for(;c.undoneStrokes[c.undoneStrokes.length-1].length>0;)c.clicks.push(c.undoneStrokes[c.undoneStrokes.length-1].shift());c.undoneStrokes.pop(),c.showUndo(),0===c.undoneStrokes.length&&c.hideRedo(),S(),c.reqDataFromParent.isOnRedoEventEnabled&&c.reqDataFromParent.triggerOnRedoEventFunction()}},c.redoMouseDown=function(){c._isRedoShown&&g(c.btnRedo,!0,!0)},c.redoMouseUpOrOut=function(){c._isRedoShown&&g(c.btnRedo,!0,!1)},c.redoTouch=function(){c.redo(),c.redoMouseDown()},c.redraw=function(t,e,i){S(t,e,i)},c.prevFuncCallWhileTouchScroll=function(t,e){c.scrolling||t(e)},c.buildCanvas=function(){c.canvas=o[0],c.canvas.height=c.canvas.clientHeight,c.canvas.width=c.canvas.clientWidth,c.context=c.canvas.getContext("2d"),$(c.context),function(){c._isGridShown&&M();c.useBackImage&&function(){if(!c.backImage)return;var e=O("uploaded-image");e.drawInterval=300,e.initialize=function(){e.uploadedImg=new Image,e.uploadedImg.onload=function(){e.canvas.width=e.canvas.width,e.draw(),S(),t.ajax(i.getTenantUploads(c.backImage),{success:function(t,e,i){if(a=c.backImage,o=".svg",-1!==a.indexOf(o,a.length-o.length)){var n=btoa(i.responseText);n="data:image/svg+xml;base64,"+n,c.uploadedImgBase64=n}var a,o},mimeType:"text/plain; charset=x-user-defined"})},e.uploadedImg.src=i.getTenantUploads(c.backImage)},e.draw=function(){_(e.uploadedImg,e)}}()}(),c.lastX=c.canvas.width/2,c.lastY=c.canvas.height/2,c.canvas.addEventListener("touchstart",c.touchstart),c.canvas.addEventListener("touchmove",c.touchmove),c.canvas.addEventListener("touchend",c.touchend),c.canvas.addEventListener("touchcancel",c.touchcancel),c.canvas.addEventListener("mousedown",c.mousedown),c.canvas.addEventListener("mousemove",c.mousemove),c.canvas.addEventListener("mouseup",c.mouseup),c.canvas.addEventListener("mouseout",c.mouseout),c.canvas.addEventListener("mousewheel",c.mousewheel),function(){var i=t('<td id="canvas-morph-toolbar">').css({padding:"0px",height:c.hasHeader?"69px":"",textAlign:"left",verticalAlign:"bottom",whiteSpace:"nowrap",width:c.canvas.width,overflowX:"auto",overflowY:"hidden",position:"relative",display:"flex",flexWrap:"nowrap",alignContent:"space-between",justifyContent:"flex-start",alignItems:"flex-end"}).on("scroll",(function(){c.scrolling=!0})).on("touchend",(function(){c.scrolling=!1}));c.$toolbarButtons=i;var n=t('<img id="imgUndo" />').on("click",c.undo).on("mousedown",c.undoMouseDown).on("mouseup",c.undoMouseUpOrOut).on("mouseout",c.undoMouseUpOrOut).appendTo(i),o=t('<img id="imgRedo" />').on("click",c.redo).on("mousedown",c.redoMouseDown).on("mouseup",c.redoMouseUpOrOut).on("mouseout",c.redoMouseUpOrOut).appendTo(i),s=t('<div id="imgDraw" style="display: inline-block; position: relative;"><object id="imgDrawObj" /></div>').appendTo(i);s.on("click",c.selectDraw.bind(c)).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.selectDraw)),c.showPen||s.hide();c.$penTool=s,t('<div id="pickDraw" class="sketchStylePicker sketchStylePickerPencil"><input id="colPicker" type="hidden" /><input type="hidden" name="lineSize" min="1" max="15" value="3"/></div>').appendTo(c.$stylePickerContainer);var A=t('<div id="imgMarker" style="display: inline-block; position: relative;"><object id="imgMarkerObj" /></div>').appendTo(i);A.on("click",c.selectMarker.bind(c)).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.selectMarker)),c.$markerTool=A,t('<div id="pickMark" class="sketchStylePicker sketchStylePickerMarker"><input id="colPicker" type="hidden" /><input type="hidden" name="lineSize" min="1" max="15" value="3"/></div>').appendTo(c.$stylePickerContainer);var l=t('<div id="imgDelete" style="display: inline-block; position: relative;"><object id="imgDeleteObj" /></div>').on("click",c.selectDelete).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.selectDelete)).appendTo(i),d=t('<img id="imgGrab" />').on("click",c.selectGrab).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.selectGrab)).appendTo(i),u=t('<img id="imgClear" />').on("click",c.selectClear).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.selectClear)).appendTo(i);c.showDelete||l.hide();c.showMove||d.hide();c.showMarker||A.hide();c.showClear||u.hide();if(!c.showUndoRedo){var h={display:"none"};n.css(h),o.css(h)}i.hide();var p=t('<img id="imgGrid" />').on("click",c.toggleGrid.bind(c)).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.toggleGrid)).appendTo(i),m=t('<img id="imgOnTop" />').on("click",c.toggleOnTop.bind(c)).on("touchend",c.prevFuncCallWhileTouchScroll.bind(c,c.toggleOnTop)).appendTo(i);c.showGridInitially||p.hide();c.showGridOnTop||m.hide();t("<tr />").append(i).append(i).append(i).appendTo(r),f(c.btnDraw,c.showPen,a.defaultPenColor),f(c.btnMarker,!c.showPen,a.defaultMarkerColor),g(c.btnGrab,!0,!1),f(c.btnDelete,!1),g(c.btnClear,!0,!1),g(c.btnUndo,!1,!1),g(c.btnRedo,!1,!1),g(c.btnGrid,!0,a.showGridInitially),c.gridOnTop?g(c.btnOnTop,!0,!0):g(c.btnOnTop,!0,!1);c.startingLineSize&&(c.lineSize=c.startingLineSize);c.startingLineSizeMarker&&(c.lineSizeMarker=c.startingLineSizeMarker);c.startingGridSize&&(c.gridSize=c.startingGridSize);c.startingSensitivity&&(c.strokeSelectionSensitivity=c.startingSensitivity);c.filenameToLoad&&T(c.filenameToLoad);(function(){var i=new Array("#F5D870","#EE9F39","#DD6655","#E76FA0","#A872D5","#6151C8","#2A99EA","#0674BC","#A8D26E","#60A55A","#3F7451","#304388","#FFFFFF","#969696","#333333","#A47D46"),n=new Array;if(c.colorIndicesToAllow){var o=c.colorIndicesToAllow.split(",");e.each(o,(function(t){n.push(parseInt(t.trim()))}))}0===n.length&&(n=new Array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15));var r=new Array(4,5,6,7,8,9,10,12,15,20,25,30),s=new Array(1,2,3,4,5,6,7,8,9,10,12,15);c.$stylePickerContainer.find(".sketchStylePicker").each((function(){var o,A=t(this),l=A.attr("id");"pickMark"===l?o=r:o=s,A.find(".sketchStylePopup").remove();var d="";d="pickMark"===l?"<div class='sketchStylePopup sketchStylePopupMarker'><div class = 'centerBorder'/> <div class='sketchStyleThickness'>":"<div class='sketchStylePopup sketchStylePopupPencil'><div class = 'centerBorder'/> <div class='sketchStyleThickness'>";for(var u=0;u<o.length;u++)d+="<input type='radio' id='size_radio"+u+l+"' name='radioSizes"+l+"' value='"+o[u]+"'",("pickDraw"===l&&o[u]==c.lineSize||"pickMark"===l&&o[u]==c.lineSizeMarker)&&(d+=" checked"),d+="><label for='size_radio"+u+l+"'><div class='style-thickness_"+o[u]+"'></div></label>";d+="</div><div class='sketchStyleColors'>";for(u=0;u<i.length;u++)void 0!==e.find(n,(function(t){return t==u}))&&("pickMark"===l?i[u]+="99":"99"===i[u].substring(i[u].length-2,i[u].length)&&(i[u]=i[u].substring(0,i[u].length-2)),d+="<div class='colorRadio'><input type='radio' id='color_radio"+u+l+"' name='radioColors"+l+"' value='"+i[u]+"'","pickMark"===l&&a.defaultMarkerColor?q(i[u])===a.defaultMarkerColor&&(d+=" checked"):"pickMark"!==l&&a.defaultPenColor?q(i[u])===a.defaultPenColor&&(d+=" checked"):"#000000"!==i[u]&&"#00000099"!==i[u]||(d+=" checked"),d+="><label for='color_radio"+u+l+"' style='background-color:"+q("#FFFFFF"!==i[u]?i[u]:"#ECECED")+"'></label></div>");d+="</div><div class='clear'</div>",t(this).append(d),A.find("input:radio[name*='radioSizes']").on("change",(function(){var t=A.find("input[type='radio'][name*='radioSizes']:checked").val(),e=A.find('input[name*="lineSize"]');e.val(t),e.change(),"pickMark"===l?c.lineSizeMarker=t:c.lineSize=t})),A.find("input:radio[name*='radioColors']").on("change",(function(){var e=A.find("input[type='radio'][name*='radioColors']:checked").val(),i=A.find('input[id*="colPicker"]');i.val(e),i.change(),"pickMark"===l?(c.curColorMarker=e,t(c.$toolbarButtons.find("#"+c.btnMarker.id)[0].contentDocument.getElementsByClassName("color")).attr("fill",q("#FFFFFF99"!==e?e:"#ECECED99"))):(c.curColor=e,t(c.$toolbarButtons.find("#"+c.btnDraw.id)[0].contentDocument.getElementsByClassName("color")).attr("fill",q("#FFFFFF"!==e?e:"#ECECED")))})),"pickMark"===l?(c.$markerTool[0].addEventListener("markOpened",(function(t){1==W()&&"click"===t.type||(c.$markerTool.find(".sketchStylePopupMarker").closest("div[id!="+l+"][id*=pick]").find(".sketchStylePopup").hide(),c.$stylePickerContainer.find(".sketchStylePopupMarker").toggle())}),!1),c.$markerTool.parents("table:eq(0)").parent().on("mousedown touchstart",(function(t){t.target.isSameNode(c.$markerTool[0])||c.$stylePickerContainer.find(".sketchStylePopupMarker").hide()})).find(".sketchStylePickerMarker").on("mousedown touchstart",(function(t){t.stopPropagation()}))):(c.$penTool[0].addEventListener("penOpened",(function(t){1==W()&&"click"===t.type||(c.$penTool.find(".sketchStylePopupPencil").closest("div[id!="+l+"][id*=pick]").find(".sketchStylePopup").hide(),c.$stylePickerContainer.find(".sketchStylePopupPencil").toggle())}),!1),c.$penTool.parents("table:eq(0)").parent().on("mousedown touchstart",(function(t){t.target.isSameNode(c.$penTool[0])||c.$stylePickerContainer.find(".sketchStylePopupPencil").hide()})).find(".sketchStylePickerPencil").on("mousedown touchstart",(function(t){t.stopPropagation()})))}))})(),setTimeout((function(){i.show()}),100)}();var n=c.context.transformedPoint(c.lastX,c.lastY),s=c.context.transformedPoint(c.lastX,c.lastY);c.context.translate(s.x-n.x,s.y-n.y),S()},c.resizerRedraw=function(t,i){c.$canvas.width(t),c.$canvas.height(i),c.canvas.height=c.canvas.clientHeight,c.canvas.width=c.canvas.clientWidth,c.$toolbarButtons&&c.$toolbarButtons.width(t),e.forEach(U,(function(t){t.isInitialized=!1})),S()},c.createSvg=function(){var t="http://www.w3.org/2000/svg",e="http://www.w3.org/1999/xlink";if(c.svg=document.createElementNS(t,"svg"),c.sizeAtTheTimeOfSaving&&c.hasBgImage){var i=document.createElementNS(t,"bgData");i.setAttribute("bgWidth",c.sizeAtTheTimeOfSaving.bgWidth),i.setAttribute("bgHeight",c.sizeAtTheTimeOfSaving.bgHeight),i.setAttribute("cvWidth",c.sizeAtTheTimeOfSaving.cvWidth),i.setAttribute("cvHeight",c.sizeAtTheTimeOfSaving.cvHeight),i.setAttribute("bgLeft",c.sizeAtTheTimeOfSaving.bgLeft),i.setAttribute("bgTop",c.sizeAtTheTimeOfSaving.bgTop),c.svg.appendChild(i)}window.navigator.userAgent.indexOf("MSIE ")<0&&c.svg.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",t),c.svg.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",e),c.svg.setAttribute("width",c.canvas.width),c.svg.setAttribute("height",c.canvas.height);var n=c.clicks.length>0;if(n){c.clicks[c.clicks.length-1]&&!c.clicks[c.clicks.length-1].drag&&c.clicks.pop();var a=Array.minProp(c.clicks,"x"),o=Array.maxProp(c.clicks,"x"),r=I(a,o),s=Array.minProp(c.clicks,"y"),A=Array.maxProp(c.clicks,"y"),l=I(s,A);c.svg.setAttribute("class","grid="+c._isGridShown+", ontop="+c.gridOnTop+", size="+c.gridSize),c._isGridShown&&!c.gridOnTop&&(N(null,a,s,o,A),c.svg.setAttribute("viewBox",a-10+" "+(s-10)+" "+(r+20)+" "+(l+20)),c.svg.setAttribute("width",r+20),c.svg.setAttribute("height",l+20),w())}if(c.uploadedImgBase64&&!c.backImageOnTop&&y(),n){for(var d=0;d<c.completedStrokesInd.length;d++){for(var u=document.createElementNS(t,"path"),h=c.completedStrokesInd[d].beg,p=c.completedStrokesInd[d].end,g=new Array,f=h;f<p+1;f++)g.push(c.clicks[f]);u.setAttribute("stroke",z(g[0].color)),u.setAttribute("stroke-opacity",V(g[0].color)),u.setAttribute("stroke-width",g[0].size),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-linecap","round"),u.setAttribute("fill","none");var m="M "+g[0].x+" "+g[0].y;if(g.length<3)m+=" L "+g[1].x+" "+g[1].y,u.setAttribute("class","line");else{for(var v=1;v<g.length-2;v++)m+=" Q "+g[v].x+" "+g[v].y+" "+(g[v].x+g[v+1].x)/2+" "+(g[v].y+g[v+1].y)/2;m+=" Q "+g[v].x+" "+g[v].y+" "+g[v+1].x+" "+g[v+1].y,u.setAttribute("class","curve")}u.setAttribute("d",m),c.svg.appendChild(u)}c._isGridShown&&c.gridOnTop&&(N(null,a,s,o,A),c.svg.setAttribute("viewBox",a-10+" "+(s-10)+" "+(r+20)+" "+(l+20)),c.svg.setAttribute("width",r+20),c.svg.setAttribute("height",l+20),w())}function y(){var i=document.createElementNS(t,"image");i.setAttributeNS(e,"xlink:href",c.uploadedImgBase64),i.setAttribute("x",0),i.setAttribute("y",0);var n=L("uploaded-image");i.setAttribute("width",n.uploadedImg.width),i.setAttribute("height",n.uploadedImg.height),c.svg.appendChild(i)}function w(){for(var t=0;t<c.gridLines.length;t++)c.svg.appendChild(c.gridLines[t])}return c.uploadedImgBase64&&c.backImageOnTop&&y(),(new XMLSerializer).serializeToString(c.svg)},c.createImage=function(t,e){if(!t||!c.sizeAtTheTimeOfSaving)return o[0].toDataURL(e);var i=c.sizeAtTheTimeOfSaving.bgLeft,n=c.sizeAtTheTimeOfSaving.bgTop,a=c.sizeAtTheTimeOfSaving.cvWidth,r=c.sizeAtTheTimeOfSaving.cvHeight,s=o[0].getBoundingClientRect().height,A=o[0].getBoundingClientRect().width;i<0&&(i=0),n<0&&(n=0),r>s&&(r=s),a>A&&(r=A);var l=document.createElement("canvas"),d=l.getContext("2d");return l.width=a,l.height=r,d.drawImage(o[0],i,n,a,r,0,0,a,r),l.toDataURL(e)},c.setValue=function(t){if(P(),t)if(void 0!==(t=n.convertListOfKeyValuesToObject(t)).Url){if(0===t.Url.length)return;c.filenameToLoad=t.Url,T(c.filenameToLoad)}else if(void 0!==t.url){if(0===t.url.length)return;c.filenameToLoad=t.url,T(c.filenameToLoad)}else".svg"===t.substring(t.length-4,t.length).toLowerCase()&&(c.filenameToLoad=t,T(c.filenameToLoad))},Array.minProp=function(t,i){return e.min(t,(function(t){return t[i]}))[i]},Array.maxProp=function(t,i){return e.max(t,(function(t){return t[i]}))[i]},c.updateRequiredIndicator=E;var U=[];function Q(t){c.canvas?(t.canvas.width=c.canvas.clientWidth,t.canvas.height=c.canvas.clientHeight):(t.canvas.width=t.canvas.width,t.canvas.height=t.canvas.height),c.context.applyTransformTo(t.context),t.draw()}function P(){e.forEach(U,(function(t){t.currentTimeoutId&&window.clearTimeout(t.currentTimeoutId),t.drawInterval?t.currentTimeoutId=window.setTimeout((function(){Q(t),S()}),t.drawInterval):Q(t)}))}function L(t){return e.find(U,(function(e){return e.name==t}))}function H(t){var e=L(t);e||"grid"!==t||(M(),Q(e=L(t))),c.context.save();var i=c.context.getTransformMatrix(),n=e.context.getTransformMatrix(),a=i.a/n.a,o=i.e-n.e*a,r=i.f-n.f*a;c.context.setTransform(a,0,0,a,o,r),c.context.drawImage(e.canvas,0,0),c.context.restore()}function O(t){var e=document.createElement("canvas");e.height=c.canvas.height,e.width=c.canvas.width;var i=e.getContext("2d");$(i),e.width=e.width;var n={name:t,canvas:e,context:i};return U.push(n),n}function M(){var t=O("grid");t.drawInterval=300,t.draw=function(){N(t)}}function N(t,e,i,n,a){var o="http://www.w3.org/2000/svg";c.gridLines=[];var r,s,A,l,d=!1,u=c.context.transformedPoint(0,0),h=c.context.transformedPoint(c.canvas.width,c.canvas.height);e&&i&&n&&a&&(u.x=e-20,u.y=i-20,h.x=n+20,h.y=a+20,d=!0);var p=1,g="#000000",f=1;if(1==c.useGraphPaper?(r=3,s=3,t&&(t.context.lineWidth=.5),p=.5):(r=10,s=10,t&&(t.context.lineWidth=1,t.context.strokeStyle=q("#E6E6E6")),p=1,g="#E6E6E6",f=1),0==c.useGraphPaper){for(A=u.x-u.x%(c.gridSize*r);A<h.x;A+=c.gridSize*r){if(d)(T=document.createElementNS(o,"line")).setAttribute("class","gridline"),T.setAttribute("stroke",g),T.setAttribute("stroke-width",p),T.setAttribute("stroke-opacity",f),T.setAttribute("x1",A),T.setAttribute("y1",u.y),T.setAttribute("x2",A),T.setAttribute("y2",h.y),c.gridLines.push(T);else t.context.beginPath(),t.context.moveTo(A,u.y),t.context.lineTo(A,h.y),t.context.closePath(),t.context.stroke()}for(A=u.y-u.y%(c.gridSize*s);A<h.y;A+=c.gridSize*s){if(d)(T=document.createElementNS(o,"line")).setAttribute("class","gridline"),T.setAttribute("stroke",g),T.setAttribute("stroke-width",p),T.setAttribute("stroke-opacity",f),T.setAttribute("x1",u.x),T.setAttribute("y1",A),T.setAttribute("x2",h.x),T.setAttribute("y2",A),c.gridLines.push(T);else t.context.beginPath(),t.context.moveTo(u.x,A),t.context.lineTo(h.x,A),t.context.closePath(),t.context.stroke()}}else{for(var m=1;m<=3;m++){switch(m){case 1:t&&(t.context.strokeStyle=q("#FFE1BDBB")),g="#FFE1BD",f=.74;break;case 2:t&&(t.context.strokeStyle=q("#FFC682BB")),g="#FFC682",f=.74;break;case 3:t&&(t.context.strokeStyle=q("#D67C11BB")),g="#D67C11",f=.74}var v={x:u.x-80,y:u.y-80},y={x:h.x+80,y:h.y+80};for(A=v.x-v.x%(c.gridSize*r);A<y.x;A+=c.gridSize*r){if(3==m&&A%(10*c.gridSize*r)==0||2==m&&A%(10*c.gridSize*r/2)==0||1==m)if(d)(T=document.createElementNS(o,"line")).setAttribute("class","gridline"),T.setAttribute("stroke",g),T.setAttribute("stroke-width",p),T.setAttribute("stroke-opacity",f),T.setAttribute("x1",A),T.setAttribute("y1",v.y),T.setAttribute("x2",A),T.setAttribute("y2",y.y),c.gridLines.push(T);else t.context.beginPath(),t.context.moveTo(A,v.y),t.context.lineTo(A,y.y),t.context.closePath(),t.context.stroke()}for(A=v.y-v.y%(c.gridSize*s);A<y.y;A+=c.gridSize*s){if(3==m&&A%(10*c.gridSize*s)==0||2==m&&A%(10*c.gridSize*s/2)==0||1==m)if(d)(T=document.createElementNS(o,"line")).setAttribute("class","gridline"),T.setAttribute("stroke",g),T.setAttribute("stroke-width",p),T.setAttribute("stroke-opacity",f),T.setAttribute("x1",v.x),T.setAttribute("y1",A),T.setAttribute("x2",y.x),T.setAttribute("y2",A),c.gridLines.push(T);else t.context.beginPath(),t.context.moveTo(v.x,A),t.context.lineTo(y.x,A),t.context.closePath(),t.context.stroke()}}if(c.useGraphPaperScale&&c.graphPaperScaleParameter){var w=parseInt(c.parameters.getValue(c.graphPaperScaleParameter));t&&(t.context.strokeStyle="#000000",t.context.lineWidth=1),g="#000000",f=1,p=1;var b=-10*c.gridSize*r;if(!isNaN(w)){var B=u.x-10,C=u.y-10,x=h.x+10,D=h.y+10;for(A=B-B%(c.gridSize*r);A<x;A+=c.gridSize*r)if((A+b)%(10*c.gridSize*r*w)==0)for(l=C-C%(c.gridSize*s);l<D;l+=c.gridSize*s){var T;if((l+b)%(10*c.gridSize*s*w)==0)if(d)(T=document.createElementNS(o,"line")).setAttribute("class","gridline"),T.setAttribute("stroke",g),T.setAttribute("stroke-width",p),T.setAttribute("stroke-opacity",f),T.setAttribute("x1",A-5),T.setAttribute("y1",l),T.setAttribute("x2",A+5),T.setAttribute("y2",l),c.gridLines.push(T),(T=document.createElementNS(o,"line")).setAttribute("class","gridline"),T.setAttribute("stroke",g),T.setAttribute("stroke-width",p),T.setAttribute("stroke-opacity",f),T.setAttribute("x1",A),T.setAttribute("y1",l-5),T.setAttribute("x2",A),T.setAttribute("y2",l+5),c.gridLines.push(T);else t.context.beginPath(),t.context.moveTo(A-5,l),t.context.lineTo(A+5,l),t.context.closePath(),t.context.stroke(),t.context.beginPath(),t.context.moveTo(A,l-5),t.context.lineTo(A,l+5),t.context.closePath(),t.context.stroke()}}}}}function R(t){if(t.length<3)return c.context.beginPath(),c.context.moveTo(t[0].x,t[0].y),c.context.lineTo(t[1].x,t[1].y),c.context.moveTo(t[1].x,t[1].y),c.context.closePath(),c.context.strokeStyle=q(t[0].color),c.context.lineWidth=t[0].size,void c.context.stroke();c.context.beginPath(),c.context.moveTo(t[0].x,t[0].y);for(var e=1;e<t.length-2;e++)c.context.quadraticCurveTo(t[e].x,t[e].y,(t[e].x+t[e+1].x)/2,(t[e].y+t[e+1].y)/2);c.context.quadraticCurveTo(t[e].x,t[e].y,t[e+1].x,t[e+1].y),c.context.strokeStyle=q(t[0].color),c.context.lineWidth=t[0].size,c.context.stroke()}function $(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=e.createSVGMatrix(),n=t.scale;t.scale=function(e,a){return i=i.scaleNonUniform(e,a),n.call(t,e,a)};var a=t.translate;t.translate=function(e,n){return i=i.translate(e,n),a.call(t,e,n)};var o=e.createSVGPoint();t.transformedPoint=function(t,e){return o.x=t,o.y=e,o.matrixTransform(i.inverse())},t.setXForm=function(t){i=t},t.resetTracking=function(){i=e.createSVGMatrix()},t.applyTransformTo=function(t){t.setTransform(i.a,i.b,i.c,i.d,i.e,i.f),t.setXForm&&t.setXForm(i)},t.getTransformMatrix=function(){return i}}function q(t){var e;if(void 0!==t)return"rgb"===t.substr(0,3)?t:(7==t.length&&(t+="ff"),"rgba("+((16711680&(e=parseInt(t.substring(1,7),16)))>>16)+", "+((65280&e)>>8)+", "+(255&e)+", "+(255&(e=parseInt(t.substring(7),16)))/255+")")}function V(t){return void 0===t?0:"rgba"===t.substr(0,4)?parseFloat(t.split(",")[3].replace(")","")):"rgb"===t.substr(0,3)||7===t.length?1:(255&parseInt(t.substring(7),16))/255}function z(t){if(void 0!==t)return"rgb"===t.substr(0,3)?(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):"":"#"+t.substring(1,7)}function K(t,e){if("#"===t.substr(0,1)&&(t=q(t)),null==e)return t;var i=t.split(",");return"rgba("+parseInt(i[0].replace("rgba(",""))+","+parseInt(i[1])+","+parseInt(i[2])+","+e+")"}function W(){return"ontouchstart"in window||!!window.navigator.msMaxTouchPoints}return c}})),define("drops/sketchPad/sketchPad",["jquery","lq/drop","lq/style","drops/sketchPad/canvasMorph","lq/util","lq/dynamicContentImage","lq/required"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{selectedResizeOption:"Stretch Image",defaultMarkerColor:"rgba(51, 51, 51, 0.6)",defaultPenColor:"rgba(51, 51, 51, 1)",showUndoRedo:!0,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},disableZooming:!1,enablePinchMove:!1,disableMovingBg:!1,exportType:"sketchpad",exportCrop:!1}};function A(n){e.call(this,t("<div/>"),s,n);var a=this;a.$toolbar=t("<table />"),a.$toolbar.css({width:"auto"}),a.$canvas=t("<canvas />"),a.$canvas.addClass("boxToBorderSize"),a.$canvas.css({width:a.data.size.x+"px",height:a.data.size.y-90+"px",zIndex:a.data.zIndex,position:"relative"}),a.$stylePickerContainer=t('<div id="stylePickerContainer" />').css({position:"absolute",top:"77px",left:"3px",zIndex:a.data.zIndex+1}),i.renderStyles(a,null,a.$canvas),a.$toolbar.appendTo(a.$element),a.$stylePickerContainer.appendTo(a.$element),a.$canvas.appendTo(a.$element)}return e.extend(A,e),A.typeName="SketchPad",A.prototype.onResizeOptions=[{key:"Stretch Image",value:"Stretch Image"},{key:"No-Resize",value:"No-Resize"},{key:"Keep Ratio, Show Complete Image",value:"Keep Ratio, Show Complete Image"},{key:"fillKeepRatio",value:"Fill, keep ratio"}],A.prototype.renderStyles=function(){i.renderStyles(this,null,this.$canvas),this.$canvas.css("padding-top","55px")},A.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.piping.required.apply(this),r.prototype.addRemoveRequiredIndicator(this)},A.prototype.postRender=function(){var t=this;setTimeout((function(){var e=t.data.selectedResizeOption,i=t.isEventEnabled("clearClicked"),a=t.isEventEnabled("onRelease"),o=t.isEventEnabled("onUndo"),r=t.isEventEnabled("onRedo");t.canvasMorph=new n(t.data,t.$canvas,t.$toolbar,t.$stylePickerContainer,t.piping.parameters,{selectedResizeOption:e,isClearEventEnabled:i,triggerClearEventFunction:function(){t.triggerEventIfEnabled("clearClicked")},isOnReleaseEnabled:a,triggerOnReleaseEventFunction:function(){t.triggerEventIfEnabled("onRelease")},isOnUndoEventEnabled:o,triggerOnUndoEventFunction:function(){t.triggerEventIfEnabled("onUndo")},isOnRedoEventEnabled:r,triggerOnRedoEventFunction:function(){t.triggerEventIfEnabled("onRedo")}},t.piping.$actionWrapper),t.canvasMorph.buildCanvas(),setTimeout((function(){t.adjustCanvasSize()}),101)}),0)},A.prototype.clearValue=function(){var t=this;setTimeout((function(){t.canvasMorph.setValue(),t.canvasMorph.updateRequiredIndicator()}),0)},A.prototype.setValue=function(t){var e=this;setTimeout((function(){e.canvasMorph.setValue(t.value),e.canvasMorph.updateRequiredIndicator()}),0)},A.prototype.getValue=function(){var t=this.canvasMorph.createSvg();return"data:image/svg+xml;base64,"+btoa(t)},A.prototype.getFile=function(){return"sketchpad"===this.data.exportType?this.getValue():this.canvasMorph.createImage(this.data.exportCrop,"image/png")},A.prototype.hasValue=function(){return 0!==this.canvasMorph.clicks.length},A.prototype.clearBackground=function(){this.canvasMorph.redraw(null,!0,!0),this.canvasMorph.hasBgImage=!1},A.prototype.updateImage=function(t,e){this.canvasMorph.redraw(t,!0),this.canvasMorph.hasBgImage=!0},A.prototype.getPathFromSrcString=function(t){return o.getPath({imageName:t,useThumbnail:!1,resizeOption:this.data.selectedResizeOption,size:this.data.size})},A.prototype.licquidMethod_setBackgroundImage=function(e){var i=a.convertListOfKeyValuesToObject(e.document);if(i)if("string"===t.type(i)){var n=this.getPathFromSrcString(i);this.updateImage(n,"")}else{var o=e.document.url||e.document.Url;if(o){var r=this.getPathFromSrcString(o);r?this.updateImage(r,e.document.filename||e.document.Filename):this.clearBackground()}}else this.clearBackground()},A.prototype.licquidMethod_clearDrawing=function(){this.canvasMorph.clearDrawing(),this.canvasMorph.setValue(),this.canvasMorph.redraw()},A.prototype.postWindowResize=function(){this.canvasMorph&&this.designData&&this.adjustCanvasSize()},A.prototype.adjustCanvasSize=function(){var t=parseFloat(this.$canvas.css("border-left-width")),e=parseFloat(this.$canvas.css("border-top-width")),i=parseFloat(this.$canvas.css("border-right-width")),n=parseFloat(this.$canvas.css("border-bottom-width")),a=this.$element.width()-(t||0)-(i||0),o=this.$element.height()-(e||0)-(n||0),r=this.$toolbar.height();a<1||o-r<1?(this.$toolbar.width(54),this.canvasMorph.resizerRedraw(1,1)):(this.$toolbar.width(a),this.canvasMorph.resizerRedraw(a,o-r))},A})),
/*! nouislider - 10.0.0 - 2017-05-28 14:52:48 */
function(t){"function"==typeof define&&define.amd?define("nouislider",[],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}((function(){"use strict";var t="10.0.0";function e(t){t.preventDefault()}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function n(t,e,i){i>0&&(r(t,e),setTimeout((function(){s(t,e)}),i))}function a(t){return Array.isArray(t)?t:[t]}function o(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function r(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function s(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function A(t){var e=void 0!==window.pageXOffset,i="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:i?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:i?t.documentElement.scrollTop:t.body.scrollTop}}function l(t,e){return 100/(e-t)}function d(t,e){return 100*e/(t[1]-t[0])}function c(t,e){for(var i=1;t>=e[i];)i+=1;return i}function u(t,e,i){if(i>=t.slice(-1)[0])return 100;var n,a,o,r,s=c(i,t);return n=t[s-1],a=t[s],o=e[s-1],r=e[s],o+function(t,e){return d(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}([n,a],i)/l(o,r)}function h(t,e,i,n){if(100===n)return n;var a,o,r=c(n,t);return i?n-(a=t[r-1])>((o=t[r])-a)/2?o:a:e[r-1]?t[r-1]+function(t,e){return Math.round(t/e)*e}(n-t[r-1],e[r-1]):n}function p(e,n,a){var o;if("number"==typeof n&&(n=[n]),"[object Array]"!==Object.prototype.toString.call(n))throw new Error("noUiSlider ("+t+"): 'range' contains invalid value.");if(!i(o="min"===e?0:"max"===e?100:parseFloat(e))||!i(n[0]))throw new Error("noUiSlider ("+t+"): 'range' value isn't numeric.");a.xPct.push(o),a.xVal.push(n[0]),o?a.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(a.xSteps[0]=n[1]),a.xHighestCompleteStep.push(0)}function g(t,e,i){if(!e)return!0;i.xSteps[t]=d([i.xVal[t],i.xVal[t+1]],e)/l(i.xPct[t],i.xPct[t+1]);var n=(i.xVal[t+1]-i.xVal[t])/i.xNumSteps[t],a=Math.ceil(Number(n.toFixed(3))-1),o=i.xVal[t]+i.xNumSteps[t]*a;i.xHighestCompleteStep[t]=o}function f(t,e,i){this.xPct=[],this.xVal=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var n,a=[];for(n in t)t.hasOwnProperty(n)&&a.push([t[n],n]);for(a.length&&"object"==typeof a[0][0]?a.sort((function(t,e){return t[0][0]-e[0][0]})):a.sort((function(t,e){return t[0]-e[0]})),n=0;n<a.length;n++)p(a[n][1],a[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)g(n,this.xNumSteps[n],this)}f.prototype.getMargin=function(e){var i=this.xNumSteps[0];if(i&&e/i%1!=0)throw new Error("noUiSlider ("+t+"): 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&d(this.xVal,e)},f.prototype.toStepping=function(t){return t=u(this.xVal,this.xPct,t)},f.prototype.fromStepping=function(t){return function(t,e,i){if(i>=100)return t.slice(-1)[0];var n,a=c(i,e);return function(t,e){return e*(t[1]-t[0])/100+t[0]}([t[a-1],t[a]],(i-(n=e[a-1]))*l(n,e[a]))}(this.xVal,this.xPct,t)},f.prototype.getStep=function(t){return t=h(this.xPct,this.xSteps,this.snap,t)},f.prototype.getNearbySteps=function(t){var e=c(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},f.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(o);return Math.max.apply(null,t)},f.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var m={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function v(e){if(function(t){return"object"==typeof t&&"function"==typeof t.to&&"function"==typeof t.from}(e))return!0;throw new Error("noUiSlider ("+t+"): 'format' requires 'to' and 'from' methods.")}function y(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'step' is not numeric.");e.singleStep=n}function w(e,i){if("object"!=typeof i||Array.isArray(i))throw new Error("noUiSlider ("+t+"): 'range' is not an object.");if(void 0===i.min||void 0===i.max)throw new Error("noUiSlider ("+t+"): Missing 'min' or 'max' in 'range'.");if(i.min===i.max)throw new Error("noUiSlider ("+t+"): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new f(i,e.snap,e.singleStep)}function b(e,i){if(i=a(i),!Array.isArray(i)||!i.length)throw new Error("noUiSlider ("+t+"): 'start' option is incorrect.");e.handles=i.length,e.start=i}function B(e,i){if(e.snap=i,"boolean"!=typeof i)throw new Error("noUiSlider ("+t+"): 'snap' option must be a boolean.")}function C(e,i){if(e.animate=i,"boolean"!=typeof i)throw new Error("noUiSlider ("+t+"): 'animate' option must be a boolean.")}function x(e,i){if(e.animationDuration=i,"number"!=typeof i)throw new Error("noUiSlider ("+t+"): 'animationDuration' option must be a number.")}function D(e,i){var n,a=[!1];if("lower"===i?i=[!0,!1]:"upper"===i&&(i=[!1,!0]),!0===i||!1===i){for(n=1;n<e.handles;n++)a.push(i);a.push(!1)}else{if(!Array.isArray(i)||!i.length||i.length!==e.handles+1)throw new Error("noUiSlider ("+t+"): 'connect' option doesn't match handle count.");a=i}e.connect=a}function T(e,i){switch(i){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider ("+t+"): 'orientation' option is invalid.")}}function I(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'margin' option must be numeric.");if(0!==n&&(e.margin=e.spectrum.getMargin(n),!e.margin))throw new Error("noUiSlider ("+t+"): 'margin' option is only supported on linear sliders.")}function E(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'limit' option must be numeric.");if(e.limit=e.spectrum.getMargin(n),!e.limit||e.handles<2)throw new Error("noUiSlider ("+t+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function S(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'padding' option must be numeric.");if(0!==n){if(e.padding=e.spectrum.getMargin(n),!e.padding)throw new Error("noUiSlider ("+t+"): 'padding' option is only supported on linear sliders.");if(e.padding<0)throw new Error("noUiSlider ("+t+"): 'padding' option must be a positive number.");if(e.padding>=50)throw new Error("noUiSlider ("+t+"): 'padding' option must be less than half the range.")}}function F(e,i){switch(i){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider ("+t+"): 'direction' option was not recognized.")}}function k(e,i){if("string"!=typeof i)throw new Error("noUiSlider ("+t+"): 'behaviour' must be a string containing options.");var n=i.indexOf("tap")>=0,a=i.indexOf("drag")>=0,o=i.indexOf("fixed")>=0,r=i.indexOf("snap")>=0,s=i.indexOf("hover")>=0;if(o){if(2!==e.handles)throw new Error("noUiSlider ("+t+"): 'fixed' behaviour must be used with 2 handles");I(e,e.start[1]-e.start[0])}e.events={tap:n||r,drag:a,fixed:o,snap:r,hover:s}}function _(e,i){if(!1!==i)if(!0===i){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(!0)}else{if(e.tooltips=a(i),e.tooltips.length!==e.handles)throw new Error("noUiSlider ("+t+"): must pass a formatter for all handles.");e.tooltips.forEach((function(e){if("boolean"!=typeof e&&("object"!=typeof e||"function"!=typeof e.to))throw new Error("noUiSlider ("+t+"): 'tooltips' must be passed a formatter or 'false'.")}))}}function U(t,e){t.ariaFormat=e,v(e)}function Q(t,e){t.format=e,v(e)}function P(e,i){if(void 0!==i&&"string"!=typeof i&&!1!==i)throw new Error("noUiSlider ("+t+"): 'cssPrefix' must be a string or `false`.");e.cssPrefix=i}function L(e,i){if(void 0!==i&&"object"!=typeof i)throw new Error("noUiSlider ("+t+"): 'cssClasses' must be an object.");if("string"==typeof e.cssPrefix)for(var n in e.cssClasses={},i)i.hasOwnProperty(n)&&(e.cssClasses[n]=e.cssPrefix+i[n]);else e.cssClasses=i}function H(e,i){if(!0!==i&&!1!==i)throw new Error("noUiSlider ("+t+"): 'useRequestAnimationFrame' option should be true (default) or false.");e.useRequestAnimationFrame=i}function O(e){var i={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:m,format:m},n={step:{r:!1,t:y},start:{r:!0,t:b},connect:{r:!0,t:D},direction:{r:!0,t:F},snap:{r:!1,t:B},animate:{r:!1,t:C},animationDuration:{r:!1,t:x},range:{r:!0,t:w},orientation:{r:!1,t:T},margin:{r:!1,t:I},limit:{r:!1,t:E},padding:{r:!1,t:S},behaviour:{r:!0,t:k},ariaFormat:{r:!1,t:U},format:{r:!1,t:Q},tooltips:{r:!1,t:_},cssPrefix:{r:!1,t:P},cssClasses:{r:!1,t:L},useRequestAnimationFrame:{r:!1,t:H}},a={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach((function(o){if(void 0===e[o]&&void 0===a[o]){if(n[o].r)throw new Error("noUiSlider ("+t+"): '"+o+"' is required.");return!0}n[o].t(i,void 0===e[o]?a[o]:e[o])})),i.pips=e.pips;var o=[["left","top"],["right","bottom"]];return i.style=o[i.dir][i.ort],i.styleOposite=o[i.dir?0:1][i.ort],i}function M(i,o,l){var d,c,u,h,p,g,f,m=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},v=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),y=i,w=[],b=[],B=!1,C=o.spectrum,x=[],D={},T=null,I=i.ownerDocument,E=I.documentElement,S=I.body;function F(t,e){var i=I.createElement("div");return e&&r(i,e),t.appendChild(i),i}function k(t,e){var i=F(t,o.cssClasses.origin),n=F(i,o.cssClasses.handle);return n.setAttribute("data-handle",e),n.setAttribute("tabindex","0"),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",o.ort?"vertical":"horizontal"),0===e?r(n,o.cssClasses.handleLower):e===o.handles-1&&r(n,o.cssClasses.handleUpper),i}function _(t,e){return!!e&&F(t,o.cssClasses.connect)}function U(t,e){return!!o.tooltips[e]&&F(t.firstChild,o.cssClasses.tooltip)}function Q(t,e,i){var n=I.createElement("div"),a=[o.cssClasses.valueNormal,o.cssClasses.valueLarge,o.cssClasses.valueSub],s=[o.cssClasses.markerNormal,o.cssClasses.markerLarge,o.cssClasses.markerSub],A=[o.cssClasses.valueHorizontal,o.cssClasses.valueVertical],l=[o.cssClasses.markerHorizontal,o.cssClasses.markerVertical];function d(t,e){var i=e===o.cssClasses.value,n=i?a:s;return e+" "+(i?A:l)[o.ort]+" "+n[t]}return r(n,o.cssClasses.pips),r(n,0===o.ort?o.cssClasses.pipsHorizontal:o.cssClasses.pipsVertical),Object.keys(t).forEach((function(a){!function(t,a){a[1]=a[1]&&e?e(a[0],a[1]):a[1];var r=F(n,!1);r.className=d(a[1],o.cssClasses.marker),r.style[o.style]=t+"%",a[1]&&((r=F(n,!1)).className=d(a[1],o.cssClasses.value),r.style[o.style]=t+"%",r.innerText=i.to(a[0]))}(a,t[a])})),n}function P(){var t;p&&((t=p).parentElement.removeChild(t),p=null)}function L(e){P();var i=e.mode,n=e.density||1,a=e.filter||!1,o=function(e,i,n){if("range"===e||"steps"===e)return C.xVal;if("count"===e){if(!i)throw new Error("noUiSlider ("+t+"): 'values' required for mode 'count'.");var a,o=100/(i-1),r=0;for(i=[];(a=r++*o)<=100;)i.push(a);e="positions"}return"positions"===e?i.map((function(t){return C.fromStepping(n?C.getStep(t):t)})):"values"===e?n?i.map((function(t){return C.fromStepping(C.getStep(C.toStepping(t)))})):i:void 0}(i,e.values||!1,e.stepped||!1),r=function(t,e,i){var n,a={},o=C.xVal[0],r=C.xVal[C.xVal.length-1],s=!1,A=!1,l=0;return n=i.slice().sort((function(t,e){return t-e})),(i=n.filter((function(t){return!this[t]&&(this[t]=!0)}),{}))[0]!==o&&(i.unshift(o),s=!0),i[i.length-1]!==r&&(i.push(r),A=!0),i.forEach((function(n,o){var r,d,c,u,h,p,g,f,m,v=n,y=i[o+1];if("steps"===e&&(r=C.xNumSteps[o]),r||(r=y-v),!1!==v&&void 0!==y)for(r=Math.max(r,1e-7),d=v;d<=y;d=(d+r).toFixed(7)/1){for(g=(h=(u=C.toStepping(d))-l)/t,m=h/(f=Math.round(g)),c=1;c<=f;c+=1)a[(l+c*m).toFixed(5)]=["x",0];p=i.indexOf(d)>-1?1:"steps"===e?2:0,!o&&s&&(p=0),d===y&&A||(a[u.toFixed(5)]=[d,p]),l=u}})),a}(n,i,o),s=e.format||{to:Math.round};return p=y.appendChild(Q(r,a,s))}function H(){var t=d.getBoundingClientRect(),e="offset"+["Width","Height"][o.ort];return 0===o.ort?t.width||d[e]:t.height||d[e]}function M(t,e,i,n){var a=function(e){return!y.hasAttribute("disabled")&&(a=y,r=o.cssClasses.tap,!(a.classList?a.classList.contains(r):new RegExp("\\b"+r+"\\b").test(a.className))&&(!!(e=function(t,e){var i,n,a=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),r=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(r=!0);if(a){if(t.touches.length>1)return!1;i=t.changedTouches[0].pageX,n=t.changedTouches[0].pageY}e=e||A(I),(o||r)&&(i=t.clientX+e.x,n=t.clientY+e.y);return t.pageOffset=e,t.points=[i,n],t.cursor=o||r,t}(e,n.pageOffset))&&(!(t===m.start&&void 0!==e.buttons&&e.buttons>1)&&((!n.hover||!e.buttons)&&(v||e.preventDefault(),e.calcPoint=e.points[o.ort],void i(e,n))))));var a,r},r=[];return t.split(" ").forEach((function(t){e.addEventListener(t,a,!!v&&{passive:!0}),r.push([t,a])})),r}function N(t){var e,i,n,a,r,s,l=100*(t-(e=d,i=o.ort,n=e.getBoundingClientRect(),a=e.ownerDocument,r=a.documentElement,s=A(a),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(s.x=0),i?n.top+s.y-r.clientTop:n.left+s.x-r.clientLeft))/H();return o.dir?100-l:l}function R(t,e,i,n){var a=i.slice(),o=[!t,t],r=[t,!t];n=n.slice(),t&&n.reverse(),n.length>1?n.forEach((function(t,i){var n=Y(a,t,a[t]+e,o[i],r[i],!1);!1===n?e=0:(e=n-a[t],a[t]=n)})):o=r=[!0];var s=!1;n.forEach((function(t,n){s=J(t,i[t]+e,o[n],r[n])||s})),s&&n.forEach((function(t){$("update",t),$("slide",t)}))}function $(t,e,i){Object.keys(D).forEach((function(n){var a=n.split(".")[0];t===a&&D[n].forEach((function(t){t.call(h,x.map(o.format.to),e,x.slice(),i||!1,w.slice())}))}))}function q(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&z(t,e)}function V(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return z(t,e);var i=(o.dir?-1:1)*(t.calcPoint-e.startCalcPoint);R(i>0,100*i/e.baseSize,e.locations,e.handleNumbers)}function z(t,i){B&&(s(B,o.cssClasses.active),B=!1),t.cursor&&(S.style.cursor="",S.removeEventListener("selectstart",e)),T.forEach((function(t){E.removeEventListener(t[0],t[1])})),s(y,o.cssClasses.drag),X(),i.handleNumbers.forEach((function(t){$("change",t),$("set",t),$("end",t)}))}function K(t,i){if(1===i.handleNumbers.length){var n=c[i.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;r(B=n.children[0],o.cssClasses.active)}t.stopPropagation();var a=M(m.move,E,V,{startCalcPoint:t.calcPoint,baseSize:H(),pageOffset:t.pageOffset,handleNumbers:i.handleNumbers,buttonsProperty:t.buttons,locations:w.slice()}),s=M(m.end,E,z,{handleNumbers:i.handleNumbers}),A=M("mouseout",E,q,{handleNumbers:i.handleNumbers});T=a.concat(s,A),t.cursor&&(S.style.cursor=getComputedStyle(t.target).cursor,c.length>1&&r(y,o.cssClasses.drag),S.addEventListener("selectstart",e,!1)),i.handleNumbers.forEach((function(t){$("start",t)}))}function W(t){t.stopPropagation();var e=N(t.calcPoint),i=function(t){var e=100,i=!1;return c.forEach((function(n,a){if(!n.hasAttribute("disabled")){var o=Math.abs(w[a]-t);o<e&&(i=a,e=o)}})),i}(e);if(!1===i)return!1;o.events.snap||n(y,o.cssClasses.tap,o.animationDuration),J(i,e,!0,!0),X(),$("slide",i,!0),$("update",i,!0),$("change",i,!0),$("set",i,!0),o.events.snap&&K(t,{handleNumbers:[i]})}function G(t){var e=N(t.calcPoint),i=C.getStep(e),n=C.fromStepping(i);Object.keys(D).forEach((function(t){"hover"===t.split(".")[0]&&D[t].forEach((function(t){t.call(h,n)}))}))}function Y(t,e,i,n,a,r){var s;return c.length>1&&(n&&e>0&&(i=Math.max(i,t[e-1]+o.margin)),a&&e<c.length-1&&(i=Math.min(i,t[e+1]-o.margin))),c.length>1&&o.limit&&(n&&e>0&&(i=Math.min(i,t[e-1]+o.limit)),a&&e<c.length-1&&(i=Math.max(i,t[e+1]-o.limit))),o.padding&&(0===e&&(i=Math.max(i,o.padding)),e===c.length-1&&(i=Math.min(i,100-o.padding))),i=C.getStep(i),s=i,!((i=Math.max(Math.min(s,100),0))===t[e]&&!r)&&i}function j(t){return t+"%"}function X(){b.forEach((function(t){var e=w[t]>50?-1:1,i=3+(c.length+e*t);c[t].childNodes[0].style.zIndex=i}))}function J(t,e,i,n){return!1!==(e=Y(w,t,e,i,n,!1))&&(function(t,e){w[t]=e,x[t]=C.fromStepping(e);var i=function(){c[t].style[o.style]=j(e),Z(t),Z(t+1)};window.requestAnimationFrame&&o.useRequestAnimationFrame?window.requestAnimationFrame(i):i()}(t,e),!0)}function Z(t){if(u[t]){var e=0,i=100;0!==t&&(e=w[t-1]),t!==u.length-1&&(i=w[t]),u[t].style[o.style]=j(e),u[t].style[o.styleOposite]=j(100-i)}}function tt(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=o.format.from(t))||isNaN(t)||J(e,C.toStepping(t),!1,!1))}function et(t,e){var i=a(t),r=void 0===w[0];e=void 0===e||!!e,i.forEach(tt),o.animate&&!r&&n(y,o.cssClasses.tap,o.animationDuration),b.forEach((function(t){J(t,w[t],!0,!1)})),X(),b.forEach((function(t){$("update",t),null!==i[t]&&e&&$("set",t)}))}function it(){var t=x.map(o.format.to);return 1===t.length?t[0]:t}function nt(t,e){D[t]=D[t]||[],D[t].push(e),"update"===t.split(".")[0]&&c.forEach((function(t,e){$("update",e)}))}if(y.noUiSlider)throw new Error("noUiSlider ("+t+"): Slider was already initialized.");return function(t){r(t,o.cssClasses.target),0===o.dir?r(t,o.cssClasses.ltr):r(t,o.cssClasses.rtl),0===o.ort?r(t,o.cssClasses.horizontal):r(t,o.cssClasses.vertical),d=F(t,o.cssClasses.base)}(y),function(t,e){c=[],(u=[]).push(_(e,t[0]));for(var i=0;i<o.handles;i++)c.push(k(e,i)),b[i]=i,u.push(_(e,t[i+1]))}(o.connect,d),h={destroy:function(){for(var t in o.cssClasses)o.cssClasses.hasOwnProperty(t)&&s(y,o.cssClasses[t]);for(;y.firstChild;)y.removeChild(y.firstChild);delete y.noUiSlider},steps:function(){return w.map((function(t,e){var i=C.getNearbySteps(t),n=x[e],a=i.thisStep.step,o=null;!1!==a&&n+a>i.stepAfter.startValue&&(a=i.stepAfter.startValue-n),o=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?a=null:0===t&&(o=null);var r=C.countStepDecimals();return null!==a&&!1!==a&&(a=Number(a.toFixed(r))),null!==o&&!1!==o&&(o=Number(o.toFixed(r))),[o,a]}))},on:nt,off:function(t){var e=t&&t.split(".")[0],i=e&&t.substring(e.length);Object.keys(D).forEach((function(t){var n=t.split(".")[0],a=t.substring(n.length);e&&e!==n||i&&i!==a||delete D[t]}))},get:it,set:et,reset:function(t){et(o.start,t)},__moveHandles:function(t,e,i){R(t,e,w,i)},options:l,updateOptions:function(t,e){var i=it(),n=["margin","limit","padding","range","animate","snap","step","format"];n.forEach((function(e){void 0!==t[e]&&(l[e]=t[e])}));var a=O(l);n.forEach((function(e){void 0!==t[e]&&(o[e]=a[e])})),C=a.spectrum,o.margin=a.margin,o.limit=a.limit,o.padding=a.padding,o.pips&&L(o.pips),w=[],et(t.start||i,e)},target:y,removePips:P,pips:L},(g=o.events).fixed||c.forEach((function(t,e){M(m.start,t.children[0],K,{handleNumbers:[e]})})),g.tap&&M(m.start,d,W,{}),g.hover&&M(m.move,d,G,{hover:!0}),g.drag&&u.forEach((function(t,e){if(!1!==t&&0!==e&&e!==u.length-1){var i=c[e-1],n=c[e],a=[t];r(t,o.cssClasses.draggable),g.fixed&&(a.push(i.children[0]),a.push(n.children[0])),a.forEach((function(t){M(m.start,t,K,{handles:[i,n],handleNumbers:[e-1,e]})}))}})),et(o.start),o.pips&&L(o.pips),o.tooltips&&(f=c.map(U),nt("update",(function(t,e,i){if(f[e]){var n=t[e];!0!==o.tooltips[e]&&(n=o.tooltips[e].to(i[e])),f[e].innerHTML=n}}))),nt("update",(function(t,e,i,n,a){b.forEach((function(t){var e=c[t],n=Y(w,t,0,!0,!0,!0),r=Y(w,t,100,!0,!0,!0),s=a[t],A=o.ariaFormat.to(i[t]);e.children[0].setAttribute("aria-valuemin",n.toFixed(1)),e.children[0].setAttribute("aria-valuemax",r.toFixed(1)),e.children[0].setAttribute("aria-valuenow",s.toFixed(1)),e.children[0].setAttribute("aria-valuetext",A)}))})),h}return{version:t,create:function(e,i){if(!e||!e.nodeName)throw new Error("noUiSlider ("+t+"): create requires a single element, got: "+e);var n=M(e,O(i),i);return e.noUiSlider=n,n}}})),define("drops/slider/slider",["jquery","nouislider","lq/drop","lq/style"],(function(t,e,i,n){"use strict";var a={data:{initialValue:5,minValue:0,maxValue:10,stepSize:1,orientation:"horizontal",handleSize:{width:15,height:15},barSize:8}};function o(e){i.call(this,t('<div class="slider-drop"/>'),a,e),this.$slider=t("<div/>").appendTo(this.$element),this.createSlider(),this.renderStyles()}return i.extend(o,i),o.typeName="Slider",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},o.prototype.createSlider=function(){e.create(this.$slider[0],{start:Number(this.data.initialValue).valueOf(),step:Number(this.data.stepSize).valueOf(),orientation:this.data.orientation,range:{min:Number(this.data.minValue).valueOf(),max:Number(this.data.maxValue).valueOf()}});var t=this,i=this.getEventDataFor("changed");i.enabled&&this.$slider[0].noUiSlider.on("change",(function(){var e=t.$slider[0].noUiSlider.get();t.triggerEvent(i.raisedEventName,e)}));var n=this.getEventDataFor("slide");n.enabled&&this.$slider[0].noUiSlider.on("slide",(function(){var e=t.$slider[0].noUiSlider.get();t.triggerEvent(n.raisedEventName,e)}))},o.prototype.renderStyles=function(){n.renderStyles(this);var t=this.$slider.find(".noUi-handle");n.renderStyles(this,null,t,this.data.styles,"sliderHandle"),n.renderStyles(this,null,this.$slider.find(".noUi-base"),this.data.styles,"sliderBar"),"horizontal"===this.data.orientation?(this.$slider.css({width:"100%",height:this.data.barSize}),t.css({width:this.data.handleSize.width,height:this.data.handleSize.height,top:(this.data.barSize-this.data.handleSize.height)/2,left:this.data.handleSize.width/2*-1})):(this.$slider.css({width:this.data.barSize,height:"100%"}),t.css({width:this.data.handleSize.width,height:this.data.handleSize.height,left:(this.data.barSize-this.data.handleSize.width)/2,top:this.data.handleSize.height/2*-1}))},o.prototype.getValue=function(){return Number(this.$slider[0].noUiSlider.get())},o.prototype.clearValue=function(){return this.$slider[0].noUiSlider.set(Number(this.data.initialValue).valueOf())},o.prototype.setValue=function(t){return this.$slider[0].noUiSlider.set(Number(t.value).valueOf())},o})),define("drops/stack/stack",["jquery","underscore","when","lq/drop","lq/style"],(function(t,e,i,n,a){"use strict";var o={data:{orientation:"vertical",childIdsByPosition:[],useDynamicWidth:!0,useDynamicHeight:!0,isDynamiclySizedContainer:!0}},r=n,s=function(e){n.call(this,t("<div/>"),o,e);this.$element.addClass("boxToBorderSize stacklayout has-states"),this.determineAutoLayout(),a.renderStyles(this)};return n.extend(s),s.typeName="Stack",s.prototype.determineAutoLayout=function(){"vertical"===this.data.orientation?(this.data.autoHeight=!0,this.data.autoWidth=!1):(this.data.autoHeight=!1,this.data.autoWidth=!0),"vertical"===this.data.orientation?this.$element.removeClass("horizontal").addClass("vertical"):this.$element.removeClass("vertical").addClass("horizontal")},s.prototype.applyPositionForChild=function(t){this.resetPositioningForChild(t),t.applyRelativePositioning&&t.applyRelativePositioning(),t.$wrapper.css(this.getPositionCss(t.data));var e={};this.shouldStretchHorizontally()||t.data.useDynamicWidth||t.data.autoWidth?e.width="auto":e.width=t.data.size.x+"px",t.data.useDynamicHeight||t.data.autoHeight?e.height="auto":e.height=t.data.size.y+"px",t.$element.css(e)},s.prototype.getChildElementForVisibility=function(t){return t.$wrapper},s.prototype.resetPositioningForChild=function(t){t.$element.css({left:"auto",right:"auto",top:"auto",bottom:"auto",position:"relative"})},s.prototype.shouldStretchHorizontally=function(){return"vertical"===this.data.orientation&&null!==this.data.right&&void 0!==this.data.right&&null!==this.data.left&&void 0!==this.data.left},s.prototype.getPositionCss=function(t){var e={zIndex:t.zIndex};return"vertical"===this.data.orientation?this.applyHorizontalAlignmentCss(e,t):this.applyVerticalAlignmentCss(e,t),e.paddingLeft=0,e.paddingRight=0,e.paddingTop=0,e.paddingBottom=0,t.margin&&(t.margin.left&&(e.paddingLeft=t.margin.left+"px"),t.margin.right&&(e.paddingRight=t.margin.right+"px"),t.margin.top&&(e.paddingTop=t.margin.top+"px"),t.margin.bottom&&(e.paddingBottom=t.margin.bottom+"px")),e},s.prototype.applyVerticalAlignmentCss=function(t,e){t.verticalAlign="top",e.stack_verticalAlignment&&("bottom"===e.stack_verticalAlignment?t.verticalAlign="bottom":"center"===e.stack_verticalAlignment&&(t.verticalAlign="middle"))},s.prototype.applyHorizontalAlignmentCss=function(t,e){t.marginLeft="initial",t.marginRight="initial",this.shouldStretchHorizontally()?t.width="100%":e.stack_horizontalAlignment&&("right"===e.stack_horizontalAlignment?t.marginLeft="auto":"center"===e.stack_horizontalAlignment&&(t.marginLeft="auto",t.marginRight="auto"))},s.prototype.preRender=function(){if(this.piping.visibility.apply(this),("ListItem"===this.parent.data.type||"ModalPopup"===this.parent.data.type&&this.parent.data.autoPosition)&&1===this.parent.childDrops.length){var t={position:"relative",inset:""};this.data.positioning="relative",this.data.position={x:0,y:0};var e={};this.data.useDynamicWidth&&(t.width="auto",e.width="auto"),this.data.useDynamicHeight&&(t.height="auto",e.height="auto"),this.$element.css(t),this.parent.$element.css(e)}else this.data.positioning="absolute",this.applyPosition()},s.prototype.render=function(t){return this.createAndRenderDrops(t)},s.prototype.postRender=function(){this.data.centered&&this.data.useDynamicWidth&&this.applyCentering()},s.prototype.applyCentering=function(){this.$element.css({width:"fit-content"})},s.prototype.addDrop=function(e){var i=t("<div/>").addClass("stack-child").css("pointer-events","none");return e.$wrapper=i,e.$element.css("pointer-events","auto"),r.prototype.addDrop.apply(this,arguments)},s.prototype.createRenderPromisesForChildren=function(t){var i=this,n=[],a=[];return e.each(this.data.childIdsByPosition,(function(i){var n=e.find(t,(function(t){return t.data.id===i}));n&&a.push(n)})),e.each(t,(function(t){e.find(a,(function(e){return e.data.id===t.data.id}))||a.push(t)})),e.each(a,(function(t){i.addDrop(t),n.push(i.createRenderPromiseForChild(t))})),n},s.prototype.createRenderPromiseForChild=function(t){var e=this;return i().then((function(){return t.isHidden&&(t.$wrapper.addClass("drop-hidden"),t.$element.removeClass("drop-hidden")),t.$wrapper.appendTo(e.$element),t.render(t.$wrapper)}))},s.prototype.getStates=function(){return[{key:"normal",value:"Normal"},{key:"hover",value:"Hover"}]},s})),define("drops/taskProgress/taskProgress",["jquery","lq/drop","lq/style","underscore"],(function(t,e,i,n){"use strict";var a=function(i){e.call(this,t("<div/>"),i);var n=this;n.$element.addClass("boxToBorderSize").addClass("taskprogress").addClass("taskprogress-"+(n.data.styleId?n.data.styleId.split("/")[1]:"default")),n.$canvas=t("<canvas />").attr("height",n.data.size.y+"px").attr("width",n.data.size.x+"px").appendTo(n.$element),n.ctx=n.$canvas.get(0).getContext("2d")};return e.extend(a,e),a.typeName="TaskProgress",a.prototype.preRender=function(){var t=this;this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t.update(e)})),this.applyPosition()},a.prototype.postRender=function(){this.buildLinks(),this.drawAllLinks(),this.borderPadding=parseInt(this.$element.css("border-width"),10),this.lineWidth=parseInt(this.$canvas.css("line-height"),10)},a.prototype.render=function(t){return this.createAndRenderDrops(t)},a.prototype.buildLinks=function(){var t=this;t.links=n.map(t.data.links,(function(e){return{drop1:n.find(t.pool,(function(t){return t.data.id===e.morph1})),drop2:n.find(t.pool,(function(t){return t.data.id===e.morph2}))}}))},a.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.$canvas.width(),this.$canvas.height())},a.prototype.drawAllLinks=function(){this.clearCanvas();for(var t=0;t<this.links.length;t++){var e=this.links[t];this.checkLinkCanBuild(e)?this.drawOneLink(e.drop1,e.drop2):this.links.splice(t,1)}},a.prototype.checkLinkCanBuild=function(e){return-1!=t.inArray(e.drop1,this.pool)&&-1!=t.inArray(e.drop2,this.pool)},a.prototype.drawOneLink=function(t,e){var i={x:t.data.position.x+this.borderPadding+t.data.size.x/2,y:t.data.position.y+this.borderPadding+t.data.size.y/2},n={x:e.data.position.x+this.borderPadding+e.data.size.x/2,y:e.data.position.y+this.borderPadding+e.data.size.y/2};this.ctx.beginPath(),e.completionPercentage<50?this.ctx.strokeStyle=e.$element.find(".incomplete").css("background-color"):this.ctx.strokeStyle=e.$element.css("background-color"),this.ctx.moveTo(i.x,i.y),this.ctx.lineTo(n.x,n.y),this.ctx.lineWidth=this.lineWidth,this.ctx.closePath(),this.ctx.stroke()},a.prototype.update=function(t){n.forEach(this.pool,(function(e){var i=t.results[0][e.data.dataSourceOutput];e.setCompletionPercentage(i)})),this.drawAllLinks()},a})),define("drops/text/text",["jquery","lq","lq/drop","lq/style","lq/util","lq/html","lq/tooltip","lq/onlongpress"],(function(t,e,i,n,a,o,r,s){"use strict";var A={data:{text:"New Text",useDynamicWidth:!0,useDynamicHeight:!0,openInline:!1,scrollbarOnOverflow:!1,title:{option:r.hardcoded},renderAsHtml:!1,role:"default"}};function l(e){i.call(this,t("<div/>"),A,e),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing),this.$element.addClass("text-drop"),this.data.scrollbarOnOverflow&&this.$element.css("overflow-y","auto"),n.renderStyles(this),(new s).applyLongPressOnElement(this.$element,this),!this.designData&&this.isEventEnabled("onLongPress")&&this.$element.addClass("clickable"),this.data.eventing&&this.data.eventing.clicked&&!0===this.data.eventing.clicked.enabled&&this.$element.addClass("clickable"),this.applyEventTrigger("mouseEnter","mouseenter"),this.applyEventTrigger("mouseLeave","mouseleave"),this.tooltip=new r(this,this.data.title,this.$element)}return i.extend(l,i),l.typeName="Text",l.prototype.preRender=function(){this.rerenderText()},l.prototype.rerenderText=function(){this.$text=this.createTextElement(),this.$element.empty(),this.$element.addClass("boxToBorderSize drop-text-container").append(t("<div />").css({display:"flex",whiteSpace:"pre-wrap",position:"relative",height:"100%",width:"100%"}).append(this.$text)),this.$text.addClass("drop-text-content").css({display:"flex",flexDirection:"column",flex:"1 1 100%"}),n.renderStyles(this)},l.prototype.createTextElement=function(){var i,n=this.data.text;if("title"===this.data.role?i=t("<h1/>").addClass("ignore-default-headings").css({height:"100%"}):"subtitle"===this.data.role?i=t("<h2/>").addClass("ignore-default-headings").css({height:"100%"}):"label"===this.data.role?(i=t("<label/>").css({height:"100%"}),this.designData||i.attr("for",this.rootDrop.instanceId+"_"+this.data.labelForDropId)):i=this.data.hyperlink&&!this.designData?t("<a/>").prop("href",a.convertRelativeHyperlinkToHostName(this.data.hyperlink)).prop("target",this.data.openInline?"_self":"_blank").css({height:"100%"}):t("<div/>").css({height:"100%"}),this.data.renderAsHtml){if(n){var r=new RegExp("{{{TenantUrl}}}","g");n=n.replace(r,e.getTenantUrl(""))}var s=t("<div />").html(o.sanitize(n)||"");return i.append(s).css("whiteSpace","normal")}return i.text(n)},l.prototype.postRender=function(){this.tooltip.update(),this.piping.visibility.apply(this),this.applyPosition(),this.data.applyBestFontFit&&n.bestFontSize(this.$element[0],this.$text)},l.prototype.postWindowResize=function(){this.data.applyBestFontFit&&n.bestFontSize(this.$element[0],this.$text)},l})),define("drops/textArea/textArea",["jquery","lq/drop","lq/style","lq/richText","lq/required"],(function(t,e,i,n,a){"use strict";var o={data:{required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}},r="maxLength"in document.createElement("textarea");function s(i){e.call(this,t("<div/>"),o,i),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"})}return e.extend(s),s.typeName="TextArea",s.prototype.preRender=function(){this.data.richText?this.createRichTextEditor():this.createSimpleTextEditor(),this.piping.visibility.apply(this),this.piping.required.apply(this),a.prototype.addRemoveRequiredIndicator(this),this.applyPosition()},s.prototype.focus=function(){var t=this.$textArea.val();this.$textArea.val(""),this.$textArea.trigger("focus"),this.$textArea.val(t)},s.prototype.getValue=function(){return this.richTextEditor?this.richTextEditor.toString():this.$textArea.val()},s.prototype.clearValue=function(){this.$textArea&&(this.$textArea.val(""),this.$textArea[0].setAttribute("value","")),this.updateRequiredIndicator()},s.prototype.isInRichTextMode=function(){return void 0!==this.richTextEditor&&null!==this.richTextEditor},s.prototype.switchToRichText=function(){this.richTextEditor||(this.$textArea.remove(),this.$textArea=null,this.createRichTextEditor())},s.prototype.switchToSimpleText=function(){this.richTextEditor&&(this.richTextEditor.close(),this.richTextEditor=null,this.createSimpleTextEditor())},s.prototype.setValue=function(t){this.data.richText||n.isRichTextString(t.value)?(this.switchToRichText(),this.richTextEditor.fromString(t.value)):(this.switchToSimpleText(),null!==t.value&&void 0!==t.value?(this.$textArea.val(t.value),this.$textArea[0].setAttribute("value",t.value)):(this.$textArea.val(""),this.$textArea[0].setAttribute("value",""))),this.updateRequiredIndicator()},s.prototype.createSimpleTextEditor=function(){this.$textArea=t("<textarea />").addClass("boxToBorderSize not-resizable").attr("id",this.rootDrop.instanceId+"_"+this.data.id).attr("tabindex",this.data.tabIndex).attr("placeholder",this.data.watermark).css({width:"100%",height:"100%",overflowX:"hidden"}).val(this.data.defaultValue||"").appendTo(this.$element),this.$textArea[0].setAttribute("value","");var e=this,n=function(){e.$textArea.val().length>e.data.maxLength&&e.$textArea.val(e.$textArea.val().substr(0,e.data.maxLength))};this.data.hasMaxLength&&(r?this.$textArea.attr("maxLength",this.data.maxLength):this.$textArea.on("keypress paste change compositionupdate",(function(){_.defer(n)}))),this.$textArea.on("keyup",(function(){e.updateRequiredIndicator(),t(this)[0].setAttribute("value",t(this).val())})),this.data.readOnly&&this.$textArea.prop("readonly",!0),this.applyEventTrigger("focusLost","blur",this.$textArea);var a=this.getEventDataFor("changed");a.enabled&&(this.subscribeEventHandler(this.$textArea,"keydown",(function(){_.has(e,"lastChangedEventValue")||(e.lastChangedEventValue=e.getValue())})),this.subscribeEventHandler(this.$textArea,"keypress input",_.debounce((function(){e.lastChangedEventValue!==e.getValue()&&(e.lastChangedEventValue=e.getValue(),e.triggerEvent(a.raisedEventName))}),300)));var o=this.getEventDataFor("enterPressed");o.enabled&&this.$textArea.on("keyup",(function(t){13===t.keyCode&&e.triggerEvent(o.raisedEventName)})),i.renderStyles(e,null,e.$textArea)},s.prototype.createRichTextEditor=function(){this.richTextEditor=new n.RichTextEditor({parentElement:this.$element,sections:this.data.sections,editable:!0!==this.data.readOnly,simpleRichTextEditor:this.data.simpleRichTextEditor,placeholder:this.data.richTextPlaceholder}),i.renderStyles(this,null,this.richTextEditor.$element);var t=this.getEventDataFor("focusLost"),e=this;t.enabled&&this.richTextEditor.withOnFocusLost((function(){e.triggerEvent(t.raisedEventName)}))},s.prototype.setPlaceholder=function(t){this.$textArea?.attr("placeholder",t)},s})),define("drops/timeInput/timeInput",["jquery","underscore","lq/drop","lq/style","lq/util","lq/dayTime","jquery.timepicker","lq/required","drops/modals"],(function(t,e,i,n,a,o,r,s,A){"use strict";c.NATURAL_NUMBER="naturalnumber",c.DATE_TIME="datetime";var l={data:{storageType:c.NATURAL_NUMBER,withDropDown:!1,step:30,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"},changedDelay:500}},d="--:--";function c(o){i.call(this,t("<div/>"),l,o),this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing)||{},this.data.eventing.focusLost=this.data.eventing.focusLost||this.data.eventing.focuslost,delete this.data.eventing.focuslost;var r=this;this.$input=t("<input />").attr("name",this.data.name).attr("tabindex",this.data.tabIndex).css({width:"100%",height:"100%"}).val(d).on("blur",(function(){r.displayValue(r.getValue())})).on("focus",(function(){r.$input.val()===d&&r.$input.val("")})).on("showTimepicker",(function(){t(this).data("timepicker-list").css("z-index",A.getZIndexForPopups())})).addClass("boxToBorderSize").appendTo(this.$element),this.data.eventing.focusLost&&!0===this.data.eventing.focusLost.enabled&&this.$input.on("blur",(function(){r.triggerEvent(r.data.eventing.focusLost.raisedEventName,r.getValue())})),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"}),n.renderStyles(this,null,this.$input),this.$input.on("keyup",(function(){r.updateRequiredIndicator()})),this.data.readOnly&&this.$input.prop("readonly",!0),this.getEventDataFor("changed").enabled&&(this.subscribeEventHandler(this.$input,"keydown",(function(){e.has(r,"lastChangedEventValue")||(r.lastChangedEventValue=r.getValue())})),this.subscribeEventHandler(this.$input,"keypress input",e.debounce((function(){r.triggerChangeEvent()}),this.data.changedDelay)))}return i.extend(c,i),c.typeName="TimeInput",c.prototype.triggerChangeEvent=function(){this.lastChangedEventValue!==this.getValue()&&(this.lastChangedEventValue=this.getValue(),this.triggerEventIfEnabled("changed"))},c.prototype.preRender=function(){this.$input.attr("id",this.rootDrop.instanceId+"_"+this.data.id),this.piping.visibility.apply(this),this.piping.required.apply(this),s.prototype.addRemoveRequiredIndicator(this),this.applyPosition()},c.prototype.postRender=function(){if(this.data.withDropDown){var t=this;this.$input.timepicker({timeFormat:"H:i",scrollDefault:"now",step:this.data.step}).on("changeTime",(function(){t.triggerEventIfEnabled("selected",t.getValue()),t.$input.timepicker("hide")})).on("change",(function(){var e=t.getValue();this.lastChangedEventValue!==e&&(t.triggerChangeEvent(),t.$input.timepicker("hide"))}))}},c.prototype.focus=function(){this.$input.trigger("focus")},c.prototype.getValue=function(){var t=this.$input.val();return this.data.storageType===c.NATURAL_NUMBER?o.toTicks(t):o.toDate(this.piping,t)},c.prototype.clearValue=function(){this.$input.val(null),this.updateRequiredIndicator(),this.lastChangedEventValue=""},c.prototype.setValue=function(t){this.displayValue(t.value),this.lastChangedEventValue=t.value},c.prototype.displayValue=function(t){var e;e=this.data.storageType===c.NATURAL_NUMBER?o.fromTicks(t):o.fromDate(this.piping,t),this.$input.val(e),this.updateRequiredIndicator()},c})),define("drops/timer/timer",["jquery","lq/drop"],(function(t,e){"use strict";var i={data:{intervalOption:"Hard Coded",autoStart:!0}};function n(n){e.call(this,t("<div/>"),i,n),this.timer=6e4}return e.extend(n),n.typeName="Timer",n.prototype.postRender=function(){this.data.autoStart&&this.piping.eventing.onPageLoad(this.startTimer.bind(this))},n.prototype.startTimer=function(t){var e=this,i=e.getEventDataFor("timerElapsed");i.enabled&&("Hard Coded"===e.data.intervalOption?(e.timer=1e3*e.data.interval,setTimeout((function(){e.triggerEvent(i.raisedEventName)}),e.timer)):this.piping.datasources.registerDatasourceListener(e.data.dataSourceForInterval,(function(t){e.timer=1e3*t.results[0][e.data.dataSourceOutputForInterval],setTimeout((function(){e.triggerEvent(i.raisedEventName)}),e.timer)}))),t()},n})),define("drops/treeView/singleSelection",["jquery","underscore"],(function(t,e){"use strict";var i=function(t){this.idOfSelectedNode=null,this.drop=t;var e=this;this.drop.$tree.bind("tree.select",(function(t){e.selectNode(t.node)}))};return i.prototype.onCreateLi=t.noop,i.prototype.getSelection=function(){return this.idOfSelectedNode},i.prototype.replaceWith=function(t){var e=this.drop.$tree.tree("getNodeById",t);this.drop.$tree.tree("selectNode",e),this.selectNode(e),this.drop.$tree.tree("addToSelection",e),this.drop.$tree.tree("scrollToNode",e)},i.prototype.selectNode=function(t){this.deselect(),t?(this.idOfSelectedNode=t.id,this.drop.showAsSelected(t),this.drop.$tree.tree("openNode",t),this.drop.triggerEventIfEnabled("selected",t.id)):this.idOfSelectedNode&&(this.drop.triggerEventIfEnabled("deselected",this.idOfSelectedNode),this.idOfSelectedNode=null),this.drop.updateRequiredIndicator()},i.prototype.reset=function(){this.deselect(),this.idOfSelectedNode=null},i.prototype.deselect=function(){if(this.idOfSelectedNode){var t=this.drop.$tree.tree("getNodeById",this.idOfSelectedNode);this.drop.showAsDeselected(t)}},i.prototype.reselect=function(){if(this.idOfSelectedNode){var t=this.drop.$tree.tree("getNodeById",this.idOfSelectedNode);t?(this.drop.$tree.tree("clear"),this.drop.$tree.tree("addToSelection",t),this.drop.showAsSelected(t)):this.idOfSelectedNode=null}},i})),define("drops/treeView/multiSelection",["jquery","underscore"],(function(t,e){"use strict";var i=function(t){this.idsOfSelectedNodes=[],this.drop=t};return i.prototype.onCreateLi=function(e,i){var n=t('<input type="checkbox" />').on("change",this.onCheckboxToggled.bind(this,e,i));e.children.length||n.addClass("leaf-node"),i.find(".jqtree-title").before(n)},i.prototype.onCheckboxToggled=function(i,n,a){t(a.srcElement).prop("checked")?(this.drop.$tree.tree("addToSelection",i),this.idsOfSelectedNodes.push(i.id),this.drop.showAsSelected(i),this.drop.triggerEventIfEnabled("selected",i.id)):(this.drop.$tree.tree("removeFromSelection",i),this.idsOfSelectedNodes=e.reject(this.idsOfSelectedNodes,(function(t){return t===i.id})),this.drop.showAsDeselected(i),this.drop.triggerEventIfEnabled("deselected",i.id)),this.drop.updateRequiredIndicator()},i.prototype.getSelection=function(){return this.idsOfSelectedNodes},i.prototype.replaceWith=function(e){this.deselectAll(),this.idsOfSelectedNodes=t.isArray(e)?e:[e],this.reselect()},i.prototype.reset=function(){this.deselectAll(),this.idsOfSelectedNodes=[]},i.prototype.deselectAll=function(){var i=this;e.each(this.idsOfSelectedNodes,(function(e){var n=i.drop.$tree.tree("getNodeById",e);t(n.element).find("> .jqtree-element input[type=checkbox]").prop("checked",!1),i.drop.$tree.tree("removeFromSelection",n),i.drop.showAsDeselected(n)}))},i.prototype.reselect=function(){var i=this,n=e.chain(this.idsOfSelectedNodes).map((function(t){return i.drop.$tree.tree("getNodeById",t)})).filter((function(t){return!!t})).value();e.each(n,(function(e){t(e.element).find("> .jqtree-element input[type=checkbox]").prop("checked",!0),i.drop.$tree.tree("addToSelection",e),i.drop.showAsSelected(e)})),this.idsOfSelectedNodes=e.pluck(n,"id")},i})),define("drops/treeView/treeView",["lq","jquery","lq/drop","lq/style","lq/util","underscore","./singleSelection","./multiSelection","jqTree/tree.jquery","lq/required"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d={data:{expandTreeOnLoad:!0,multiselect:!1,required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function c(t){i.call(this,e("<div/>"),d,t);this.data.eventing=a.convertListOfKeyValuesToObject(this.data.eventing)||{},this.$tree=e("<div/>");var n=e("<div/>");n.css({overflow:"auto",height:"100%",width:"100%"}),n.append(this.$tree),this.$element.append(n),this.initializeTree(),this.data.useCustomNodeImages&&this.$element.addClass("leaf-nodes-have-icons")}return i.extend(c,i),c.typeName="TreeView",c.prototype.initializeTree=function(){var i=this,a={data:[],autoOpen:this.data.expandTreeOnLoad,dragAndDrop:!1,onCreateLi:function(a,r){var s=r.find(".jqtree-element").first();n.renderStyles(i,null,s),i.renderCustomColors(s,a),i.data.useCustomNodeImages&&s.prepend(e('<a class="default-leaf-node"></a>').append(e("<img />").attr("src",t.getTenantUploads(i.data.defaultLeafNodeImage)).css({verticalAlign:"middle"}))).prepend(e('<a class="selected-leaf-node"></a>').append(e("<img />").attr("src",t.getTenantUploads(i.data.selectedLeafNodeImage)).css({verticalAlign:"middle"}))),i.selection.onCreateLi(a,s),s.append(o.map(i.data.nodeActions,(function(n,o){var r=e('<img class="tree-node-action" />').addClass(n.visibility+"-visibility").attr("src",t.getTenantUploads(n.image)).attr("title",n.tooltip).css({verticalAlign:"middle"});(n.resizeImage&&r.width(n.imageWidth+"px").height(n.imageHeight+"px"),i.data.nodeActionSpacing&&o!==i.data.nodeActions.length-1&&r.css("margin-right",i.data.nodeActionSpacing+"px"),n.enableDynamicVisibility&&null!=a.actionData&&a.actionData.length>0)&&(a.actionData[o].show||r.hide());return n.eventing.clicked.enabled&&r.on("click",(function(){return i.triggerEvent(n.eventing.clicked.raisedEventName,a.id,r),!1})),r})).reverse())}};this.isEventEnabled("deselected")||(a.onCanSelectNode=function(t){return t.id!==i.idOfSelectedNode}),this.data.useCustomNodeImages&&(a.closedIcon=e("<img />").attr("src",t.getTenantUploads(this.data.collapsedNodeImage)).css({verticalAlign:"middle"}),a.openedIcon=e("<img />").attr("src",t.getTenantUploads(this.data.expandedNodeImage)).css({verticalAlign:"middle"})),this.$tree.tree(a)},c.prototype.renderNormalStyleForNode=function(t,e){n.renderStyles(this,null,t),this.overrideStylingIfNeeded(t,e)},c.prototype.showAsDeselected=function(t){var i=e(t.element).find(".jqtree-element").first();i.removeClass("selected"),this.renderStyleIfEnabled("normal",i,t)},c.prototype.showAsSelected=function(t){var i=e(t.element).find(".jqtree-element").first();i.addClass("selected"),this.renderStyleIfEnabled("selected",i,t)},c.prototype.preRender=function(){var t=this;this.piping.visibility.apply(this),this.piping.required.apply(this),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t._update(e)}),(function(t){})),l.prototype.addRemoveRequiredIndicator(t),this.applyPosition(),this.selection=this.data.multiselect?new s(this):new r(this)},c.prototype.postRender=e.noop,c.prototype.renderStyleIfEnabled=function(t,e,i){var a=this.data.styles&&this.data.styles[t];a&&!0===a.enabled&&(n.renderStyle(a,this,e),this.renderCustomColors(e,i))},c.prototype.renderCustomColors=function(t,e){e.textColor&&t.css("color",e.textColor),e.backgroundColor&&t.css("background",e.backgroundColor)},c.prototype._update=function(t){var e=this.$tree.tree("getState"),i=this.data.idProperty,n=this.data.parentIdProperty,a=this.data.textProperty,r=[],s={},A=[],l=this;o.each(t.results,(function(t){var e={id:t[i],label:t[a],parentId:t[n],actionData:o.map(l.data.nodeActions,(function(e){return{show:t[e.dynamicVisibility]}})),children:[]};l.data.textColorProperty&&t[l.data.textColorProperty]&&(e.textColor=t[l.data.textColorProperty]),l.data.backgroundColorProperty&&t[l.data.backgroundColorProperty]&&(e.backgroundColor=t[l.data.backgroundColorProperty]),r.push(e),s[e.id]=e,null==e.parentId&&A.push(e)})),o.each(r,(function(t){null!=t.parentId&&s[t.parentId].children.push(t)})),this.$tree.tree("loadData",A),this.$tree.tree("setOption","autoOpen",!1),o.defer((function(){l.selection.reselect()})),this.$tree.tree("setState",e)},c.prototype.getValue=function(){return this.selection.getSelection()},c.prototype.clearValue=function(){this.value=null,this.$tree.tree("clear"),this.selection.reset()},c.prototype.setValue=function(t){this.selection.replaceWith(t.value)},c.prototype.supportsManyToManyData=function(){return this.data.multiselect},c})),define("drops/tweetDrop/tweetDrop",["jquery","lq/drop"],(function(t,e){"use strict";function i(i){e.call(this,t("<div/>"),i),this.$element.addClass("boxToBorderSize tweet-drop").css({whiteSpace:"pre-wrap"})}return e.extend(i,e),i.typeName="Twitter",i.prototype.preRender=function(){this.applyPosition()},i.prototype.postRender=function(){this.renderTwitter()},i.prototype.renderTwitter=function(){var e,i,n,a,o;this.$element.empty(),t("<a />").addClass("twitter-timeline").attr("href",this.data.username?"http://twitter.com/"+this.data.username:"#").attr("data-widget-id",this.data.widgetId).text("Tweets by @"+this.data.username).prependTo(this.$element),e=document,i="script",a=e.getElementsByTagName(i)[0],o=/^http:/.test(e.location)?"http":"https",(n=e.createElement(i)).id="twitter-wjs",n.src=o+"://platform.twitter.com/widgets.js",a.parentNode.insertBefore(n,a)},i})),define("drops/video/video",["jquery","lq/drop","lq/style","lq/videoPlayer"],(function(t,e,i,n){"use strict";var a={data:{value:"",loop:!1,controls:!0}};function o(o){return e.call(this,t("<div/>"),a,o),this.player=new n(this.$element),this.data.size.x<200&&(this.data.size.x=200),this.data.size.y<100&&(this.data.size.y=100),this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap",overflow:"hidden"}),i.renderStyles(this),this}return e.extend(o,e),o.typeName="Video",o.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},o.prototype.postRender=function(){this.isVisible()&&this.openVideoPlayer()},o.prototype.afterShown=function(){this.openVideoPlayer()},o.prototype.afterHidden=function(){this.player.close()},o.prototype.openVideoPlayer=function(){var t={url:this.data.value,autoPlay:this.data.autoPlay,poster:this.data.poster,loop:this.data.loop,controls:this.data.controls};this.isEventEnabled("videoEnded")&&(t.onEnded=this.triggerEventIfEnabled.bind(this,"videoEnded")),this.player.open(t)},o})),define("drops/documentPreviewer/documentPreviewer",["jquery","lq","lq/drop","lq/style","lq/util"],(function(t,e,i,n,a){"use strict";var o=function(t,e){return _.some(e,(function(e){return-1!==t.toLowerCase().indexOf(e,t.length-e.length)}))};function r(e){i.call(this,t("<div/>"),e),n.renderStyles(this)}return i.extend(r,i),r.typeName="DocumentPreviewer",r.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition()},r.prototype.setValue=function(e){var i,n=a.convertListOfKeyValuesToObject(e.value);if(n?i="string"===t.type(n)?n:e.value.url||e.value.Url:this.clearValue(),this.$element.empty(),this.isImage(i))this.$element.append(t('<img src="'+this.getFullDocumentUrl(i)+'" />').css({display:"block","max-width":"100%","max-height":"100%",width:"auto",height:"auto",margin:"0 auto"}));else{var o=this.getEmbeddedUrl(i);this.$element.append(t('<iframe src="'+o+'" width="100%" height="100%" frameborder="0" />'))}},r.prototype.clearValue=function(){this.$element.empty()},r.prototype.getEmbeddedUrl=function(t){var i=this.getFullDocumentUrl(t);return this.isOfficeFile(t)?"https://view.officeapps.live.com/op/embed.aspx?src="+encodeURIComponent(i):this.isPdfFile(t)?e.getCdnUrl("drops/DocumentPreviewer/view/viewer.html?file="+encodeURIComponent(i)+"&bust=v2023"):"https://docs.google.com/viewer?url="+encodeURIComponent(i)+"&embedded=true"},r.prototype.getFullDocumentUrl=function(t){return e.getFullUrl(e.getTenantUrl("DynamicContent/DownloadFile?url="+t+"&openInBrowser=true"))},r.prototype.isPdfFile=function(t){return o(t,[".pdf"])},r.prototype.isOfficeFile=function(t){return o(t,[".doc",".docx",".xls",".xlsx",".ppt",".pptx"])},r.prototype.isImage=function(t){return o(t,[".bmp",".jpg",".jpeg",".png",".gif"])},r})),define("drops/googlePlaces/googlePlaces",["jquery","when","lq","lq/drop","lq/style","lq/util","lq/frontendModules"],(function(t,e,i,n,a,o,r){"use strict";function s(e){n.call(this,t("<div/>"),e),this.data.eventing=o.convertListOfKeyValuesToObject(this.data.eventing),this.$input=t("<input type=text/>").addClass("boxToBorderSize").attr("name",this.data.name).attr("tabindex",this.data.tabIndex).attr("placeholder",this.data.watermark).val(this.data.defaultValue||"").css({width:"100%",height:"100%"}).appendTo(this.$element),a.renderStyles(this,null,this.$input)}return n.extend(s,n),s.typeName="GooglePlaces",s.prototype.preRender=function(){this.piping.visibility.apply(this),this.applyPosition(),this.formatter=this.piping.formatting.createFormatter(this.data.formatting);var t=e.defer();return this.loadModule(t),t.promise},s.prototype.loadModule=function(t){var e=this;r.load("googleMap",!0).then((function(n){n.loadGoogleMapsLibraries({libraryNames:["places"],url:i.getTenantUrl("GoogleMaps/FetchApiKey"),actionId:e.piping.actionId,dropId:e.data.id}).then((function(){t.resolve()}))}))},s.prototype.postRender=function(){var t=new google.maps.places.SearchBox(this.$input[0]),e=this,i=this.piping.dropFactory.findDropByName(this.data.targetDrop);i&&i.getMap().then((function(e){e&&e.addListener("bounds_changed",(function(){t.setBounds(e.getBounds())}))})),t.addListener("places_changed",(function(){var i=t.getPlaces();0!=i.length&&e.triggerEventIfEnabled("selected",i[0].formatted_address)}))},s.prototype.getValue=function(){return this.$input.val()},s.prototype.clearValue=function(){this.$input.val("")},s.prototype.setValue=function(t){var e=this.formatter.convertFromLicquidFormat(t.type,t.value);this.$input.val(e)},s})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("drops/dropDown_v2/dropkick",[],e):"object"==typeof exports?exports.dropkickjs=e():t.dropkickjs=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=A(i(1)),r=A(i(2)),s=A(i(3));function A(t){return t&&t.__esModule?t:{default:t}}var l=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),d=window.parent!==window.self,c=void 0,u=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sel=e;var n=void 0,a=void 0,r=window.Dropkick;for("string"==typeof this.sel&&"#"===this.sel[0]&&(this.sel=document.getElementById(e.substr(1))),n=0;n<r.uid;n++)if((a=r.cache[n])instanceof t&&a.data.select===this.sel)return o.default.extend(a.data.settings,i),a;if(!this.sel)throw"You must pass a select to DropKick";if(this.sel.length<1)throw"You must have options inside your <select>: "+e;if("SELECT"===this.sel.nodeName)return this.init(this.sel,i)}return a(t,[{key:"init",value:function(e,i){var n,a=window.Dropkick,s=t.build(e,"dk"+a.uid);this.data={},this.data.select=e,this.data.elem=s.elem,this.data.optList=s.optList,this.data.settings=o.default.extend({},r.default,i),this.funcs={},this.funcs.close=this.close;var A=this;if($(this.data.optList).on("click keydown keypress mouseover reset change",(function(t){A.handleEvent(t)})),this.disabled=e.disabled,this.form=e.form,this.length=e.length,this.multiple=e.multiple,this.options=s.options.slice(0),this.selectedIndex=e.selectedIndex,this.selectedOptions=s.selected.slice(0),this.value=e.value,this.data.cacheID=a.uid,a.cache[this.data.cacheID]=this,this.data.settings.initialize.call(this),a.uid+=1,this._changeListener||(e.addEventListener("change",this),this._changeListener=!0),!l||this.data.settings.mobile){if(e.parentNode.insertBefore(this.data.elem,e),e.setAttribute("data-dkCacheId",this.data.cacheID),this.data.elem.addEventListener("click",this),this.data.elem.addEventListener("keydown",this),this.data.elem.addEventListener("keypress",this),this.form&&this.form.addEventListener("reset",this),!this.multiple)for(n=0;n<this.options.length;n++)this.options[n].addEventListener("mouseover",this);c||(document.addEventListener("click",t.onDocClick),d&&parent.document.addEventListener("click",t.onDocClick),c=!0)}return this}},{key:"add",value:function(t,e){var i,n,a;"string"==typeof t&&(i=t,(t=document.createElement("option")).text=i),"OPTION"===t.nodeName&&(n=o.default.create("li",{class:"dk-option","data-value":t.value,text:t.text,innerHTML:t.innerHTML,role:"option","aria-selected":"false",id:"dk"+this.data.cacheID+"-"+(t.id||t.value.replace(" ","-"))}),o.default.addClass(n,t.className),this.length+=1,t.disabled&&(o.default.addClass(n,"dk-option-disabled"),n.setAttribute("aria-disabled","true")),t.hidden&&(o.default.addClass(n,"dk-option-hidden"),n.setAttribute("aria-hidden","true")),this.data.select.add(t,e),"number"==typeof e&&(e=this.item(e)),(a=this.options.indexOf(e))>-1?(e.parentNode.insertBefore(n,e),this.options.splice(a,0,n)):(this.data.optList.appendChild(n),this.options.push(n)),n.addEventListener("mouseover",this),t.selected&&this.select(a))}},{key:"item",value:function(t){return t=t<0?this.options.length+t:t,this.options[t]||null}},{key:"remove",value:function(t){var e=this.item(t);e.parentNode.removeChild(e),this.options.splice(t,1),this.data.select.remove(t),this.select(this.data.select.selectedIndex),this.length-=1}},{key:"close",value:function(){var t,e=this.data.elem,i=this.data.optList;if(!this.isOpen||this.multiple)return!1;for(t=0;t<this.options.length;t++)o.default.removeClass(this.options[t],"dk-option-highlight");i.setAttribute("aria-expanded","false"),o.default.removeClass(i,"dk-select-options-highlight"),o.default.removeClass(e,"dk-select-open-(up|down)"),this.isOpen=!1,$(e).append(i),this.data.settings.close.call(this)}},{key:"open",value:function(){var t,e,i,n,a=this.data.elem,r=this.data.optList,s=void 0!==window.pageXOffset,A="CSS1Compat"===(document.compatMode||""),l=s?window.pageYOffset:A?document.documentElement.scrollTop:document.body.scrollTop;if(i=o.default.offset(a).top-l,n=window.innerHeight-(i+a.offsetHeight),this.isOpen||this.multiple)return!1;r.style.display="block",t=r.offsetHeight,r.style.display="",e=i>t&&!(n>t)?"-up":"-down",this.isOpen=!0,o.default.addClass(a,"dk-select-open"+e),r.setAttribute("aria-expanded","true"),$(r).css({zIndex:7001,position:"absolute",width:parseInt($($(this.data.elem)[0].parentNode).css("width"))-2+"px",left:$($(this.data.elem)[0].parentNode).offset().left,top:$($(this.data.elem)[0].parentNode).offset().top+$($(this.data.elem)[0].parentNode).height()}),$("#theBody").append(r),this._scrollTo(this.options.length-1),this._scrollTo(this.selectedIndex),this.data.settings.open.call(this)}},{key:"disable",value:function(t,e){var i="dk-option-disabled";0!==arguments.length&&"boolean"!=typeof t||(e=void 0===t,t=this.data.elem,i="dk-select-disabled",this.disabled=e),void 0===e&&(e=!0),"number"==typeof t&&(t=this.item(t)),e?(t.setAttribute("aria-disabled",!0),o.default.addClass(t,i)):(t.setAttribute("aria-disabled",!1),o.default.removeClass(t,i))}},{key:"hide",value:function(t,e){var i="dk-option-hidden";void 0===e&&(e=!0),t=this.item(t),e?(t.setAttribute("aria-hidden",!0),o.default.addClass(t,i)):(t.setAttribute("aria-hidden",!1),o.default.removeClass(t,i))}},{key:"select",value:function(t,e){var i,n,a,r,A=this.data.select;if("number"==typeof t&&(t=this.item(t)),"string"==typeof t)for(i=0;i<this.length;i++)this.options[i].getAttribute("data-value")===t&&(t=this.options[i]);return!(!t||"string"==typeof t||!e&&o.default.hasClass(t,"dk-option-disabled"))&&(o.default.hasClass(t,"dk-option")?(n=this.options.indexOf(t),a=A.options[n],this.multiple?(o.default.toggleClass(t,"dk-option-selected"),a.selected=!a.selected,o.default.hasClass(t,"dk-option-selected")?(t.setAttribute("aria-selected","true"),this.selectedOptions.push(t)):(t.setAttribute("aria-selected","false"),n=this.selectedOptions.indexOf(t),this.selectedOptions.splice(n,1))):(r=this.data.elem.firstChild,this.selectedOptions.length&&(o.default.removeClass(this.selectedOptions[0],"dk-option-selected"),this.selectedOptions[0].setAttribute("aria-selected","false")),o.default.addClass(t,"dk-option-selected"),t.setAttribute("aria-selected","true"),r.setAttribute("aria-activedescendant",t.id),r.className="dk-selected "+a.className,r.innerHTML=a.innerHTML,this.selectedOptions[0]=t,a.selected=!0),this.selectedIndex=A.selectedIndex,this.value=A.value,e||this.data.select.dispatchEvent(new s.default("change",{bubbles:this.data.settings.bubble})),t):void 0)}},{key:"selectOne",value:function(t,e){return this.reset(!0),this._scrollTo(t),this.select(t,e)}},{key:"search",value:function(t,e){var i,n,a,o,r,s,A,l,d=this.data.select.options,c=[];if(!t)return this.options;for(e="fuzzy"===(e=e?e.toLowerCase():"strict")?2:"partial"===e?1:0,l=new RegExp((e?"":"^")+t,"i"),i=0;i<d.length;i++)if(a=d[i].text.toLowerCase(),2==e){for(n=t.toLowerCase().split(""),o=r=s=A=0;r<a.length;)a[r]===n[o]?(s+=1+s,o++):s=0,A+=s,r++;o===n.length&&c.push({e:this.options[i],s:A,i:i})}else l.test(a)&&c.push(this.options[i]);return 2===e&&(c=c.sort((function(t,e){return e.s-t.s||t.i-e.i})).reduce((function(t,e){return t[t.length]=e.e,t}),[])),c}},{key:"focus",value:function(){this.disabled||(this.multiple?this.data.elem:this.data.elem.children[0]).focus()}},{key:"reset",value:function(t){var e,i=this.data.select;for(this.selectedOptions.length=0,e=0;e<i.options.length;e++)i.options[e].selected=!1,o.default.removeClass(this.options[e],"dk-option-selected"),this.options[e].setAttribute("aria-selected","false"),!t&&i.options[e].defaultSelected&&this.select(e,!0);this.selectedOptions.length||this.multiple||this.select(0,!0)}},{key:"refresh",value:function(){Object.keys(this).length>0&&(!l||this.data.settings.mobile)&&this.dispose().init(this.data.select,this.data.settings)}},{key:"dispose",value:function(){var t=window.Dropkick;return Object.keys(this).length>0&&(!l||this.data.settings.mobile)&&(delete t.cache[this.data.cacheID],this.data.elem.parentNode.removeChild(this.data.elem),this.data.select.removeAttribute("data-dkCacheId")),this}},{key:"handleEvent",value:function(t){if(!this.disabled)switch(t.type){case"click":this._delegate(t);break;case"keydown":this._keyHandler(t);break;case"keypress":this._searchOptions(t);break;case"mouseover":this._highlight(t);break;case"reset":this.reset();break;case"change":this.data.settings.change.call(this)}}},{key:"_delegate",value:function(t){var e,i,n,a,r=t.target;if(o.default.hasClass(r,"dk-option-disabled"))return!1;if(this.multiple){if(o.default.hasClass(r,"dk-option"))if("Range"===(e=window.getSelection()).type&&e.collapseToStart(),t.shiftKey)if(n=this.options.indexOf(this.selectedOptions[0]),a=this.options.indexOf(this.selectedOptions[this.selectedOptions.length-1]),(i=this.options.indexOf(r))>n&&i<a&&(i=n),i>a&&a>n&&(a=n),this.reset(!0),a>i)for(;i<a+1;)this.select(i++);else for(;i>a-1;)this.select(i--);else t.ctrlKey||t.metaKey||this.reset(!0),this.select(r)}else this[this.isOpen?"close":"open"](),o.default.hasClass(r,"dk-option")&&this.select(r)}},{key:"_highlight",value:function(t){var e,i=t.target;if(!this.multiple){for(e=0;e<this.options.length;e++)o.default.removeClass(this.options[e],"dk-option-highlight");o.default.addClass(this.data.optList,"dk-select-options-highlight"),o.default.addClass(i,"dk-option-highlight")}}},{key:"_keyHandler",value:function(t){var e,i,n=this.selectedOptions,a=this.options,r=1,s=9,A=13,l=27,d=32,c=38,u=40;switch(t.keyCode){case c:r=-1;case u:if(t.preventDefault(),e=n[n.length-1],o.default.hasClass(this.data.optList,"dk-select-options-highlight"))for(o.default.removeClass(this.data.optList,"dk-select-options-highlight"),i=0;i<a.length;i++)o.default.hasClass(a[i],"dk-option-highlight")&&(o.default.removeClass(a[i],"dk-option-highlight"),e=a[i]);(r=a.indexOf(e)+r)>a.length-1?r=a.length-1:r<0&&(r=0),this.data.select.options[r].disabled||(this.reset(!0),this.select(r),this._scrollTo(r));break;case d:if(!this.isOpen){t.preventDefault(),this.open();break}case s:case A:for(r=0;r<a.length;r++)o.default.hasClass(a[r],"dk-option-highlight")&&this.select(r);case l:this.isOpen&&(t.preventDefault(),this.close())}}},{key:"_searchOptions",value:function(t){var e,i=this,n=String.fromCharCode(t.keyCode||t.which);void 0===this.data.searchString&&(this.data.searchString=""),i.data.searchTimeout&&clearTimeout(i.data.searchTimeout),i.data.searchTimeout=setTimeout((function(){i.data.searchString=""}),1e3),this.data.searchString+=n,(e=this.search(this.data.searchString,this.data.settings.search)).length&&(o.default.hasClass(e[0],"dk-option-disabled")||this.selectOne(e[0]))}},{key:"_scrollTo",value:function(t){var e,i,n=this.data.optList;if(-1===t||"number"!=typeof t&&!t||!this.isOpen&&!this.multiple)return!1;"number"==typeof t&&(t=this.item(t)),(i=(e=o.default.position(t,n).top)-n.scrollTop)+t.offsetHeight>n.offsetHeight?(e+=t.offsetHeight,n.scrollTop=e-n.offsetHeight):i<0&&(n.scrollTop=e)}}]),t}();window.Dropkick=u,window.Dropkick.cache={},window.Dropkick.uid=0,u.build=function(t,e){var i,n,a,r=[],s={elem:null,optList:null,options:[],selected:[]};for(s.elem=o.default.create("div",{class:"dk-select"+(t.multiple?"-multi":"")}),n=o.default.create("ul",{class:"dk-select-options",id:e+"-listbox",role:"listbox"}),t.disabled&&(o.default.addClass(s.elem,"dk-select-disabled"),s.elem.setAttribute("aria-disabled",!0)),s.elem.id=e+(t.id?"-"+t.id:""),o.default.addClass(s.elem,t.className),t.multiple?(s.elem.setAttribute("tabindex",t.getAttribute("tabindex")||"0"),n.setAttribute("aria-multiselectable","true")):(i=t.options[t.selectedIndex],s.elem.appendChild(o.default.create("div",{class:"dk-selected "+(i?i.className:""),tabindex:t.tabindex||0,innerHTML:i?i.text:"&nbsp;",id:e+"-combobox","aria-live":"assertive","aria-owns":n.id,role:"combobox"})),n.setAttribute("aria-expanded","false")),a=t.children.length;a--;r.unshift(t.children[a]));return r.forEach((function t(i){var n,a,r,A,l=[];switch(i.nodeName){case"OPTION":n=o.default.create("li",{class:"dk-option ","data-value":i.value,text:i.text,innerHTML:i.innerHTML,role:"option","aria-selected":"false",id:e+"-"+(i.id||i.value.replace(" ","-"))}),o.default.addClass(n,i.className),i.disabled&&(o.default.addClass(n,"dk-option-disabled"),n.setAttribute("aria-disabled","true")),i.hidden&&(o.default.addClass(n,"dk-option-hidden"),n.setAttribute("aria-hidden","true")),i.selected&&(o.default.addClass(n,"dk-option-selected"),n.setAttribute("aria-selected","true"),s.selected.push(n)),s.options.push(this.appendChild(n));break;case"OPTGROUP":for(a=o.default.create("li",{class:"dk-optgroup"}),i.label&&a.appendChild(o.default.create("div",{class:"dk-optgroup-label",innerHTML:i.label})),r=o.default.create("ul",{class:"dk-optgroup-options"}),A=i.children.length;A--;l.unshift(i.children[A]));i.disabled&&(a.classList.add("dk-optgroup-disabled"),l.forEach((function(t){t.disabled=i.disabled}))),l.forEach(t,r),this.appendChild(a).appendChild(r)}}),s.elem.appendChild(n)),s.optList=n,s},u.onDocClick=function(t){var e,i,n=window.Dropkick;if(1!==t.target.nodeType)return!1;for(i in null!==(e=t.target.getAttribute("data-dkcacheid"))&&n.cache[e].focus(),n.cache)o.default.closest(t.target,n.cache[i].data.elem)||i===e||n.cache[i].disabled||n.cache[i].close()},void 0!==window.jQuery&&(window.jQuery.fn.dropkick=function(){var t=Array.prototype.slice.call(arguments);return jQuery(this).each((function(){t[0]&&"object"!==n(t[0])?"string"==typeof t[0]&&u.prototype[t[0]].apply(new u(this),t.slice(1)):new u(this,t[0]||{})}))}),e.default=u},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});var n=-1!==navigator.appVersion.indexOf("MSIE"),a={hasClass:function(t,e){var i=new RegExp("(^|\\s+)"+e+"(\\s+|$)");return t&&i.test(t.className)},addClass:function(t,e){t&&!this.hasClass(t,e)&&(t.className+=" "+e)},removeClass:function(t,e){var i=new RegExp("(^|\\s+)"+e+"(\\s+|$)");t&&(t.className=t.className.replace(i," "))},toggleClass:function(t,e){this[(this.hasClass(t,e)?"remove":"add")+"Class"](t,e)},extend:function(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e)for(var i in e)t[i]=e[i]})),t},offset:function(t){var e=t.getBoundingClientRect()||{top:0,left:0},i=document.documentElement,a=n?i.scrollTop:window.pageYOffset,o=n?i.scrollLeft:window.pageXOffset;return{top:e.top+a-i.clientTop,left:e.left+o-i.clientLeft}},position:function(t,e){for(var i={top:0,left:0};t&&t!==e;)i.top+=t.offsetTop,i.left+=t.offsetLeft,t=t.parentNode;return i},closest:function(t,e){for(;t;){if(t===e)return t;t=t.parentNode}return!1},create:function(t,e){var i=void 0,n=document.createElement(t);for(i in e||(e={}),e)e.hasOwnProperty(i)&&("innerHTML"===i?n.innerHTML=e[i]:n.setAttribute(i,e[i]));return n},deferred:function(t){return function(){var e=this,i=arguments;window.setTimeout((function(){t.apply(e,i)}),1)}}};e.default=a},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});e.default={initialize:function(){},mobile:!0,change:function(){},open:function(){},close:function(){},search:"strict",bubble:!0}},function(t,e,i){(function(e){var i=e.CustomEvent;t.exports=function(){try{var t=new i("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?i:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var i=document.createEvent("CustomEvent");return e?i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):i.initCustomEvent(t,!1,!1,void 0),i}:function(t,e){var i=document.createEventObject();return i.type=t,e?(i.bubbles=Boolean(e.bubbles),i.cancelable=Boolean(e.cancelable),i.detail=e.detail):(i.bubbles=!1,i.cancelable=!1,i.detail=void 0),i}}).call(e,i(4))},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i}])})),define("drops/dropDown_v2/dropDown_v2",["jquery","lq/drop","lq/style","lq/util","underscore","lq/tooltip","lq/html","lq/required","drops/modals","./dropkick"],(function(t,e,i,n,a,o,r,s,A){"use strict";var l={data:{showEmptyItem:!0,hideEmptyItemInList:!1,title:{option:o.hardcoded},required:{initialVisibility:!0,isRequired:!1,valueSource:"hardcoded"}}};function d(i){e.call(this,t("<div/>"),l,i),this.data.eventing=n.convertListOfKeyValuesToObject(this.data.eventing),this.loaded=!1,this.value=null,this.valueIsNumber=!1,this.$element.addClass("boxToBorderSize").css({whiteSpace:"pre-wrap"});this.$dropDown=t("<select />").css({width:"100%",height:"100%"}).on("change",this.valueChanged.bind(this)).attr("tabindex",this.data.tabIndex).append(t("<option>")).appendTo(this.$element),this.data.readOnly&&this.$dropDown.prop("disabled",!0),this.subscribeEventHandler(this.$dropDown,"change",this.handleChange.bind(this)),this.tooltip=new o(this,this.data.title,this.$dropDown)}return e.extend(d,e),d.typeName="Dropdown_v2",d.prototype.handleChange=function(){if(this.$dropDown.val()){var t=this.$dropDown.val();this.triggerEventIfEnabled("selected",t),this.triggerEventIfEnabled("changed",t)}else this.triggerEventIfEnabled("deselected",null),this.triggerEventIfEnabled("changed",null);this.updateRequiredIndicator()},d.prototype.preRender=function(){var t=this;this.tooltip.update(),this.piping.visibility.apply(this),this.piping.required.apply(this),this.piping.datasources.registerDatasourceListener(this.data.dataSource,(function(e){t._update(e)}),(function(e){t.data.pageSize&&(e.pageSize=t.data.pageSize)})),s.prototype.addRemoveRequiredIndicator(t),this.applyPosition(),this.renderMockData()},d.prototype.postRender=function(){var e=this;this.dropKickObject=new Dropkick(this.$dropDown[0],{initialize:function(){i.renderStyles(e,null,t(this.data.optList))},mobile:!0,change:t.noop,open:function(){var i={};i.zIndex=A.getZIndexForPopups(),e.data.listMaxHeight&&(i.maxHeight=e.data.listMaxHeight+"px"),t(e.dropKickObject.data.optList).css(i),t(window).height()<parseInt(t(e.dropKickObject.data.optList).css("top"))+t(e.dropKickObject.data.optList).outerHeight()?(t(e.dropKickObject.data.optList).css({top:parseInt(t(e.dropKickObject.data.optList).css("top"))-e.$dropDown.outerHeight()-t(e.dropKickObject.data.optList).outerHeight()+"px"}),e.listPosition="Top"):e.listPosition="Bottom"},close:t.noop,search:"strict",bubble:!0}),this.$dkSelected=this.$element.find(".dk-selected").addClass("dropdown-stylable-placeholder"),this.data.hideEmptyItemInList&&this.data.showEmptyItem&&t(this.dropKickObject.data.optList).addClass("empty-item-hidden"),this.subscribeEventHandler(this.piping.$actionWrapper,"scroll",this.handleScroll.bind(this)),this.subscribeEventHandler(t(window),"resize",(function(){var i=t(e.dropKickObject.data.optList).css("top");t(window).height()<t(e.$dropDown[0].parentNode).offset().top+t(e.$dropDown[0].parentNode).height()+t(e.dropKickObject.data.optList).outerHeight()&&"Bottom"===e.listPosition?(e.listPosition="Top",i=parseInt(t(e.dropKickObject.data.optList).css("top"))-e.$dropDown.outerHeight()-t(e.dropKickObject.data.optList).outerHeight()+"px"):t(window).height()>t(e.$dropDown[0].parentNode).offset().top+t(e.$dropDown[0].parentNode).height()+t(e.dropKickObject.data.optList).outerHeight()&&"Top"===e.listPosition&&(e.listPosition="Bottom",i=t(e.$dropDown[0].parentNode).offset().top+t(e.$dropDown[0].parentNode).height()),t(e.dropKickObject.data.optList).css({zIndex:7001,position:"absolute",width:parseInt(t(e.$dropDown[0].parentNode).css("width"))-2+"px",left:t(e.$dropDown[0].parentNode).offset().left,top:i})})),i.renderStyles(this,null,this.$dkSelected),this.ensureRightPadding()},d.prototype.handleScroll=function(){this.dropKickObject.funcs.close.apply(this.dropKickObject)},d.prototype.valueChanged=function(){var t=this.$dropDown.val();this.value=""===t?null:t,i.renderStyles(this,null,this.$dkSelected),this.ensureRightPadding(),this.value?this.$dkSelected.removeClass("dropdown-stylable-placeholder"):this.$dkSelected.addClass("dropdown-stylable-placeholder")},d.prototype.createEmptyItem=function(){return t("<option />",{value:"",text:this.data.emptyItemText||"..."}).css({display:"none"})},d.prototype.renderMockData=function(){this.data.showEmptyItem&&this.$dropDown.append(this.createEmptyItem()),this.data.mockData&&(this.$dropDown.children(":first").remove(),this.$dropDown.append(a.map(this.data.mockData.split("\n"),(function(e){return t("<option />",{value:e,text:e})}))))},d.prototype._update=function(e){this.loaded=!0,this.$dropDown.find("option").remove().end(),this.data.showEmptyItem&&this.$dropDown.append(this.createEmptyItem());var n=this;t.each(e.results,(function(e,i){var a=i[n.data.selectedKeyColumn||"Id"];n.valueIsNumber="number"==typeof a,t("<option />",{value:a,text:r.strip(n.getDisplayStringFromResult(i))}).appendTo(n.$dropDown)})),this.dropKickObject.refresh(),this.$dkSelected=this.$element.find(".dk-selected"),this.data.hideEmptyItemInList&&this.data.showEmptyItem&&t(this.dropKickObject.data.optList).addClass("empty-item-hidden"),i.renderStyles(this,null,this.$dkSelected),this.ensureRightPadding(),this.value?this.setValue({value:this.value}):this.data.showEmptyItem?this.$dkSelected.addClass("dropdown-stylable-placeholder"):this.selectFirstItem()},d.prototype.getDisplayStringFromResult=function(t){return t[this.getNameOfDisplayedColumn(t)]},d.prototype.getNameOfDisplayedColumn=function(t){var e=Object.keys(t);return 1===e.length?e[0]:-1!==e.indexOf(this.data.selectedColumnToShow)?this.data.selectedColumnToShow:"ID"!==e[0].toUpperCase()?e[0]:e[1]},d.prototype.focus=function(){this.$dropDown.trigger("focus")},d.prototype.getValue=function(){return this.valueIsNumber&&null!==this.value?parseInt(this.value):void 0===this.value?null:this.value},d.prototype.clearValue=function(){this.data.showEmptyItem&&(this.value=null),this.selectFirstItem(),this.updateRequiredIndicator()},d.prototype.selectFirstItem=function(){this.dropKickObject.select(0),this.valueChanged()},d.prototype.setValue=function(t){this.loaded?null!==t.value&&void 0!==t.value?a.find(this.$dropDown.children(),(function(e){return e.value===t.value.toString()}))?(this.value=t.value,this.dropKickObject.select(t.value.toString()),this.updateRequiredIndicator()):(this.triggerEventIfEnabled("valueNotFound",t.value),this.isEventEnabled("valueNotFound")||alert("A value was mapped onto a drop down list, but the corresponding item was not found in the list. Saving this form will cause you to lose this information."),this.clearValue()):this.clearValue():this.value=t.value;this.updateRequiredIndicator()},d.prototype.ensureRightPadding=function(){this.$dkSelected.css("padding-right","max(23px, "+this.$dkSelected.css("padding-right")+")")},d})),define("drops/dynamicGridLayout/dynamicGridLayout",["jquery","lq/drop","lq/style"],(function(t,e,i){"use strict";var n={data:{rows:[{value:1,unit:"fr"}],columns:[{value:1,unit:"fr"}],spaceBetweenRows:{value:0,unit:"px"},spaceBetweenColumns:{value:0,unit:"px"},isDynamiclySizedContainer:!1,useDynamicWidth:!1,useDynamicHeight:!1}};function a(a){e.call(this,t("<div/>"),n,a),this.cellElements=[],this.initCellsVisibsWithVal(!1),this.initDropsInCells(),i.renderStyles(this),this.$element.addClass("has-states")}return e.extend(a,e),a.typeName="DynamicGridLayout",a.prototype.preRender=function(){if(this.piping.visibility.apply(this),("ListItem"===this.parent.data.type||"ModalPopup"===this.parent.data.type&&this.parent.data.autoPosition)&&1===this.parent.childDrops.length){var t={position:"relative"},e={};this.data.useDynamicWidth&&(t.width="auto",e.width="auto"),this.data.useDynamicHeight&&(t.height="auto",e.height="auto"),this.$element.css(t),this.parent.$element.css(e)}else this.applyPosition();this.createCells()},a.prototype.render=function(t){return this.createAndRenderDrops(t)},a.prototype.postRender=function(){this.setupDynamicCells(),this.setupCellsVisibilities(),this.data.centered&&this.applyCentering()},a.prototype.applyCentering=function(){this.$element.css({marginLeft:"auto",marginRight:"auto"}),this.data.useDynamicWidth&&this.$element.css({width:"fit-content"})},a.prototype.createCells=function(){var t=this;this.cellElements=[],_.each(t.data.rows,(function(e,i){var n=[];_.each(t.data.columns,(function(e,a){var o=t.easyCell(i,a);n.push(o)})),t.cellElements.push(n)}))},a.prototype.easyCell=function(e,i){var n=t("<div/>").addClass("dynamic-grid-cell").css({top:"",left:"",height:"px"===this.data.rows[e].unit?this.data.rows[e].value+"px":"",width:"px"===this.data.columns[i].unit?this.data.columns[i].value+"px":""}).appendTo(this.$element),a=void 0!==this.data.top&&null!==this.data.top&&void 0!==this.data.bottom&&null!==this.data.bottom,o=void 0!==this.data.left&&null!==this.data.left&&void 0!==this.data.right&&null!==this.data.right;return"auto"!==this.data.columns[i].unit&&"fr"!==this.data.columns[i].unit||"auto"!==this.data.rows[e].unit&&"fr"!==this.data.rows[e].unit||this.data.useDynamicHeight||this.data.useDynamicWidth||!a||!o?"auto"!==this.data.rows[e].unit&&"fr"!==this.data.rows[e].unit||this.data.useDynamicHeight||!a||"auto"===this.data.columns[i].unit&&"fr"===this.data.columns[i].unit&&!this.data.useDynamicWidth?"auto"!==this.data.columns[i].unit&&"fr"!==this.data.columns[i].unit||this.data.useDynamicWidth||!o||"auto"===this.data.rows[e].unit&&"fr"===this.data.rows[e].unit&&!this.data.useDynamicHeight||n.css({overflowY:"hidden",overflowX:"auto"}):n.css({overflowY:"auto",overflowX:"hidden"}):n.css({overflowY:"auto",overflowX:"auto"}),n},a.prototype.createRenderPromiseForChild=function(t){var e=this.getWrapperForDrop(t);return t.render(e)},a.prototype.getWrapperForDrop=function(e){var i=this.getCellElementForChild(e),n=i.cellElement,a=n.find(".grid-wrapper");0===a.length&&(a=t('<div class = "grid-wrapper"></div>').css({position:"relative",width:"100%",height:"100%"})).appendTo(n);var o=i.rowIndex,r=i.columnIndex;return this.dropsInCells[o][r].push(e),e.data.initialVisibility&&(this.cellsContentVisibilities[o][r]=!0),e.afterHidden=this.hideCellsIfNeeded.bind(this,o,r),e.afterShown=this.showCellsIfNeeded.bind(this,o,r),a},a.prototype.setupPosForDropInDynCell=function(e){var i=this.getCellElementForChild(e),n=i.cellElement.children(".grid-wrapper");!n.length>0||("auto"===this.data.columns[i.columnIndex].unit&&(null!==e.data.left&&e.data.left>=0&&null!==e.data.right&&e.data.right>=0?(t(n.parent()).css({paddingLeft:e.data.left+"px",paddingRight:e.data.right+"px"}),e.$element.css({width:"100%"})):null!==e.data.left&&e.data.left>=0?t(n.parent()).css({paddingLeft:e.data.left+"px"}):null!==e.data.right&&e.data.right>=0?t(n.parent()).css({paddingRight:e.data.right+"px"}):(e.data.useDynamicWidth||e.data.autoWidth)&&e.$element.css({width:"auto"}),null!==e.data.top&&e.data.top>=0&&null!==e.data.bottom&&e.data.bottom>=0?(n.css({boxSizing:"border-box",paddingTop:e.data.top+"px",paddingBottom:e.data.bottom+"px"}),e.$element.css({height:"100%"})):null!==e.data.top&&e.data.top>=0?n.css({boxSizing:"border-box",paddingTop:e.data.top+"px"}):null!==e.data.bottom&&e.data.bottom>=0&&n.css({boxSizing:"border-box",paddingBottom:e.data.bottom+"px"}),!(null!==e.data.left&&e.data.left>=0)&&null!==e.data.right&&e.data.right>=0&&t(n.parent()).css({marginLeft:"auto"}),!(null!==e.data.top&&e.data.top>=0)&&null!==e.data.bottom&&e.data.bottom>=0&&t(n.parent()).css({marginTop:"auto"}),e.data.centered&&t(n.parent()).css({marginTop:"auto",marginBottom:"auto"})),"auto"===this.data.rows[i.rowIndex].unit&&(null!==e.data.top&&e.data.top>=0&&null!==e.data.bottom&&e.data.bottom>=0?(t(n.parent()).css({paddingTop:e.data.top+"px",paddingBottom:e.data.bottom+"px"}),e.$element.css({height:"100%"})):null!==e.data.top&&e.data.top>=0?t(n.parent()).css({paddingTop:e.data.top+"px"}):null!==e.data.bottom&&e.data.bottom>=0?t(n.parent()).css({paddingBottom:e.data.bottom+"px"}):(e.data.useDynamicHeight||e.data.autoHeight)&&e.$element.css({height:"auto"}),null!==e.data.left&&e.data.left>=0&&null!==e.data.right&&e.data.right>=0?(n.css({boxSizing:"border-box",paddingLeft:e.data.left+"px",paddingRight:e.data.right+"px"}),e.$element.css({width:"100%"})):null!==e.data.left&&e.data.left>=0?n.css({boxSizing:"border-box",paddingLeft:e.data.left+"px"}):null!==e.data.right&&e.data.right>=0&&n.css({boxSizing:"border-box",paddingRight:e.data.right+"px"}),!(null!==e.data.top&&e.data.top>=0)&&null!==e.data.bottom&&e.data.bottom>=0&&t(n.parent()).css({marginTop:"auto"}),!(null!==e.data.left&&e.data.left>=0)&&null!==e.data.right&&e.data.right>=0&&t(n.parent()).css({marginLeft:"auto"}),e.data.centered&&t(n.parent()).css({marginLeft:"auto",marginRight:"auto"})))},a.prototype.applyPositionForChild=function(t){e.prototype.applyPositionForChild.call(this,t);var i=this.getCellElementForChild(t);if("auto"===this.data.columns[i.columnIndex].unit||"auto"===this.data.rows[i.rowIndex].unit){t.applyRelativePositioning&&t.applyRelativePositioning(),t.$element.css({position:"relative",inset:""});var n=t.data.margin;n&&(n.top?t.$element.css({marginTop:n.top+"px"}):t.$element.css({marginTop:""}),n.right?t.$element.css({marginRight:n.right+"px"}):t.$element.css({marginRight:""}),n.bottom?t.$element.css({marginBottom:n.bottom+"px"}):t.$element.css({marginBottom:""}),n.left?t.$element.css({marginLeft:n.left+"px"}):t.$element.css({marginLeft:""}))}this.setupPosForDropInDynCell(t)},a.prototype.getCellElementForChild=function(t){var e=Math.max(Math.min((t.data.gridlayout_row||1)-1,this.data.rows.length-1),0),i=Math.max(Math.min((t.data.gridlayout_column||1)-1,this.data.columns.length-1),0);if(e===this.cellElements.length){var n=[],a=this;_.each(a.data.columns,(function(t,i){var o=a.easyCell(e,i);n.push(o)})),this.cellElements.push(n)}return{cellElement:this.cellElements[e][i],rowIndex:e,columnIndex:i}},a.prototype.getPropertyEditor=function(t,e){for(var i in t.currentPropertyEditors)for(var n=0;n<t.currentPropertyEditors[i].length;n++){var a=t.currentPropertyEditors[i][n];if(a.constructor.propertyEditorName===e)return a;if("CombinedEditor"===a.constructor.propertyEditorName)for(var o=0;o<a.editors.length;o++){var r=a.editors[o];if(r.constructor.propertyEditorName===e)return r}}return null},a.prototype.setupDynamicCells=function(){(this.data.useDynamicHeight||this.data.useDynamicWidth)&&(this.data.isDynamiclySizedContainer=!0);var t=this.generateGridTemplate();this.$element.css({display:window.document.documentMode?"-ms-grid":"grid",gridTemplateColumns:t.gridTemplateColumns,gridTemplateRows:t.gridTemplateRows,rowGap:this.data.spaceBetweenRows.value+this.data.spaceBetweenRows.unit,columnGap:this.data.spaceBetweenColumns.value+this.data.spaceBetweenColumns.unit}),this.data.useDynamicHeight?this.$element.css({height:""}):""===this.$element.css("height")&&this.$element.css({height:this.data.size.x+"px"}),this.data.useDynamicWidth?this.$element.css({width:""}):""===this.$element.css("width")&&this.$element.css({width:this.data.size.y+"px"})},a.prototype.generateGridTemplate=function(){for(var t=function(t,e){return""===t?e:t+" "+e},e=this,i="",n="",a=0;a<this.cellsContentVisibilities.length;a++)if(this.hasTrue(this.cellsContentVisibilities[a]))switch(e.data.rows[a].unit){case"auto":i=t(i,"auto");break;case"fr":i=t(i,e.data.rows[a].value+"fr");break;case"px":i=t(i,e.data.rows[a].value+"px")}for(var o=0;o<this.data.columns.length;o++){var r=e.cellsContentVisibilities.map((function(t){return t[o]}));if(this.hasTrue(r))switch(e.data.columns[o].unit){case"auto":n=t(n,"auto");break;case"fr":n=t(n,e.data.columns[o].value+"fr");break;case"px":n=t(n,e.data.columns[o].value+"px")}}return{gridTemplateRows:i,gridTemplateColumns:n}},a.prototype.isAllFalse=function(t){return _.every(t,(function(t){return!t}))},a.prototype.hasTrue=function(t){return!this.isAllFalse(t)},a.prototype.hideCellsIfNeeded=function(t,e){if(_.all(this.dropsInCells[t][e],(function(t){return t.isHidden}))){this.cellsContentVisibilities[t][e]=!1;var i=this.cellsContentVisibilities.map((function(t){return t[e]}));if(this.isAllFalse(this.cellsContentVisibilities[t])){for(var n=0;n<this.cellsContentVisibilities[t].length;n++)this.cellElements[t][n].hide();this.$element.css("grid-template-rows",this.generateGridTemplate().gridTemplateRows)}if(this.isAllFalse(i)){for(n=0;n<i.length;n++)this.cellElements[n][e].hide();this.$element.css("grid-template-columns",this.generateGridTemplate().gridTemplateColumns)}}},a.prototype.showCellsIfNeeded=function(t,e){this.cellsContentVisibilities[t][e]=!0,this.setupCellsVisibilities()},a.prototype.setupCellsVisibilities=function(){for(var t=0;t<this.cellsContentVisibilities.length;t++)for(var e=0;e<this.cellsContentVisibilities[t].length;e++)if(this.cellsContentVisibilities[t][e])this.cellElements[t][e].show();else{var i=this.cellsContentVisibilities.map((function(t){return t[e]}));this.isAllFalse(this.cellsContentVisibilities[t])||this.isAllFalse(i)?this.cellElements[t][e].hide():this.cellElements[t][e].show()}var n=this.generateGridTemplate();this.$element.css("grid-template-rows",n.gridTemplateRows),this.$element.css("grid-template-columns",n.gridTemplateColumns)},a.prototype.initCellsVisibsWithVal=function(t){const e=this.data.rows.length,i=this.data.columns.length;this.cellsContentVisibilities=Array(e);for(var n=0;n<e;n++)this.cellsContentVisibilities[n]=Array(i).fill(t||!1)},a.prototype.initDropsInCells=function(){const t=this.data.rows.length,e=this.data.columns.length;this.dropsInCells=[];for(var i=0;i<t;i++){this.dropsInCells.push([]);for(var n=0;n<e;n++)this.dropsInCells[i].push([])}},a.prototype.reInitDropsInCells=function(){this.initDropsInCells()},a.prototype.getStates=function(){return[{key:"normal",value:"Normal"},{key:"hover",value:"Hover"}]},a})),define("lq/types",["globalize","underscore","lq/constants"],(function(t,e,i){var n=/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/;return{isDate:function(t){return null!=t&&(e.isDate(t)||t.constructor===String&&null!=t.match(n))},isString:function(t){return"string"==typeof t},isBoolean:function(t){return"boolean"==typeof t},parseBoolean:function(t){if("true"===(t=t.toLowerCase()))return!0;if("false"===t)return!1;throw new Error('The value "'+t+'" cannot be converted to a boolean.')},parseDate:function(n){return e.isDate(n)?n:t.parseDate(n,i.licquidDateFormat)}}})),define("drops/ganttChart/ganttChart",["jquery","globalize","lq/frontendModules","lq/drop","lq/style","lq/constants","lq/types"],(function(t,e,i,n,a,o,r){"use strict";var s={data:{dependenciesEnabled:!1,dependencyArrowRemoverEnabled:!0,holidaysEnabled:!1,scrollbarVisible:!0,defaultZoomLevel:0,headerHeight:80,strongYearFormat:"numeric",strongMonthFormat:"long",strongWeekDayFormat:"narrow",mediumMonthFormat:"long",lightMonthFormat:"short",barLabelPosition:"before",boxShadowColor:"#000000",toolbarIconHoverColor:"#2a84bf",headerFill:"#ffffff",headerRowWrapperLineColor:"#a6a6a6",headerRowLineColor:"#b8b8b8",headerRowCellLineColor:"#c7c7c7",headerHorizontalLineColor:"#c7c7c7",cellFill:"#ffffff",weekendFill:"#ebe9eb",holidayFill:"#a6d1ed",horizontalGridLinesColor:"#c7c7c7",dayLinesColor:"#c7c7c7",monthLinesColor:"#b8b8b8",yearLinesColor:"#a6a6a6"}};function A(e){n.call(this,t("<div/>"),s,e),a.renderStyles(this),this.bindings=void 0}return n.extend(A,n),A.typeName="GanttChart",A.prototype.preRender=function(){this.GanttChartComponent=null,this.applyPosition();var t=this;this.tasksDataSourceListenerId=this.piping.datasources.registerDatasourceListener(this.data.tasksDataSource,(function(e){t.taskData=e.results.map((function(e){return{id:e[t.data.taskId],name:e[t.data.taskName],start:e[t.data.taskStart].substring(0,10),end:e[t.data.taskEnd].substring(0,10),position:e[t.data.taskPosition],color:e[t.data.taskColor],textColor:e[t.data.textColor]}})),t.GanttChartComponent&&t.GanttChartComponent.setTasksL(t.taskData)})),this.data.dependenciesEnabled&&(this.dependenciesDataSourceListenerId=this.piping.datasources.registerDatasourceListener(this.data.dependenciesDataSource,(function(e){t.dependencyData=e.results.map((function(e){return{id:e[t.data.dependencyId],fromTaskId:e[t.data.dependencyFromTaskId],toTaskId:e[t.data.dependencyToTaskId]}})),t.GanttChartComponent&&t.GanttChartComponent.setDependenciesL(t.dependencyData)}))),this.data.holidaysEnabled&&(this.holidaysDataSourceListenerId=this.piping.datasources.registerDatasourceListener(this.data.holidaysDataSource,(function(e){t.holidaysData=e.results.map((function(e){return{id:e[t.data.holidayId],date:e[t.data.holidayDate].substring(0,10)}})),t.GanttChartComponent&&t.GanttChartComponent.setHolidaysL(t.holidaysData)}))),i.load("ganttChart",!0).then(this.showComponent.bind(this))},A.prototype.showComponent=function(t){var i=this;if(t.default({changeTask:function(t,n,a){i.piping.parameters.locals.setValue(i.data.taskIdParameter,t),i.piping.parameters.locals.setValue(i.data.taskStartParameter,e.format(new Date(n),o.licquidDateFormat)),i.piping.parameters.locals.setValue(i.data.taskEndParameter,e.format(new Date(a),o.licquidDateFormat)),i.triggerEventIfEnabled("taskChanged")},taskClicked:function(t,n,a){i.piping.parameters.locals.setValue(i.data.taskIdParameter,t),i.piping.parameters.locals.setValue(i.data.taskStartParameter,e.format(new Date(n),o.licquidDateFormat)),i.piping.parameters.locals.setValue(i.data.taskEndParameter,e.format(new Date(a),o.licquidDateFormat)),i.triggerEventIfEnabled("taskClicked")},taskHovered:function(t,n,a){i.piping.parameters.locals.setValue(i.data.taskIdParameter,t),i.piping.parameters.locals.setValue(i.data.taskStartParameter,e.format(new Date(n),o.licquidDateFormat)),i.piping.parameters.locals.setValue(i.data.taskEndParameter,e.format(new Date(a),o.licquidDateFormat)),i.triggerEventIfEnabled("taskHovered")},zoomLevelChanged:function(t){i.piping.parameters.locals.setValue(i.data.currentZoomLevelParameter,t),i.triggerEventIfEnabled("zoomLevelChanged",t)},focusedDateChanged:function(t){var n=e.format(new Date(t),o.licquidDateFormat);i.piping.parameters.locals.setValue(i.data.currentFocusedDateParameter,n),i.triggerEventIfEnabled("focusedDateChanged",n)},addDependency:function(t,e,n){i.piping.parameters.locals.setValue(i.data.dependencyIdParameter,t),i.piping.parameters.locals.setValue(i.data.dependencyFromTaskIdParameter,e),i.piping.parameters.locals.setValue(i.data.dependencyToTaskIdParameter,n),i.triggerEventIfEnabled("dependencyAdded")},deleteDependency:function(t){i.piping.parameters.locals.setValue(i.data.dependencyIdParameter,t),i.triggerEventIfEnabled("dependencyDeleted")},dependencyClicked:function(t,e,n){i.piping.parameters.locals.setValue(i.data.dependencyIdParameter,t),i.piping.parameters.locals.setValue(i.data.dependencyFromTaskIdParameter,e),i.piping.parameters.locals.setValue(i.data.dependencyToTaskIdParameter,n),i.triggerEventIfEnabled("dependencyClicked")}},this.$element.get(0)),this.taskData&&t.setTasksL(this.taskData),this.dependencyData&&t.setDependenciesL(this.dependencyData),this.holidaysData&&t.setHolidaysL(this.holidaysData),this.data.useFocusedDateParameter&&this.data.focusedDateParameterIsBound){var n=this.piping.parameters.subscribeForUpdates(this.data.focusedDateParameter,this.updateFocusedDateParameter.bind(this),!0);this.bindings||(this.bindings=[]),this.bindings.push(n)}if(this.data.useStartDateParameter&&this.data.viewStartParameterIsBound){n=this.piping.parameters.subscribeForUpdates(this.data.viewStart,this.updateViewStartParameter.bind(this),!0);this.bindings||(this.bindings=[]),this.bindings.push(n)}if(this.data.useEndDateParameter&&this.data.viewEndParameterIsBound){n=this.piping.parameters.subscribeForUpdates(this.data.viewEnd,this.updateViewEndParameter.bind(this),!0);this.bindings||(this.bindings=[]),this.bindings.push(n)}if(this.data.useReadOnlyParameter&&this.data.readOnlyParameterIsBound){n=this.piping.parameters.subscribeForUpdates(this.data.readOnlyParameter,this.updateReadOnlyParameter.bind(this),!0);this.bindings||(this.bindings=[]),this.bindings.push(n)}t.configureGanttChart({cellHeight:this.data.cellHeight,barHeight:this.data.barHeight,barLabelPosition:this.data.barLabelPosition,toolbarHeight:this.data.toolbarHeight,scrollbarVisible:this.data.scrollbarVisible,dependenciesEnabled:this.data.dependenciesEnabled,dependencyArrowRemoverEnabled:this.data.dependenciesEnabled&&this.data.dependencyArrowRemoverEnabled,focusedDate:this.data.useFocusedDateParameter?this.piping.parameters.getValue(this.data.focusedDateParameter):void 0,defaultZoomLevel:this.data.defaultZoomLevel,viewStart:this.data.useStartDateParameter?this.piping.parameters.getValue(this.data.startDateParameter):void 0,viewEnd:this.useEndDateParameter?this.piping.parameters.getValue(this.data.endDateParameter):void 0,readOnly:this.useReadOnlyParameter?this.piping.parameters.getValue(this.data.readOnlyParameter):void 0,boxShadowColor:this.data.boxShadowColor,toolbarIconHoverColor:this.data.toolbarIconHoverColor}),t.configureHeader({languageCode:this.piping.parameters.getValue("CurrentLanguageISOCode"),headerHeight:this.data.headerHeight,strongYearFormat:this.data.strongYearFormat,strongMonthFormat:this.data.strongMonthFormat,strongWeekDayFormat:this.data.strongWeekDayFormat,mediumMonthFormat:this.data.mediumMonthFormat,lightMonthFormat:this.data.lightMonthFormat,headerFill:this.data.headerFill,headerRowWrapperLineColor:this.data.headerRowWrapperLineColor,headerRowLineColor:this.data.headerRowLineColor,headerRowCellLineColor:this.data.headerRowCellLineColor,headerHorizontalLineColor:this.data.headerHorizontalLineColor}),t.configureCells({cellFill:this.data.cellFill,weekendFill:this.data.weekendFill,holidayFill:this.data.holidayFill,horizontalGridLinesColor:this.data.horizontalGridLinesColor,dayLinesColor:this.data.dayLinesColor,monthLinesColor:this.data.monthLinesColor,yearLinesColor:this.data.yearLinesColor}),this.GanttChartComponent=t},A.prototype.updateFocusedDateParameter=function(t){null!=t&&this.GanttChartComponent.updateFocusedDateParameter(r.parseDate(t))},A.prototype.updateViewStartParameter=function(t){null!=t&&this.GanttChartComponent.updateViewStartParameter(r.parseDate(t))},A.prototype.updateViewEndParameter=function(t){null!=t&&this.GanttChartComponent.updateViewEndParameter(r.parseDate(t))},A.prototype.updateReadOnlyParameter=function(t){null!=t&&this.GanttChartComponent.updateReadOnlyParameter(r.parseBoolean(t))},A.prototype.unsubscribeEventHandlers=function(){this.tasksDataSourceListenerId&&this.piping.datasources.unregisterDatasourceListener(this.tasksDataSourceListenerId),this.dependenciesDataSourceListenerId&&this.piping.datasources.unregisterDatasourceListener(this.dependenciesDataSourceListenerId),this.holidaysDataSourceListenerId&&this.piping.datasources.unregisterDatasourceListener(this.holidaysDataSourceListenerId),_.each(this.bindings,(function(t){t.dispose()})),this.bindings=void 0},A})),define("drops/normalDistribution/normalDistributionDefaults",[],(function(){return{data:{size:{x:400,y:300},chosenValueDataType:"unlabeled",methodType:"meanAndSTD",numericIsPopulation:!0,enableZoom:!0,showLegend:!0,showChosenLegend:!1,showLowestLegend:!0,showLowerLegend:!0,showAverageLegend:!0,showHigherLegend:!0,showHighestLegend:!0,legendPosition:"bottom",showTooltip:!0,maxTooltips:5,showChosenBars:!0,barWidth:5,valueRadius:5,chosenLabel:"Your Data",lowestLabel:"Very Low",lowerLabel:"Below Average",averageLabel:"Average",higherLabel:"Above Average",highestLabel:"Outstanding",chosenColor:"rgba(255,0,0,1)",lowestColor:"rgba(253,1,2,1)",lowerColor:"rgba(255,149,55,1)",averageColor:"rgba(252,255,60,1)",higherColor:"rgba(107,254,41,1)",highestColor:"rgba(52,49,255,1)",showXAxis:!0,axisXLabel:"",axisXLabelPosition:"outer-center",axisXPrecision:2,showYAxis:!1,axisYLabel:"",axisYLabelPosition:"outer-middle",axisYPrecision:2,axisXRemovePadding:!1,axisXLimit:!1,showGridX:!1,showGridY:!1,emptyText:"No data"}}})),define("drops/normalDistribution/normalDistribution",["jquery","when","lq","lq/drop","lq/cssutil","drops/normalDistribution/normalDistributionDefaults"],(function(t,e,i,n,a,o){"use strict";var r=null,s=null,A=function(e){n.call(this,t("<div/>"),o,e),this.$chart=t("<div>").appendTo(this.$element)};n.extend(A),A.typeName="NormalDistribution",A.prototype.preRender=function(){this.piping.visibility.apply(this);var t=e.defer();require(["d3","c3"],(function(e,i){a.requireCss("c3.min.css"),a.requireCss("drops/normalDistribution/normalDistribution.css"),r=e,s=i,t.resolve()})),this.applyPosition();var i=this;return this.piping.datasources.registerDatasourceListener(this.data.chosenValueDataSource,(function(t){i.chosenData=t,i.checkUpdate()})),"numericDataset"===i.data.methodType&&this.piping.datasources.registerDatasourceListener(this.data.numericDatasetDataSource,(function(t){i.numericData=t,i.checkUpdate()})),"meanAndSTD"===i.data.methodType&&this.piping.datasources.registerDatasourceListener(this.data.meanAndStdDataSource,(function(t){i.meanAndStdData=t,i.checkUpdate()})),t.promise},A.prototype.postRender=function(){this.generateEmptyChart()};var l=function(t){return t.reduce((function(t,e){return t+e}),0)/t.length},d=function(t,e,i){var n=1/(i*Math.sqrt(2*Math.PI)),a=-Math.pow(t-e,2)/(2*Math.pow(i,2));return 100*n*Math.exp(a)},c=function(t,e,i){var n=(e-t)/i;return Array.from({length:i+1},(function(e,i){return t+i*n}))},u=function(t,e,i,n,a){return c(t,e,a).map((function(t){return d(t,i,n)}))},h=function(t,e){t.sort((function(t,e){return t-e}));for(var i=[t[0]],n=1;n<t.length;n++)t[n]-i[i.length-1]>=e&&i.push(t[n]);return i};return A.prototype.generateTooltipPercentile=function(t,e,i){var n=this,a="",o=function(t,e,i){t=(t-e)/i;var n=1/(1+.2315419*Math.abs(t)),a=.3989423*Math.exp(-t*t/2)*n*(.3193815+n*(n*(1.781478+n*(1.330274*n-1.821256))-.3565638));return t>0&&(a=1-a),100*a}(t=t.toFixed(n.data.axisXPrecision),e,i);return o=o>50?"Top "+(100-o).toFixed(2)+"%":"Bottom "+o.toFixed(2)+"%",a+="<tr><td> "+(n.showXAxis&&n.data.axisXLabel||n.valueColumn||"Value")+" </td><td>"+t+"</td></tr>",a+='<tr><td colspan="2"><b>'+o+"</b></td></tr>"},A.prototype.update=function(){var t,e,i=this;if("numericDataset"===i.data.methodType){var n=[];if(i.numericData.totalResults){if((f=Object.keys(i.numericData.outputs)).length>1)return i.generateEmptyChart("Too many columns in numeric dataset.");var a=f[0];n=i.numericData.results.map((function(t){return t[a]})),t=l(n),e=function(t,e){var i,n=l(t),a=t.map((function(t){return Math.pow(t-n,2)}));return i=e?l(a)*(t.length/(t.length-1)):l(a),Math.sqrt(i)}(n,!i.data.numericIsPopulation)}if(!n.length)return i.generateEmptyChart()}else{var A=i.meanAndStdData.results[0];t=A[i.data.meanDataSourceColumn],e=A[i.data.stdDataSourceColumn]}var p=[];if("labeled"==i.data.chosenValueDataType){var g="";if(i.data.valuesDataLabelColumn||(g+="No label column selected.\n"),i.data.valuesDataValueColumn||(g+="No value column selected.\n"),g)return i.generateEmptyChart(g);i.labelColumn=i.data.valuesDataLabelColumn,i.valueColumn=i.data.valuesDataValueColumn,i.chosenValueNamePairs=i.chosenData.results.reduce((function(t,e){return t[e[i.labelColumn]]=e[i.valueColumn],t}),{}),p=Object.values(i.chosenValueNamePairs)}else if(i.chosenData=i.chosenData||{outputs:[],results:[],totalResults:0},i.chosenData.totalResults){var f;if((f=Object.keys(i.chosenData.outputs)).length>1)return i.generateEmptyChart("Too many columns in chosen dataset.");var m=Object.keys(i.chosenData.outputs)[0];p=i.chosenData.results.map((function(t){return t[m]}))}var v=d(t,t,e),y=t-3*e,w=t+3*e,b=c(y,t-2*e,Math.floor(5.833333333333333)),B=u(y,t-2*e,t,e,Math.floor(5.833333333333333)),C=c(t-2*e,t-e,Math.floor(5.833333333333333)),x=u(t-2*e,t-e,t,e,Math.floor(5.833333333333333)),D=c(t-e,t+e,Math.floor(11.666666666666666)),T=u(t-e,t+e,t,e,Math.floor(11.666666666666666)),I=c(t+e,t+2*e,Math.floor(5.833333333333333)),E=u(t+e,t+2*e,t,e,Math.floor(5.833333333333333)),S=c(t+2*e,w,Math.floor(5.833333333333333)),F=u(t+2*e,w,t,e,Math.floor(5.833333333333333)),k={bindto:i.$chart[0],size:{height:null!=this.data.top||null!=this.data.bottom?void 0:i.data.size.y},transition:{duration:0},data:{xs:{farBelowAverage:"xfba",belowAverage:"xba",average:"xa",aboveAverage:"xaa",farAboveAverage:"xfaa"},columns:[["xfba",...b],["farBelowAverage",...B],["xba",...C],["belowAverage",...x],["xa",...D],["average",...T],["xaa",...I],["aboveAverage",...E],["xfaa",...S],["farAboveAverage",...F]],types:{farBelowAverage:"area-spline",belowAverage:"area-spline",average:"area-spline",aboveAverage:"area-spline",farAboveAverage:"area-spline"},names:{farBelowAverage:i.data.customLabelNames&&i.data.lowestLabel||o.data.lowestLabel,belowAverage:i.data.customLabelNames&&i.data.lowerLabel||o.data.lowerLabel,average:i.data.customLabelNames&&i.data.averageLabel||o.data.averageLabel,aboveAverage:i.data.customLabelNames&&i.data.higherLabel||o.data.higherLabel,farAboveAverage:i.data.customLabelNames&&i.data.highestLabel||o.data.highestLabel},colors:{farBelowAverage:i.data.customColors&&i.data.lowestColor||o.data.lowestColor,belowAverage:i.data.customColors&&i.data.lowerColor||o.data.lowerColor,average:i.data.customColors&&i.data.averageColor||o.data.averageColor,aboveAverage:i.data.customColors&&i.data.higherColor||o.data.higherColor,farAboveAverage:i.data.customColors&&i.data.highestColor||o.data.highestColor}},grid:{x:{show:i.data.showGridX},y:{show:i.data.showGridY}},bar:{width:i.data.barWidth},tooltip:{show:i.data.showTooltip,contents:function(n){var a='<div class="c3-tooltip-container">';a+='<table class="c3-tooltip">',a+="<tbody>";var o=i.chart?i.chart.zoom():[-3*sigma,3*sigma],r=(o[1]-o[0])/80,s=0;if(i.chosenPoints)if("unlabeled"==i.data.chosenValueDataType){var A="";i.chosenPoints.toSorted().forEach((function(a){Math.abs(a-n[0].x)<r&&(s<i.data.maxTooltips&&(A+=i.generateTooltipPercentile(a,t,e)),s++)})),A&&(a+='<tr><th colspan="2">'+i.data.chosenLabel+"</th></tr>",s>1&&(a+="<tr><th> Count: </th><th>"+s+"</th></tr>"),a+=A)}else for(var l in i.chosenValueNamePairs){var d=i.chosenValueNamePairs[l];Math.abs(d-n[0].x)<r&&(s<i.data.maxTooltips&&(a+='<tr><th colspan="2"><b>'+l+"</b></th></tr>",a+=i.generateTooltipPercentile(d,t,e)),s++)}return s?s>i.data.maxTooltips&&(a+='<tr><td colspan="2"><b> . . . </b></td></tr>'):a+=i.generateTooltipPercentile(n[0].x,t,e),a+="</tbody>",a+="</table>",a+="</div>"}},axis:{x:{show:i.data.showXAxis,label:{text:i.data.axisXLabel,position:i.data.axisXLabelPosition},tick:{format:r.format("."+i.data.axisXPrecision+"f"),values:[...c(i.data.axisXLimit&&i.data.axisXLimitMin?i.data.axisXLimitMin:y,i.data.axisXLimit&&i.data.axisXLimitMax?i.data.axisXLimitMax:w,6).map((function(t){return t}))],multiline:!0},min:i.data.axisXLimit?i.data.axisXLimitMin:void 0,max:i.data.axisXLimit?i.data.axisXLimitMax:void 0},y:{show:i.data.showYAxis,label:{text:i.data.axisYLabel,position:i.data.axisYLabelPosition},tick:{format:r.format("."+i.data.axisYPrecision+"f"),values:[0,...c(y+e,t,2).map((function(i){return d(i,t,e)}))]}}},point:{r:i.data.valueRadius},legend:{show:!1,position:i.data.legendPosition},padding:{right:5+5*i.data.axisXPrecision},zoom:{enabled:i.data.enableZoom}};if(i.data.axisXRemovePadding&&(k.axis.x.padding={left:0,right:0}),p.length){i.chosenPoints=p;var _=i.chosenPoints.map((function(n){return d(n,t,e).toFixed(i.data.axisYPrecision)}));k.data.xs.chosenPoints="xChosen",k.data.columns.push(["xChosen",...i.chosenPoints]),k.data.columns.push(["chosenPoints",..._]),k.data.types.chosenPoints="scatter",i.data.showChosenBars&&(k.data.xs.chosenPointBars="xChosen",k.data.columns.push(["chosenPointBars",...Array(i.chosenPoints.length).fill(v)]),k.data.types.chosenPointBars="bar",k.data.colors.chosenPointBars=i.data.customColors&&i.data.chosenColor||i.data.chosenColor),k.data.names.chosenPoints=i.data.customLabelNames&&i.data.chosenLabel||o.data.chosenLabel,k.data.colors.chosenPoints=i.data.customColors&&i.data.chosenColor||i.data.chosenColor;var U=h(i.chosenPoints,e/3);k.axis.x.tick.values=k.axis.x.tick.values.filter((function(t){return!U.some((function(i){return Math.abs(i-t)<e/3}))})),Array.prototype.push.call(k.axis.x.tick.values,...U);var Q=h(_,v/18);k.axis.y.tick.values=k.axis.y.tick.values.filter((function(t){return!Q.some((function(e){return Math.abs(e-t)<v/18}))})),Array.prototype.push.call(k.axis.y.tick.values,..._),k.axis.y.tick.values=h(k.axis.y.tick.values,v/18)}if(i.chart&&i.chart.destroy(),i.chart=s.generate(k),i.data.showLegend){var P=[];i.data.showChosenLegend&&i.chosenPoints&&P.push("chosenPoints"),i.data.showLowestLegend&&P.push("farBelowAverage"),i.data.showLowerLegend&&P.push("belowAverage"),i.data.showAverageLegend&&P.push("average"),i.data.showHigherLegend&&P.push("aboveAverage"),i.data.showHighestLegend&&P.push("farAboveAverage"),i.chart.legend.show(P)}},A.prototype.generateEmptyChart=function(t){this.chart&&this.chart.destroy(),this.chart=s.generate({bindto:this.$chart[0],data:{columns:[],type:"line",empty:{label:{text:t||this.data.emptyText}}}})},A.prototype.checkUpdate=function(){this.chosenData&&("numericDataset"===this.data.methodType&&this.numericData||"meanAndSTD"===this.data.methodType&&this.meanAndStdData)&&this.update()},A})),define("drops/contentRegion/contentRegion",["jquery","underscore","lq/style","drops/action/action","lq/layouting","lq/responsive","lq/validatorGateway","lq/drop","when","lq/highlighter"],(function(t,e,i,n,a,o,r,s,A,l){"use strict";var d={data:{sharedParameters:[]}},c=function(e){s.call(this,t("<div/>"),d,e),i.renderStyles(this),this.$wrapper=t('<div class="licquid-action-wrapper" />').css({width:"100%",height:"100%"}).appendTo(this.$element),this.$view=t('<div class="licquid-action-view" />').appendTo(this.$wrapper),this.onEventReceived=this.receiveEvent.bind(this),this.bindingsOfThisAction=void 0,this.bindingsOfChildAction=void 0};return s.extend(c,s),c.typeName="ContentRegion",c.prototype.preRender=function(){if(this.piping.visibility.apply(this),this.applyPosition(),!r.isEnabled()){var t=this;this.gatewayCallback=function(){t.action&&t.informValidator(t.action,!1)},r.whenEnabled(this.gatewayCallback)}},c.prototype.copyParameterToChild=function(t,e,i){this.action&&this.copyParameterToPiping(this.action.piping,t,e,i)},c.prototype.copyParameterFromChild=function(t,e,i){this.copyParameterToPiping(this.piping,t,e,i)},c.prototype.copyParameterToPiping=function(t,e,i,n){this.updating||(this.updating=!0,"local"===n&&t.parameters.locals.setValue(e,i),"global"===n&&t.parameters.globals.setValue(e,i),this.updating=!1)},c.prototype.setContent=function(i,s,A){if(!this.bindingsOfThisAction){var l=this;this.bindingsOfThisAction=e.map(this.data.sharedParameters,(function(t){return l.piping.parameters.subscribeForUpdates(t,l.copyParameterToChild.bind(l,t))}))}if(A&&A!==this.rootDrop.data.id)this.action.setContent(i,s,A);else{l=this;var d=i[0].action;this.triggerEventIfEnabled("contentLoading",d.id);var c=i[0].systemParameters,u=i.length>1?{}:s,h=new n(d.view,this.piping.application.options);h.loadData(d),h.piping=this.piping.createChildPiping(d,h,u,c,this.$wrapper,this.$view,!1),h.piping.eventing.addIntercept(this.onEventReceived),h.globals=e.clone(this.piping.parameters.globals.getAll()),h.locals=e.clone(s);var p=o.getCurrentLayout(h);if(a.applyLayout(this.$view,p),h.applyLayout(p),h.createAndRenderDrops(t()).done((function(){l.triggerEventIfEnabled("contentLoaded",d.id)})),r.isEnabled()){var g=1===i.length;this.informValidator(h,g)}i.length>1&&h.setContent(i.slice(1),s),e.each(this.data.sharedParameters,(function(t){h.piping.parameters.locals.parameterExists(t)&&l.piping.parameters.locals.setValue(t,h.piping.parameters.locals.getValue(t)),h.piping.parameters.globals.parameterExists(t)&&l.piping.parameters.globals.setValue(t,h.piping.parameters.globals.getValue(t))}));var f=e.map(this.data.sharedParameters,(function(t){return h.piping.parameters.subscribeForUpdates(t,l.copyParameterFromChild.bind(l,t))}));"relative"===this.$element.css("position")&&(h.data.makeItGrow?this.$element.css("height","auto"):isNaN(h.data.top)||isNaN(h.data.height)?this.$element.css("height",h.data.size.y+"px"):this.$element.css("height","20px")),this.cleanupCurrentAction(),this.action=h,this.bindingsOfChildAction=f,this.piping.busyIndicator.forceHide()}},c.prototype.receiveMessage=function(t){switch(t.type){case"RELOAD_ACTION_INSTANCE":this.piping.runtime.actionLoader.load(this.action.data.id,this.action.globals,this.action.locals,{ignoreHistory:!0},[]);break;case"HIGHLIGHT_ACTION_INSTANCE":l.highlight(this.$wrapper)}},c.prototype.informValidator=function(t,e){r.registerListener(t.instanceId,this.receiveMessage.bind(this)),r.publishEvent({type:"ACTION_INSTANCE_LOADED",action:t,parentInstanceId:this.rootDrop.instanceId,canReload:e})},c.prototype.cleanupCurrentAction=function(){this.action&&(r.isEnabled()&&r.publishEvent({type:"ACTION_INSTANCE_UNLOADING",action:this.action}),this.action.piping.eventing.removeIntercept(this.onEventReceived),this.action.piping.cleanUp(),this.action.unsubscribeEventHandlersRecursive(),r.isEnabled()&&r.unregisterListener(this.action.instanceId),this.disposeBindings(this.bindingsOfChildAction),this.action=null)},c.prototype.disposeBindings=function(t){e.each(t,(function(t){t.dispose()}))},c.prototype.unsubscribeEventHandlers=function(){this.cleanupCurrentAction(),this.gatewayCallback&&r.removeCallback(this.gatewayCallback),this.disposeBindings(this.bindingsOfThisAction)},c.prototype.receiveEvent=function(t){if(this.data.eventsToCatch&&-1!==this.data.eventsToCatch.indexOf(t.eventName)){var e=A.defer(),i=t.args?t.args[0]:null;return this.piping.eventing.publish(this.data.id+"."+t.eventName,void 0,i,(function(){e.resolve()}),t.parentEventAction),e.promise}},c})),define("drops/scrollSync/scrollSync",["jquery","underscore","lq/drop"],(function(t,e,i){"use strict";function n(e){i.call(this,t("<div/>"),e),this.$element.css({display:"none",pointerEvents:"none"})}return i.extend(n,i),n.typeName="ScrollSync",n.prototype.postRender=function(){var t=this;this.data.syncedDrops&&(this.allScrollableElements=[],this.data.syncedDrops.map((function(e){let i=t.piping.dropFactory.findDropByName(e.dropName);if("List"===i.type)t.allScrollableElements.push(i.$scrollableElement),e.hideScrollbar&&i.$scrollableElement.addClass("scrollbar-hidden")})),this.allScrollableElements.forEach((function(e){t.syncScroll(e,t.allScrollableElements)})),this.attachObserver())},n.prototype.syncScroll=function(t,e){this.subscribeEventHandler(t,"scroll",(function(){var i=t.scrollTop();e.forEach((function(t){t.scrollTop(i)}))}))},n.prototype.attachObserver=function(){var e=this;new MutationObserver((function(i){i.forEach((function(i){"childList"===i.type&&t(i.addedNodes).each((function(){var i=t(this).find('[class*="ganttGridContentContainer"]');i.length>0&&i.each((function(){e.allScrollableElements.push(t(this)),e.syncScroll(t(this),e.allScrollableElements)}))}))}))})).observe(document.body,{childList:!0,subtree:!0})},n})),define("drops/action/runtimeTypesProvider",["lq/typesProvider","drops/actionSlideshow/actionSlideshow","drops/autoComplete/autoComplete","drops/baiduMaps/baiduMaps","drops/barCode/barCode","drops/boolImageInput/boolImageInput","drops/boolInput/boolInput","drops/businessProcess/businessProcess","drops/businessProcessCanvas/businessProcessCanvas","drops/button/button","drops/buttonWithIcon/buttonWithIcon","drops/calendar/calendar","drops/calendarDayView/calendarDayView","drops/calendarItem/calendarItem","drops/calendarMonthView/calendarMonthView","drops/calendarWeekView/calendarWeekView","drops/calendarYearView/calendarYearView","drops/bucketDrop/bucketDrop","drops/captcha/captcha","drops/carousel/carousel","drops/carouselControl/carouselControl","drops/carouselPanel/carouselPanel","drops/carouselTabControl/carouselTabControl","drops/chart/chart","drops/chart_v2/chart_v2","drops/circle/circle","drops/circleShape/circleShape","drops/clock/clock","drops/colorPicker/colorPicker","drops/custom/custom","drops/dataGrid/dataGrid","drops/dateInput/dateInput","drops/documentView/documentView","drops/dropdown/dropdown","drops/dropField/dropField","drops/dynamicBarcode/dynamicBarcode","drops/dynamicIframe/dynamicIframe","drops/dynamicImage/dynamicImage","drops/dynamicSlideshow/dynamicSlideshow","drops/dynamicText/dynamicText","drops/dynamicVideo/dynamicVideo","drops/embed/embed","drops/entityFilter/entityFilter","drops/entityFiltersPanel/entityFiltersPanel","drops/errorHandling/errorHandling","drops/frame/frame","drops/gauge/gauge","drops/googleMap/googleMap","drops/grid/grid","drops/gridLayout/gridLayout","drops/helper/helper","drops/hotspot/hotspot","drops/iframe/iframe","drops/image/image","drops/imageKpi/imageKpi","drops/input/input","drops/jitsiMeeting/jitsiMeeting","drops/list/list","drops/listItem/listItem","drops/magicWand/magicWand","drops/matrix/matrix","drops/milestones/milestones","drops/mockList/mockList","drops/modalAction/modalAction","drops/modalPopup/modalPopup","drops/multiSelect/multiSelect","drops/numericInput/numericInput","drops/pagination/pagination","drops/pattern/pattern","drops/payment/payment","drops/planningGraph/planningGraph","drops/progressBar/progressBar","drops/pushNotificationReceiver/pushNotificationReceiver","drops/qrCode/qrCode","drops/radioButton/radioButton","drops/radioButtonGroup/radioButtonGroup","drops/radioButtonGroupV2/radioButtonGroupV2","drops/radioButtonList/radioButtonList","drops/rectangle/rectangle","drops/requirementsGraph/requirementsGraph","drops/richTextEditor/richTextEditor","drops/richTextTemplateEditor/richTextTemplateEditor","drops/runtimeQueryBuilder/runtimeQueryBuilder","drops/simpleSpreadsheet/simpleSpreadsheet","drops/sketchPad/sketchPad","drops/slider/slider","drops/stack/stack","drops/taskProgress/taskProgress","drops/text/text","drops/textArea/textArea","drops/timeInput/timeInput","drops/timer/timer","drops/treeView/treeView","drops/tweetDrop/tweetDrop","drops/video/video","drops/documentPreviewer/documentPreviewer","drops/googlePlaces/googlePlaces","drops/dropDown_v2/dropDown_v2","drops/dynamicGridLayout/dynamicGridLayout","drops/ganttChart/ganttChart","drops/normalDistribution/normalDistribution","drops/contentRegion/contentRegion","drops/scrollSync/scrollSync"],(function(t){"use strict";return new t(Array.prototype.slice.call(arguments,1))})),define("lq/parameterCollection",["underscore"],(function(t){var e=function(t){return(t||"").toLowerCase()},i=function(e,i){if(this.parameters={},this.parentCollection=i,e){var n=this;t.each(t.keys(e),(function(t){n.setValue(t,e[t])}))}};return i.prototype.getValue=function(t){var i=this.parameters[e(t)];return i?"function"==typeof i.value?i.value():i.value:this.parentCollection?this.parentCollection.getValue(t):void 0},i.prototype.setValue=function(t,i){if(t){var n=e(t);this.parameters[n]?this.parameters[n].value=i:this.parameters[n]={key:t,value:i},this.informSubscribers(n,i)}},i.prototype.parameterExists=function(t){var i=e(t);return this.parameters.hasOwnProperty(i)},i.prototype.clear=function(t){this.setValue(t,null)},i.prototype.remove=function(t){var i=e(t);delete this.parameters[i],this.informSubscribers(i,void 0)},i.prototype.getAll=function(){return this.copyInto({})},i.prototype.copyInto=function(e){var i=this;return t.each(t.keys(this.parameters),(function(t){var n=i.parameters[t].key,a=i.getValue(t);e[n]=a})),this.parentCollection?this.parentCollection.copyInto(e):e},i.prototype.createChildScope=function(t){return new i(t,this)},i.prototype.subscribeForUpdates=function(t,i,n,a){this.callbacks||(this.callbacks={});var o=e(t);this.callbacks[o]||(this.callbacks[o]=[]),this.callbacks[o].push({callback:i,ctxObject:n}),a&&setTimeout(this.informSubscribers.bind(this,o,this.getValue(t)),0)},i.prototype.unsubscribeFromUpdates=function(i,n){if(this.callbacks){var a=e(i);this.callbacks[a]&&(this.callbacks[a]=t.filter(this.callbacks[a],(function(t){return t.callback!==n})),0===this.callbacks[a].length&&delete this.callbacks[a])}},i.prototype.informSubscribers=function(e,i){this.callbacks&&t.each(this.callbacks[e],(function(t){t.callback(i,t.ctxObject)}))},i})),define("lq/parameterShell",["underscore","globalize","lq/constants","lq/parameterCollection","lq/webPushNotifications"],(function(t,e,i,n,a){var o=function(){var t=new Date;return t.setHours(0,0,0,0),e.format(t,i.licquidDateFormat)},r=function(){var t=new Date;return e.format(t,i.licquidDateFormat)},s=function(){var t=new Date;return e.format(t,i.licquidDateFormat)},A=function(t,e,i){this.bindings={},this.locals=t,this.globals=e,this.systems=i};return A.prototype.fork=function(e,i){return new A(new n(e),this.globals,new n((a=i,l={},t.each(t.keys(a),(function(t){l[t]=a[t]})),l.CurrentDate=o,l.CurrentDateTime=r,l.CurrentTime=s,l.CurrentLayoutName="",l)));var a,l},A.prototype.getNonSystemParameters=function(){var t={};return this.globals.copyInto(t),this.locals.copyInto(t),t},A.prototype.getAll=function(){var t={};return this.systems.copyInto(t),this.globals.copyInto(t),this.locals.copyInto(t),t},A.prototype.getValue=function(t){var e=this.locals.getValue(t);if(void 0!==e)return e;var i=this.globals.getValue(t);return void 0!==i?i:this.systems.getValue(t)},A.prototype.replace=function(t){if(!t)return t;var e=this;return t.replace(/\{(\w+)\}/g,(function(t,i){return e.getValue(i)}))},A.prototype.createChildScope=function(t){return new A(this.locals.createChildScope(t),this.globals,this.systems)},A.prototype.subscribeForUpdates=function(t,e,i){return this.locals.subscribeForUpdates(t,e,"local",i),this.globals.subscribeForUpdates(t,e,"global",i),{dispose:this.unsubscribeFromUpdates.bind(this,t,e)}},A.prototype.unsubscribeFromUpdates=function(t,e){this.locals.unsubscribeFromUpdates(t,e),this.globals.unsubscribeFromUpdates(t,e)},A})),define("lq/clipboard",["jquery"],(function(t){"use strict";return{copy:function(e){var i=t("<textarea />").val(e).width(0).height(0).appendTo("body").trigger("select");document.execCommand("copy"),i.remove()}}})),define("lq/runtimeErrorHandler",["jquery","underscore","lq","lq/clipboard"],(function(t,e,i,n){"use strict";var a=function(e){var a=t('<div class="unhandled-error-dialog-content" />'),o=t('<div class="unhandled-error-dialog-header" />').append(t('<div class="unhandled-error-dialog-title" />').text("Something went wrong"));if(e.devTools){var r=t('<div class="unhandled-error-dev-tools" />');if(e.bookmark&&e.bookmark.rootMorphId){var s=e.bookmark,A={};s.morphId&&(A.dropId=s.morphId),s.morphName&&(A.dropName=s.morphName);var l=i.getPortalUrl("rootMorphs/"+s.rootMorphId+"?"+t.param(A));r.append(t("<a />").attr("href",l).attr("target","_blank").text("Open in designer"))}if(e.reference){var d=i.getPortalUrl("errors/sentry/"+e.reference);r.append(t("<a />").attr("href",d).attr("target","_blank").text("View error report"))}o.append(r)}a.append(t('<div class="unhandled-error-dialog-message" />').text(e.message||"Please contact the administrator if the problem persists.")),e.reference&&a.append(t("<div />").append(t('<span class="unhandled-error-dialog-reference" />').text("Reference: ")).append(t("<span />").text(e.reference)).append(t('<img class="unhandled-error-dialog-clipboard" />').attr("title","Copy the reference number to the clipboard").attr("src",require.toUrl("../Images/clipboard.png")).on("click",(function(){n.copy(e.reference)}))));var c=t('<div class="unhandled-error-dialog-buttons" />').append(t('<button class="unhandled-error-dialog-button" />').text(e.buttonLabel).on("click",e.onButtonClicked));if(e.allowErrorReporting&&e.reference){var u=t('<button class="unhandled-error-dialog-button" />').text("Send error report to administrator").on("click",(function(){t.ajax({url:i.getTenantUrl("ErrorReporting/SubmitErrorReport"),type:"POST",cache:!1,data:JSON.stringify({reference:e.reference}),dataType:"json",contentType:"application/json; charset=utf-8",success:function(t,i,n){u.remove(),e.onErrorSubmitted()},error:t.noop})}));c.append(u)}return a.append(c),e.details&&t('<div class="unhandled-error-dialog-details" />').text(e.details).appendTo(a),t('<div class="unhandled-error-layer" />').append(t('<div class="unhandled-error-dialog" />').append(o).append(a))},o=[],r=function(t,e,i){this.$container=i,this.application=e,this.busyIndicator=t,this.listeners=[],this.pageIsUnloading=!1,this.listenForPageUnloading(),this.listenForAjaxErrors(),this.listenForWindowErrors()};return r.prototype.listenForPageUnloading=function(){var e=this;t(window).on("unload",(function(){e.pageIsUnloading=!0})),t(window).on("beforeunload",(function(){e.pageIsUnloading=!0}))},r.prototype.listenForAjaxErrors=function(){var e=this;t(document).ajaxError((function(t,n,o){if(0===o.url.indexOf(i.getTenantUrl(""))&&!e.pageIsUnloading){var r=e.getAjaxError(n)||{};if(!e.handleError(r.message)){var s=a({allowErrorReporting:e.application.allowErrorReporting,reference:r.referenceId,message:r.message,details:r.details,devTools:r.devTools,bookmark:r.bookmark,buttonLabel:"Continue",onButtonClicked:function(){s.remove(),e.$container.css("overflow","")},onErrorSubmitted:function(){s.remove(),e.$container.css("overflow","")}});e.$container.css("overflow","hidden").append(s)}e.busyIndicator.forceHide()}}))},r.prototype.getAjaxError=function(t){try{return JSON.parse(t.responseText)}catch(t){}return{message:t.responseText}},r.prototype.listenForWindowErrors=function(){var e=this,n=window.onerror;window.onerror=function(r,s,A,l,d){if(s&&s.toLowerCase().indexOf("newrelic.com")>-1)return!0;n&&n(r,s,A,l,d);var c=e.handleError(r),u=e.getStack(d),h=r+"\n file: "+s+" "+A,p=i.getRavenLogger(),g=p?p.lastEventId():void 0,f=!0;if(g&&-1===o.indexOf(g)?o.push(g):(g=btoa((new Date).toISOString()),f=!1),t.ajax({url:i.getTenantUrl("ErrorReporting/ReportClientError"),type:"POST",cache:!1,data:JSON.stringify({url:window.location.href,component:i.getNameOfComponent(),reference:g,message:h,file:s,lineNumber:A,stack:u}),dataType:"json",contentType:"application/json; charset=utf-8",success:function(t,i,n){e.busyIndicator.forceHide()},error:t.noop}),!c){var m=a({reference:g,allowErrorReporting:e.application.allowErrorReporting&&f,message:e.application.showErrorDetails?h:null,details:e.application.showErrorDetails?u:null,buttonLabel:"Reload page",onButtonClicked:function(){window.location.reload()},onErrorSubmitted:t.noop});e.$container.children().hide(),e.$container.append(m)}return!0}},r.prototype.getStack=function(t){return t&&t.stack?t.stack:"no stack information available"},r.prototype.addListener=function(t){this.listeners.push(t)},r.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},r.prototype.handleError=function(t){var i={message:t,handled:!1};return e.forEach(this.listeners,(function(t){t(i)})),i.handled},r.prototype.showErrorDialog=function(e){var i=this,n=a({allowErrorReporting:i.application.allowErrorReporting,message:e.message,details:i.application.showErrorDetails?i.getStack(e):null,buttonLabel:"Reload page",onButtonClicked:function(){window.location.reload()},onErrorSubmitted:t.noop});i.$container.children().hide(),i.$container.append(n)},r})),define("lq/formatter",["globalize","underscore","lq/constants"],(function(t,e,i){"use strict";var n=function(t,n){return t===i.valueTypes.decimal?t:"[object Number]"===Object.prototype.toString.call(n)?n%1==0?i.valueTypes.integer:i.valueTypes.decimal:e.isDate(n)?i.valueTypes.dateTime:t||i.valueTypes.string},a=function(e,i){var n=Math.random().toString(),a=t.findClosestCulture(i);t.addCultureInfo(n,a,{name:n,englishName:n,nativeName:n,language:n}),this.culture=t.culture(n),this.culture.numberFormat[","]=e.groupSeperator,this.culture.numberFormat["."]=e.decimalSeperator,this.culture.calendars.standard["/"]="/",this.dateFormat=e.dateFormat,this.decimalPrecision=e.decimalPrecision,this.groupSeperator=e.groupSeperator,this.decimalSeperator=e.decimalSeperator,this.looseDateFormat=e.dateFormat.replace(/[^dMymhHsftzg]/g,"")};return a.prototype.convertFromLicquidFormat=function(a,o){if((a=n(a,o))===i.valueTypes.dateTime){if(o){var r=e.isDate(o)?o:this.parseLicquidDate(o);if(!r)return o;try{return this.formatDate(r)}catch(t){return o}}return o}return a===i.valueTypes.decimal||a===i.valueTypes.integer?null==o||""===o?null:("[object Number]"!==Object.prototype.toString.call(o)&&(o=Number(o)),a===i.valueTypes.decimal?t.format(o,"n"+this.decimalPrecision,this.culture):t.format(o,"n0",this.culture)):a===i.valueTypes.boolean?o?"true":"false":o},a.prototype.convertToLicquidFormat=function(e,a){if(e=n(e,a),a){if(e===i.valueTypes.dateTime){var o=t.parseDate(a,this.dateFormat);return this.formatLicquidDate(o)}if(e===i.valueTypes.decimal||e===i.valueTypes.integer)return"[object Number]"===Object.prototype.toString.call(a)?a:e===i.valueTypes.decimal?t.parseFloat(a,10,this.culture):t.parseInt(a,10,this.culture)}return a},a.prototype.formatLicquidDate=function(e){return t.format(e,i.licquidDateFormat)},a.prototype.parseDate=function(e){return t.parseDate(e,[this.dateFormat,this.looseDateFormat])},a.prototype.parseLicquidDate=function(e){return t.parseDate(e,i.licquidDateFormat)},a.prototype.properlyFormatDate=function(t){var e=this.parseDate(t);return e?this.formatDate(e):null},a.prototype.formatDate=function(e){return t.format(e,this.dateFormat)},a})),define("lq/formatting",["jquery","underscore","lq/formatter","lq/util"],(function(t,e,i,n){"use strict";var a={id:null,name:"",dateFormat:"dd-MM-yyyy",decimalSeperator:".",groupSeperator:",",decimalPrecision:2},o=function(t,o){this.defaultFormattingId=t.defaultFormattingId,this.formattersById={},this.defaultFormatter=null,this.fallbackFormatter=null,this.formattingSettings=n.cloneData(t),this.userLanguage=o,null!==t.formattings&&void 0!==t.formattings&&""!==t.formattings&&e.each(t.formattings,this.addFormatting.bind(this)),this.fallbackFormatter=new i(a,this.userLanguage)};return o.prototype.addFormatting=function(e){e=n.convertListOfKeyValuesToObject(e),e=t.extend(!0,{},a,e);var i=this.createFormatter(e);this.formattersById[e.id]=i,e.id===this.defaultFormattingId&&(this.defaultFormatter=i)},o.prototype.getAvailableFormattings=function(){return n.cloneData(this.formattingSettings.formattings)},o.prototype.getSettings=function(){return n.cloneData(this.formattingSettings)},o.prototype.getFallbackFormatting=function(){return n.cloneData(a)},o.prototype.createFormatter=function(e){return e?e.constructor===String?this.formattersById[e]||this.fallbackFormatter:(e=n.convertListOfKeyValuesToObject(e),(e=t.extend(!0,{},a,e)).decimalSeperator=e.decimalSeperator||a.decimalSeperator,new i(e,this.userLanguage)):this.defaultFormatter||this.fallbackFormatter},o})),define("lq/runtimeUrl",["jquery","underscore"],(function(t,e){"use strict";var i=function(t){this.queryString=t};return i.parameters={language:"lq_lang"},i.prototype.overwriteLicquidParameter=function(t,n){var a=this;e.each(e.keys(i.parameters),(function(e){i.parameters[e]===t&&a.queryString.updateParameter(t,n)}))},i.prototype.prepare=function(n,a){a=a||{};var o=this;return e.each(e.keys(i.parameters),(function(t){var e=i.parameters[t],n=o.queryString.getValueOf(e);void 0!==n&&(a[e]=n)})),e.keys(a).length?n+"?"+t.param(a):n},i.prototype.openUrl=function(t,e){e?window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(t,"_system",""):window.open(t,"_blank"):window.location.href=t},i})),define("lq/conditions/operandEvaluator",["jquery","lq/types"],(function(t,e){var i=function(t,i){return e.isString(t)&&null==i},n=function(t){return null!==t&&(""===t||void 0===t||Array.isArray(t)&&0===t.length)},a={"=":function(t,e){return n(t)&&(t=null),n(e)&&(e=null),t===e},"≠":function(t,e){return n(t)&&(t=null),n(e)&&(e=null),t!==e},">":function(t,e){return t>e},"≥":function(t,e){return t>=e},"≤":function(t,e){return t<=e},"<":function(t,e){return t<e},contains:function(t,e){var i=String(t).toLowerCase(),n=String(e).toLowerCase();return-1!=i.indexOf(n)}},o=function(e){t.extend(this,e)};return o.isCurrentContext=function(t){return"CurrentContext"===t.typeOfValue},o.isQueryOutput=function(t){return"Query"===t.typeOfValue},o.isValue=function(t){return"Value"===t.typeOfValue},o.isParameter=function(t){return"Parameter"===t.typeOfValue},o.isViewData=function(t){return"View"===t.typeOfValue},o.prototype.evaluate=function(n,o,r){var s=this.getValue(this.leftValue,n,o,r),A=this.getValue(this.rightValue,n,o,r);return i(s,A)?A="":i(A,s)?s="":t.isNumeric(s)&&t.isNumeric(A)?(s=Number(s),A=Number(A)):e.isDate(s)&&e.isDate(A)?(s=new Date(s).getTime(),A=new Date(A).getTime()):e.isBoolean(s)&&e.isString(A)?A=A?e.parseBoolean(A):!s:e.isBoolean(A)&&e.isString(s)&&(s=s?e.parseBoolean(s):!A),(0,a[this.operator])(s,A)},o.prototype.getValue=function(t,e,i,n){if(o.isViewData(t))return i.dropFactory.findDropByViewModelKey(t.viewModelKey).getValue();if(o.isParameter(t))return i.parameters.getValue(t.fixedValue);if(o.isQueryOutput(t))return e[t.query][t.output];if(o.isValue(t))return t.fixedValue;if(o.isCurrentContext(t))return n;throw Error("Don't know what to do with \""+t.typeOfValue+'".')},o})),define("lq/conditions/conditionEvaluator",["underscore","when","lq/events/processEventActionsUrl","./operandEvaluator"],(function(_,when,processEventActionsUrl,OperandEvaluator){var ConditionEvaluator=function(t){if(!t.expression)throw new Error('The condition "'+t.name+'" has an empty expression.');this.conditionId=t.id,this.conditionName=t.name,this.expression=this.prepareExpression(t.expression),this.name=t.name,this.operands=_.map(t.operands,(function(t){return new OperandEvaluator(t)}))};return ConditionEvaluator.prototype.evaluate=function(t,e,i,n){var a=when.defer();if(this.awaitingQueries)return this.awaitingQueries;if(void 0===this.previousExecutionData||e){var o=this.findAllDataSources(i),r=this,s=function(e){r.previousExecutionData=r.evaluateOperands(e,t,n),delete r.awaitingQueries,a.resolve(r.previousExecutionData)};0===o.length?s(i):(this.awaitingQueries=a.promise,this.runQueries(o,t).done((function(t){i=i||{},_.forEach(t,(function(t){i[t[0]]=t[1]})),s(i)}),$.noop))}else a.resolve(this.previousExecutionData);return a.promise},ConditionEvaluator.prototype.findAllDataSources=function(t){var e=[];return _.each(this.operands,(function(i){!OperandEvaluator.isQueryOutput(i.leftValue)||t&&t[i.leftValue.query]||e.push(i.leftValue.query),!OperandEvaluator.isQueryOutput(i.rightValue)||t&&t[i.rightValue.query]||e.push(i.rightValue.query)})),e},ConditionEvaluator.prototype.runQueries=function(t,e){return t=_.uniq(t),e.dispatcher.dispatch(processEventActionsUrl.get(e,"Conditions",this.name),{actionId:e.actionId,globalParameters:e.parameters.globals.getAll(),localParameters:e.parameters.locals.getAll(),requests:_.map(t,(function(t){return{eventActionType:"ExecuteQuery",queryObjectName:t,queries:[{listeners:[],params:{page:0,pageSize:1}}]}}))}).then((function(e){return _.map(e.responses,(function(e,i){var n=e.results[0].result.results.length>0?e.results[0].result.results[0]:{};return[t[i],n]}))}))},ConditionEvaluator.prototype.evaluateOperands=function(queryResults,piping,currentContextValue){var executableExpression=this.expression,inputValues={};return _.each(this.operands,(function(t){var e=t.evaluate(queryResults,piping,currentContextValue),i="(^| |\\()("+t.name+")((?= |$|\\)))";inputValues[t.name]=e,executableExpression=executableExpression.replace(new RegExp(i,"g"),"$1"+e+"$3")})),{condition:this,conditionResult:eval("("+executableExpression+")"),inputValues:inputValues}},ConditionEvaluator.prototype.clearResult=function(){delete this.previousExecutionData},ConditionEvaluator.prototype.prepareExpression=function(t){return t.replace(/ and /gi," && ").replace(/ or /gi," || ")},ConditionEvaluator})),define("lq/conditions/conditions",["underscore","./conditionEvaluator"],(function(t,e){"use strict";var i=function(e,i){this.piping=i,this.conditionsById={},this.evaluatorsById={};var n=this;t.each(e,(function(t){n.conditionsById[t.id]=t}))};return i.supportedValues=["View","Query","Value","Parameter"],i.supportedOperators=["=","≠",">","≥","≤","<","contains"],i.prototype.getConditionEvaluator=function(i){if(t.isString(i)){if(void 0===this.evaluatorsById[i]){if(void 0===this.conditionsById[i])throw new Error("Condition with id "+i+" does not exist.");var n=this.conditionsById[i];this.evaluatorsById[i]=new e(n)}return this.evaluatorsById[i]}return new e(i)},i})),define("lq/events/actions/eventAction",["jquery","lq/oop"],(function(t,e){"use strict";function i(t,e){this.eventData=t,this.eventArg=e}return e.makeExtendable(i),i.DO_NOT_BATCH="no-batch",i.QUERY_BATCH="query-batch",i.COMMAND_BATCH="command-batch",i.prototype.getBatchType=function(){throw new Error("please override 'getBatchType()' of EventAction")},i.prototype.createEventActionRequest=function(){},i.prototype.execute=function(t,e){t()},i.prototype.eventIsEnabled=function(t){return this.eventData.eventing&&this.eventData.eventing[t]&&this.eventData.eventing[t].enabled},i.prototype.triggerEvent=function(t,e,i){this.piping.eventing.publish(this.eventData.eventing[t].raisedEventName,this.eventSource,i,e,this.getEventActionIdentifier())},i.prototype.getEventActionIdentifier=function(t,e,i){return{id:this.eventActionId,actionInstanceId:this.rootDrop.instanceId}},i.prototype.triggerEventIfEnabled=function(t,e,i){this.eventIsEnabled(t)&&this.triggerEvent(t,e,i)},i})),define("lq/events/actions/thirdPartyLogin",["jquery","underscore","lq","lq/events/actions/eventAction"],(function(t,e,i,n){"use strict";function a(t,e){return n.call(this,t,e),this}n.extend(a,n),a.typeName="ThirdPartyLogin",a.prototype.getBatchType=function(){return n.DO_NOT_BATCH};var o=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.search);return null==e?"":decodeURIComponent(e[1].replace(/\+/g," "))};return a.prototype.execute=function(t){var n=o("thirdPartyLoginCommandId");if(window.isThirdPartyLoginAfterPageLoad||this.eventData.command!==n){var a=o("AppId"),r=i.getTenantUrl("LicquidAction/ThirdPartyLogin?commandId="+encodeURIComponent(this.eventData.command)+"&actionId="+encodeURIComponent(this.piping.actionId)+(a?"&appId="+a:"")+"&returnUrl="+encodeURIComponent(window.location.pathname+window.location.search)),s={},A=this;e.forEach(this.eventData.requiredParameters,(function(t){s[t]=A.piping.parameters.getValue(t)})),r+="&parameters="+encodeURIComponent(JSON.stringify(s)),window.location=r}else t()},a.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},a.afterPageLoad=function(n){window.isThirdPartyLoginAfterPageLoad=!0;var r=o("thirdPartyLoginCommandId"),s=o("thirdPartyLoginStatus"),A=o("ReturnUrl");if(r&&s){var l=function(){},d=!1;e.each(n.events.handlers,(function(o){e.each(o.actions,(function(e){if(!d&&r&&e.command===r){d=!0;var o=new a(e);o.piping=n.piping,o.rootDrop=n.eventActionFactory.rootDrop,o.getEventActionIdentifier=t.noop,"Success"===s?(A=A||i.getTenantUrl(""),o.eventIsEnabled("updatingUserProperties")?o.triggerEvent("updatingUserProperties",(function(){n.piping.dispatcher.dispatch("LicquidAction/RefreshCurrentUser").then((function(){o.eventIsEnabled("userLoggedIn")&&o.triggerEvent("userLoggedIn",l,A)}))})):o.eventIsEnabled("userLoggedIn")?o.triggerEvent("userLoggedIn",l,A):window.location=A):"InvalidCredentials"===s?o.handleError("invalidCredentials","The credentials provided are invalid.",l):"UserNotFound"===s?o.handleError("userNotFound","The user does not exist.",l):"UserLoginNotAllowed"===s?o.handleError("userLoginNotAllowed","The user is not allowed to log in.",l):"AccountLocked"===s?o.handleError("accountLocked","Your account has been locked out because of too many invalid login attempts.",l):alert("Unable to login.")}}))}))}},a})),define("lq/events/actions/federatedLogin",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this}e.extend(i,e),i.typeName="FederatedLogin",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH};var n=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.search);return null==e?"":decodeURIComponent(e[1].replace(/\+/g," "))};return i.prototype.execute=function(e){var i=n("federatedLoginCommandId");if(window.isFederatedLoginAfterPageLoad||this.eventData.command!==i){var a=t.getTenantUrl("FederatedLogin/Login?commandId="+encodeURIComponent(this.eventData.command)+"&actionId="+encodeURIComponent(this.piping.actionId)+"&parameters="+encodeURIComponent(JSON.stringify(this.piping.parameters.getNonSystemParameters()))+"&returnUrl="+encodeURIComponent(window.location.pathname+window.location.search));window.location.href=a}else e()},i.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},i.afterPageLoad=function(e){window.isFederatedLoginAfterPageLoad=!0;var a=n("federatedLoginCommandId"),o=n("federatedLoginStatus"),r=n("ReturnUrl");if(a&&o){var s=function(){},A=!1;_.each(e.events.handlers,(function(n){_.each(n.actions,(function(n){if(!A&&a&&n.command===a){A=!0;var l=new i(n);l.piping=e.piping,l.rootDrop=e.eventActionFactory.rootDrop,l.getEventActionIdentifier=$.noop,"Success"===o?(r=r||t.getTenantUrl(""),l.eventIsEnabled("userLoggedIn")?l.triggerEvent("userLoggedIn",s,r):window.location=r):"InvalidCredentials"===o?l.handleError("invalidCredentials","The credentials provided are invalid.",s):"UserLoginNotAllowed"===o?l.handleError("userLoginNotAllowed","The user is not allowed to log in.",s):"AccountLocked"===o?l.handleError("accountLocked","Your acccount has been locked out because of too many invalid login attempts.",s):alert("Unable to login.")}}))}))}},i})),define("lq/events/abortError",["lq/oop"],(function(t){"use strict";function e(t){this.name="AbortError",this.message=t||"An abort of the current event was requested."}return e.prototype=new Error,e})),define("lq/events/eventing",["underscore","lq/events/actions/eventAction","lq/events/actions/thirdPartyLogin","lq/events/actions/federatedLogin","lq/events/processEventActionsUrl","lq/events/abortError","when","lq/validatorGateway"],(function(t,e,i,n,a,o,r,s){"use strict";var A=0,l=function(t){return t.eventSourceDropId?t.eventSourceDropId+"."+t.eventName:t.eventName},d=function(t,e,i,n){this.events=t,this.piping=e,this.eventActionFactory=i,this.subcriptions={},this.interceptors=[],this.initialEventNames=n?this.events.reloadedEventNames:this.events.loadedEventNames};d.prototype.onPageLoad=function(t){0!==this.initialEventNames.length&&this.subscribe(this.initialEventNames[0],(function(e,i,n){t(n)}))},d.prototype.subscribe=function(t,e){this.subcriptions[t]||(this.subcriptions[t]=[]),this.subcriptions[t].push(e)},d.prototype.addIntercept=function(t){this.interceptors.push(t)},d.prototype.removeIntercept=function(t){var e=this.interceptors.indexOf(t);e>=0&&this.interceptors.splice(e,1)},d.prototype.hasSubscribers=function(t){return void 0!==this.subcriptions[t]&&this.subcriptions[t].length>0},d.prototype.publish=function(e,i,n,a,o){var s=this.subcriptions[e],A=this;if(r.all(t.map(s,(function(t){var e=r.defer();return t.apply(t,[i,n,function(){e.resolve()},o]),e.promise}))).then((function(){if(0!==A.interceptors.length){var i={eventName:e,parentEventAction:o,args:[n]};return r.all(t.map(A.interceptors,(function(t){return t(i)})))}})).done(a),window.parent){var l={eventName:e,args:[n]},d=A.piping.embeddable?"*":window.location.protocol+"//"+window.location.host;window.parent.postMessage(JSON.stringify(l),d)}},d.prototype.bindEvents=function(){var e=this;if(0!==e.events.handlers.length){var i=t.groupBy(e.events.handlers,(function(t){return l(t)}));t.each(i,(function(t){e.bindEventGroup(t,e.piping)}));for(var n=0;n<20;n++)w()}},d.prototype.triggerPageLoadEvent=function(){var t=this;return this.initialEventNames.reduce((function(e,i){return e.then((function(){return new Promise((function(e){t.publish(i,null,null,e)}))}))}),Promise.resolve()).then((function(){i.afterPageLoad(t),n.afterPageLoad(t)}))},d.prototype.bindEventGroup=function(e,i){if(0!==e.length){var n=t.chain(e).filter((function(t){return!!t.conditionId})).uniq((function(t){return t.conditionId})).map((function(t){return c(t,i)})).value(),a=this;this.subscribe(l(e[0]),(function(o,l,d,c){o&&!o.isBackgroundEvent&&i.busyIndicator.show(),t.each(n,(function(t){t.clearResult()})),r.map(e,(function(e){return e.conditionId?t.findWhere(n,{conditionId:e.conditionId}).evaluate(i).then((function(t){return{event:e,condition:t,shouldExecute:e.invertCondition?!t.conditionResult:t.conditionResult}})):{event:e,shouldExecute:!0}})).done((function(t){if(a.eventActionFactory.rootDrop.isActive()){var e=function(){if(a.eventActionFactory.rootDrop.isActive())if(0===t.length)o&&!o.isBackgroundEvent&&i.busyIndicator.hide(),"function"==typeof d&&d();else{var n=t.splice(0,1)[0],r=++A;s.isEnabled()&&s.publishEvent({type:"ENTERING_EVENT",status:n.shouldExecute?"EXECUTING":"SKIPPING",actionInstanceId:a.eventActionFactory.rootDrop.instanceId,id:r,name:n.event.eventName,condition:n.condition?{name:n.condition.condition.conditionName,expression:n.condition.condition.expression,inverted:n.event.invertCondition,values:n.condition.inputValues}:void 0,parentEventAction:c,locals:i.parameters.locals.getAll(),globals:i.parameters.globals.getAll(),systems:i.parameters.systems.getAll(),sourceDrop:o?o.drop:void 0}),n.shouldExecute?u(o,n.event,r,l,e,i,a):e()}};e()}}))}))}};var c=function(t,e){return e.conditions.getConditionEvaluator(t.conditionId)},u=function(e,i,n,a,o,r,A){if(i.conditionId){var l=c(i,r),d="";i.invertCondition&&(d="NOT "),y("EVENT: "+i.eventName+" ("+d+l.conditionName+")")}else y("EVENT: "+i.eventName);var u=A.eventActionFactory.createEventActions(i,e,a);s.isEnabled()&&t.each(u,(function(t){s.publishEvent({type:"CREATED_EVENT_ACTION",actionInstanceId:t.rootDrop.instanceId,id:t.eventActionId,eventId:n,eventActionData:t.eventData})})),p(i,e,n,h(u),o,r,A)},h=function(i){if(0===i.length)return[];var n,a=[],o=[];return a.push(o),t.forEach(i,(function(t){var i=t.getBatchType();(void 0!==n&&i!==n||i===e.DO_NOT_BATCH)&&o.length>0&&(o=[],a.push(o)),o.push(t),n=i})),a},p=function(e,i,n,o,r,s,A){if(A.eventActionFactory.rootDrop.isActive()){if(0===o.length)return w(),void("function"==typeof r&&r());var l=o[0];o.splice(0,1),y("<BATCH>");var d=function(){w(),p(e,i,n,o,r,s,A)};g(s,n,l,(function(e){if(0===e.length)f(n,l,d,[]);else{var o=s.parameters,r=i&&i.isBackgroundEvent?s.dispatcher.backgroundDispatch:s.dispatcher.dispatch;(r=r.bind(s.dispatcher))(a.get(s,"Events"),{actionId:s.actionId,globalParameters:o.globals.getAll(),localParameters:o.locals.getAll(),requests:e},(function(e){A.eventActionFactory.rootDrop.isActive()&&(e.abort?(s.busyIndicator.forceHide(),e.eventName?s.eventing.publish(e.eventName):alert(e.reason)):(t.each(e.globalParameters,(function(t,e){o.globals.setValue(e,t)})),t.each(e.localParameters,(function(t,e){o.locals.setValue(e,t)})),f(n,l,d,e.responses)))}))}}))}},g=function(t,e,i,n,a){if(a=a||[],0!==i.length){var r=i[0];(i=i.slice(0)).splice(0,1);var A=function(o){if(self.stopExecuting)return self.stopExecuting=!1,void t.busyIndicator.forceHide();o&&(o.eventActionId=r.eventActionId,a.push(o)),g(t,e,i,n,a)};s.isEnabled()&&s.publishEvent({type:"EXECUTING_EVENT_ACTION",actionInstanceId:r.rootDrop.instanceId,id:r.eventActionId,eventId:e,eventActionTypeName:r.eventActionTypeName,locals:r.piping.parameters.locals.getAll(),globals:r.piping.parameters.globals.getAll(),systems:r.piping.parameters.systems.getAll()});try{var l=r.createEventActionRequest()}catch(t){if(!(t instanceof o))throw t;self.stopExecuting=!0}"function"==typeof l?l((function(t){A(t)}),(function(){self.stopExecuting=!0,A(null)})):A(l)}else n(a)},f=function(e,i,n,a){if(0!==i.length){var o=i[0];i.splice(0,1);var r=t.find(a,(function(t){return t.eventActionId===o.eventActionId}));s.isEnabled()&&r&&s.publishEvent({type:"HANDLING_EVENT_ACTION_RESPONSE",actionInstanceId:o.rootDrop.instanceId,id:o.eventActionId,eventId:e,eventActionTypeName:o.eventActionTypeName,location:r?"SERVER":"CLIENT",locals:r.d?r.d.beforeParameters.locals:o.piping.parameters.locals.getAll(),globals:r.d?r.d.beforeParameters.globals:o.piping.parameters.globals.getAll(),systems:r.d?r.d.systems:o.piping.parameters.systems.getAll()}),y(o.eventActionId+" - "+o.eventActionTypeName),v("Executing '"+o.eventActionId+" - "+o.eventActionTypeName+"'"),o.execute((function(){s.isEnabled()&&s.publishEvent({type:"EXECUTED_EVENT_ACTION",actionInstanceId:o.rootDrop.instanceId,id:o.eventActionId,locals:r&&r.d?r.d.afterParameters.locals:o.piping.parameters.locals.getAll(),globals:r&&r.d?r.d.afterParameters.globals:o.piping.parameters.globals.getAll()}),v("Finished executing '"+o.eventActionId+" - "+o.eventActionTypeName+"'"),w(),f(e,i,n,a)}),r)}else n()},m=0,v=function(t){if(window.console&&window.console.log){var e="";if(void 0===console.group)for(var i=0;i<m;i++)e+="\t";console.log(e+t)}},y=function(t){m++,"undefined"!=typeof console&&void 0!==console.group?console.group(t):v(t)},w=function(){m--,"undefined"!=typeof console&&void 0!==console.groupEnd&&console.groupEnd()};return d})),define("lq/events/actions/activeDirectorySyncGroupUsers",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="ActiveDirectorySyncGroupUsers",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"ActiveDirectorySyncGroupUsers",command:this.eventData.command}},e})),define("lq/events/actions/backgroundTask",["lq/events/actions/eventAction","lq","when"],(function(t,e,i){"use strict";function n(e,i){return t.call(this,e,i),this}return t.extend(n,t),n.typeName="BackgroundTask",n.prototype.getBatchType=function(){return this.pollForProgress()?t.DO_NOT_BATCH:t.COMMAND_BATCH},n.prototype.createEventActionRequest=function(){if(!this.pollForProgress())return{eventActionType:"BackgroundTask",morphId:this.eventData.commandId}},n.prototype.pollForProgress=function(){return this.eventData.waitUntilReady||this.eventIsEnabled("completed")},n.prototype.updateProgress=function(t){t.progress!==this.lastBatchProgress&&(this.lastBatchProgress=t.progress,this.triggerEventIfEnabled("batchProgressChanged",void 0,t.progress)),t.total!==this.lastBatchTotal&&(this.lastBatchTotal=t.total,this.triggerEventIfEnabled("batchTotalChanged",void 0,t.total))},n.prototype.execute=function(t,n){var a=this,o=this.piping;if(this.eventData.waitUntilReady)o.busyIndicator.show();else if(t(),!this.pollForProgress())return;function r(){a.eventData.waitUntilReady&&(o.busyIndicator.hide(),t()),a.triggerEventIfEnabled("completed")}this.piping.dispatcher.dispatchToAbsoluteUrl(this.piping.url.prepare(e.getTenantUrl("BackgroundTask/"),{}),{actionId:this.rootDrop.data.id,commandId:this.eventData.commandId,globals:o.parameters.globals.getAll(),locals:o.parameters.locals.getAll()}).then((function(t){if(t.ticketNumber){function n(){return $.get({url:e.getTenantUrl("BackgroundTask/IsReady"),data:{ticketNumber:t.ticketNumber},cache:!1})}function o(t){return i.promise((function(e,i,n){setTimeout((function(){e(t().always((function(e,i,n){if(202===n.status)return a.updateProgress(e),o(t);200===n.status&&(a.updateProgress(e),r())})))}),1e3)}))}o(n)}else r()})).catch((function(){alert("Something went wrong while running the background task.")}))},n})),define("lq/events/actions/breakEvent",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="BreakEvent",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t,e){this.piping.busyIndicator.forceHide()},e})),define("lq/events/actions/calendarEventsExportCommand",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this}return e.extend(i,e),i.typeName="CalendarEventsExportCommand",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH},i.prototype.createEventActionRequest=function(){if(!this.eventData.downloadOnly)return{eventActionType:"CalendarEventsExport",command:this.eventData.command}},i.prototype.execute=function(e,i){if(this.eventData.downloadOnly){var n={actionId:this.piping.actionId,calendarExportId:this.eventData.command,parameters:JSON.stringify(this.piping.parameters.getNonSystemParameters()||{})},a=this.piping.url.prepare(t.getTenantUrl("Export/CalendarEvent"),n);window.location.href=a+"#toolbar=1",e()}else if(i.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(i.download){n={url:i.url,filename:i.filename,openInBrowser:!1};window.location=this.piping.url.prepare(t.getTenantUrl("DynamicContent/DownloadFile"),n),e()}else e()},i})),define("lq/events/actions/calendarURLExport",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";var i=function(t){return encodeURIComponent(btoa(t))};function n(t,i){return e.call(this,t,i),this}return e.extend(n,e),n.typeName="CalendarURLExport",n.prototype.getBatchType=function(){return e.DO_NOT_BATCH},n.prototype.execute=function(t){var e=this.getFullUrl().replace(/https?:\/\//,"webcal://");this.eventData.targetParameter&&this.piping.parameters.locals.setValue(this.eventData.targetParameter,e),this.eventData.open&&(window.location.href=e),t()},n.prototype.getFullUrl=function(){var e=t.getTenantUrl("Export/Calendar/"+i(this.piping.actionId)+"/"+i(this.eventData.command))+"/";if(this.eventData.identifierParameter){var n=this.piping.parameters.getValue(this.eventData.identifierParameter);n&&(e+=i(n))}return t.getFullUrl(e)},n})),define("lq/events/actions/changeParameter",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="ChangeParameter",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){var e=this.eventData.setParameter,i=e.global?this.piping.parameters.globals:this.piping.parameters.locals;"remove"===e.updateType?i.remove(e.parameter):"clear"===e.updateType?i.clear(e.parameter):function(t,e){if("always"===t.updateType)return!0;var i=e.getValue(t.parameter);return null==i}(e,i)&&i.setValue(e.parameter,e.value),t()},e})),define("lq/events/actions/changePassword",["jquery","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){i.call(this,t,e)}return i.extend(n,i),n.typeName="ChangePassword",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH},n.prototype.getValueOf=function(t){return this.piping.dropFactory.findDropByViewModelKey(t).getValue()},n.prototype.createEventActionRequest=function(){return{eventActionType:"ChangePassword",command:this.eventData.command,newPassword:this.getValueOf(this.eventData.passwordField),newPasswordConfirmation:this.eventData.passwordConfirmationField?this.getValueOf(this.eventData.passwordConfirmationField):null,oldPassword:this.eventData.oldPasswordField?this.getValueOf(this.eventData.oldPasswordField):null}},n.prototype.execute=function(t,e){e&&"invalidOldPassword"===e.status?this.handleError("invalidOldPassword","The old password is wrong.",t):e&&"invalidPasswordConfirmation"===e.status?this.handleError("invalidPasswordConfirmation","Passwords do not match.",t):e&&"invalidNewPassword"===e.status?this.handleError("invalidNewPassword","The new password cannot be left empty.",t):e&&"invalidPasswordLength"===e.status?this.handleError("invalidPasswordLength","The new password is too short.",t):e&&"invalidPasswordComplexity"===e.status?this.handleError("invalidPasswordComplexity","The new password does not meet the complexity requirements.",t):e&&"newPasswordSameAsOldPassword"===e.status?this.handleError("newPasswordSameAsOldPassword","The new password should be different from the previous password.",t):this.eventIsEnabled("passwordChanged")&&this.triggerEvent("passwordChanged"),t()},n.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t):alert(e)},n})),define("lq/events/actions/checkIn",["lq/events/actions/eventAction","lq/uploader"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="CheckIn",i.prototype.getBatchType=function(){return t.COMMAND_BATCH},i.prototype.createEventActionRequest=function(){var t=this;return function(i){new e(t.piping).toTenantUrl("DynamicContent/AddTempFile").onFileUploaded((function(e){if(!e.success)throw new Error("Upload failed.");var n={eventActionType:"CheckIn",morphId:t.eventData.command,fileName:e.filename,tempUrl:e.tempUrl};i(n)})).uploadSingleFile()}},i})),define("lq/events/actions/checkOut",["jquery","lq/events/actions/eventAction","lq"],(function(t,e,i){"use strict";function n(t,i){return e.call(this,t,i),this}return e.extend(n,e),n.typeName="CheckOut",n.prototype.getBatchType=function(){return e.COMMAND_BATCH},n.prototype.createEventActionRequest=function(){return{eventActionType:"CheckOut",morphId:this.eventData.command}},n.prototype.execute=function(e,n){var a=i.getTenantUrl("DynamicContent/DownloadFile")+"?"+t.param({url:n.url,filename:n.filename});window.open(a),e()},n})),define("lq/events/actions/copyDynamicContentCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="CopyDynamicContentCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"CopyDynamicContent",command:this.eventData.command}},e})),define("lq/events/actions/copyToClipboard",["lq/events/actions/eventAction","lq/clipboard"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="CopyToClipboard",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){e.copy(this.getValueToCopy()),t()},i.prototype.getValueToCopy=function(){return"viewmodel"===this.eventData.source?this.piping.dropFactory.findDropByViewModelKey(this.eventData.viewModelKey).getValue():this.piping.parameters.getValue(this.eventData.parameter)},i})),define("lq/entityFiltersState",["underscore"],(function(t){"use strict";return{getStateOfEntityFilters:function(e){var i={},n=t.filter(e.piping.dropFactory.createdDrops,(function(t){return"EntityFilter"===t.data.type}));return t.each(n,(function(n){var a=t.chain(n.getDropTargets()).map((function(t){return{drop:t,filters:n.getMyActiveFiltersForTarget(t)}})).filter((function(t){return t.filters.length})).map((function(i){var a={targetDrop:i.drop.data.name},o=n.getOptionsForTarget(i.drop);if(o.modalPopup){var r=e.piping.parameters;a.values=t.map(o.mappings,(function(t){return{sourceName:t.sourceName,parameterValue:r.getValue(t.targetParameter)}}))}return a})).value();a.length&&(i[n.data.id]=a)})),JSON.stringify(i)},restoreStateOfFilters:function(e,i){var n=JSON.parse(i),a=e.piping.parameters,o=t.filter(e.piping.dropFactory.createdDrops,(function(t){return"EntityFilter"===t.data.type})),r={};t.each(o,(function(i){if(t.each(i.data.targets,(function(t){r.hasOwnProperty(t.drop)||(r[t.drop]=!1)})),i.removeAppliedFilters(),n[i.data.id]){var o=n[i.data.id];t.each(o,(function(n){var o=e.piping.dropFactory.findDropByName(n.targetDrop);if(o){var s=i.getOptionsForTarget(o),A=i.createInstance(o,s,!0);i.addAsActiveFilterToTarget(A),A.options.filterParameterName&&a.locals.setValue(A.options.filterParameterName,A.options.filterParameterValue),A.options.mappings&&t.each(A.options.mappings,(function(o){var r=t.findWhere(n.values,{sourceName:o.sourceName});r&&(e.piping.dropFactory.findDropByName(o.sourceName).setValue({value:r.parameterValue}),a.locals.setValue(o.targetParameter,r.parameterValue),i.triggerEventForTargetIfEnabled(s,"applyFilter"))})),i.dragToPosition(i.initialPosition),r[n.targetDrop]=!0}}))}}));var s=[];t.each(r,(function(i,n){var a=e.piping.dropFactory.findDropByName(n);a&&(i?s.push({queryName:a.data.dataSource,handler:function(e){t.each(a.getDatasourceListenersWithSameParams(),(function(t){t.handler(e)}))},decorateDataFunc:function(t){a.decorateQueryParams(t)}}):t.defer((function(){a.clear()})))})),s.length&&e.piping.queryDispatcher.dispatchBatch(s,e.piping)}}})),define("lq/events/actions/create",["lq/events/actions/eventAction","jquery","underscore","lq/uploader","lq/entityFiltersState","lq","lq/events/abortError","when"],(function(t,e,i,n,a,o,r,s){"use strict";function A(e,i){return t.call(this,e,i),this}return t.extend(A,t),A.typeName="Create",A.prototype.getBatchType=function(){return t.COMMAND_BATCH},A.prototype.createEventActionRequest=function(){return this.validateData.bind(this)},A.prototype.validateData=function(t,e){var i=this;this.isDataValid().then((function(n){n?(i.eventIsEnabled("inputValidated")&&i.triggerEvent("inputValidated"),i.buildRequest(t,e)):(i.eventIsEnabled("inputInvalidated")&&i.triggerEvent("inputInvalidated"),e())}))},A.prototype.buildRequest=function(t,e){var r=this,A={};i.each(r.eventData.commandViewModelKeys,(function(t){var e=r.piping.dropFactory.findDropByViewModelKey(t).getValue();A[t]=e}));var l={};r.eventData.isEntityFilterEntity&&(l.Filter=a.getStateOfEntityFilters(this.rootDrop));var d={eventActionType:"Create",command:r.eventData.command,commandViewModelKeys:A,uploads:[],extraProperties:l,captcha:this.getCaptcha()};if(null===r.eventData.fileUploadType||""===r.eventData.fileUploadType||"fromDocument"===r.eventData.fileUploadType||"createEmptyFile"===r.eventData.fileUploadType)t(d);else if("fromViewModel"===r.eventData.fileUploadType){var c=r.piping.dropFactory.findDropByViewModelKey(r.eventData.fileSourceMorph);r.requiredValueIsFilledIn(c)?s(c.getFile()).then((function(e){r.uploadBase64Img(e,d,t)})):e()}else if("fromParameterBase64"===r.eventData.fileUploadType){var u=r.piping.parameters.getValue(r.eventData.fileSourceParameter);r.uploadBase64Img(u,d,t)}else if("fromParameter"===r.eventData.fileUploadType){var h=r.piping.parameters.getValue(r.eventData.fileSourceParameter),p=new XMLHttpRequest,g=new FormData,f=o.getTenantUrl("DynamicContent/AddTempFile");p.open("POST",f,!0),p.onreadystatechange=function(){if(4===p.readyState&&200===p.status){var e=JSON.parse(p.responseText);d.uploads.push({fileName:e.fileName,tempUrl:e.tempUrl}),t(d)}},g.append("qqfile",h),p.send(g)}else{var m=new n(r.piping).toTenantUrl("DynamicContent/AddTempFile").withFileFilter("custom"===r.eventData.fileUploadAllowedFileTypes?r.eventData.fileUploadAllowedCustomFileTypes:r.eventData.fileUploadAllowedFileTypes).withMaxFileSize(r.eventData.maxFileSize).withSmartphoneMode(r.eventData.fileUploadModeSmartPhone).withPhotoQuality(r.eventData.photoQuality).withMaxImageDimensions(r.eventData.maxImageDimensions).onFileUploaded((function(t){if(!t.success)throw new Error("Upload failed.");d.uploads.push({fileName:t.filename,tempUrl:t.tempUrl})})).onUploadFinished((function(){t(d)}));r.eventIsEnabled("maxFileSizeExceeded")&&m.onMaxFileSizeExceeded((function(){r.triggerEvent("maxFileSizeExceeded")})),"singleFile"===r.eventData.fileUploadType?m.uploadSingleFile():"multipleFiles"===r.eventData.fileUploadType&&m.uploadMultipleFiles()}},A.prototype.execute=function(t,e){e.isDirty&&this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty",t):t()},A.prototype.requiredValueIsFilledIn=function(t){return!(!this.eventData.skipRequiredFields&&t.isVisible()&&!t.isValid())||(this.eventIsEnabled("requiredFieldsMissing")?this.triggerEvent("requiredFieldsMissing"):alert("* not all required fields are filled in."),!1)},A.prototype.isDataValid=function(){var t=this;return s.reduce(t.eventData.commandViewModelKeys,(function(e,i){var n=t.piping.dropFactory.findDropByViewModelKey(i);if(!n)throw'Cannot find drop : "'+key+'" for create command.';return n.isVisible()?!!t.requiredValueIsFilledIn(n)&&n.performValidation(t.eventActionId).then((function(t){return!!t&&e})):e}),!0)},A.prototype.getCaptcha=function(){if(!this.eventData.captchaField)return null;var t=this.piping.dropFactory.findDropByName(this.eventData.captchaField);return t.data.captchaInputField?this.piping.dropFactory.findDropByName(t.data.captchaInputField).getValue():null},A.prototype.uploadBase64Img=function(t,i,n){e.ajax({type:"POST",url:o.getTenantUrl("DynamicContent/AddPromptlessTempFile"),contentType:"application/json; charset=utf-8",data:t,dataType:"json"}).done((function(t){t.success&&(i.uploads.push({fileName:t.fileName,tempUrl:t.tempUrl}),n(i))}))},A})),define("lq/events/actions/createTextFileCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="CreateTextFileCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"CreateTextFile",command:this.eventData.command}},e})),define("lq/formSubmission",[],(function(){"use strict";var t=function(t,e){this.form=document.createElement("form"),this.form.setAttribute("method","post"),this.form.setAttribute("action",t),e&&this.form.setAttribute("target",e)};return t.prototype.addProperty=function(t,e){var i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name",t),i.setAttribute("value",e),this.form.appendChild(i)},t.prototype.addParameters=function(t,e){this.addProperty(t,JSON.stringify(e))},t.prototype.submit=function(){document.body.appendChild(this.form),this.form.submit()},t})),define("lq/events/actions/csvExportCommand",["lq/events/actions/eventAction","jquery","lq","lq/cookie","lq/formSubmission"],(function(t,e,i,n,a){"use strict";function o(e,i){return t.call(this,e,i),this}return t.extend(o,t),o.typeName="CsvExportCommand",o.prototype.getBatchType=function(){return t.DO_NOT_BATCH},o.prototype.createEventActionRequest=function(){if(!this.eventData.downloadOnly)return{eventActionType:"CsvExport",command:this.eventData.command}},o.prototype.execute=function(t,e){if(this.eventData.downloadOnly){var o="csv-export-"+Date.now(),r=new a(this.piping.url.prepare(i.getTenantUrl("Export/Csv")));r.addProperty("actionId",this.piping.actionId),r.addProperty("csvExportId",this.eventData.command),r.addProperty("token",o),r.addParameters("parameters",this.piping.parameters.getNonSystemParameters()),r.submit();var s=function(){null===n.get(o)?setTimeout(s,200):t()};s()}else e.isDirty?this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty."):e.download?(window.location.href=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),{url:e.url,filename:e.filename,openInBrowser:!1}),t()):t()},o})),define("lq/events/actions/deleteCommand",["lq/events/actions/eventAction","lq/events/abortError"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="DeleteCommand",i.prototype.getBatchType=function(){return t.COMMAND_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"Delete",ObjectName:this.eventData.command}},i.prototype.execute=function(t,e){e.isDirty?this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not delete the data, because the data is dirty."):t()},i})),define("lq/events/actions/deleteDynamicContentCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="DeleteDynamicContentCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"DeleteDynamicContent",command:this.eventData.command}},e})),define("lq/events/actions/distanceMatrix",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="DistanceMatrix",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"DistanceMatrix",command:this.eventData.command}},e})),define("lq/events/actions/desktopClientCommand",["underscore","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this.eventData=t,this}return e.extend(i,e),i.typeName="DesktopClientCommand",i.prototype.getBatchType=function(){return e.COMMAND_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"PrepareDesktopClientCommand",commandId:this.eventData.command}},i.prototype.execute=function(t,e){window.location.href=e.url,t()},i})),define("lq/events/actions/documentZip",["underscore","lq/events/actions/eventAction","lq"],(function(t,e,i){"use strict";function n(t,i){return e.call(this,t,i),this}return e.extend(n,e),n.typeName="DocumentZip",n.prototype.getBatchType=function(){return this.eventData.isDownloadOnly?e.DO_NOT_BATCH:e.COMMAND_BATCH},n.prototype.execute=function(t,e){if(this.eventData.isDownloadOnly){var n={actionId:this.piping.actionId,morphId:this.eventData.morphId,parameters:JSON.stringify(this.piping.parameters.getNonSystemParameters())};window.location=this.piping.url.prepare(i.getTenantUrl("GeneratedContent/DocumentZip"),n),t()}else if(e.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(e.download){var a={url:e.url,filename:e.filename};window.location=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),a),t()}else t()},n.prototype.createEventActionRequest=function(){if(!this.eventData.isDownloadOnly)return{eventActionType:"DocumentZip",morphId:this.eventData.morphId}},n})),define("lq/events/actions/domainFunctionCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="DomainFunctionCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"DomainFunction",ObjectName:this.eventData.command}},e})),define("lq/events/actions/download",["underscore","lq/events/actions/eventAction","lq","lq/util","lq/responsive"],(function(t,e,i,n,a){"use strict";function o(t,i){return e.call(this,t,i),this.eventData=t,this}return e.extend(o,e),o.typeName="Download",o.prototype.getBatchType=function(){return e.DO_NOT_BATCH},o.prototype.execute=function(t){var e=this.piping.parameters.getValue(this.eventData.parameter);if(e){e=n.convertListOfKeyValuesToObject(e);var o=this.eventData.openInBrowser;a.isPWA()&&(o=!1);var r=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),{url:e.Url,filename:e.Filename,openInBrowser:o});this.eventData.openInNewTab?window.open(r+"&isDownload=false#toolbar=1"):window.location.href=r}t()},o})),define("lq/events/actions/downloadFileCommand",["underscore","lq/events/actions/eventAction","lq","lq/responsive"],(function(t,e,i,n){"use strict";function a(t,i){return e.call(this,t,i),this.eventData=t,this}return e.extend(a,e),a.typeName="DownloadFileCommand",a.prototype.getBatchType=function(){return e.DO_NOT_BATCH},a.prototype.execute=function(t){var e={actionId:this.piping.actionId,commandId:this.eventData.command,parameters:JSON.stringify(this.piping.parameters.getNonSystemParameters()),forceDownload:n.isPWA()},a=this.piping.url.prepare(i.getTenantUrl("Export/File"),e);this.eventData.openInNewTab?window.open(a+"#toolbar=1"):window.location.href=a,t()},a})),define("lq/events/actions/excelExportCommand",["lq/events/actions/eventAction","jquery","lq","lq/cookie","lq/formSubmission"],(function(t,e,i,n,a){"use strict";function o(e,i){return t.call(this,e,i),this}return t.extend(o,t),o.typeName="ExcelExportCommand",o.prototype.getBatchType=function(){return t.DO_NOT_BATCH},o.prototype.createEventActionRequest=function(){if(!this.eventData.downloadOnly)return{eventActionType:"ExcelExport",command:this.eventData.command}},o.prototype.execute=function(t,e){if(this.eventData.downloadOnly){var o="excel-export-"+Date.now(),r=new a(this.piping.url.prepare(i.getTenantUrl("Export/Excel")));r.addProperty("actionId",this.piping.actionId),r.addProperty("excelExportId",this.eventData.command),r.addProperty("token",o),r.addParameters("parameters",this.piping.parameters.getNonSystemParameters()),r.submit();var s=function(){null===n.get(o)?setTimeout(s,200):t()};s()}else if(e.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(e.download){var A={url:e.url,filename:e.filename,openInBrowser:!1};window.location=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),A),t()}else t()},o})),define("lq/events/actions/executeEidReader",["jquery","lq","underscore","lq/events/actions/eventAction","lq/util"],(function(t,e,i,n,a){"use strict";function o(t,e){return n.call(this,t,e),this}n.extend(o),o.typeName="ExecuteEidReader",o.prototype.getBatchType=function(){return n.DO_NOT_BATCH},o.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},o.prototype.execute=function(t){var e=this;fetch("http://localhost:31031/eid",{mode:"cors",method:"GET"}).then((async function(i){e.piping.busyIndicator.hide();try{if(i.json){var n=await i.json();i.ok?parseInt(n.version)<2?alert("Your eID-Reader version is: "+n.version+" but 2 is required"):e.executeMappings(e.getDecoratedData(n),e.eventData.eidMappings):1===n.errorCode?e.handleError("noCardReaderConnected","No card reader connected",t):2===n.errorCode?e.handleError("noCardInReader","No card in the reader",t):3===n.errorCode?e.handleError("moreThanOneCardDetected","More than one card detected",t):4===n.errorCode?e.handleError("eIDMiddlewareNotInstalled","e-ID middleware not installed",t):alert("eID-Reader error: "+n.detail)}else alert("eID-Reader unknown error")}finally{e.piping.busyIndicator.hide(),t()}}),(function(i){e.piping.busyIndicator.hide(),e.handleError("notRunning","The eID-Reader service is not running",t)})),this.piping.busyIndicator.show()};var r=[{expr:/JAN/,value:"01"},{expr:/FE(B|V)/,value:"02"},{expr:/MAAR|MARS|M.R/,value:"03"},{expr:/A(P|V)R/,value:"04"},{expr:/M(E|A)I/,value:"05"},{expr:/JUI?N/,value:"06"},{expr:/JUI?L/,value:"07"},{expr:/AUG|AOUT/,value:"08"},{expr:/SEPT?/,value:"09"},{expr:/O(K|C)T/,value:"10"},{expr:/NOV/,value:"11"},{expr:/DE(C|Z)/,value:"12"}],s=/(\d\d)\.?\s*(\S+)\.?\s*(\d{4})/,A=/(\d\d)\.(\d\d)\.(\d{4})/,l={"id.date_of_birth":function(t,e){var n=t.match(s);if(n){var a=n[2],o=i.find(r,(function(t){return t.expr.test(a)}));if(o)return new Date(Date.UTC(n[3],o.value-1,n[1]))}return null},"id.validity_begin_date":function(t,e){var i=t.match(A);return i?new Date(Date.UTC(i[3],i[2]-1,i[1])):null},"id.validity_end_date":function(t,e){var i=t.match(A);return i?new Date(Date.UTC(i[3],i[2]-1,i[1])):null},"id.gender":function(t){return"V"===t||"W"===t?"F":t},"address.address_street":function(t){var e=t.search(/\d/);return e<0?t:t.substring(0,e).trim()},"address.address_number":function(t){var e=t.search(/\d/);return e<0?"":t.substring(e).trim()}};return o.prototype.executeMappings=function(t,e){var n=this,o=n.piping.formatting.createFormatter();i.each(e,(function(e){var i=e.sourcePath;"address.address_street"!=i&&"address.address_number"!=i||(i="address.address_street_and_number");var r=a.getPropertyByPath(t,i);l[e.sourcePath]&&(r=l[e.sourcePath](r,o)),n.piping.parameters.locals.setValue(e.targetParameter,r)}))},o.prototype.getDecoratedData=function(t){return t.photoBase64="data:image/png;base64, "+t.photoBase64,t},o})),function(t){function e(){}function i(t){r=[t]}function n(t,e,i){return t&&t.apply&&t.apply(e.context||e,i)}function a(t){return/\?/.test(t)?"&":"?"}function o(o){function h(t){Y++||(j(),V&&(T[K]={s:[t]}),N&&(t=N.apply(o,[t])),n(H,o,[t,b,o]),n(M,o,[o,b]))}function k(t){Y++||(j(),V&&t!=B&&(T[K]=t),n(O,o,[o,t]),n(M,o,[o,t]))}var _,U,Q,P,L,H=(o=t.extend({},E,o)).success,O=o.error,M=o.complete,N=o.dataFilter,R=o.callbackParameter,$=o.callback,q=o.cache,V=o.pageCache,z=o.charset,K=o.url,W=o.data,G=o.timeout,Y=0,j=e;return x&&x((function(t){t.done(H).fail(O),H=t.resolve,O=t.reject})).promise(o),o.abort=function(){!Y++&&j()},!1===n(o.beforeSend,o,[o])||Y||(K=K||l,W=W?"string"==typeof W?W:t.param(W,o.traditional):l,K+=W?a(K)+W:l,R&&(K+=a(K)+encodeURIComponent(R)+"=?"),!q&&!V&&(K+=a(K)+"_"+(new Date).getTime()+"="),K=K.replace(/=\?(&|$)/,"="+$+"$1"),V&&(_=T[K])?_.s?h(_.s[0]):k(_):(C[$]=i,(Q=t(w)[0]).id=u+I++,z&&(Q[A]=z),S&&S.version()<11.6?(P=t(w)[0]).text="document.getElementById('"+Q.id+"')."+g+"()":Q[s]=s,F&&(Q.htmlFor=Q.id,Q.event=p),Q[f]=Q[g]=Q[m]=function(t){if(!Q[v]||!/i/.test(Q[v])){try{Q[p]&&Q[p]()}catch(t){}t=r,r=0,t?h(t[0]):k(d)}},Q.src=K,j=function(t){L&&clearTimeout(L),Q[m]=Q[f]=Q[g]=null,D[y](Q),P&&D[y](P)},D[c](Q,U=D.firstChild),P&&D[c](P,U),L=G>0&&setTimeout((function(){k(B)}),G))),o}var r,s="async",A="charset",l="",d="error",c="insertBefore",u="_jqjsp",h="on",p="onclick",g=h+d,f="onload",m="onreadystatechange",v="readyState",y="removeChild",w="<script>",b="success",B="timeout",C=window,x=t.Deferred,D=t("head")[0]||document.documentElement,T={},I=0,E={callback:u,url:location.href},S=C.opera,F=!!t("<div>").html("\x3c!--[if IE]><i><![endif]--\x3e").find("i").length;o.setup=function(e){t.extend(E,e)},t.jsonp=o}(jQuery),define("jquery.jsonp.min",["jquery"],function(t){return function(){return t.jQuery.jsonp}}(this)),define("lq/events/actions/executeEidSigner",["jquery","underscore","lq/events/actions/eventAction","jquery.jsonp.min"],(function(t,e,i){"use strict";function n(t,e){return i.call(this,t,e),this}i.extend(n),n.typeName="ExecuteEidSigner",n.prototype.getBatchType=function(){return i.COMMAND_BATCH},n.prototype.createEventActionRequest=function(){var e=this;return function(i){t.ajax({url:"/eID-IdP/",type:"POST",cache:!1,timeout:6e5,dataType:"json",success:function(t){var n;e.piping.busyIndicator.hide(),t.error?(alert(t.error),i()):t.success?(n=t.claims,e.executeMappings(n,e.eventData.eidMappings),i()):(alert("eID signing failed."),i())},error:function(t){busyIndicator.hide(),t.responseText&&t.responseText.length>0&&"{"===t.responseText[0]?alert(JSON.parse(t.responseText).error):alert("eID signing failed."),i()}}),e.piping.busyIndicator.show()}};var a={};return n.prototype.executeMappings=function(t,i){var n=this;e.each(i,(function(e){var i=t[e.sourcePath];a[e.sourcePath]&&(i=a[e.sourcePath](i)),n.piping.parameters.locals.setValue(e.targetParameter,i)}))},n})),define("lq/events/actions/executeMethod",["underscore","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){e.call(this,t,i)}return e.extend(i,e),i.typeName="ExecuteMethod",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH},i.prototype.execute=function(e){var i="licquidMethod_"+this.eventData.method,n=this.piping.dropFactory.findDropByName(this.eventData.drop);if(!n)throw'Cannot find drop : "'+this.eventData.drop+'".';if(!n[i])throw'Cannot call method : "'+this.eventData.method+'" on drop "'+this.eventData.drop+'".';var a=this,o=t.object(t.map(t.keys(this.eventData.argumentMappings),(function(t){return[t,a.piping.parameters.getValue(a.eventData.argumentMappings[t])]})));n[i](o),e()},i})),define("lq/events/actions/executePlugin",["lq/events/actions/eventAction","lq/fileUpload"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="ExecutePlugin",i.prototype.getBatchType=function(){return this.eventData.doNotBatch?t.DO_NOT_BATCH:t.COMMAND_BATCH},i.prototype.createEventActionRequest=function(){var t=this,e={eventActionType:"ExecutePlugin",morphId:t.eventData.command,files:[]};return t.eventData.fileUploads&&t.eventData.fileUploads.length>0?(t.piping.busyIndicator.hide(),function(i){t.uploadFile(0,e,i)}):e},i.prototype.uploadFile=function(t,i,n){var a=this;if(t>=a.eventData.fileUploads.length)return a.piping.busyIndicator.show(),void n(i);var o=a.eventData.fileUploads[t];new e({accept:o.accept,multiple:o.multiple,onInvalidFileExtension:function(t,e){alert(t+" has invalid extension. Only "+e+" files are allowed.")},onFilesSelected:function(e){const r=function(s){if(s<e.length){const t=e[s],n=new FileReader;n.onload=function(e){const n=e.target.result;i.files.push({name:o.name,filename:t.name,data:n}),r(s+1)},n.readAsDataURL(t)}else a.uploadFile(t+1,i,n)};r(0)}}).do()},i})),define("lq/events/actions/executeQuery",["underscore","lq/events/actions/eventAction","lq/asyncSubcriptions"],(function(t,e,i){"use strict";function n(t,i){return e.call(this,t,i),this}return e.extend(n,e),n.typeName="ExecuteQuery",n.prototype.getBatchType=function(){return!this.eventData.dataSource.async||this.eventData.dataSource.initialDataSource?e.QUERY_BATCH:e.DO_NOT_BATCH},n.prototype.createEventActionRequest=function(){if(this.getBatchType()!==e.DO_NOT_BATCH){var i=[],n=this.piping.datasources.getDatasourceListenersThatListenFor(this.eventData.dataSource.id);return t.each(n,(function(e){var n={};"function"==typeof e.decorateDataFunc&&e.decorateDataFunc(n);var a=t.find(i,(function(e){return t.isEqual(e.params,n)}));a?a.listeners.push(e.id):i.push({listeners:[e.id],params:n})})),i.length>0?{eventActionType:"ExecuteQuery",actionId:this.piping.actionId,rootMorphId:this.eventData.dataSource.rootMorphId,queryObjectName:this.eventData.dataSource.id,queries:i}:void 0}},n.prototype.execute=function(e,n){if(n){var a=this;t.each(n.results,(function(e){t.each(e.listeners,(function(t){a.piping.datasources.getDatasourceListener(t).handler(e.result,!1)}))}))}this.eventData.dataSource.async?i.addDatasourceSubscription(this.piping,this.eventData.dataSource.id,this.eventData.dataSource.filter,this.receiveAsyncData.bind(this)).then(e):e()},n.prototype.receiveAsyncData=function(e,i){var n=this.piping.datasources.getDatasourceListenersThatListenFor(this.eventData.dataSource.id);"receiveResults"===e?t.each(n,(function(t){t.handler(i,!0)})):"deleteResult"===e&&t.each(n,(function(t){t.deleteHandler(i)}))},n})),define("lq/events/actions/executeTimer",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="ExecuteTimer",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){var e=this.eventData.timer,i=this.piping.dropFactory.findDropByName(e);if(!i)throw'Cannot find drop : "'+e+'" for execute timer event action.';if("function"!=typeof i.startTimer)throw'Drop : "'+e+'" for execute timer event action is not a timer.';i.startTimer(t)},e})),define("lq/events/actions/extractMailAttachment",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="ExtractMailAttachment",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"ExtractMailAttachment",commandId:this.eventData.command}},e})),define("lq/events/actions/eYouthAuthenticationCommand",["underscore","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){var n=this;return i.call(n,t,e),n.authWindows=[],n.listenForMessage((function(t){"eYouthAuthenticated"===t.eventName&&n.triggerEvent("authenticated")})),n}return i.extend(n,i),n.typeName="eYouthAuthenticationCommand",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH},n.prototype.execute=function(t){var i=window.top.outerHeight/2+window.top.screenY-387,n=window.top.outerWidth/2+window.top.screenX-515;this.authWindows.push(window.open(e.getTenantUrl("Sso/eYouth"),"eYouthAuth","scrollbars=on,top="+i+",left="+n+",width=1030,height=774")),t()},n.prototype.listenForMessage=function(e){var i=window.addEventListener?"addEventListener":"attachEvent",n=window.addEventListener?"message":"onmessage",a=this;window[i](n,(function(i){if(t.contains(a.authWindows,i.source))try{var n=JSON.parse(i.data);e(n)}catch(t){}}),!1)},n})),define("lq/events/actions/eYouthAuthenticationLogoutCommand",["underscore","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){var n=this;return i.call(n,t,e),n.authWindows=[],n.listenForMessage((function(t){"eYouthAuthenticated"===t.eventName&&n.triggerEvent("loggedOff")})),n}return i.extend(n,i),n.typeName="eYouthAuthenticationLogoutCommand",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH},n.prototype.execute=function(t){var i=window.top.outerHeight/2+window.top.screenY-387,n=window.top.outerWidth/2+window.top.screenX-515;this.authWindows.push(window.open(e.getTenantUrl("Sso/eYouthLogout"),"eYouthAuth","scrollbars=on,top="+i+",left="+n+",width=1030,height=774")),t()},n.prototype.listenForMessage=function(e){var i=window.addEventListener?"addEventListener":"attachEvent",n=window.addEventListener?"message":"onmessage",a=this;window[i](n,(function(i){if(t.contains(a.authWindows,i.source))try{var n=JSON.parse(i.data);e(n)}catch(t){}}),!1)},n})),define("lq/events/actions/focus",["lq/events/actions/eventAction","jquery"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="Focus",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){var e=this.piping.dropFactory.findDropById(this.eventData.morphId);e&&e.focus(),t()},i})),define("lq/events/actions/forEach",["lq/events/actions/eventAction"],(function(t){"use strict";var e=function(e,i){return t.call(this,e,i),this.eventName=e.forEach.eventName,this.eventArg=e.forEach.eventArg,this.dataSource=e.forEach.dataSource,this};return t.extend(e,t),e.typeName="ForEach",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){var e=this;e.shouldContinueWithoutDoingAnything()?t():e.piping.queryDispatcher.dispatch(e.dataSource.id,(function(i){e.handleForEach(t,i.results,0)}))},e.prototype.shouldContinueWithoutDoingAnything=function(){return!this.piping.eventing.hasSubscribers(this.eventName)},e.prototype.handleForEach=function(t,e,i){var n=this;if(i+1>e.length)t();else{var a=e[i][n.eventArg];n.piping.eventing.publish(n.eventName,n.eventSource,a,(function(){n.handleForEach(t,e,i+1)}),n.getEventActionIdentifier())}},e})),define("lq/events/actions/formula",["lq/events/actions/eventAction","jquery","underscore","globalize","lq/constants"],(function(t,e,i,n,a){"use strict";function o(e,i){return t.call(this,e,i),this.formula=this.eventData.formula,this}t.extend(o,t),o.typeName="Formula",o.prototype.getBatchType=function(){return t.DO_NOT_BATCH};var r=function(t,n){return function(t,n){var a=t.getAllDrops(),o=i.filter(a,(function(t){return t.data.viewModelKey&&t.getValue}));e.each(o,(function(t,e){n[e.data.viewModelKey]=e.getValue()}))}(t,n),function(t){var e=[],i=[];for(var n in t)if(n.match(/^[$A-Za-z_][0-9A-Za-z_$]*$/g)){var a=t[n];e.push(n),i.push(a)}return{args:e,values:i}}(n)};return o.prototype.execute=function(t){var e,i,o=r(this.piping.dropFactory,this.piping.parameters.getAll()),s=(e=this.formula,-1==(i=e.expression).indexOf("\n")&&0==!i.indexOf("return")&&(i="return "+i+";"),i),A=this;(function(t,e){var i=this;return new Promise((function(o){var r=new Function(e.args,t).apply(i,e.values);null!=r&&r.constructor===Date&&(r=n.format(r,a.licquidDateFormat)),o(r)}))})(s,o).then((function(e){(A.formula.targetParameterIsGlobal?A.piping.parameters.globals:A.piping.parameters.locals).setValue(A.formula.targetParameter,e),t()}))},o})),define("lq/events/actions/generateText",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="GenerateText",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){var e=this.piping.parameters.replace(this.eventData.textTemplate);this.piping.parameters.locals.setValue(this.eventData.targetParameter,e),t()},e})),define("lq/events/actions/import",["lq/events/actions/eventAction","lq/uploader"],(function(t,e){"use strict";var i=function(e,i){return t.call(this,e,i),this.data=e.excelImport,this};return t.extend(i,t),i.typeName="Import",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){var i=this;new e(this.piping).toTenantUrl("Import/"+i.eventData.type).withParameters({actionId:this.piping.actionId,importMorphId:this.eventData.command,localParameters:JSON.stringify(this.piping.parameters.locals.getAll()),globalParameters:JSON.stringify(this.piping.parameters.globals.getAll())}).onFileUploaded((function(e){if(e.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(e&&e.success)_.each(e.globalParameters,(function(t,e){i.piping.parameters.globals.setValue(e,t)})),_.each(e.localParameters,(function(t,e){i.piping.parameters.locals.setValue(e,t)})),i.eventData.filenameParameter&&e.filename&&i.piping.parameters.locals.setValue(i.eventData.filenameParameter,e.filename),t();else if(e.report){var n=i.convertReportToErrorMessage(e.report);i.piping.errorHandler.handleError(n)||alert(n)}else{var a=e&&e.message?e.message:"The file could not be imported.";i.piping.errorHandler.handleError(a)||alert(a)}})).uploadSingleFile()},i.prototype.convertReportToErrorMessage=function(t){if(1===t.length){return"One or more errors occurred during the import. The affected lines were not imported.\n"+this.mergeErrorMessages(t[0])}var e=this,i=_.map(t,(function(t){var i=e.mergeErrorMessages(t);return'One or more errors occurred during the import of "'+t.name+'". The affected lines were not imported.'+"\n"+i}));return i.join("\n")},i.prototype.mergeErrorMessages=function(t){return _.map(t.errors,(function(t){return"Row "+(t.row+1)+(null!=t.column?" Column "+t.column:"")+": "+t.message})).join("\n")},i})),define("lq/events/actions/languageCommand",["jquery","lq/events/actions/eventAction","lq/runtimeUrl"],(function(t,e,i){"use strict";function n(t,i){return e.call(this,t,i),this}return e.extend(n,e),n.typeName="LanguageCommand",n.prototype.getBatchType=function(){return this.eventData.refreshPage?e.DO_NOT_BATCH:e.COMMAND_BATCH},n.prototype.createEventActionRequest=function(){return{eventActionType:"SwitchLanguage",commandId:this.eventData.command}},n.prototype.execute=function(t,e){e.queryString&&this.piping.url.overwriteLicquidParameter(i.parameters.language,e.queryString),this.refreshPageOrContinueEvents(t,e),this.piping.parameters.systems.setValue("CurrentLanguage",e.languageCode)},n.prototype.refreshPageOrContinueEvents=function(e,i){if(i.refreshPage){var n=t.extend({},this.piping.queryString.getParameters());document.location.href=this.piping.url.prepare("",n)}else e()},n})),define("lq/events/actions/login",["jquery","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){return i.call(this,t,e),this}i.extend(n,i),n.typeName="Login",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH};return n.prototype.getUsername=function(){return this.piping.dropFactory.findDropByViewModelKey(this.eventData.usernameField).getValue()},n.prototype.getPassword=function(){return this.piping.dropFactory.findDropByViewModelKey(this.eventData.passwordField).getValue()},n.prototype.getCaptcha=function(){if(!this.eventData.captchaField)return null;var t=this.piping.dropFactory.findDropByName(this.eventData.captchaField);return t.data.captchaInputField?this.piping.dropFactory.findDropByName(t.data.captchaInputField).getValue():null},n.prototype.execute=function(i){var n=this.getUsername(),a=this.getPassword(),o=this.getCaptcha(),r=this.piping.queryString.getValueOf("ReturnUrl"),s=this;this.piping.dispatcher.dispatch("LicquidAction/LoginCommand",{actionId:this.piping.actionId,commandId:this.eventData.command,captcha:o,appId:this.piping.queryString.getValueOf("AppId"),parameters:{username:n,password:a}},(function(n){!function(i,n,a,o,r){if("Success"===n.status)a=a||e.getTenantUrl(""),i.eventIsEnabled("userLoggedIn")?i.piping.dispatcher.refreshCsrfToken((function(){i.triggerEvent("userLoggedIn",o,a)})):window.location=a;else{if(r&&t("body").show(),"LoginFromLocalStorageFailed"===n.status)return;"InvalidCaptcha"===n.status?i.handleError("invalidCaptcha","The captcha is incorrect.",o):"InvalidCredentials"===n.status?i.handleError("invalidCredentials","The username or password provided is incorrect.",o):"UserLoginNotAllowed"===n.status?i.handleError("userLoginNotAllowed","The user is not allowed to log in.",o):"AccountLocked"===n.status?i.handleError("accountLocked","Your account has been locked out because of too many invalid login attempts.",o):alert("Unable to login.")}}(s,n,r,i,!1)}))},n.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},n})),define("lq/storage",[],(function(){"use strict";return{localStorageIsAvailable:function(){try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(t){return!1}}}})),define("lq/events/actions/logoffCommand",["lq","lq/storage","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){i.call(this,t,e)}return i.extend(n,i),n.typeName="LogoffCommand",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH},n.prototype.execute=function(i){var n=this;this.piping.dispatcher.dispatch("LicquidAction/LogOff").done((function(a){e.localStorageIsAvailable()&&(localStorage.removeItem("licquidAuthCookie"),localStorage.removeItem("licquidAuthCommandId")),a&&a.isFederated?window.location=t.getTenantUrl("FederatedLogin/Logout"):n.eventIsEnabled("userLoggedOff")?n.piping.dispatcher.refreshCsrfToken((function(){n.triggerEvent("userLoggedOff",i)})):window.location=t.getTenantUrl("")}))},n})),define("lq/events/actions/mail",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this}return e.extend(i,e),i.typeName="Mail",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"SendMail",morphId:this.eventData.command}},i.prototype.execute=function(t){this.eventIsEnabled("sent")?this.triggerEvent("sent",t):t()},i})),define("lq/events/actions/mapping",["underscore","lq/events/actions/eventAction","lq/entityFiltersState","lq/constants","lq/asyncSubcriptions"],(function(t,e,i,n,a){"use strict";function o(t,i){e.call(this,t,i),this.mapping=t.mapping}return e.extend(o,e),o.typeName="Mapping",o.prototype.getBatchType=function(){return"DataSource"!==this.mapping.type||this.mapping.dataSource.async&&!this.mapping.dataSource.initialDataSource?e.DO_NOT_BATCH:e.QUERY_BATCH},o.prototype.createEventActionRequest=function(){if(this.getBatchType()!==e.DO_NOT_BATCH)return{eventActionType:"ExecuteMapping",mappingsId:this.mapping.mappingsId,mappingName:this.mapping.mappingName}},o.prototype.execute=function(t,e){if("DataSource"===this.mapping.type)e&&this._doMappingFromDataSource(e),this.mapping.dataSource.async?a.addDatasourceSubscription(this.piping,this.mapping.dataSource.id,this.mapping.dataSource.filter,this.receiveAsyncData.bind(this)).then(t):t();else if("Parameter"===this.mapping.type)this._doMappingFromParameter(),t();else if("ViewModel"===this.mapping.type)this._doMappingFromViewModel(),t();else if("QueryString"===this.mapping.type)this._doMappingFromQueryString(),t();else if("FixedValue"===this.mapping.type)this._doMappingFromFixedValue(),t();else{if("NullValue"!==this.mapping.type)throw new Error("Unknown type of mapping encountered");this._doMappingFromNullValue(),t()}},o.prototype.receiveAsyncData=function(t,e){"receiveResults"===t&&this._doMappingFromDataSource({queryResult:e})},o.prototype._doMappingFromDataSource=function(e){var n=this,a=e.queryResult;t.each(this.mapping.fields,(function(e){var o=a.results[0];if("EntityFilters"===e.target)i.restoreStateOfFilters(n.rootDrop,o[e.sourceOutput]);else if(e.targetViewModelKey){var r=n.piping.dropFactory.findDropByViewModelKey(e.targetViewModelKey);r&&(null==o||NaN===o||""===o?r.clearValue():r.supportsManyToManyData()?r.setValue({type:a.outputs[e.sourceOutput],value:t.map(a.results,(function(t){return t[e.sourceOutput]}))}):r.setValue({type:a.outputs[e.sourceOutput],value:o[e.sourceOutput]}))}else e.targetParameterIsGlobal?n.piping.parameters.globals.setValue(e.targetParameter,o?o[e.sourceOutput]:null):n.piping.parameters.locals.setValue(e.targetParameter,o?o[e.sourceOutput]:null)}));var o=this.piping.datasources.getDatasourceListenersThatListenForWithDefaultParams(this.mapping.dataSource.id);t.each(o,(function(t){t.handler(a)}))},o.prototype._doMappingFromViewModel=function(){var e=this;t.each(this.mapping.fields,(function(t){var i=e.piping.dropFactory.findDropByViewModelKey(t.sourceViewModelKey);if(i){var n=i.getValue();e._mapValue(t,n)}}))},o.prototype._doMappingFromParameter=function(){var e=this;t.each(this.mapping.fields,(function(t){var i=e.piping.parameters.getValue(t.sourceParameter);e._mapValue(t,i)}))},o.prototype._doMappingFromQueryString=function(){var e=this;t.each(this.mapping.fields,(function(t){var i=e.piping.queryString.getValueOf(t.sourceParameter);e._mapValue(t,i)}))},o.prototype._doMappingFromFixedValue=function(){var e=this;t.each(this.mapping.fields,(function(t){e._mapValue(t,t.sourceValue)}))},o.prototype._doMappingFromNullValue=function(){var e=this;t.each(this.mapping.fields,(function(t){e._mapValue(t,null)}))},o.prototype._mapValue=function(t,e){if(t.targetViewModelKey){var i=this.piping.dropFactory.findDropByViewModelKey(t.targetViewModelKey);i&&(null==e||NaN===e||""===e?i.clearValue():i.setValue({type:n.valueTypes.string,value:e}))}else t.targetParameterIsGlobal?this.piping.parameters.globals.setValue(t.targetParameter,e):this.piping.parameters.locals.setValue(t.targetParameter,e)},o})),define("lq/events/actions/mollie",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="Mollie",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"CreateMolliePayment",commandId:this.eventData.command}},e.prototype.execute=function(t,e){e.paymentUrl?window.location.href=e.paymentUrl:t()},e.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},e})),define("lq/events/actions/mollieCreateCustomer",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="MollieCreateCustomer",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"CreateMollieCustomer",commandId:this.eventData.command}},e})),define("lq/events/actions/mollieUpdateCustomer",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="MollieUpdateCustomer",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"UpdateMollieCustomer",commandId:this.eventData.command}},e})),define("lq/events/actions/officeAddinLoginCommand",["underscore","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";var n=!1,a=[];function o(t,e){i.call(this,t,e)}i.extend(o,i),o.typeName="OfficeAddinLoginCommand",o.prototype.getBatchType=function(){return i.DO_NOT_BATCH},o.prototype.execute=function(e){n?this.startReadingMessage(e):(a.push(this.startLogin.bind(this,e)),require(["https://appsforoffice.microsoft.com/lib/1/hosted/Office.js"],(function(){Office.initialize=function(){n=!0,t.each(a,(function(t){t()}))}})))};return o.prototype.startLogin=function(t){var i=this,n=this.piping.queryString.getValueOf("ReturnUrl");Office.context.mailbox.getCallbackTokenAsync((function(a){if("succeeded"!==a.status)throw new Error("Unable to get a token from Outlook.");i.piping.dispatcher.dispatch("Outlook/LogIn",{actionId:i.piping.actionId,commandId:i.eventData.commandId,ewsUrl:Office.context.mailbox.ewsUrl,callbackToken:a.value,itemId:Office.context.mailbox.item.itemId}).then((function(a){!function(t,i,n,a){"Success"===i.status?(n=n||e.getTenantUrl(""),t.eventIsEnabled("userLoggedIn")?t.piping.dispatcher.refreshCsrfToken((function(){t.triggerEvent("userLoggedIn",a,n)})):window.location=n):"InvalidCredentials"===i.status||"UserNotFound"===i.status?t.handleError("invalidCredentials","The username or password provided is incorrect.",a):"UserLoginNotAllowed"===i.status?t.handleError("userLoginNotAllowed","The user is not allowed to log in.",a):"AccountLocked"===i.status?t.handleError("accountLocked","Your account has been locked out because of too many invalid login attempts.",a):alert("Unable to login.")}(i,a,n,t)}))})),o.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())}},o})),define("lq/events/actions/openDocumentInOfficeOnline",["underscore","lq/events/actions/eventAction","lq","lq/util","lq/dispatcher","lq/cookie","lq/formSubmission"],(function(t,e,i,n,a,o,r){"use strict";function s(t,i){return e.call(this,t,i),this.eventData=t,this}return e.extend(s,e),s.typeName="OpenDocumentInOfficeOnline",s.prototype.getBatchType=function(){return e.DO_NOT_BATCH},s.prototype.execute=function(t){var e=this,n=e.piping.parameters.getValue(e.eventData.idParameter);if(n){var o="wopi-window-"+e.eventData.commandId+"-"+Date.now(),s=window.open("",o),A=new r(e.piping.url.prepare(i.getTenantUrl("Wopi/Open")),o);A.addProperty("actionId",e.piping.actionId),A.addProperty("commandId",e.eventData.commandId),A.addProperty("documentId",n),A.addParameters("parameters",e.piping.parameters.getNonSystemParameters()),A.submit();var l=!1,d=null,c=null,u=setInterval((function(){s.closed&&(clearInterval(u),l=!0,d=Date.now(),e.eventIsEnabled("closed")&&e.triggerEvent("closed"))}),500);if(e.eventIsEnabled("saved")||e.eventIsEnabled("savedafterclosed")){var h=function(){l&&Date.now()-d>3e4?e.eventIsEnabled("savedafterclosed")&&e.triggerEvent("savedafterclosed"):a.dispatch("Wopi/GetModificationDate",{actionId:e.piping.actionId,commandId:e.eventData.commandId,documentId:n},(function(t){var i=c&&c!==t;c=t,i&&(e.eventIsEnabled("saved")&&e.triggerEvent("saved"),l)?e.eventIsEnabled("savedafterclosed")&&e.triggerEvent("savedafterclosed"):setTimeout(h,2e3)}),{global:!1},(function(){setTimeout(h,2e3)}))};h()}t()}else t()},s})),define("lq/events/actions/pain001ExportCommand",["lq/events/actions/eventAction","jquery","lq","lq/cookie","lq/formSubmission"],(function(t,e,i,n,a){"use strict";function o(e,i){return t.call(this,e,i),this}return t.extend(o,t),o.typeName="Pain001ExportCommand",o.prototype.getBatchType=function(){return t.DO_NOT_BATCH},o.prototype.createEventActionRequest=function(){if(!this.eventData.downloadOnly)return{eventActionType:"Pain001Export",command:this.eventData.command}},o.prototype.execute=function(t,e){if(this.eventData.downloadOnly){var o="pain0001-export-"+Date.now(),r=new a(this.piping.url.prepare(i.getTenantUrl("Export/Pain001")));r.addProperty("actionId",this.piping.actionId),r.addProperty("pain001ExportId",this.eventData.command),r.addProperty("token",o),r.addParameters("parameters",this.piping.parameters.getNonSystemParameters()),r.submit();var s=function(){null===n.get(o)?setTimeout(s,200):t()};s()}else if(e.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(e.download){var A={url:e.url,filename:e.filename,openInBrowser:!1};window.location=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),A),t()}else t()},o})),define("lq/events/actions/payment",["lq/events/actions/eventAction","jquery"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="Payment",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){var e=this.piping.dropFactory.findDropById(this.eventData.command);e&&e.executePayment(),t()},i})),define("lq/events/actions/paypal",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="Paypal",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(){var t={actionId:this.piping.actionId,morphId:this.eventData.command,parameters:this.piping.parameters.getNonSystemParameters()};this.piping.dispatcher.dispatch("LicquidAction/CreatePayPalCheckout",t).done(this.paymentInitialized.bind(this))},e.prototype.paymentInitialized=function(t){window.location.href=t.approvalUrl},e})),define("lq/events/actions/pdfDataCommand",["lq/events/actions/eventAction"],(function(t){"use strict";var e=function(e,i){return t.call(this,e,i),this};return t.extend(e,t),e.typeName="PdfDataCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"PdfData",command:this.eventData.command}},e})),define("lq/events/actions/pdfMergeCommand",["lq/events/actions/eventAction","lq"],(function(t,e){"use strict";var i=function(e,i){return t.call(this,e,i),this};return t.extend(i,t),i.typeName="PdfMergeCommand",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"PdfMerge",command:this.eventData.command}},i.prototype.execute=function(t,i){if(i.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else{if(i.download){var n=e.getTenantUrl("PdfMerge/?actionId="+i.actionId+"&pdfMergeId="+i.pdfMergeId+"&parameters="+encodeURIComponent(JSON.stringify(this.piping.parameters.getNonSystemParameters()||{}))+"#toolbar=1");window.open(n)}t()}},i})),define("lq/events/actions/pdfMergeCommand_v2",["lq/events/actions/eventAction","lq"],(function(t,e){"use strict";var i=function(e,i){return t.call(this,e,i),this};return t.extend(i,t),i.typeName="PdfMergeCommand_v2",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"PdfMerge",command:this.eventData.command}},i.prototype.execute=function(t,i){if(i.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else{if(i.download){var n=e.getTenantUrl("PdfMerge/?actionId="+i.actionId+"&pdfMergeId="+i.pdfMergeId+"&parameters="+encodeURIComponent(JSON.stringify(this.piping.parameters.getNonSystemParameters()||{}))+"#toolbar=1");window.open(n)}t()}},i})),define("lq/events/actions/platformCommand",["lq/events/actions/eventAction","jquery","underscore","lq"],(function(t,e,i,n){"use strict";function a(e,i){return t.call(this,e,i),this.mapping=e.mapping,this}return t.extend(a,t),a.typeName="PlatformCommand",a.prototype.getBatchType=function(){return t.DO_NOT_BATCH},a.prototype.createEventActionRequest=function(){var t={};return i.each(this.piping.dropFactory.getAllDrops(),(function(e){if(e.getValue){var i=e.getValue();t[e.data.viewModelKey]=i}})),{eventActionType:"PlatformCommand",command:this.eventData.command,commandViewModelKeys:t}},a.prototype.execute=function(t,e){if(e.outputs){var n=this;i.each(this.mapping.fields,(function(t){n.piping.parameters.locals.setValue(t.targetParameter,e.outputs[t.sourceOutput])}))}t()},a})),define("lq/events/actions/plugInLogin",["jquery","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){return i.call(this,t,e),this}return i.extend(n,i),n.typeName="PlugInLogin",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH},n.prototype.execute=function(t){this.piping.dispatcher.dispatch("LicquidAction/LoginCommand",{actionId:this.piping.actionId,commandId:this.eventData.command,captcha:this.getCaptcha(),appId:this.piping.queryString.getValueOf("AppId"),parameters:this.getParameters()},this.handleResult.bind(this,t))},n.prototype.getParameters=function(){var t={},e=this;return _.each(this.eventData.parameterMappings,(function(i){t[i.targetParameter]=e.piping.parameters.getValue(i.sourceParameter)})),t},n.prototype.handleResult=function(t,i){if("Success"===i.status){var n=this.piping.queryString.getValueOf("ReturnUrl")||e.getTenantUrl("");this.eventIsEnabled("userLoggedIn")?this.triggerEvent("userLoggedIn",t,n):window.location=n}else"InvalidCredentials"===i.status?this.handleError("invalidCredentials","The credentials are invalid.",t):"InvalidCaptcha"===i.status?this.handleError("invalidCaptcha","The captcha is incorrect.",t):"UserLoginNotAllowed"===i.status?self.handleError("userLoginNotAllowed","The user is not allowed to log in.",t):alert("Unable to login.")},n.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},n.prototype.getCaptcha=function(){if(!this.eventData.captchaField)return null;var t=this.piping.dropFactory.findDropByName(this.eventData.captchaField);return t.data.captchaInputField?this.piping.dropFactory.findDropByName(t.data.captchaInputField).getValue():null},n})),define("lq/events/actions/pushNotificationsCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="PushNotificationsCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"PushNotifications",command:this.eventData.command}},e})),define("lq/events/actions/raiseEvent",["lq/events/actions/eventAction","jquery"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="RaiseEvent",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){if(this.eventData.eventReceiver){var e=this.piping.dropFactory.findDropById(this.eventData.eventReceiver);if(e){var i={eventName:this.eventData.eventName,args:[this.getEventValue()]};e.triggerEventForChild(i)}t()}else this.piping.eventing.publish(this.eventData.eventName,this.eventSource,this.getEventValue(),t,this.getEventActionIdentifier())},i.prototype.getEventValue=function(){return this.eventData.eventParameter?this.piping.parameters.getValue(this.eventData.eventParameter):null},i})),define("lq/events/actions/readOutlookMessage",["underscore","globalize","lq/events/actions/eventAction","lq/constants"],(function(t,e,i,n){"use strict";var a=!1,o=[];function r(t,e){i.call(this,t,e)}return i.extend(r,i),r.typeName="ReadOutlookMessage",r.prototype.getBatchType=function(){return i.DO_NOT_BATCH},r.prototype.execute=function(e){a?this.startReadingMessage(e):(o.push(this.startReadingMessage.bind(this,e)),require(["https://appsforoffice.microsoft.com/lib/1/hosted/Office.js"],(function(){Office.initialize=function(){a=!0,t.each(o,(function(t){t()}))}})))},r.prototype.startReadingMessage=function(t){if(this.eventData.storeMessage){var e=this;Office.context.mailbox.getCallbackTokenAsync((function(i){if("succeeded"!==i.status)throw new Error("Unable to get a token from Outlook.");e.piping.dispatcher.dispatch("Outlook/FetchMessage",{actionId:e.piping.actionId,commandId:e.eventData.commandId,ewsUrl:Office.context.mailbox.ewsUrl,callbackToken:i.value,itemId:Office.context.mailbox.item.itemId}).then((function(i){e.eventData.messageEntityId&&e.piping.parameters.locals.setValue(e.eventData.messageEntityId,i.id),e.readParameters(t)}))}))}else this.readParameters(t)},r.prototype.readParameters=function(t){var i=Office.context.mailbox.item;if(this.eventData.subject&&this.piping.parameters.locals.setValue(this.eventData.subject,i.subject),this.eventData.sender&&this.piping.parameters.locals.setValue(this.eventData.sender,this.printEmailAddress(i.sender)),this.eventData.to&&this.piping.parameters.locals.setValue(this.eventData.to,this.printEmailAddresses(i.to)),this.eventData.cc&&this.piping.parameters.locals.setValue(this.eventData.cc,this.printEmailAddresses(i.cc)),this.eventData.bcc&&this.piping.parameters.locals.setValue(this.eventData.bcc,this.printEmailAddresses(i.bcc)),this.eventData.hasAttachments&&this.piping.parameters.locals.setValue(this.eventData.hasAttachments,i.attachments.length>0),this.eventData.dateTimeCreated){var a=e.format(i.dateTimeCreated,n.licquidDateFormat);this.piping.parameters.locals.setValue(this.eventData.dateTimeCreated,a)}if(this.eventData.body){var o=this;i.body.getAsync("text",(function(e){if("succeeded"!==e.status)throw new Error("Unable to get the body of the mail from Outlook.");o.piping.parameters.locals.setValue(o.eventData.body,e.value),t()}))}else t()},r.prototype.printEmailAddresses=function(e){return t.map(e,this.printEmailAddress.bind(this)).join(", ")},r.prototype.printEmailAddress=function(t){return t?"emailAddress"===this.eventData.displayMode?t.emailAddress:"displayName"===this.eventData.displayMode?t.displayName:t.displayName+" <"+t.emailAddress+">":null},r})),define("lq/events/actions/redirect",["lq","./eventAction","lq/util"],(function(t,e,i){"use strict";function n(t,i){return e.call(this,t,i),this}return e.extend(n,e),n.typeName="Redirect",n.prototype.getBatchType=function(){return e.DO_NOT_BATCH},n.prototype.execute=function(t){if("Reload"===this.eventData.redirect.type)window.location.reload();else if(this.isJumpToPrevious(this.eventData.redirect)){var e=this.piping.parameters.globals.getAll(),i=this.getLocalsForNextPage(this.eventData.redirect);this.piping.navigator.goToPrevious(e,i),t()}else if(this.isJumpOutsideApplication(this.eventData.redirect)){var n=this.getUrl(this.eventData.redirect);this.piping.url.openUrl(n,this.eventData.redirect.jumpToNewWindow),this.eventData.redirect.jumpToNewWindow?t():(this.linkWillNotCauseNavigationToAnotherPage(n)&&t(),this.piping.busyIndicator.forceHide())}else this.redirectToActionWrapper()},n.prototype.isJumpToPrevious=function(t){return"Previous"===t.type},n.prototype.isJumpOutsideApplication=function(t){return t.url||t.applicationName||t.controllerAction},n.prototype.getUrl=function(e){if(e.controllerAction){var n=t.getTenantUrl("LicquidAction/"+e.controllerAction);return this.piping.url.prepare(n,this.getParameters())}if(e.applicationName){var a=t.getBaseUrl(t.getTenantName()+"/"+e.applicationName+"/LicquidAction/Get/"+e.actionId);return this.piping.url.prepare(a,this.getParameters())}if(e.url){var o=e.isUrlFromParameter?this.piping.parameters.getValue(e.url):e.url;if(-1!==o.indexOf("@"))return this.isEmailLink(o)?o:"mailto:"+o;var r=this.getLocalsForNextPage(this.eventData.redirect);return-1===o.indexOf("tel:")&&(o=i.convertRelativeHyperlinkToHostName(o)),_.keys(r).length>0&&(o=o+"?parameters="+encodeURIComponent(JSON.stringify(r))),o}},n.prototype.getParameters=function(){var t={},e=this.piping.parameters.globals.getAll();_.keys(e).length>0&&(t.globals=JSON.stringify(e));var i=this.getLocalsForNextPage(this.eventData.redirect);return _.keys(i).length>0&&(t.parameters=JSON.stringify(i)),t},n.prototype.linkWillNotCauseNavigationToAnotherPage=function(t){return 0===(t=t.toLowerCase()).indexOf("mailto:")||0===t.indexOf("skype:")||0===t.indexOf("tel:")||0===t.indexOf("webcal:")},n.prototype.getActionId=function(t){return t.actionId?t.actionId:this.piping.parameters.getValue(t.actionIdParameter)},n.prototype.isEmailLink=function(t){return 0===t.toLowerCase().indexOf("mailto:")},n.prototype.getLocalsForNextPage=function(t){if(!t.jumpParameters)return{};for(var e={},i=0;i<t.jumpParameters.length;i++){var n=t.jumpParameters[i];e[n]=this.piping.parameters.locals.getValue(n)}return e},n.prototype.redirectToActionWrapper=function(){var t=this.getActionId(this.eventData.redirect),e=this.getLocalsForNextPage(this.eventData.redirect),i=this.piping.parameters.globals.getAll();this.rootDrop.options.cqConfiguration&&this.rootDrop.options.cqConfiguration.navigationTrailEnabled?this.updateNavigationTrailAndRedirect(t,e,i):this.redirectToAction(t,e,i)},n.prototype.redirectToAction=function(t,e,i){this.piping.navigator.openAction(t,i,e,this.eventData.redirect.jumpToNewWindow),this.eventData.redirect.jumpToNewWindow&&this.piping.busyIndicator.forceHide()},n.prototype.updateNavigationTrailAndRedirect=function(t,e,i){var n=this;this.piping.dispatcher.dispatch("LicquidAction/UpdateNavigationTrail",{url:this.getTargetUrl(t,e,i),globalParameters:this.piping.parameters.globals.getAll(),rollbackEnabled:this.eventData.redirect.rollbackEnabled,fromActionId:this.piping.actionId,fromLocalParameters:this.piping.parameters.locals.getAll(),toActionId:this.getActionId(this.eventData.redirect),toLocalParameters:this.getLocalsForNextPage(this.eventData.redirect)}).done((function(){n.redirectToAction(t,e,i)}),$.noop)},n.prototype.getTargetUrl=function(e,i,n){var a={};return _.keys(n).length&&(a.globals=JSON.stringify(n)),_.keys(i).length&&(a.parameters=JSON.stringify(i)),this.piping.url.prepare(t.getFullUrl(t.getTenantUrl("LicquidAction/Get/"+e)),a)},n})),define("lq/events/actions/refreshCaptcha",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="RefreshCaptcha",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){this.piping.dropFactory.findDropByName(this.eventData.captchaField).refreshCaptcha(),t()},e})),define("lq/events/actions/refreshLoggedInUserCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="RefreshLoggedInUserCommand",e.prototype.getBatchType=function(){return this.eventData.cookieOnly?t.DO_NOT_BATCH:t.DO_NOT_BATCH.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){if(!this.eventData.cookieOnly)return{eventActionType:"RefreshLoggedInUser",command:this.eventData.command}},e.prototype.execute=function(t){this.eventData.cookieOnly?this.piping.dispatcher.dispatch("LicquidAction/RefreshCurrentUser").then((function(){t()})):t()},e})),define("lq/events/actions/reportCommand",["lq/events/actions/eventAction","lq","when"],(function(t,e,i){"use strict";function n(e,i){return t.call(this,e,i),this}return t.extend(n,t),n.typeName="ReportCommand",n.prototype.getBatchType=function(){return t.DO_NOT_BATCH},n.prototype.execute=function(t){var n=this,a=this.piping;this.piping.dispatcher.dispatchToAbsoluteUrl(this.piping.url.prepare(e.getTenantUrl("Report/"),{}),{actionId:this.rootDrop.data.id,commandId:this.eventData.command,globals:a.parameters.globals.getAll(),locals:a.parameters.locals.getAll()}).then((function(o){if(o.ticketNumber){function r(){return $.get({url:e.getTenantUrl("Report/IsReady"),data:{ticketNumber:o.ticketNumber},cache:!1})}function s(r){return i.promise((function(i,A,l){setTimeout((function(){i(r().always((function(i,A,l){if(202===l.status)return s(r);if(200===l.status)if(i.isDirty)n.eventIsEnabled("onExecutionTrailDirty")?n.triggerEvent("onExecutionTrailDirty"):alert("Could not create report, because the data is dirty.");else{if(i.download){var d=i.url?a.url.prepare(e.getTenantUrl("DynamicContent/DownloadFile"),{url:i.url,filename:i.filename,openInBrowser:"download"!==i.downloadBehaviour}):a.url.prepare(e.getTenantUrl("Report/Download"),{ticketNumber:o.ticketNumber});"openInCurrentTab"===i.downloadBehaviour||"download"===i.downloadBehaviour?window.location=d:window.open(d+"#toolbar=1")}if(i.entityIdParameter)(i.entityIdParameterIsGlobal?a.parameters.globals:a.parameters.locals).setValue(i.entityIdParameter,i.entityIdValue);t()}})))}),1e3)}))}s(r)}else t()})).catch((function(){alert("Something went wrong while creating the report.")}))},n})),define("lq/events/actions/rssCommand",["lq/events/actions/eventAction","jquery","lq"],(function(t,e,i){"use strict";function n(e,i){return t.call(this,e,i),this}return t.extend(n,t),n.typeName="RssCommand",n.prototype.getBatchType=function(){return t.DO_NOT_BATCH},n.prototype.execute=function(t){var e={rssId:this.eventData.command,parameters:JSON.stringify(this.piping.parameters.getNonSystemParameters())};window.location=this.piping.url.prepare(i.getTenantUrl("Export/Rss"),e),t()},n})),define("lq/events/actions/saveMorph",["lq/events/actions/eventAction","lq/events/abortError","underscore"],(function(t,e,i){"use strict";function n(e,i){t.call(this,e,i)}return t.extend(n,t),n.typeName="SaveMorph",n.prototype.getBatchType=function(){return t.COMMAND_BATCH},n.prototype.createEventActionRequest=function(){return this.piping.dropFactory.findDropById(this.eventData.saveableMorphId).getBatchOfCommands()},n.prototype.execute=function(t,e){var i=this.piping.dropFactory.findDropById(this.eventData.saveableMorphId);i.receiveBatchOfCommandsResult&&i.receiveBatchOfCommandsResult(e.identifiers),t()},n})),define("lq/events/actions/scheduledTaskCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="ScheduledTaskCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"ScheduledTask",ObjectName:this.eventData.command}},e})),define("lq/events/actions/scrollTo",["lq/events/actions/eventAction","jquery"],(function(t,e){"use strict";function i(e,i){t.call(this,e,i)}return t.extend(i,t),i.typeName="ScrollTo",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){var e=this,i=e.piping.dropFactory.findDropByName(e.eventData.scrollTo);if(!i)throw'Cannot find drop : "'+e.eventData.timer+'" for scroll to event action.';i.isVisible()&&this.piping.$actionWrapper.animate({scrollTop:i.$element.offset().top},{queue:!1}),t()},i})),define("lq/events/actions/serverCommand",["lq/events/actions/eventAction","jquery","underscore","lq","lq/events/abortError"],(function(t,e,i,n,a){"use strict";function o(e,i){t.call(this,e,i)}return t.extend(o,t),o.typeName="ServerCommand",o.prototype.getBatchType=function(){return t.COMMAND_BATCH},o.prototype.createEventActionRequest=function(){var t={};return i.each(this.piping.dropFactory.getAllDrops(),(function(e){if(e.getValue){var i=e.getValue();t[e.data.viewModelKey]=i}})),{eventActionType:"ServerCommand",command:this.eventData.command,commandViewModelKeys:t}},o})),define("lq/events/actions/setParameterFromEvent",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="SetParameterFromEvent",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){(this.eventData.global?this.piping.parameters.globals:this.piping.parameters.locals).setValue(this.eventData.parameter,this.eventArg),t()},e})),define("lq/events/actions/setVisibility",["lq/events/actions/eventAction"],(function(t){"use strict";var e={top:"bottom",bottom:"top",left:"right",right:"left"},i=function(t,e){return t.srcElementX-t.scrollLeft+e<=t.windowWidth},n=function(t,e){return t.srcElementX-t.scrollLeft-e>=0},a=function(t,e){return t.srcElementY-t.scrollTop+e<=t.windowHeight},o=function(t,e){return t.srcElementY-t.scrollTop-e>=0},r=function(t,e){return"right"===t?n(e,e.targetElementWidth-e.srcElementWidth):i(e,e.targetElementWidth)},s=function(t,e){return"top"===t?a(e,e.targetElementHeight):o(e,e.targetElementHeight-e.srcElementHeight)},A=function(t,e,A){return"right"===e?i(t,t.srcElementWidth+t.targetElementWidth)&&s(A,t):"left"===e?n(t,t.targetElementWidth)&&s(A,t):"top"===e?o(t,t.targetElementHeight)&&r(A,t):"bottom"!==e||a(t,t.srcElementHeight+t.targetElementHeight)&&r(A,t)},l=function(t,e,i){var n={top:null,left:null,right:null,bottom:null};return"cover"===e&&"cover"===i?(n.left=t.srcElementX+(t.srcElementWidth-t.targetElementWidth)/2,n.top=t.srcElementY+(t.srcElementHeight-t.targetElementHeight)/2):"coverleft"===e&&"covertop"===i?(n.left=t.srcElementX,n.top=t.srcElementY):"coverright"===e&&"covertop"===i?(n.left=t.srcElementX-t.targetElementWidth+t.srcElementWidth,n.top=t.srcElementY):"coverright"===e&&"coverbottom"===i?(n.left=t.srcElementX-t.targetElementWidth+t.srcElementWidth,n.top=t.srcElementY-t.targetElementHeight+t.srcElementHeight):"coverleft"===e&&"coverbottom"===i?(n.left=t.srcElementX,n.top=t.srcElementY-t.targetElementHeight+t.srcElementHeight):"right"===e?(n.left=t.srcElementX+t.srcElementWidth,"top"===i?n.top=t.srcElementY:n.bottom=t.windowHeight-t.srcElementY-t.srcElementHeight):"left"===e?(n.right=t.windowWidth-t.srcElementX,"top"===i?n.top=t.srcElementY:n.bottom=t.windowHeight-t.srcElementY-t.srcElementHeight):"top"===e?(n.bottom=t.windowHeight-t.srcElementY,"left"===i?n.left=t.srcElementX:n.right=t.windowWidth-t.srcElementX-t.srcElementWidth):"bottom"===e&&(n.top=t.srcElementY+t.srcElementHeight,"left"===i?n.left=t.srcElementX:n.right=t.windowWidth-t.srcElementX-t.srcElementWidth),n};function d(e,i){t.call(this,e,i)}return t.extend(d,t),d.typeName="SetVisibility",d.prototype.getBatchType=function(){return t.DO_NOT_BATCH},d.prototype.execute=function(t){var i=this.piping.dropFactory.findDropById(this.eventData.morphId);if(i)if(this.eventData.showMorph||null===this.eventData.showMorph&&i.isHidden){if(i.data.autoPosition&&i.data.autoPosition.enabled){var n=function(t,i){var n=i.data.autoPosition.preferedPositionA,a=i.data.autoPosition.preferedPositionB,o=[{a:n,b:a},{a:n,b:e[a]},{a:e[n],b:a},{a:e[n],b:e[a]},{a:a,b:n},{a:a,b:e[n]},{a:e[a],b:n},{a:e[a],b:e[n]}],r=$(window),s={windowWidth:r.width(),windowHeight:r.height(),scrollTop:r.scrollTop(),scrollLeft:r.scrollLeft(),srcElementX:t.activeArea.left,srcElementY:t.activeArea.top,srcElementHeight:t.activeArea.height,srcElementWidth:t.activeArea.width,targetElementHeight:i.$element.height(),targetElementWidth:i.$element.width()};i.data.autoPosition&&t.eventPosition&&"Mouse click"===i.data.autoPosition.position&&(s.srcElementX=t.eventPosition.clientX,s.srcElementY=t.eventPosition.clientY,s.srcElementHeight=0,s.srcElementWidth=0);for(var d=0;d<o.length;d++){var c=o[d];if(A(s,c.a,c.b))return l(s,c.a,c.b)}return l(s,n,a)}(this.eventSource,i);i.autoPositionAt(n)}i.show()}else i.hide();t()},d})),define("lq/events/actions/shareOnFacebook",["lq/events/actions/eventAction"],(function(t){"use strict";var e=!1;function i(e,i){t.call(this,e,i)}return t.extend(i,t),i.typeName="ShareOnFacebook",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){if(e)this.showDialog(),t();else{var i=this;window.fbAsyncInit=function(){e=!0,window.FB.init({appId:i.eventData.facebook.appId,xfbml:!1,version:"v2.8"}),i.showDialog(),t()};var n=document.createElement("script");n.src="//connect.facebook.net/en_US/sdk.js",document.head.appendChild(n)}},i.prototype.showDialog=function(){window.FB.ui({method:"share",display:"popup",href:this.piping.parameters.replace(this.eventData.facebook.url)},(function(t){}))},i})),define("lq/events/actions/shareOnLinkedIn",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="ShareOnLinkedIn",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){var e="http://www.linkedin.com/shareArticle",i=this.getParameters();_.keys(i).length&&(e=e+"?"+$.param(i)),window.open(e,"","left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0"),t()},e.prototype.getParameters=function(){var t={mini:!0,url:this.piping.parameters.replace(this.eventData.linkedIn.url)};return this.eventData.linkedIn.title&&(t.title=this.piping.parameters.replace(this.eventData.linkedIn.title)),this.eventData.linkedIn.summary&&(t.summary=this.piping.parameters.replace(this.eventData.linkedIn.summary)),t},e})),define("lq/events/actions/shareOnTwitter",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="ShareOnTwitter",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.execute=function(t){var e="https://twitter.com/intent/tweet",i=this.getParameters();_.keys(i).length&&(e=e+"?"+$.param(i)),window.open(e,"","left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0"),t()},e.prototype.getParameters=function(){var t={};return this.eventData.twitter.text&&(t.text=this.piping.parameters.replace(this.eventData.twitter.text)),this.eventData.twitter.url&&(t.url=this.piping.parameters.replace(this.eventData.twitter.url)),this.eventData.twitter.hashtags&&(t.hashtags=this.piping.parameters.replace(this.eventData.twitter.hashtags)),this.eventData.twitter.via&&(t.via=this.piping.parameters.replace(this.eventData.twitter.via)),t},e})),define("lq/events/actions/sms",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this}return e.extend(i,e),i.typeName="Sms",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"SendSms",morphId:this.eventData.command}},i.prototype.execute=function(t){this.eventIsEnabled("sent")?this.triggerEvent("sent",t):t()},i})),define("lq/events/actions/transformRichText",["lq/events/actions/eventAction","lq/richText"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="TransformRichText",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){var i=this,n=this.piping.parameters.getValue(i.eventData.transform.sourceParameter);e.isRichTextString(n)?i.piping.queryDispatcher.dispatch(i.eventData.transform.dataSource.id,(function(e){var a=i.getResultFromTransform(n,e.results);i.writeResult(a),t()})):(i.writeResult(n),t())},i.prototype.getResultFromTransform=function(t,i){var n=e.modelFromRichTextString(t);n.sections=[];var a=this;return i.forEach((function(i){e.modelFromRichTextString(t).sections.forEach((function(t){t.text=a.getTransformedText(t.text,i),n.sections.push(t)}))})),e.modelToRichTextString(n)},i.prototype.getTransformedText=function(t,e){var i={};for(var n in e)i[n.toLowerCase()]=e[n];return t.replace(/\{(.+?)\}/g,(function(t,e){return i[e.toLowerCase()]}))},i.prototype.writeResult=function(t){null===t&&(t=void 0),this.piping.parameters.locals.setValue(this.eventData.transform.targetParameter,t)},i})),define("lq/events/actions/undoCheckOut",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="UndoCheckOut",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"UndoCheckOut",morphId:this.eventData.command}},e})),define("lq/events/actions/update",["lq/events/actions/eventAction","jquery","underscore","lq/uploader","lq/entityFiltersState","lq","lq/events/abortError","when"],(function(t,e,i,n,a,o,r,s){"use strict";function A(e,i){t.call(this,e,i)}return t.extend(A,t),A.typeName="Update",A.prototype.getBatchType=function(){return t.COMMAND_BATCH},A.prototype.createEventActionRequest=function(){return this.validateData.bind(this)},A.prototype.validateData=function(t,e){var i=this;this.isDataValid().then((function(n){n?(i.eventIsEnabled("inputValidated")&&i.triggerEvent("inputValidated"),i.buildRequest(t,e)):(i.eventIsEnabled("inputInvalidated")&&i.triggerEvent("inputInvalidated"),e())}))},A.prototype.buildRequest=function(t,r){var A=this,l={};i.each(A.eventData.commandViewModelKeys,(function(t){var e=A.piping.dropFactory.findDropByViewModelKey(t).getValue();l[t]=e}));var d={};A.eventData.isEntityFilterEntity&&(d.Filter=a.getStateOfEntityFilters(this.rootDrop));var c={eventActionType:"Update",command:A.eventData.command,commandViewModelKeys:l,uploads:[],extraProperties:d,captcha:this.getCaptcha()};if(null===A.eventData.fileUploadType)t(c);else if("fromViewModel"===A.eventData.fileUploadType){var u=A.piping.dropFactory.findDropByViewModelKey(A.eventData.fileSourceMorph);A.requiredValueIsFilledIn(u)?s(u.getFile()).then((function(i){e.ajax({type:"POST",url:o.getTenantUrl("DynamicContent/AddPromptlessTempFile"),contentType:"application/json; charset=utf-8",data:i,dataType:"json"}).done((function(e){e.success&&(c.uploads.push({fileName:e.fileName,tempUrl:e.tempUrl}),t(c))}))})):r()}else if("fromParameter"===A.eventData.fileUploadType){var h=A.piping.parameters.getValue(A.eventData.fileSourceParameter),p=new XMLHttpRequest,g=new FormData,f=o.getTenantUrl("DynamicContent/AddTempFile");p.open("POST",f,!0),p.onreadystatechange=function(){if(4===p.readyState&&200===p.status){var e=JSON.parse(p.responseText);c.uploads.push({fileName:e.fileName,tempUrl:e.tempUrl}),t(c)}},g.append("qqfile",h),p.send(g)}else{var m=new n(A.piping).toTenantUrl("DynamicContent/AddTempFile").withFileFilter("custom"===A.eventData.fileUploadAllowedFileTypes?A.eventData.fileUploadAllowedCustomFileTypes:A.eventData.fileUploadAllowedFileTypes).withMaxFileSize(A.eventData.maxFileSize).withSmartphoneMode(A.eventData.fileUploadModeSmartPhone).withPhotoQuality(A.eventData.photoQuality).withMaxImageDimensions(A.eventData.maxImageDimensions).onFileUploaded((function(t){if(!t.success)throw new Error("Upload failed.");c.uploads.push({fileName:t.filename,tempUrl:t.tempUrl})})).onUploadFinished((function(){t(c)}));A.eventIsEnabled("maxFileSizeExceeded")&&m.onMaxFileSizeExceeded((function(){A.triggerEvent("maxFileSizeExceeded")})),"singleFile"===A.eventData.fileUploadType||"newFile"==A.eventData.fileUploadType?m.uploadSingleFile():"multipleFiles"===A.eventData.fileUploadType&&m.uploadMultipleFiles()}},A.prototype.execute=function(t,e){e.isDirty?this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not update the data, because the data is dirty."):t()},A.prototype.requiredValueIsFilledIn=function(t){return!(!this.eventData.skipRequiredFields&&t.isVisible()&&!t.isValid())||(this.eventIsEnabled("requiredFieldsMissing")?this.triggerEvent("requiredFieldsMissing"):alert("* not all required fields are filled in."),!1)},A.prototype.getCaptcha=function(){if(!this.eventData.captchaField)return null;var t=this.piping.dropFactory.findDropByName(this.eventData.captchaField);return t.data.captchaInputField?this.piping.dropFactory.findDropByName(t.data.captchaInputField).getValue():null},A.prototype.isDataValid=function(){var t=this;return s.reduce(t.eventData.commandViewModelKeys,(function(e,i){var n=t.piping.dropFactory.findDropByViewModelKey(i);if(!n)throw'Cannot find drop : "'+key+'" for create command.';return n.isVisible()?!!t.requiredValueIsFilledIn(n)&&n.performValidation(t.eventActionId).then((function(t){return!!t&&e})):e}),!0)},A})),define("lq/events/actions/urlGenerator",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){e.call(this,t,i),this.values=t.values}return e.extend(i,e),i.typeName="UrlGenerator",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH},i.prototype.execute=function(t){this.piping.parameters.locals.setValue(this.values.targetParameter,this.getFullUrl()),t()},i.prototype.getFullUrl=function(){return"url"===this.values.generator?this.values.url+"?"+$.param(this.getParameters()):this.getBaseUrl()+"?"+$.param(this.getParameters())},i.prototype.getBaseUrl=function(){switch(this.values.generator){case"action":return t.getFullUrl(t.getTenantUrl("LicquidAction/Get/"+this.values.actionId));case"actionIdFromParameter":return t.getFullUrl(t.getTenantUrl("LicquidAction/Get/"+this.piping.parameters.getValue(this.values.actionIdParameter)));case"application":return t.getFullUrl(t.getBaseUrl(t.getTenantName()+"/"+this.values.application.applicationName+"/LicquidAction/Get/"+this.values.application.actionId))}throw new Error("Invalid url generator")},i.prototype.getParameters=function(){for(var t={},e={},i=0;i<this.values.parameters.length;i++){var n=this.values.parameters[i].name,a=this.piping.parameters.getValue(n);e[n]=a}if(t.parameters=JSON.stringify(e),this.values.includeGlobals){var o=this.piping.parameters.globals.getAll();t.globals=JSON.stringify(o)}return t},i})),define("lq/events/actions/windowsLoginCommand",["jquery","lq","lq/events/actions/eventAction"],(function(t,e,i){"use strict";function n(t,e){return i.call(this,t,e),this}i.extend(n,i),n.typeName="WindowsLoginCommand",n.prototype.getBatchType=function(){return i.DO_NOT_BATCH};var a=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.search);return null==e?"":decodeURIComponent(e[1].replace(/\+/g," "))};return n.prototype.execute=function(i){var n=a("ReturnUrl"),o=this;this.piping.dispatcher.dispatch("LicquidAction/StartWindowsLogin",{commandId:o.eventData.command,appId:a("AppId")},(function(){o.piping.dispatcher.dispatch("LicquidAction/LoginFromWindowsLogin",{actionId:o.piping.actionId,commandId:o.eventData.command,appId:a("AppId")},(function(a){!function(i,n,a,o,r){if("Success"===n.status)i.eventIsEnabled("userLoggedIn")?i.triggerEvent("userLoggedIn",o,a):window.location=a||e.getTenantUrl("");else{if(r&&t("body").show(),"LoginFromLocalStorageFailed"===n.status)return;"InvalidCredentials"===n.status?i.handleError("invalidCredentials","Invalid credentials.",o):"UserLoginNotAllowed"===n.status?i.handleError("userLoginNotAllowed","The user is not allowed to log in.",o):"AccountLocked"===n.status?i.handleError("accountLocked","Your account has been locked out because of too many invalid login attempts.",o):alert("Unable to login.")}}(o,a,n,i,!1)}))}),{global:!1},(function(){o.handleError("invalidCredentials","Log in failed.",i)}),!0)},n.prototype.handleError=function(t,e,i){this.eventIsEnabled(t)?this.triggerEvent(t,i):(alert(e),i())},n})),define("lq/events/actions/wordExportCommand",["lq/events/actions/eventAction","jquery","lq","lq/cookie","lq/formSubmission"],(function(t,e,i,n,a){"use strict";function o(e,i){return t.call(this,e,i),this}return t.extend(o,t),o.typeName="WordExportCommand",o.prototype.getBatchType=function(){return t.DO_NOT_BATCH},o.prototype.createEventActionRequest=function(){if(!this.eventData.downloadOnly)return{eventActionType:"WordExport",command:this.eventData.command}},o.prototype.execute=function(t,e){if(this.eventData.downloadOnly){var o="word-export-"+Date.now(),r=new a(this.piping.url.prepare(i.getTenantUrl("Export/Word")));r.addProperty("actionId",this.piping.actionId),r.addProperty("wordExportId",this.eventData.command),r.addProperty("token",o),r.addParameters("parameters",this.piping.parameters.getNonSystemParameters()),r.submit();var s=function(){null===n.get(o)?setTimeout(s,200):t()};s()}else if(e.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(e.download){var A={url:e.url,filename:e.filename,openInBrowser:!1};window.location=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),A),t()}else t()},o})),define("lq/events/actions/xmlExportCommand",["lq/events/actions/eventAction","jquery","lq","lq/cookie","lq/formSubmission"],(function(t,e,i,n,a){"use strict";function o(e,i){return t.call(this,e,i),this}return t.extend(o,t),o.typeName="XmlExportCommand",o.prototype.getBatchType=function(){return t.DO_NOT_BATCH},o.prototype.createEventActionRequest=function(){if(!this.eventData.downloadOnly)return{eventActionType:"XmlExport",command:this.eventData.command}},o.prototype.execute=function(t,e){if(this.eventData.downloadOnly){var o="xml-export-"+Date.now(),r=new a(this.piping.url.prepare(i.getTenantUrl("Export/Xml")));r.addProperty("actionId",this.piping.actionId),r.addProperty("xmlExportId",this.eventData.command),r.addProperty("token",o),r.addParameters("parameters",this.piping.parameters.getNonSystemParameters()),r.submit();var s=function(){null===n.get(o)?setTimeout(s,200):t()};s()}else if(e.isDirty)this.eventIsEnabled("onExecutionTrailDirty")?this.triggerEvent("onExecutionTrailDirty"):alert("Could not complete operation, because the data is dirty.");else if(e.download){var A={url:e.url,filename:e.filename,openInBrowser:!1};window.location=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),A),t()}else t()},o})),define("lq/events/actions/popupGoogleLogin",["lq","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this}return e.extend(i,e),i.typeName="PopupGoogleLogin",i.prototype.getBatchType=function(){return e.DO_NOT_BATCH},i.prototype.execute=function(t){require(["https://accounts.google.com/gsi/client"],this.signIn.bind(this,t))},i.prototype.signIn=function(t){this.$popup=$('<div id="googleLoginPopup" />').css({position:"fixed",top:"50%",left:"50%",zIndex:999999,transform:"translate(-50%, -50%)"}).appendTo($("body")),google.accounts.id.initialize({client_id:this.eventData.clientId,cancel_on_tap_outside:!1,prompt_parent_id:"googleLoginPopup",callback:this.handlePopupResponse.bind(this,t)});var e=this;google.accounts.id.prompt((function(t){t.isNotDisplayed()?window.google.accounts.id.renderButton(document.getElementById("googleLoginPopup"),{theme:"filled_blue",size:"large"}):t.isSkippedMoment()&&e.piping.busyIndicator.forceHide()}))},i.prototype.handlePopupResponse=function(t,e){e.credential?this.piping.dispatcher.dispatch("LicquidAction/GoogleLogin",{actionId:this.piping.actionId,commandId:this.eventData.command,accessToken:e.credential},this.handleLoginResponse.bind(this,t)):this.handleError("invalidCredentials","Unable to sign in."),this.$popup.remove(),this.$popup=null},i.prototype.handleLoginResponse=function(e,i){if("Success"===i.status){var n=this.piping.queryString.getValueOf("ReturnUrl")||t.getTenantUrl("");if(this.eventIsEnabled("updatingUserProperties")){var a=this;this.triggerEvent("updatingUserProperties",(function(){a.piping.dispatcher.dispatch("LicquidAction/RefreshCurrentUser").then((function(){a.eventIsEnabled("userLoggedIn")?a.triggerEvent("userLoggedIn",e,n):e()}))}))}else this.eventIsEnabled("userLoggedIn")?this.triggerEvent("userLoggedIn",e,n):window.location=n}else this.handleError("invalidCredentials","Unable to sign in.")},i.prototype.handleError=function(t,e){this.eventIsEnabled(t)?this.triggerEvent(t,continuation):alert(e)},i})),define("lq/events/actions/bigBlueButtonJoinMeetingCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="BigBlueButtonJoinMeetingCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"JoinMeeting",morphId:this.eventData.command}},e.prototype.execute=function(t,e){if(e.success)if(window.cordova&&window.cordova.plugins&&window.cordova.plugins.diagnostic&&window.cordova.plugins.diagnostic.requestRuntimePermissions){var i=this;window.cordova.plugins.diagnostic.requestRuntimePermissions((function(){i.joined(t,e)}),(function(t){console.error("The following error occurred: "+t)}),[window.cordova.plugins.diagnostic.permission.CAMERA,window.cordova.plugins.diagnostic.permission.RECORD_AUDIO])}else this.joined(t,e);else this.eventIsEnabled("joinFailed")?this.triggerEvent("joinFailed",t):(alert("Could not join the meeting."),t())},e.prototype.joined=function(t,e){this.eventIsEnabled("joinedMeeting")?this.triggerEvent("joinedMeeting",t,e.redirectUrl):t()},e})),define("lq/events/actions/bigBlueButtonStartMeetingCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="BigBlueButtonStartMeetingCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"StartMeeting",morphId:this.eventData.command}},e.prototype.execute=function(t,e){e.success?this.eventIsEnabled("meetingStarted")?this.triggerEvent("meetingStarted",t):t():this.eventIsEnabled("startFailed")?this.triggerEvent("startFailed",t):(alert("The meeting could not be started."),t())},e})),define("lq/events/actions/googleGeocodingQuery",["underscore","lq/events/actions/eventAction"],(function(t,e){"use strict";function i(t,i){return e.call(this,t,i),this.eventData=t,this}return e.extend(i,e),i.typeName="GoogleGeocodingQuery",i.prototype.getBatchType=function(){return e.COMMAND_BATCH},i.prototype.createEventActionRequest=function(){return{eventActionType:"GoogleGeocodingQuery",command:this.eventData.command}},i.prototype.execute=function(t,e){e.success?this.eventIsEnabled("succeeded")?this.triggerEvent("succeeded",t):t():this.eventIsEnabled("failed")?this.triggerEvent("failed",t):(alert("The geocoding of the address has been failed, and the 'failed' event is not enabled."),t())},i})),define("lq/events/actions/downloadExternalDocumentCommand",["underscore","lq/events/actions/eventAction","lq"],(function(t,e,i){"use strict";function n(t,i){return e.call(this,t,i),this.eventData=t,this}return e.extend(n,e),n.typeName="DownloadExternalDocumentCommand",n.prototype.getBatchType=function(){return e.DO_NOT_BATCH},n.prototype.createEventActionRequest=function(){return{eventActionType:"DownloadExternalDocument",command:this.eventData.command}},n.prototype.execute=function(t,e){e.directDownloadEnabled&&e.url&&e.fileName?window.location=this.piping.url.prepare(i.getTenantUrl("DynamicContent/DownloadFile"),{url:e.url,filename:e.fileName,openInBrowser:!1}):!e.directDownloadEnabled||e.url&&e.fileName||(window.location=this.piping.url.prepare(i.getTenantUrl("DownloadExternalDocument/Download"),{actionId:this.piping.actionId,commandId:this.eventData.command,parameters:JSON.stringify(this.piping.parameters.getNonSystemParameters())})),t()},n})),define("lq/events/actions/rawSqlCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="RawSql",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"RawSql",command:this.eventData.command}},e})),define("lq/events/actions/asyncSender",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="AsyncSender",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"AsyncSender",command:this.eventData.command}},e})),define("lq/events/actions/asyncEventTrigger",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="AsyncEventTrigger",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"AsyncEventTrigger",command:this.eventData.command}},e})),define("lq/events/actions/asyncEventReceiver",["lq/events/actions/eventAction","lq/asyncSubcriptions"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="AsyncEventReceiver",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){e.addEventSubscription(this.piping,this.eventData.command,this.eventData.filter,this.receiveEvent.bind(this)).then(t)},i.prototype.receiveEvent=function(t,e,i){if("receiveEvent"===t){if(-1===this.eventData.events.indexOf(e))return;this.piping.eventing.publish(this.eventData.command+"."+e,this.eventSource,i,null,this.getEventActionIdentifier())}},i})),define("lq/events/actions/share",["lq/events/actions/eventAction","lq"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this.eventData=e,this}return t.extend(i,t),i.typeName="Share",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){var i={title:this.piping.parameters.replace(this.eventData.title)};if("Text"===this.eventData.shareType)i.text=this.piping.parameters.replace(this.eventData.textToShare),navigator.share(i).then((function(){t()})).catch((function(e){t()}));else if(this.eventData.sourceFileDataSource&&this.eventData.sourceFileOutput){var n={actionId:this.piping.actionId,commandId:this.eventData.command,parameters:JSON.stringify(this.piping.parameters.getNonSystemParameters())},a=this,o=this.piping.url.prepare(e.getTenantUrl("Export/Share"),n);fetch(o).then((function(e){e.blob().then((function(n){var o={type:e.headers.get("content-type")},r=a.piping.parameters.replace(a.eventData.fileName);if(!r){var s=e.headers.get("content-disposition");if(s&&-1!==s.indexOf("attachment")){var A=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(s);null!=A&&A[1]&&(r=A[1].replace(/['"]/g,""))}}var l=new File([n],r,o);i.files=[l],navigator.canShare(i)?navigator.share(i).then((function(){t()})).catch((function(e){t()})):t()}))}))}else t()},i})),define("lq/events/actions/labelImageCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="LabelImageCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"LabelImage",command:this.eventData.command}},e})),define("lq/events/actions/webserviceClient",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="WebserviceClient",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"WebserviceClientCommand",command:this.eventData.command}},e})),define("lq/events/actions/chatGPTCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this.eventData=e,this}return t.extend(e,t),e.typeName="ChatGPTCommand",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"ChatGPT",command:this.eventData.command}},e})),define("lq/events/actions/chatGPTImageCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this.eventData=e,this}return t.extend(e,t),e.typeName="ChatGPTImageCommand",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"ChatGPTImage",command:this.eventData.command}},e})),define("lq/events/actions/businessLogicBlockCommand",["underscore","lq/events/actions/eventAction","lq/validatorGateway"],(function(t,e,i){"use strict";function n(t,i){e.call(this,t,i)}return e.extend(n,e),n.typeName="BusinessLogicBlockCommand",n.prototype.getBatchType=function(){return e.COMMAND_BATCH},n.prototype.createEventActionRequest=function(){return{eventActionType:"BusinessLogicBlockCommand",command:this.eventData.command}},n.prototype.execute=function(t,e){i.isEnabled()&&this.runTrace(e.trace,this.rootDrop.instanceId,this.eventActionId),this.triggerEvents(t,e)},n.prototype.triggerEvents=function(e,i){var n=this;t.reduce(i.events.reverse(),(function(t,e){return function(){var i=e.eventName.charAt(0).toLowerCase()+e.eventName.slice(1);n.triggerEvent(i,t,e.value)}}),e)()},n.prototype.runTrace=function(e,n,a){if(e&&0!==e.length){var o=this.rootDrop.__proto__.constructor.nextInstanceId(),r=0,s=0,A=this;t.each(e,(function(e){r++;var l={type:"ENTERING_EVENT",status:e.entered?"EXECUTING":"SKIPPING",actionInstanceId:o,id:r,name:e.eventName,parentEventAction:{id:a,actionInstanceId:n},condition:e.condition,locals:e.locals,globals:e.globals,systems:e.systems};i.publishEvent(l),t.each(e.eventActions,(function(t){s++,i.publishEvent({type:"CREATED_EVENT_ACTION",actionInstanceId:o,id:s,eventId:r,eventActionData:t.data}),i.publishEvent({type:"EXECUTING_EVENT_ACTION",actionInstanceId:o,id:s,eventId:r,eventActionTypeName:t.data.eventActionType,locals:{},globals:{},systems:{}}),i.publishEvent({type:"HANDLING_EVENT_ACTION_RESPONSE",actionInstanceId:o,id:s,eventId:r,eventActionTypeName:t.data.eventActionType,location:"SERVER",locals:t.debug.beforeParameters.locals,globals:t.debug.beforeParameters.globals,systems:t.debug.systems}),t.events&&A.runTrace(t.events,o,s),i.publishEvent({type:"EXECUTED_EVENT_ACTION",actionInstanceId:o,id:s,locals:t.debug.afterParameters.locals,globals:t.debug.afterParameters.globals})}))}))}},n})),define("lq/services/mpa/addToHomeScreenCommand",["lq/responsive"],(function(t){"use strict";function e(t){this.data=t,this.onBeforeInstallPrompt=this.handleBeforeInstallPrompt.bind(this)}return e.typeName="AddToHomeScreenCommand",e.deferredPrompt=null,e.prototype.initialize=function(){if(t.isPWA()){var e=this,i="alreadyAdded";setTimeout((function(){e.piping.eventing&&e.data.eventing[i]&&e.data.eventing[i].enabled&&e.piping.eventing.publish(e.data.eventing[i].raisedEventName,null,null,null,e.eventActionId)}))}else window.addEventListener("beforeinstallprompt",this.onBeforeInstallPrompt)},e.prototype.handleBeforeInstallPrompt=function(t){t.preventDefault(),e.deferredPrompt=t},e})),define("lq/events/actions/addToHomeScreenCommand",["underscore","lq/events/actions/eventAction","lq/services/mpa/addToHomeScreenCommand","lq/services/action/addToHomeScreenCommand"],(function(t,e,i,n){"use strict";function a(t,a){return e.call(this,t,a),this.eventData=t,i.deferredPrompt?this.deferredPrompt=i.deferredPrompt:n.deferredPrompt&&(this.deferredPrompt=n.deferredPrompt),this}return a.prototype.deferredPrompt=null,e.extend(a,e),a.typeName="AddToHomeScreenCommand",a.prototype.getBatchType=function(){return e.DO_NOT_BATCH},a.prototype.execute=function(t){this.deferredPrompt&&(this.deferredPrompt.prompt(),this.eventIsEnabled("installationPrompted")&&this.triggerEvent("installationPrompted"),this.deferredPrompt.userChoice.then((function(t){"accepted"===t.outcome&&(this.deferredPrompt=null)}))),t()},a})),define("lq/events/actions/translationCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this.eventData=e,this}return t.extend(e,t),e.typeName="TranslationCommand",e.prototype.getBatchType=function(){return t.DO_NOT_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"Translation",command:this.eventData.command}},e.prototype.execute=function(t,e){t()},e})),define("lq/events/actions/asyncDeletion",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){t.call(this,e,i)}return t.extend(e,t),e.typeName="AsyncDeletion",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"AsyncDeletion",command:this.eventData.command}},e})),define("lq/events/actions/enablePushNotificationsCommand",["lq/events/actions/eventAction","lq/main","lq/webPushNotifications"],(function(t,e,i){"use strict";function n(e,i){return t.call(this,e,i),this}return t.extend(n,t),n.typeName="EnablePushNotificationsCommand",n.prototype.getBatchType=function(){return t.COMMAND_BATCH},n.prototype.execute=function(t){var n=this;e.areWebNotificationsEnabled()?i.enableNotifications(this.piping.application.userId,(function(e,i){"granted"===e&&n.eventIsEnabled("granted")?n.triggerEvent("granted",t,i):"denied"===e&&n.eventIsEnabled("denied")?n.triggerEvent("denied",t):"default"===e&&n.eventIsEnabled("dismissed")&&n.triggerEvent("dismissed",t)})):t()},n})),define("lq/events/actions/CQCommand",["lq/events/actions/eventAction"],(function(t){"use strict";function e(e,i){return t.call(this,e,i),this}return t.extend(e,t),e.typeName="CQCommand",e.prototype.getBatchType=function(){return t.COMMAND_BATCH},e.prototype.createEventActionRequest=function(){return{eventActionType:"CQCommand",command:this.eventData.command}},e})),define("lq/events/actions/validateCommand",["lq/events/actions/eventAction","lq/validations"],(function(t,e){"use strict";function i(e,i){return t.call(this,e,i),this}return t.extend(i,t),i.typeName="ValidateCommand",i.prototype.getBatchType=function(){return t.DO_NOT_BATCH},i.prototype.execute=function(t){e.runValidation(this.eventData.validation,this.piping,this.triggerValidationEvent.bind(this)).done(this.afterValidationCompleted.bind(this,t))},i.prototype.triggerValidationEvent=function(t){this.piping.eventing.publish(t,this.eventSource,null,null,this.getEventActionIdentifier())},i.prototype.afterValidationCompleted=function(t,e){e&&this.eventIsEnabled("inputValidated")?this.triggerEvent("inputValidated",t):!e&&this.eventIsEnabled("inputInvalidated")&&this.triggerEvent("inputInvalidated"),t()},i})),define("lq/events/eventActionFactory",["lq/typesProvider","./actions/activeDirectorySyncGroupUsers","./actions/backgroundTask","./actions/breakEvent","./actions/calendarEventsExportCommand","./actions/calendarURLExport","./actions/changeParameter","./actions/changePassword","./actions/checkIn","./actions/checkOut","./actions/copyDynamicContentCommand","./actions/copyToClipboard","./actions/create","./actions/createTextFileCommand","./actions/csvExportCommand","./actions/deleteCommand","./actions/deleteDynamicContentCommand","./actions/distanceMatrix","./actions/desktopClientCommand","./actions/documentZip","./actions/domainFunctionCommand","./actions/download","./actions/downloadFileCommand","./actions/excelExportCommand","./actions/executeEidReader","./actions/executeEidSigner","./actions/executeMethod","./actions/executePlugin","./actions/executeQuery","./actions/executeTimer","./actions/extractMailAttachment","./actions/eYouthAuthenticationCommand","./actions/eYouthAuthenticationLogoutCommand","./actions/federatedLogin","./actions/focus","./actions/forEach","./actions/formula","./actions/generateText","./actions/import","./actions/languageCommand","./actions/login","./actions/logoffCommand","./actions/mail","./actions/mapping","./actions/mollie","./actions/mollieCreateCustomer","./actions/mollieUpdateCustomer","./actions/officeAddinLoginCommand","./actions/openDocumentInOfficeOnline","./actions/pain001ExportCommand","./actions/payment","./actions/paypal","./actions/pdfDataCommand","./actions/pdfMergeCommand","./actions/pdfMergeCommand_v2","./actions/platformCommand","./actions/plugInLogin","./actions/pushNotificationsCommand","./actions/raiseEvent","./actions/readOutlookMessage","./actions/redirect","./actions/refreshCaptcha","./actions/refreshLoggedInUserCommand","./actions/reportCommand","./actions/rssCommand","./actions/saveMorph","./actions/scheduledTaskCommand","./actions/scrollTo","./actions/serverCommand","./actions/setParameterFromEvent","./actions/setVisibility","./actions/shareOnFacebook","./actions/shareOnLinkedIn","./actions/shareOnTwitter","./actions/sms","./actions/thirdPartyLogin","./actions/transformRichText","./actions/undoCheckOut","./actions/update","./actions/urlGenerator","./actions/windowsLoginCommand","./actions/wordExportCommand","./actions/xmlExportCommand","./actions/popupGoogleLogin","./actions/bigBlueButtonJoinMeetingCommand","./actions/bigBlueButtonStartMeetingCommand","./actions/googleGeocodingQuery","./actions/downloadExternalDocumentCommand","./actions/rawSqlCommand","./actions/asyncSender","./actions/asyncEventTrigger","./actions/asyncEventReceiver","./actions/share","./actions/labelImageCommand","./actions/webserviceClient","./actions/chatGPTCommand","./actions/chatGPTImageCommand","./actions/businessLogicBlockCommand","./actions/addToHomeScreenCommand","./actions/translationCommand","./actions/asyncDeletion","./actions/enablePushNotificationsCommand","./actions/CQCommand","./actions/validateCommand"],(function(t){"use strict";var e=new t(Array.prototype.slice.call(arguments,1)),i=0,n=function(t){this.rootDrop=t};return n.prototype.createEventActions=function(t,n,a){var o=this;return _.map(t.actions,(function(t){var r=new(e.get(t.eventActionType))(t,a);return r.eventSource=n,r.rootDrop=o.rootDrop,r.piping=o.rootDrop.piping,r.eventActionId=++i,r.eventActionTypeName=t.eventActionType,r}))},n})),define("lq/visibility/defaultVisibility",["jquery","underscore"],(function(t,e){"use strict";var i=function(){this.bindings=void 0};return i.prototype.apply=function(i){if(!1===i.data.initialVisibility&&i.hideWithoutAnimation(),this.fromQuery(i))i.visibilityRegistrationId=i.piping.datasources.registerDatasourceListener(i.data.dataSourceForVisibility,(function(t){!0===(t.results.length&&t.results[0][i.data.dataSourceOutputForVisibility])?i.show():i.hide()}));else if(this.fromParameter(i)){if(this.updateVisibilityFromParameter(i),i.data.parameterForVisibilityIsBound){var n=i.piping.parameters.subscribeForUpdates(i.data.parameterForVisibility,this.updateVisibilityFromParameter.bind(this,i));this.bindings||(this.bindings=[]),this.bindings.push(n)}}else if(this.fromCondition(i)){i.piping.conditions.getConditionEvaluator(i.data.conditionForVisibility).evaluate(i.piping,!0).then((function(t){t.conditionResult?i.showWithoutAnimation():i.hideWithoutAnimation()}))}else if(this.fromParentState(i))if(i.hideWithoutAnimation(),i.data.parentWithState){t("#visibilityFromParentRules").length||t('<style type="text/css" id="visibilityFromParentRules" />').appendTo("head"),this.getDropById(i,i.data.parentWithState).$element.addClass(`state-for-${i.data.id}`);var a=[];e.each(i.data.visibleWhenParentHasStates,(function(t){var e=`.state-for-${i.data.id}.has-states${"hover"===t?":":"."}${t}`,n=`visible-when-${t}-${i.data.id}`;i.getElementForVisibility().addClass(n);var o=`${e} .${n}`;a.includes(o)||a.push(o)}));var o=t("#visibilityFromParentRules");a.forEach((function(t){o.html().includes(t)||o.html(`${o.html()} ${t} { visibility: inherit !important; display: block !important; } `)}))}else e.each(i.data.visibleWhenParentHasStates,(function(t){i.getElementForVisibility().addClass("visible-when-"+t)}))},i.prototype.updateVisibilityFromParameter=function(t){this.valueFromParameterIsTrue(t)?t.showWithoutAnimation():t.hideWithoutAnimation()},i.prototype.valueFromParameterIsTrue=function(e){var i=e.piping.parameters.getValue(e.data.parameterForVisibility);if(void 0===i)return!1;if("boolean"===t.type(i))return!0===i;if("string"===t.type(i))return"true"===i.toLowerCase();throw new Error("Cannot determine the visibility of the drop. The value of parameter "+e.data.parameterForVisibility+" cannot be converted to a boolean.")},i.prototype.fromQuery=function(t){return"From Query"===t.data.initialVisibilityOption&&t.data.dataSourceForVisibility},i.prototype.fromParameter=function(t){return"From Parameter"===t.data.initialVisibilityOption&&t.data.parameterForVisibility},i.prototype.fromCondition=function(t){return"From Condition"===t.data.initialVisibilityOption&&t.data.conditionForVisibility},i.prototype.fromParentState=function(t){return"FromParentState"===t.data.initialVisibilityOption&&t.data.visibleWhenParentHasStates},i.prototype.cleanUp=function(){e.each(this.bindings,(function(t){t.dispose()})),this.bindings=void 0},i.prototype.getDropById=function(t,e){for(;null!==t.parent;){if(t.data.id===e)return t;t=t.parent}},i})),define("lq/datasources",["jquery","underscore","lq/queryDispatcher","lq/util"],(function(t,e,i,n){"use strict";var a=function(){this.datasourceListeners=[],this.datasources=[]};return a.prototype.registerDatasourceListener=function(i,n,a,o){var r=e.uniqueId();return this.datasourceListeners.push({id:r,queryName:i,handler:n,decorateDataFunc:a,deleteHandler:o||t.noop}),r},a.prototype.getDatasourceListenersThatListenFor=function(t){return e.where(this.datasourceListeners,{queryName:t})},a.prototype.getDatasourceListenersThatListenForWithDefaultParams=function(t){var n=i.getDefaultQueryParams();return e.filter(this.getDatasourceListenersThatListenFor(t),(function(t){if("function"!=typeof t.decorateDataFunc)return!0;var a=i.getDefaultQueryParams();return t.decorateDataFunc(a),e.isEqual(n,a)}))},a.prototype.unregisterDatasourceListener=function(t){var i=this.getDatasourceListener(t);this.datasourceListeners=e.without(this.datasourceListeners,i)},a.prototype.getDatasourceListener=function(t){return e.findWhere(this.datasourceListeners,{id:t})},a.prototype.registerDatasource=function(t){null!=t.id&&(e.each(t.outputs,(function(e,i){t.outputs[i]=n.convertListOfKeyValuesToObject(e)})),this.datasources.push(t))},a.prototype.getDatasources=function(){return n.cloneData(this.datasources)},a.prototype.getDatasourceNames=function(t){return e.chain(this.datasources).filter((function(e){return!(!e.name||t&&-1!==t.indexOf(e.type))})).groupBy((function(t){return t.name})).map((function(t,e){return{name:e,unique:1===t.length}})).sortBy((function(t){return t.name.toLowerCase()})).value()},a.prototype.getDatasourceByName=function(t){return e.findWhere(this.datasources,{name:t})},a.prototype.getEntityTypeOfDatasource=function(t){var e=this.getDatasourceByName(t);return e?e.entityDefinitionName:null},a.prototype.getDatasourceOutputs=function(i,n){if("string"===t.type(i)&&(i=this.getDatasourceByName(i)),!i)return[];var a=e.chain(i.outputs).filter((function(t){return!t.hideField&&t.alias})).pluck("alias");return n||(a=a.sortBy((function(t){return t.toLowerCase()}))),a.value()},a.prototype.updateDatasource=function(t){this.unregisterDatasource(t),this.registerDatasource(t)},a.prototype.unregisterDatasource=function(t){this.datasources=e.filter(this.datasources,(function(e){return e.id!==t.id}))},a.prototype.clear=function(){this.datasourceListeners=[],this.datasources=[]},a})),define("lq/visibility/itemVisibility",["./defaultVisibility"],(function(t){"use strict";var e=function(e,i){this.dataRow=e,this.parent=i,this.default=new t};return e.prototype.apply=function(t){this.shouldGetVisibilityFromParent(t)?t.addListener("DatasourceApplied",this.updateVisibilityFromDataRow.bind(this,t)):this.default.apply(t)},e.prototype.updateVisibilityFromDataRow=function(t){this.dataRow[t.data.dataSourceOutputForVisibility]?t.showWithoutAnimation():t.hideWithoutAnimation()},e.prototype.shouldGetVisibilityFromParent=function(t){return"From Query"===t.data.initialVisibilityOption&&(t.data.dataSourceForVisibility===this.parent.data.dataSource||this.parent.data.useParentGroupData)},e.prototype.cleanUp=function(){this.default.cleanUp()},e})),define("lq/queryString",["underscore"],(function(t){"use strict";var e=function(){if(!window.location.search)return{};var t=window.location.search.substr(1).split("&");if(!t)return{};for(var e={},i=0;i<t.length;++i){var n=t[i],a=n.indexOf("=");if(a){var o=n.substring(0,a),r=n.substring(a+1);e[o]=decodeURIComponent(r.replace(/\+/g," "))}}return e},i=function(t){this.parameters=t};return i.initialize=function(){var t=new i(e());return window.history.pushState=new Proxy(window.history.pushState,{apply:function(e,i,n){return t.update(),e.apply(i,n)}}),t},i.prototype.getParameterNames=function(){return t.keys(this.parameters)},i.prototype.getParameters=function(){return this.parameters},i.prototype.updateParameter=function(t,e){this.parameters[t]=e},i.prototype.getValueOf=function(t){return this.parameters[t]},i.prototype.update=function(){this.parameters=e()},i})),define("lq/runtimePiping",["jquery","lq/queryDispatcher","drops/action/runtimeTypesProvider","lq/dropFactory","lq/parameterShell","lq/parameterCollection","lq/runtimeBusyIndicator","lq/runtimeErrorHandler","lq/formatting","lq/runtimeDispatcher","lq/runtimeUrl","lq/conditions/conditions","lq/events/eventing","lq/events/eventActionFactory","lq/visibility/defaultVisibility","lq/datasources","lq/visibility/itemVisibility","lq/required","lq/queryString"],(function(t,e,i,n,a,o,r,s,A,l,d,c,u,h,p,g,f,m,v){"use strict";var y=function(){};return y.createRoot=function(t,e,i){var n=new y;return n.$app=i,n.$modals=i,n.application=e,n.busyIndicator=new r(i),n.errorHandler=new s(n.busyIndicator,e,i),n.parameters=new a(new o,new o(t),new o),n.formatting=new A(e.formatting,e.languageISOCode||navigator.userLanguage||navigator.language),n.queryString=v.initialize(),n.url=new d(n.queryString),n},y.prototype.createChildPiping=function(a,o,r,s,A,d,f){var v=new y;return t.extend(v,this),v.$actionWrapper=A,v.$actionView=d,v.dispatcher=new l(v.busyIndicator,a.actionVersion,a.masterPageVersion),v.actionId=a.id,v.actionInstanceId=a.instanceId,v.masterPageId=a.view.data.masterPageId,v.embeddable=a.view.data.embeddable,v.dropFactory=new n(i,!0),v.parameters=this.parameters.fork(r,s),v.conditions=new c(a.conditions,v),v.eventing=new u(a.events,v,new h(o),f),v.datasources=new g,v.visibility=new p,v.required=new m,v.queryDispatcher=new e(v),v},y.prototype.fork=function(i,n,a){var o=this.parameters.createChildScope(i),r=new y,s=new e(r);return t.extend(r,this,{visibility:new f(i,n),parameters:o,queryDispatcher:s,idOfItem:i[a]})},y.prototype.cleanUp=function(){this.visibility.cleanUp()},y})),define("lq/navigatorMpa",["lq","./navigationHistory"],(function(t,e){"use strict";var i=function(t,i){this.url=t,this.friendlyNames=i,this.history=e.withLocalStorage("mpa")};return i.prototype.openAction=function(e,i,n,a){this.history.push(window.location.href);var o=this.friendlyNames[e];o||(o="LicquidAction/Get/"+e);var r={};_.keys(i).length&&(r.globals=JSON.stringify(i)),_.keys(n).length&&(r.parameters=JSON.stringify(n));var s=this.url.prepare(t.getTenantUrl(o),r);this.url.openUrl(s,a)},i.prototype.goToPrevious=function(t,e){var i=this.history.pop();if(i){var n={globals:t?JSON.stringify(t):void 0,parameters:e?JSON.stringify(e):void 0},a=this.url.prepare(i,n);this.url.openUrl(a,!1)}},i})),define("lq/services/mpa/pasteCommand",["jquery","underscore"],(function(t,e){"use strict";var i="filePasted",n="textPasted";function a(t){this.data=t}return a.typeName="PasteCommand",a.prototype.initialize=function(){this.shouldListenForPaste()&&this.addEventHandlers()},a.prototype.shouldListenForPaste=function(){return this.shouldListenFor(i)||this.shouldListenFor(n)},a.prototype.shouldListenFor=function(t){return this.data.eventing&&this.data.eventing[t]&&this.data.eventing[t].enabled},a.prototype.addEventHandlers=function(){var t=this;document.onpaste=function(a){var o=(a.clipboardData||a.originalEvent.clipboardData).items,r=e.find(o,(function(t){return"file"===t.kind}));if(r)t.shouldListenFor(i)&&t.piping.eventing.publish(t.data.eventing[i].raisedEventName,null,r.getAsFile(),null,t.eventActionId);else if(t.shouldListenFor(n)){var s=e.find(o,(function(t){return"string"===t.kind}));s&&s.getAsString((function(e){t.piping.eventing.publish(t.data.eventing[n].raisedEventName,null,e,null,t.eventActionId)}))}}},a})),define("lq/services/mpa/applicationValidation",["module","lq","lq/frontendModules","lq/cssutil","lq/validatorGateway"],(function(t,e,i,n,a){"use strict";var o=t.config();function r(t){this.annotations=t,this.presses=0}return r.typeName="ApplicationValidation",r.prototype.initialize=function(){this.annotations.isProductionModeEnabled&&(this.handler=this.handleKeyUp.bind(this),$(document).on("keyup",this.handler))},r.prototype.handleKeyUp=function(t){if(27===t.keyCode){var e=new Date;this.previousKeyPressTime&&e-this.previousKeyPressTime>500?(this.presses=1,this.previousKeyPressTime=e):2===this.presses?(this.presses=0,this.previousKeyPressTime=null,this.loadValidator(),$(document).off("keyup",this.handler)):(this.presses++,this.previousKeyPressTime=e)}},r.prototype.loadValidator=function(){n.requireCss(o.cssFile);var t=this;require(["lq/licquidRuntimeValidationLegacy"],(function(){i.load("validator",!0).then((function(e){t.start(e)}))}))},r.prototype.start=function(t){var i={loginUrl:"/Licquid.Designer/Account/Validator",frontEndUrl:e.getFrontEndUrl(""),designUrl:e.getDesignerUrl(""),portalUrl:e.getPortalUrl("")};t.default(i,document.getElementById("licquid-validator")),a.callCallbacks()},r})),define("lq/runtimeClone",["jquery","underscore"],(function(t,e){"use strict";var i=function(t){e.forEach(t.pool,(function(t){t.data.id&&(t.$element.hasClass("runtime-selectable")||t.$element.addClass("runtime-selectable runtime-drop-"+t.data.id)),i(t)}))},n=function(t){this.options=t,this.onClicked=this.select.bind(this),this.$container=null};return n.prototype.create=function(){i(this.options.action);var e=this.options.action.$masterPage.clone().addClass("runtime-clone"),n=this.options.action.$element.clone().addClass("runtime-clone"),a=t("<div />").css({position:"fixed",top:0,padding:"0.5rem 2rem",zIndex:999999999,backgroundColor:"#4ECCFF",color:"white",margin:"0 auto",left:0,right:0,width:"300px",textAlign:"center",borderRadius:"0 0 0.5rem 0.5rem"}).append(t("<span />").text("Select an element or ")).append(t("<span />").text("[ cancel ]").addClass("clickable").on("click",this.cancel.bind(this)));this.$container=t("<div />").append(e).append(n).append(a).css({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:999999999,backgroundColor:"white",overflowY:"auto"}).appendTo(t("body")),t("body").addClass("runtime-clone-body"),t(document).on("click",this.onClicked)},n.prototype.cancel=function(){this.options.onCancel()},n.prototype.select=function(i){var n=t(i.target).closest(".runtime-selectable");if(0!==n.length){var a=n.attr("class").split(" "),o=e.find(a,(function(t){return 0===t.indexOf("runtime-drop-")})).substring(13),r=t(i.target).closest(".licquid-drops-pool"),s=this.options.action.data,A=r.length>0?s.id:s.masterPageId;this.options.onSelect(A,o)}},n.prototype.destroy=function(){this.$container.remove(),this.$container=null,t("body").removeClass("runtime-clone-body"),t(document).off("click",this.onClicked)},n})),define("lq/runtimeDropPicker",["when","./runtimeClone"],(function(t,e){"use strict";var i=function(t){this.action=t,this.clone=null};return i.prototype.canPick=function(){return!this.clone},i.prototype.pick=function(){return t.promise(this.createClone.bind(this))},i.prototype.createClone=function(t){var i=this;this.clone=new e({action:this.action,onSelect:function(e,n){t({rootMorphId:e,morphId:n}),i.destroyClone()},onCancel:function(){t(null),i.destroyClone()}}),this.clone.create()},i.prototype.destroyClone=function(){this.clone.destroy(),this.clone=null},i})),define("lq/services/mpa/issueTracking",["lq/runtimeDropPicker"],(function(t){"use strict";function e(t){this.configuration=t.data,this.previousKeyPressTime=null,this.presses=0,this.picking=!1}return e.typeName="IssueTracking",e.prototype.initialize=function(){$(document).on("keyup",this.handleKeyUp.bind(this))},e.prototype.handleKeyUp=function(e){if(16===e.keyCode&&!this.picking){var i=new Date;this.previousKeyPressTime&&i-this.previousKeyPressTime>500?(this.presses=1,this.previousKeyPressTime=i):2===this.presses?(this.presses=0,this.previousKeyPressTime=null,this.picking=!0,new t(this.rootDrop).pick().done(this.handleSelection.bind(this))):(this.presses++,this.previousKeyPressTime=i)}},e.prototype.handleSelection=function(t){if(this.picking=!1,t){var e=this.configuration.createUrl+"?"+$.param({morphId:t.morphId,rootMorphId:t.rootMorphId,identifier:this.configuration.identifier});window.open(e)}},e})),define("lq/pullDownAction",["jquery"],(function(t){var e=function(t){return t.touches||t.originalEvent.touches};return{attach:function(i,n,a){var o=null,r=!1,s=-1,A=0,l=t("<div id='pull-down-container'></div>"),d=t(`<img id='pull-down-indicator' src=${require.toUrl("../Lq/pullDownAction.svg?bust=00001")}/>`).appendTo(l);i.append(l),t(document.documentElement).addClass("no-native-pull-down"),t(document.body).addClass("no-native-pull-down");var c=function(t){if(o&&Array.from(t.changedTouches).find((function(t){return t.identifier===s}))){var n=e(t)[0].screenY-o;r=n>=150,n>0&&(A=Math.min(n,120),requestAnimationFrame((function(){i[0].style.overflow="hidden",i[0].style.webkitOverflowScrolling="touch",d.css({top:`${A}px`,transition:"top 0.3s linear",transform:`rotate(${3*A}deg)`})})))}},u=function(t){Array.from(t.changedTouches).find((function(t){return t.identifier===s}))&&(i[0].style.overflowY="auto",s=-1,r&&(a(),r=!1),i[0].style.overflow="hidden",i[0].style.webkitOverflowScrolling="touch",d.css({top:"-48px",transition:"top 0.1s linear"}),i[0].style.overflow="visible",removeEventListener("touchmove",c),removeEventListener("touchend",u))};document.addEventListener("touchstart",(function(t){if(!(s>-1||0!==n.scrollTop())){var i=e(t)[0];o=i.screenY,s=i.identifier}})),document.addEventListener("touchmove",c),document.addEventListener("touchend",u)}}})),define("lq/services/mpa/pullDownEvents",["lq/pullDownAction"],(function(t){"use strict";function e(){}return e.typeName="PullDownEvents",e.prototype.initialize=function(){if(window===window.parent){var e=this.rootDrop;t.attach(this.piping.$app,this.piping.$actionWrapper,(function(){e.isEventEnabled("pullDown")?e.triggerEventIfEnabled("pullDown"):window.location.reload()}))}},e})),define("lq/services/mpa/serviceFactory",["lq/typesProvider","./pasteCommand","./applicationValidation","./issueTracking","./pullDownEvents","./addToHomeScreenCommand"],(function(t){"use strict";var e=new t(Array.prototype.slice.call(arguments,1));return{createService:function(t,i){var n=new(e.get(t.serviceType))(t.data);return n.rootDrop=i,n.piping=i.piping,n}}})),define("lq/javascript/polyfill",[],(function(){var t;if(Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var i,n,a=e||0;if(!this)throw new TypeError;if(0===(n=this.length)||a>=n)return-1;for(a<0&&(a=n-Math.abs(a)),i=a;i<n;i++)if(this[i]===t)return i;return-1}),Object.keys||(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=i.length;return function(a){if("object"!=typeof a&&("function"!=typeof a||null===a))throw new TypeError("Object.keys called on non-object");var o,r,s=[];for(o in a)t.call(a,o)&&s.push(o);if(e)for(r=0;r<n;r++)t.call(a,i[r])&&s.push(i[r]);return s}}()),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get&&(t=Object.getOwnPropertyDescriptor(Element.prototype,"innerText"),Object.defineProperty(Element.prototype,"textContent",{get:function(){return t.get.call(this)},set:function(e){return t.set.call(this,e)}})),"function"!=typeof window.CustomEvent){function e(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}e.prototype=window.Event.prototype,window.CustomEvent=e}
/* @license
	 * BSD License for Pointer Events Polyfill (http://github.com/kmewhort/pointer_events_polyfill)
	 *
	 * Copyright (c) 2013, Kent Mewhort
	 * All rights reserved.
	 *
	 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
	 * following conditions are met:
	 *
	 *     Redistributions of source code must retain the above copyright notice, this list of conditions and the following
	 *     disclaimer.
	 *     Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
	 *     disclaimer in the documentation and/or other materials provided with the distribution.
	 *
	 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
	 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
	 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
	 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
	 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
	 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
	 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
	 */function i(t){if(this.options={selector:"*",mouseEvents:["click","dblclick","mousedown","mouseup"],usePolyfillIf:function(){if("Microsoft Internet Explorer"==navigator.appName&&(null!=navigator.userAgent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/)&&parseFloat(RegExp.$1)<11))return!0;return!1}},t){var e=this;$.each(t,(function(t,i){e.options[t]=i}))}this.options.usePolyfillIf()&&this.register_mouse_events()}i.initialize=function(t){return null==i.singleton&&(i.singleton=new i(t)),i.singleton},i.prototype.register_mouse_events=function(){$(document).on(this.options.mouseEvents.join(" "),this.options.selector,(function(t){if(this==t.target){if("none"==$(t.target).css("pointer-events")){var e=$(this).css("display");$(this).css("display","none");var i=document.elementFromPoint(t.clientX,t.clientY);return e?$(this).css("display",e):$(this).css("display",""),t.target=i,$(i).trigger(t),!1}return!0}}))},window.PointerEventsPolyfill=i})),define("lq/licquidRuntimeMpa",["underscore","drops/action/action","lq/runtimePiping","lq/style","lq/windowSize","lq/navigatorMpa","lq/responsive","lq/layouting","lq/services/mpa/serviceFactory","lq/validatorGateway","lq/javascript/polyfill"],(function(t,e,i,n,a,o,r,s,A,l){var d=function(){window.cordova&&document.addEventListener("deviceready",(function(){window.universalLinks&&window.universalLinks.subscribe(null,(function(t){window.location=t.url}))}),!1)};return d.prototype.start=function(d){n.defaultStyles=d.application.styles.defaultStyles,n.mockMode=d.isInMockMode;var c=d.$el,u=$('<div class="licquid-action-wrapper" />').appendTo(c),h=$('<div class="licquid-action-view" />').appendTo(u);this.globalPiping=i.createRoot(d.parameters.globals,d.application,c),this.globalPiping.navigator=new o(this.globalPiping.url,d.friendlyNames),this.globalPiping.errorHandler.addListener(this.handleError.bind(this));var p=new e(d.action.view,d.application.options);p.backgroundDrops=d.action.backgroundDrops,p.allLayouts=d.action.allLayouts,p.defaultLayout=d.action.defaultLayout,p.piping=this.globalPiping.createChildPiping(d.action,p,d.parameters.locals,d.parameters.system,u,h,window.performance.navigation.type==window.performance.navigation.TYPE_RELOAD);var g=this;l.isEnabled()?l.publishEvent({type:"LICQUID_RUNTIME_LOADED",globalPiping:this.globalPiping}):l.whenEnabled((function(){l.publishEvent({type:"LICQUID_RUNTIME_LOADED",globalPiping:g.globalPiping}),null!==g.action&&(l.registerListener(g.action.instanceId,g.receiveMessage.bind(g)),l.publishEvent({type:"ACTION_INSTANCE_LOADED",action:g.action,canReload:!1}))})),p.services=t.map(d.application.services.concat(d.action.services),(function(t){return A.createService(t,p)}));var f=r.getCurrentLayout(p);if(s.applyLayout(h,f),p.applyLayout(f),p.createAndRenderDrops($("#viewport")),d.application.embedded&&window.parent.postMessage(JSON.stringify({eventName:"LicquidLoaded"}),"*"),l.isEnabled()&&(l.registerListener(p.instanceId.toString(),this.receiveMessage.bind(this)),l.publishEvent({type:"ACTION_INSTANCE_LOADED",action:p,canReload:!1})),window!==window.parent){window.parent.postMessage(JSON.stringify({eventName:"EmbeddedActionLoaded",sizeX:p.data.size.x,sizeY:p.data.size.y}),window.location.protocol+"//"+window.location.host);window.addEventListener("message",(function(t){if(t.source===window.parent)try{var e=JSON.parse(t.data);if(!e.eventName)return;p.triggerEvent(e.eventName,e.args[0])}catch(t){}}),!1)}a.withOnChanged((function(){p.resize()})),this.action=p},d.prototype.receiveMessage=function(t){switch(t.type){case"RELOAD_ACTION_INSTANCE":this.openNewAction(this.action.data.id,this.action.globals,this.action.locals,{ignoreHistory:!0});break;case"HIGHLIGHT_ACTION_INSTANCE":highlighter.highlight(this.$wrapper)}},d.prototype.handleError=function(t){this.action&&this.action.error(t)},d})),
/** @license
 * RequireJS plugin for async dependency load like JSONP and Google Maps
 * Author: Miller Medeiros
 * Version: 0.1.2 (2014/02/24)
 * Released under the MIT license
 */
define("async",[],(function(){var t=0;return{load:function(e,i,n,a){if(a.isBuild)n(null);else{var o="__async_req_"+(t+=1)+"__";window[o]=n,r=function(t,e){var i=/!(.+)/,n=t.replace(i,""),a=i.test(t)?t.replace(/.+!/,""):"callback";return(n+=n.indexOf("?")<0?"?":"&")+a+"="+e}(i.toUrl(e),o),(s=document.createElement("script")).type="text/javascript",s.async=!0,s.src=r,(A=document.getElementsByTagName("script")[0]).parentNode.insertBefore(s,A)}var r,s,A}}})),define("lq/services/application/applicationValidation",["module","lq","lq/frontendModules","lq/cssutil","lq/validatorGateway"],(function(t,e,i,n,a){"use strict";var o=t.config();function r(t){this.annotations=t,this.presses=0}return r.typeName="ApplicationValidation",r.prototype.initialize=function(){this.annotations.isProductionModeEnabled&&(this.handler=this.handleKeyUp.bind(this),$(document).on("keyup",this.handler))},r.prototype.handleKeyUp=function(t){if(27===t.keyCode){var e=new Date;this.previousKeyPressTime&&e-this.previousKeyPressTime>500?(this.presses=1,this.previousKeyPressTime=e):2===this.presses?(this.presses=0,this.previousKeyPressTime=null,this.loadValidator(),$(document).off("keyup",this.handler)):(this.presses++,this.previousKeyPressTime=e)}},r.prototype.loadValidator=function(){n.requireCss(o.cssFile);var t=this;require(["lq/licquidRuntimeValidationLegacy"],(function(){i.load("validator",!0).then((function(e){t.start(e)}))}))},r.prototype.start=function(t){var i={loginUrl:"/Licquid.Designer/Account/Validator",frontEndUrl:e.getFrontEndUrl(""),designUrl:e.getDesignerUrl(""),portalUrl:e.getPortalUrl("")};t.default(i,document.getElementById("licquid-validator")),a.callCallbacks()},r})),define("lq/services/application/issueTracking",[],(function(){"use strict";function t(){}return t.typeName="IssueTracking",t.prototype.initialize=function(){},t})),define("lq/services/application/pullDownEvents",["lq/pullDownAction"],(function(t){"use strict";function e(){}return e.typeName="PullDownEvents",e.prototype.initialize=function(e){window===window.parent&&t.attach(e.$app,e.$wrapper,(function(){e.action.isEventEnabled("pullDown")?e.action.triggerEventIfEnabled("pullDown"):window.location.reload()}))},e})),define("lq/services/application/applicationServiceFactory",["lq/typesProvider","./applicationValidation","./issueTracking","./pullDownEvents"],(function(t){"use strict";var e=new t(Array.prototype.slice.call(arguments,1));return{createService:function(t){return new(e.get(t.serviceType))(t.data)}}})),define("lq/licquidRuntimeSpa",["lq","underscore","drops/action/action","lq/runtimePiping","lq/parameterShell","lq/actionLoader","lq/navigatorSpa","lq/style","lq/windowSize","lq/responsive","lq/services/application/applicationServiceFactory","lq/validatorGateway","lq/highlighter","lq/layouting","lq/javascript/polyfill"],(function(t,e,i,n,a,o,r,s,A,l,d,c,u,h,p){var g=null;l.isPWA()||window.addEventListener("beforeinstallprompt",(function(t){g=t}));var f=function(){window.cordova&&document.addEventListener("deviceready",(function(){window.universalLinks&&window.universalLinks.subscribe(null,(function(t){window.location=t.url}))}),!1)};return f.prototype.start=function(t){t.application.embedded&&window.parent.postMessage(JSON.stringify({eventName:"LicquidLoaded"}),"*");var i=this;A.withOnChanged((function(){i.action&&i.action.resize()})),window.addEventListener("popstate",(function(t){i.openNewAction(t.state.actionId,t.state.globals,t.state.locals,{ignoreHistory:!0})})),s.defaultStyles=t.application.styles.defaultStyles,s.mockMode=t.isInMockMode,this.action=null,this.$app=t.$el,this.$wrapper=$('<div class="licquid-action-wrapper" />').appendTo(this.$app),this.$view=$('<div class="licquid-action-view" />').appendTo(this.$wrapper),this.globalPiping=n.createRoot(t.parameters.globals,t.application,this.$app),this.globalPiping.navigator=r.withLocalStorage(t.action.id,this.globalPiping.url,this.openNewAction.bind(this)),this.globalPiping.errorHandler.addListener(this.handleError.bind(this)),this.globalPiping.runtime=this,c.isEnabled()?c.publishEvent({type:"LICQUID_RUNTIME_LOADED",globalPiping:this.globalPiping}):c.whenEnabled((function(){c.publishEvent({type:"LICQUID_RUNTIME_LOADED",globalPiping:i.globalPiping}),null!==i.action&&(c.registerListener(i.action.instanceId,i.receiveMessage.bind(i)),c.publishEvent({type:"ACTION_INSTANCE_LOADED",action:i.action,canReload:!1}))})),this.globalServices=e.map(t.application.services,(function(t){return d.createService(t)})),e.forEach(this.globalServices,(function(t){t.initialize(i)})),this.application=t.application,this.actionLoader=new o(this.globalPiping.url),this.actionLoader.addListener(this.showAction.bind(this)),this.globalPiping.busyIndicator.show(),this.openNewAction(t.action.id,t.parameters.globals,t.parameters.locals),this.globalPiping.deferredPrompt=g},f.prototype.showAction=function(n,a,o){if($.extend(this.globalPiping.application,n.application),n.view.insertionPoint){var r=this.insertionPoints.indexOf(n.view.insertionPoint);this.insertionPoints=this.insertionPoints.slice(0,r+1),this.insertionPoints=this.insertionPoints.concat(e.map(n.view.actions,(function(t){return t.action.id}))),this.action.setContent(n.view.actions,a.locals,n.view.insertionPoint),this.updateHistory(n,e.last(n.view.actions).action.id,a,o)}else{this.insertionPoints=e.map(n.view.actions,(function(t){return t.action.id}));var s=n.view.actions[0].action,A=n.view.actions[0].systemParameters,d=n.view.actions.length>1?{}:a.locals,u=new i(s.view,this.globalPiping.application.options);u.loadData(s),u.piping=this.globalPiping.createChildPiping(s,u,d,A,this.$wrapper,this.$view,!this.action&&window.performance.navigation.type==window.performance.navigation.TYPE_RELOAD),u.globals=e.clone(a.globals),u.locals=e.clone(a.locals);var p=l.getCurrentLayout(u);h.applyLayout(this.$view,p),u.applyLayout(p),u.createAndRenderDrops($("#viewport")).then((function(){u.setContent(n.view.actions.slice(1),a.locals)})),this.action?(c.isEnabled()&&(c.unregisterListener(this.action.instanceId),c.publishEvent({type:"ACTION_INSTANCE_UNLOADING",action:this.action})),this.action.piping.cleanUp(),this.action.unsubscribeEventHandlersRecursive(),this.updateHistory(n,e.last(n.view.actions).action.id,a,o)):window.history.replaceState({actionId:e.last(n.view.actions).action.id,globals:a.globals,locals:a.locals},"",this.application.hideUrl?t.getTenantUrl(""):window.location.href),this.$wrapper.scrollTop(0),this.action=u,this.action.piping.busyIndicator.forceHide(),c.isEnabled()&&(c.registerListener(u.instanceId.toString(),this.receiveMessage.bind(this)),c.publishEvent({type:"ACTION_INSTANCE_LOADED",action:u,canReload:1===n.view.actions.length})),window!==window.parent&&window.parent.postMessage(JSON.stringify({eventName:"EmbeddedActionLoaded",sizeX:u.data.size.x,sizeY:u.data.size.y}),window.location.protocol+"//"+window.location.host)}},f.prototype.updateHistory=function(i,n,a,o){if(!o||!o.ignoreHistory){var r=i.friendlyName?i.friendlyName:"LicquidAction/Get/"+n,s={};e.keys(a.globals).length&&(s.globals=JSON.stringify(a.globals)),e.keys(a.locals).length&&(s.parameters=JSON.stringify(a.locals));var A=this.application.hideUrl?t.getTenantUrl(""):this.globalPiping.url.prepare(t.getTenantUrl(r),s);window.history.pushState({actionId:n,globals:a.globals,locals:a.locals},"",A)}},f.prototype.receiveMessage=function(t){switch(t.type){case"RELOAD_ACTION_INSTANCE":this.openNewAction(this.action.data.id,this.action.globals,this.action.locals,{ignoreHistory:!0});break;case"HIGHLIGHT_ACTION_INSTANCE":u.highlight(this.$wrapper)}},f.prototype.openNewAction=function(t,e,i,n){this.actionLoader.load(t,e,i,n,this.insertionPoints)},f.prototype.handleError=function(t){this.action&&this.action.error(t)},f})),define("lq/licquidRuntimeRaven",["lq/main"],(function(t){var e=function(t){this.licquidRuntime=t};return e.prototype.start=function(e){var i=this,n=e.raven,a=this.licquidRuntime;require(["raven"],(function(o){var r=o.config(n.frontEndDsn,{tags:n.tags,dataCallback:function(t){if(t.fingerprint=n.tags.issuesProjectIdentifier?["{{ default }}",n.tags.issuesProjectIdentifier,n.tags.rootMorphId]:["{{ default }}",n.tags.tenant,n.tags.application,n.tags.rootMorphId],a.action&&(t.extra.globalParameters=a.action.piping.parameters.globals.getAll(),t.extra.localParameters=a.action.piping.parameters.locals.getAll(),t.tags.rootMorphId=a.action.data.id,t.extra.bookmark={bookmarkType:"actionBookmarkById",rootMorphId:a.action.data.id}),a.globalPiping){var e=a.globalPiping.application;e.releaseName&&(t.tags.releaseNumber=e.releaseName),e.userId&&(t.user={id:e.userId})}return t}}).install();t.setRavenLogger(r),o.context(i.startRuntime.bind(i,e))}))},e.prototype.startRuntime=function(t){this.licquidRuntime.start(t)},e}));
//# sourceMappingURL=licquidRuntime.min.js.map
