@wavemaker/app-runtime-wm-build 11.4.0-next.28152 → 11.4.0-next.28701
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +62 -33
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +3 -3
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +155 -51
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +10 -10
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +62 -33
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +3 -3
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +155 -51
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +23 -23
|
@@ -3624,7 +3624,7 @@ function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery",
|
|
|
3624
3624
|
* Released under the MIT license.
|
|
3625
3625
|
* http://jquery.org/license
|
|
3626
3626
|
*/
|
|
3627
|
-
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],t):t(jQuery)}((function(t){"use strict";return t.widget("ui.droppable",{version:"1.13.2",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 t,e=this.options,n=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof n?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.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,n){if("accept"===e)this.accept="function"==typeof n?n:function(t){return t.is(n)};else if("scope"===e){var r=t.ui.ddmanager.droppables[this.options.scope];this._splice(r),this._addToManager(n)}this._super(e,n)},_activate:function(e){var n=t.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",e,this.ui(n))},_deactivate:function(e){var n=t.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",e,this.ui(n))},_over:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(n)))},_out:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(n)))},_drop:function(e,n){var r=n||t.ui.ddmanager.current,i=!1;return!(!r||(r.currentItem||r.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var n=t(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===r.options.scope&&n.accept.call(n.element[0],r.currentItem||r.element)&&t.ui.intersect(r,t.extend(n,{offset:n.element.offset()}),n.options.tolerance,e))return i=!0,!1})),!i&&(!!this.accept.call(this.element[0],r.currentItem||r.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(r)),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")}}),t.ui.intersect=function(){function t(t,e,n){return t>=e&&t<e+n}return function(e,n,r,i){if(!n.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,s=o+e.helperProportions.width,u=a+e.helperProportions.height,l=n.offset.left,c=n.offset.top,p=l+n.proportions().width,d=c+n.proportions().height;switch(r){case"fit":return l<=o&&s<=p&&c<=a&&u<=d;case"intersect":return l<o+e.helperProportions.width/2&&s-e.helperProportions.width/2<p&&c<a+e.helperProportions.height/2&&u-e.helperProportions.height/2<d;case"pointer":return t(i.pageY,c,n.proportions().height)&&t(i.pageX,l,n.proportions().width);case"touch":return(a>=c&&a<=d||u>=c&&u<=d||a<c&&u>d)&&(o>=l&&o<=p||s>=l&&s<=p||o<l&&s>p);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,n){var r,i,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=n?n.type:null,s=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(r=0;r<o.length;r++)if(!(o[r].options.disabled||e&&!o[r].accept.call(o[r].element[0],e.currentItem||e.element))){for(i=0;i<s.length;i++)if(s[i]===o[r].element[0]){o[r].proportions().height=0;continue t}o[r].visible="none"!==o[r].element.css("display"),o[r].visible&&("mousedown"===a&&o[r]._activate.call(o[r],n),o[r].offset=o[r].element.offset(),o[r].proportions({width:o[r].element[0].offsetWidth,height:o[r].element[0].offsetHeight}))}},drop:function(e,n){var r=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,n)&&(r=this._drop.call(this,n)||r),!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,n)))})),r},dragStart:function(e,n){e.element.parentsUntil("body").on("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}))},drag:function(e,n){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,n),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,i,o,a=t.ui.intersect(e,this,this.options.tolerance,n),s=!a&&this.isover?"isout":a&&!this.isover?"isover":null;s&&(this.options.greedy&&(i=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===i}))).length&&((r=t(o[0]).droppable("instance")).greedyChild="isover"===s)),r&&"isover"===s&&(r.isover=!1,r.isout=!0,r._out.call(r,n)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,n),r&&"isout"===s&&(r.isout=!1,r.isover=!0,r._over.call(r,n)))}}))},dragStop:function(e,n){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}},!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})),function(t,e,n,r){"use strict";function i(t,e,n){return setTimeout(l(t,n),e)}function o(t,e,n){return!!Array.isArray(t)&&(a(t,n[e],n),!0)}function a(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==r)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function s(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}function u(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&rt(r,n)}function l(t,e){return function(){return t.apply(e,arguments)}}function c(t,e){return typeof t==at?t.apply(e&&e[0]||r,e):t}function p(t,e){return t===r?e:t}function d(t,e,n){a(m(e),(function(e){t.addEventListener(e,n,!1)}))}function h(t,e,n){a(m(e),(function(e){t.removeEventListener(e,n,!1)}))}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function v(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function g(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function y(t){return Array.prototype.slice.call(t,0)}function b(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];g(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function _(t,e){for(var n,i,o=e[0].toUpperCase()+e.slice(1),a=0;a<it.length;){if((i=(n=it[a])?n+o:e)in t)return i;a++}return r}function w(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}function E(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){c(t.options.enable,[t])&&n.handler(e)},this.init()}function x(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&bt&&r-i==0,a=e&(wt|Et)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=C(e)),i>1&&!n.firstMultiple?n.firstMultiple=C(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=T(r);e.timeStamp=lt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=M(s,u),e.distance=A(s,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==bt&&o.eventType!==wt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=D(e.deltaX,e.deltaY);var l=k(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=ut(l.x)>ut(l.y)?l.x:l.y,e.scale=a?function(t,e){return A(e[0],e[1],It)/A(t[0],t[1],It)}(a.pointers,r):1,e.rotation=a?function(t,e){return M(e[1],e[0],It)+M(t[1],t[0],It)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,S(n,e);var c=t.element;f(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function S(t,e){var n,i,o,a,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=Et&&(u>yt||s.velocity===r)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,p=k(u,l,c);i=p.x,o=p.y,n=ut(p.x)>ut(p.y)?p.x:p.y,a=D(l,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=o,e.direction=a}function C(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:st(t.pointers[n].clientX),clientY:st(t.pointers[n].clientY)},n++;return{timeStamp:lt(),pointers:e,center:T(e),deltaX:t.deltaX,deltaY:t.deltaY}}function T(t){var e=t.length;if(1===e)return{x:st(t[0].clientX),y:st(t[0].clientY)};for(var n=0,r=0,i=0;e>i;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:st(n/e),y:st(r/e)}}function k(t,e,n){return{x:e/t||0,y:n/t||0}}function D(t,e){return t===e?xt:ut(t)>=ut(e)?0>t?St:Ct:0>e?Tt:kt}function A(t,e,n){n||(n=Ot);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function M(t,e,n){n||(n=Ot);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function O(){this.evEl=Rt,this.evWin=Nt,this.pressed=!1,E.apply(this,arguments)}function I(){this.evEl=jt,this.evWin=Bt,E.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function P(){this.evTarget=Ht,this.evWin=Ut,this.started=!1,E.apply(this,arguments)}function R(t,e){var n=y(t.touches),r=y(t.changedTouches);return e&(wt|Et)&&(n=b(n.concat(r),"identifier",!0)),[n,r]}function N(){this.evTarget=Yt,this.targetIds={},E.apply(this,arguments)}function L(t,e){var n=y(t.touches),r=this.targetIds;if(e&(bt|_t)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=y(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return f(t.target,u)})),e===bt)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),e&(wt|Et)&&delete r[a[i].identifier],i++;return s.length?[b(o.concat(s),"identifier",!0),s]:void 0}function F(){E.apply(this,arguments);var t=l(this.handler,this);this.touch=new N(this.manager,t),this.mouse=new O(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function j(t,e){t&bt?(this.primaryTouch=e.changedPointers[0].identifier,B.call(this,e)):t&(wt|Et)&&B.call(this,e)}function B(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),zt)}}function V(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(Wt>=o&&Wt>=a)return!0}return!1}function H(t,e){this.manager=t,this.set(e)}function U(t){this.options=rt({},this.defaults,t||{}),this.id=dt++,this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=ne,this.simultaneous={},this.requireFail=[]}function q(t){return t&se?"cancel":t&oe?"end":t&ie?"move":t&re?"start":""}function Y(t){return t==kt?"down":t==Tt?"up":t==St?"left":t==Ct?"right":""}function z(t,e){var n=e.manager;return n?n.get(t):t}function W(){U.apply(this,arguments)}function G(){W.apply(this,arguments),this.pX=null,this.pY=null}function K(){W.apply(this,arguments)}function $(){U.apply(this,arguments),this._timer=null,this._input=null}function Z(){W.apply(this,arguments)}function X(){W.apply(this,arguments)}function Q(){U.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function J(t,e){return(e=e||{}).recognizers=p(e.recognizers,J.defaults.preset),new tt(t,e)}function tt(t,e){this.options=rt({},J.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){return new(t.options.inputClass||(ft?I:vt?N:ht?F:O))(t,x)}(this),this.touchAction=new H(this,this.options.touchAction),et(this,!0),a(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function et(t,e){var n,r=t.element;r.style&&(a(t.options.cssProps,(function(i,o){n=_(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}function nt(t,n){var r=e.createEvent("Event");r.initEvent(t,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}var rt,it=["","webkit","Moz","MS","ms","o"],ot=e.createElement("div"),at="function",st=Math.round,ut=Math.abs,lt=Date.now;rt="function"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e}:Object.assign;var ct=s((function(t,e,n){for(var i=Object.keys(e),o=0;o<i.length;)(!n||n&&t[i[o]]===r)&&(t[i[o]]=e[i[o]]),o++;return t}),"extend","Use `assign`."),pt=s((function(t,e){return ct(t,e,!0)}),"merge","Use `assign`."),dt=1,ht="ontouchstart"in t,ft=_(t,"PointerEvent")!==r,vt=ht&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),mt="touch",gt="mouse",yt=25,bt=1,_t=2,wt=4,Et=8,xt=1,St=2,Ct=4,Tt=8,kt=16,Dt=St|Ct,At=Tt|kt,Mt=Dt|At,Ot=["x","y"],It=["clientX","clientY"];E.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(w(this.element),this.evWin,this.domHandler)}};var Pt={mousedown:bt,mousemove:_t,mouseup:wt},Rt="mousedown",Nt="mousemove mouseup";u(O,E,{handler:function(t){var e=Pt[t.type];e&bt&&0===t.button&&(this.pressed=!0),e&_t&&1!==t.which&&(e=wt),this.pressed&&(e&wt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:gt,srcEvent:t}))}});var Lt={pointerdown:bt,pointermove:_t,pointerup:wt,pointercancel:Et,pointerout:Et},Ft={2:mt,3:"pen",4:gt,5:"kinect"},jt="pointerdown",Bt="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(jt="MSPointerDown",Bt="MSPointerMove MSPointerUp MSPointerCancel"),u(I,E,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=Lt[r],o=Ft[t.pointerType]||t.pointerType,a=o==mt,s=g(e,t.pointerId,"pointerId");i&bt&&(0===t.button||a)?0>s&&(e.push(t),s=e.length-1):i&(wt|Et)&&(n=!0),0>s||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var Vt={touchstart:bt,touchmove:_t,touchend:wt,touchcancel:Et},Ht="touchstart",Ut="touchstart touchmove touchend touchcancel";u(P,E,{handler:function(t){var e=Vt[t.type];if(e===bt&&(this.started=!0),this.started){var n=R.call(this,t,e);e&(wt|Et)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:mt,srcEvent:t})}}});var qt={touchstart:bt,touchmove:_t,touchend:wt,touchcancel:Et},Yt="touchstart touchmove touchend touchcancel";u(N,E,{handler:function(t){var e=qt[t.type],n=L.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:mt,srcEvent:t})}});var zt=2500,Wt=25;u(F,E,{handler:function(t,e,n){var r=n.pointerType==mt,i=n.pointerType==gt;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)j.call(this,e,n);else if(i&&V.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Gt=_(ot.style,"touchAction"),Kt=Gt!==r,$t="compute",Zt="auto",Xt="manipulation",Qt="none",Jt="pan-x",te="pan-y",ee=function(){if(!Kt)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){e[r]=!n||t.CSS.supports("touch-action",r)})),e}();H.prototype={set:function(t){t==$t&&(t=this.compute()),Kt&&this.manager.element.style&&ee[t]&&(this.manager.element.style[Gt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return a(this.manager.recognizers,(function(e){c(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(v(t,Qt))return Qt;var e=v(t,Jt),n=v(t,te);return e&&n?Qt:e||n?e?Jt:te:v(t,Xt)?Xt:Zt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(!this.manager.session.prevented){var r=this.actions,i=v(r,Qt)&&!ee[Qt],o=v(r,te)&&!ee[te],a=v(r,Jt)&&!ee[Jt];if(i){var s=1===t.pointers.length,u=t.distance<2,l=t.deltaTime<250;if(s&&u&&l)return}return a&&o?void 0:i||o&&n&Dt||a&&n&At?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ne=1,re=2,ie=4,oe=8,ae=oe,se=16,ue=32;U.prototype={defaults:{},set:function(t){return rt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(o(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=z(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return o(t,"dropRecognizeWith",this)||(t=z(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(o(t,"requireFailure",this))return this;var e=this.requireFail;return-1===g(e,t=z(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(o(t,"dropRequireFailure",this))return this;t=z(t,this);var e=g(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;oe>r&&e(n.options.event+q(r)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),r>=oe&&e(n.options.event+q(r))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ue)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(ue|ne)))return!1;t++}return!0},recognize:function(t){var e=rt({},t);return c(this.options.enable,[this,e])?(this.state&(ae|se|ue)&&(this.state=ne),this.state=this.process(e),void(this.state&(re|ie|oe|se)&&this.tryEmit(e))):(this.reset(),void(this.state=ue))},process:function(t){},getTouchAction:function(){},reset:function(){}},u(W,U,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=e&(re|ie),i=this.attrTest(t);return r&&(n&Et||!i)?e|se:r||i?n&wt?e|oe:e&re?e|ie:re:ue}}),u(G,W,{defaults:{event:"pan",threshold:10,pointers:1,direction:Mt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Dt&&e.push(te),t&At&&e.push(Jt),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(e.direction&Dt?(i=0===o?xt:0>o?St:Ct,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?xt:0>a?Tt:kt,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return W.prototype.attrTest.call(this,t)&&(this.state&re||!(this.state&re)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Y(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(K,W,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&re)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u($,U,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Zt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!r||!n||t.eventType&(wt|Et)&&!o)this.reset();else if(t.eventType&bt)this.reset(),this._timer=i((function(){this.state=ae,this.tryEmit()}),e.time,this);else if(t.eventType&wt)return ae;return ue},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ae&&(t&&t.eventType&wt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=lt(),this.manager.emit(this.options.event,this._input)))}}),u(Z,W,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&re)}}),u(X,W,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Dt|At,pointers:1},getTouchAction:function(){return G.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Dt|At)?e=t.overallVelocity:n&Dt?e=t.overallVelocityX:n&At&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&ut(e)>this.options.velocity&&t.eventType&wt},emit:function(t){var e=Y(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(Q,U,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),t.eventType&bt&&0===this.count)return this.failTimeout();if(r&&o&&n){if(t.eventType!=wt)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||A(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=i((function(){this.state=ae,this.tryEmit()}),e.interval,this),re):ae}return ue},failTimeout:function(){return this._timer=i((function(){this.state=ue}),this.options.interval,this),ue},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ae&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),J.VERSION="2.0.7",J.defaults={domEvents:!1,touchAction:$t,enable:!0,inputTarget:null,inputClass:null,preset:[[Z,{enable:!1}],[K,{enable:!1},["rotate"]],[X,{direction:Dt}],[G,{direction:Dt},["swipe"]],[Q],[Q,{event:"doubletap",taps:2},["tap"]],[$]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};tt.prototype={set:function(t){return rt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,r=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&ae)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&n.state&(re|ie|oe)&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof U)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(o(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(o(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=g(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==r&&e!==r){var n=this.handlers;return a(m(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==r){var n=this.handlers;return a(m(t),(function(t){e?n[t]&&n[t].splice(g(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&nt(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&et(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},rt(J,{INPUT_START:bt,INPUT_MOVE:_t,INPUT_END:wt,INPUT_CANCEL:Et,STATE_POSSIBLE:ne,STATE_BEGAN:re,STATE_CHANGED:ie,STATE_ENDED:oe,STATE_RECOGNIZED:ae,STATE_CANCELLED:se,STATE_FAILED:ue,DIRECTION_NONE:xt,DIRECTION_LEFT:St,DIRECTION_RIGHT:Ct,DIRECTION_UP:Tt,DIRECTION_DOWN:kt,DIRECTION_HORIZONTAL:Dt,DIRECTION_VERTICAL:At,DIRECTION_ALL:Mt,Manager:tt,Input:E,TouchAction:H,TouchInput:N,MouseInput:O,PointerEventInput:I,TouchMouseInput:F,SingleTouchInput:P,Recognizer:U,AttrRecognizer:W,Tap:Q,Pan:G,Swipe:X,Pinch:K,Rotate:Z,Press:$,on:d,off:h,each:a,merge:pt,extend:ct,assign:rt,inherit:u,bindFn:l,prefixed:_}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=J,"function"==typeof define&&define.amd?define((function(){return J})):"undefined"!=typeof module&&module.exports?module.exports=J:t.Hammer=J}(window,document),$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:!1,enableSort:!0,filtermode:"",activeRow:void 0,height:"100%",showHeader:!0,selectFirstRow:!1,showNewRow:!0,showRowIndex:!1,enableRowSelection:!0,enableColumnSelection:!1,multiselect:!1,filterNullRecords:!0,navigation:"",isdynamictable:"",cssClassNames:{tableRow:"app-datagrid-row",headerCell:"app-datagrid-header-cell",groupHeaderCell:"app-datagrid-group-header-cell",tableCell:"app-datagrid-cell",grid:"",gridDefault:"table",gridBody:"app-datagrid-body",gridFooter:"app-datagrid-footer",deleteRow:"danger",ascIcon:"wi wi-long-arrow-up",descIcon:"wi wi-long-arrow-down",selectedColumn:"selected-column",rowExpandIcon:"wi wi-minus-square",rowCollapseIcon:"wi wi-plus-square",gridRowExpansionClass:"table-row-expansion",expandedRowClass:"expanded"},dataStates:{loading:"Loading...",ready:"",error:"An error occurred in loading the data.",nodata:"No data found."},messages:{selectField:"Select Field"},loadingicon:"",startRowIndex:1,editmode:"",actionsEnabled:{edit:!0,new:!0},rowExpansionEnabled:!1,rowDef:{position:"0",closeothers:!1,columnwidth:"30px"},summaryRow:!1,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:!0,show:!0},radio:{field:"radio",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",show:!0},__expand:{field:"__expand",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"text-align: center;",textAlignment:"center",show:!0,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:!1,searchable:!1,selectable:!1,readonly:!0,style:"text-align: left;",textAlignment:"left",show:!0}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},isDefined:function(t){return void 0!==t},isObject:function(t){return null!==t&&"object"==typeof t},getObjectIndex:function(t,e){var n=-1;return Array.isArray(t)?(t.some((function(t,r){if(_.isEqual(t,e))return n=r,!0})),n):-1},generateGuid:function(){var t=this.random;return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},isValidHtml:function(t){return/<[a-z][\s\S]*>/i.test(t)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(t){return this.isMac()&&8===t.which||46===t.which}},_setStyles:function(t,e){if(e)return e.split(";").forEach((function(e){var n,r,i=e.split(":");2===i.length&&(n=i[0].trim(),r=i[1].trim(),t.css(n,r))})),e},_getColumnSortDirection:function(t){var e=this.options.sortInfo;return t===e.field?e.direction:""},_toggleSpacingClasses:function(t){switch(t){case"normal":this.tableContainer.removeClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").removeClass("form-group-sm"),this.gridSearch.find("select").removeClass("input-sm"),this.gridSearch.find(".input-group").removeClass("input-group-sm"));break;case"condensed":this.tableContainer.addClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").addClass("form-group-sm"),this.gridSearch.find("select").addClass("input-sm"),this.gridSearch.find(".input-group").addClass("input-group-sm"))}},_getColSpan:function(t){var e=0,n=this;return _.forEach(t,(function(t){var r;t.isGroup?e+=n._getColSpan(t.columns):(r=_.find(n.preparedHeaderData,{field:t.field}),e=_.isUndefined(r.show)||r.show?e+1:e)})),e},_setColSpan:function(t){var e=this;_.forEach(t,(function(t){t.isGroup&&(t.colspan=e._getColSpan(t.columns),e.gridHeaderElement.find('th[data-col-group="'+t.field+'"]').attr("colspan",t.colspan),e._setColSpan(t.columns))}))},_getHeaderTemplate:function(){var t,e=$("<colgroup></colgroup>"),n=this.gridHeaderElement.empty(),r=this.Utils.isDefined,i=this.options.sortInfo,o=i.field,a=this,s=[],u=this.options.headerConfig,l=a.options.cssClassNames.groupHeaderCell;function c(t,n){var s,u,l,c,p,d=n,h=t.field,f=a.Utils.isDefined(t.displayName)?t.displayName:h||"",v=f,m=a.options.enableSort&&(_.isUndefined(t.show)||t.show)&&(_.isUndefined(t.sortable)||t.sortable),g=a.options.cssClassNames.headerCell,y="";return f=a.Utils.isDefined(f)&&""!==f?f:" ",l=$("<col/>"),t.style&&a._setStyles(l,t.style),e.append(l),r(t.class)&&(g+=" "+t.class),t.selected&&(g+=" "+a.options.cssClassNames.selectedColumn+" "),"checkbox"!==h&&"radio"!==h||(g+=" grid-col-small"),y+="<th",(_.isUndefined(t.resizable)||t.resizable)&&(_.isUndefined(t.show)||t.show)&&(y+=" data-col-resizable"),a.options.enableColumnSelection&&(_.isUndefined(t.selectable)||t.selectable)&&(y+=" data-col-selectable"),m&&(y+=" data-col-sortable"),y+="></th>",(u=$(y)).attr({"data-col-id":d,"data-col-field":h,title:v}),a._setStyles(u,"text-align: "+t.textAlignment),u.addClass(g),"checkbox"===h&&u.append('<input type="checkbox" />'),u.append('<span class="header-data">'+f+"</span>"),m&&(c=$('<span class="sort-buttons-container"></span>'),p=$('<i class="sort-icon"></i>'),o&&o===t.field&&i.direction&&(s="asc"===i.direction?a.options.cssClassNames.ascIcon:a.options.cssClassNames.descIcon,c.addClass("active"),p.addClass(s+" "+i.direction)),u.append(c.append(p))),u}return _.isEmpty(u)?(t=$("<tr></tr>"),a.preparedHeaderData.forEach((function(e,n){t.append(c(e,n))})),n.append(t)):(!function t(e,n){var r=[];_.forEach(e,(function(e){var i,o,s,u,p;e.columns&&e.columns.length?(p=$("<th></th>"),s=l+" "+(e.class||""),u="text-align: "+e.textAlignment+";background-color: "+(e.backgroundColor||"")+";",p.attr({"data-col-group":e.field,class:s,title:e.displayName}),a._setStyles(p,u),p.append('<span class="header-data">'+e.displayName+"</span>"),r.push(p),t(e.columns,n+1)):(i=_.findIndex(a.preparedHeaderData,{field:e.field}),(o=a.preparedHeaderData[i])&&r.push(c(o,i)))})),s[n]=s[n]||[],s[n]=s[n].concat(r)}(u,0),s.forEach((function(e,r){t=$('<tr role="row" tabindex="0"></tr>');var i=s.length-r;e.forEach((function(e){i>1&&e.hasClass("app-datagrid-header-cell")&&e.attr("rowspan",i),t.append(e)})),n.append(t)}))),{colgroup:e,header:n}},_getSearchEl:function(){var t='<select name="wm-datatable" data-element="dgFilterValue" class="form-control app-select"><option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",e=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(e,n){"none"!==e.field&&"rowOperations"!==e.field&&e.searchable&&"false"!==_.toString(e.showinfilter)&&(t+='<option value="'+e.field+'" data-coldef-index="'+n+'">'+(e.displayName||e.field)+"</option>")})),t+="</select>";var n=$('<form class="form-search form-inline" onsubmit="return false;"><div class="form-group"><input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="'+e+'"/></div><div class="input-append input-group">'+t+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+e+'"><i class="wi wi-search"></i></button></span></div></div></form>');return this._setStyles(n.find('[data-element="dgSearchText"]'),"display: inline-block;"),n},_appendRowExpansionButtons:function(t){var e=this;t.find("[data-identifier='rowExpansionButtons']").each((function(t){var n,r,i,o=t;r=$(this).closest("tr.app-datagrid-row"),i=parseInt(r.attr("data-row-id"),10),(n=_.clone(e.options.data[i])).$index=o+1,e.options.generateRowExpansionCell(n,o),$(this).empty().append(e.options.getRowExpansionAction(o))}))},setSummaryRowDef:function(t,e,n,r){this.options.summaryRow=!0,null==this.options.summaryRowDefs[n]&&(this.options.summaryRowDefs[n]={},this.options.summaryRowDefsObject[n]={}),this.options.summaryRowDefsObject[n][t]=e,this.options.summaryRowDefs[n][t]=e&&e.value?e.value:e,r&&this.refreshGridData()},_getSummaryRowTemplate:function(){var t=this,e=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');return this._setStyles(e,"border-top: 3px solid #eee;"),_.forEach(this.options.summaryRowDefs,(function(n,r){n.$$pk=r,e.append(t._getRowTemplate(n,r,!0))})),e},getPageStartIndex:function(){var t=this.options.getCurrentPage(),e=this.options.getPageSize();return((this.options.actionRowPage<t?this.options.actionRowPage:t)-1)*e},_getPreparedDataForInfiniteScroll:function(t,e){return e=e.filter((function(e,n){if(!t.find("tr.app-datagrid-row[data-row-id="+e.$$pk+"]").length)return e}))},_updateTrData:function(t){var e,n,r=this;e=t.find("tr.app-datagrid-row[data-row-id="+r.options.actionRowIndex+"]"),n=r.preparedData[r.options.actionRowIndex],r.options.generateCustomExpressions(n,r.options.actionRowIndex);var i=r._getRowTemplate(n,r.options.actionRowIndex);e.replaceWith(i[0])},_handleCRUDForInfiniteScroll:function(t){var e=this;e.options.lastActionPerformed!==e.options.ACTIONS.SEARCH_OR_SORT&&e.options.lastActionPerformed!==e.options.ACTIONS.FILTER_CRITERIA&&e.options.lastActionPerformed!==e.options.ACTIONS.DATASET_UPDATE||!(e.options.isSearchTrigerred||e.options.isDatasetUpdated||e.options.isDataUpdatedByUser)?e.options.lastActionPerformed===e.options.ACTIONS.EDIT&&void 0!==e.options.actionRowIndex&&e.options.editmode!==this.CONSTANTS.QUICK_EDIT&&e._updateTrData(t):(t.html(""),"On-Demand"!==this.options.navigation||this.options.isLastPage||this.element.find(".on-demand-datagrid").show(),e.options.clearCustomExpression(),e.options.clearRowDetailExpression(),e.options.setIsSearchTrigerred(!1),e.options.setIsDatasetUpdated(!1))},_getGridTemplate:function(){var t,e,n=this,r=n.getPageStartIndex(),i=n.options.startRowIndex,o=n.options.isNavTypeScrollOrOndemand();return e=o?this.gridElement:this.gridElement.empty(),o?(this._handleCRUDForInfiniteScroll(e),n.options.lastActionPerformed===n.options.ACTIONS.DELETE&&(i=n.options.actionRowIndex+1),t=this._getPreparedDataForInfiniteScroll(e,this.preparedData.slice(r))):(this.options.clearCustomExpression(),this.options.clearRowDetailExpression(),t=this.preparedData),_.forEach(t,(function(t,r){var a,s=_.clone(t),u=o?i+r-1:r;if(s.$index=u+1,n.options.generateCustomExpressions(s,u),n.options.registerRowNgClassWatcher(s,u),a=n._getRowTemplate(t,u),e.append(a),n.options.rowExpansionEnabled){var l=n.options.rowDef.height,c=_.filter(n.preparedHeaderData,(function(t){return t.show})).length-1,p=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+t.$$pk+'"><td></td><td colspan="'+c+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td></tr>');l&&p.find("div.row-overlay").css("min-height",l),p.css("display","none"),p.find(".details-section").css("display","none"),e.append(p)}})),this.options.isdynamictable||(this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT),this.options.setIsDataUpdatedByUser(!1),this.options.clearActionRowIndex()),e},_getRowTemplate:function(t,e,n){var r,i=this,o=i.options;return r=$('<tr role="row" tabindex="0" class="'+o.cssClassNames.tableRow+" "+(o.rowClass||"")+'" data-row-id="'+t.$$pk+'"></tr>'),this.preparedHeaderData.forEach((function(o,a){r.append(i._getColumnTemplate(t,a,o,e,n))})),r},_getRowActionsColumnDefIndex:function(){var t,e=this.preparedHeaderData.length;for(t=0;t<e;t+=1)if("rowOperations"===this.preparedHeaderData[t].field)return t;return-1},_getRowActionsColumnDef:function(){var t=this._getRowActionsColumnDefIndex();return-1!==t?this.preparedHeaderData[t]:null},_getCheckboxTemplate:function(t,e){return'<input name="'+(e?"gridMultiSelect":"")+'" type="checkbox"'+(!0===t._checked?" checked":"")+(t.disabed?" disabled":"")+"/>"},_getRadioTemplate:function(t){return'<input type="radio" rowSelectInput name="" value=""'+(!0===t._checked?" checked":"")+(t.disabed?" disabled":"")+"/>"},_getColumnTemplate:function(t,e,n,r,i){var o,a,s,u,l=this.options.cssClassNames.tableCell+" "+(n.class||""),c=n.customExpression,p="text-align: "+n.textAlignment+";position: relative;";if(o=$('<td class="'+l+'" data-col-id="'+e+'" role="cell"></td>'),this._setStyles(o,p),a=_.get(t,n.field),i)(s=this.options.summaryRowDefsObject[r][n.field])instanceof Object&&s.class&&o.addClass(s.class),a instanceof Promise?('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',o.html('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>')):(u=_.isUndefined(a)||null===a?"":a,o.html(u));else if(c)o.html(this.options.getCustomExpression(n.field,r));else if("custom"!==n.type)a=_.get(t,n.field),(this.options.filterNullRecords&&null===a||_.isUndefined(a))&&(a=""),o.attr("title",a),o.text(""+a);else{switch(n.field){case"checkbox":u=this._getCheckboxTemplate(t,n.isMultiSelectCol);break;case"__expand":u='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":u=this._getRadioTemplate(t);break;case"rowOperations":u='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":u=t.$$index;break;case"none":u="";break;default:u=_.isUndefined(a)||null===a?"":a}o.html(u)}return t.$index=r+1,this.options.registerColNgClassWatcher(t,n,r,e),o},_getEventTemplate:function(t){var e,n=_.filter(_.keys(t),(function(t){return _.startsWith(t,"on")})),r="";return e="autocomplete"===t.editWidgetType?"onSubmit":"onChange",n=_.union(n,[e]),_.forEach(n,(function(e){r+=" "+_.kebabCase(e)+'="',"onSubmit"!==e&&"onChange"!==e||(r+="_"+e+"Field($event, $scope, newVal, oldVal);"),r+=(t[e]||"")+'" '})),r},_insertFieldInHeaderConfig:function(t,e,n){var r=_.findIndex(t,{field:n}),i=this;-1===r?_.forEach(t,(function(t){t.isGroup&&i._insertFieldInHeaderConfig(t.columns,e,n)})):t.splice(r+1,0,{field:e,isPredefined:!0})},setHeaderConfigForDefaultFields:function(t,e){if(!_.isEmpty(this.options.headerConfig)){var n=this.customColumnDefs[t].field;_.remove(this.options.headerConfig,{field:n}),"0"===e?this.options.headerConfig.unshift({field:n,isPredefined:!0}):"-1"===e?this.options.headerConfig.push({field:n,isPredefined:!0}):this._insertFieldInHeaderConfig(this.options.headerConfig,n,e)}},setDefaultColsData:function(t){if(!_.isEmpty(this.preparedHeaderData)){var e,n;if(this.options.rowExpansionEnabled){if(e=this.options.rowDef.position,(n=_.clone(this.customColumnDefs.__expand)).width=this.options.rowDef.columnwidth,t)if("-1"===e)this.preparedHeaderData.push(n);else if("0"===e)this.preparedHeaderData.unshift(n);else{var r=_.findIndex(this.preparedHeaderData,{field:e});this.preparedHeaderData.splice(r+1,0,n)}this.setHeaderConfigForDefaultFields("__expand",e)}this.options.showRowIndex&&(t&&this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex),this.setHeaderConfigForDefaultFields("rowIndex","0")),this.options.multiselect&&(t&&this.preparedHeaderData.unshift(this.customColumnDefs.checkbox),this.setHeaderConfigForDefaultFields("checkbox","0")),!this.options.multiselect&&this.options.showRadioColumn&&(t&&this.preparedHeaderData.unshift(this.customColumnDefs.radio),this.setHeaderConfigForDefaultFields("radio","0"))}},_prepareHeaderData:function(){this.preparedHeaderData=[],$.extend(this.preparedHeaderData,this.options.colDefs),this.setDefaultColsData(!0)},_generateCustomColDefs:function(){var t=[],e={};function n(n){if(!e[n]){var r={type:"string",field:n};t.push(r),e[n]=!0}}this.options.data.forEach((function(t){_.keys(t).forEach(n)})),this.options.colDefs=t,this._prepareHeaderData()},_prepareData:function(){var t=[],e=this.options.colDefs,n=this,r=n.getPageStartIndex(),i=this.Utils.isObject,o=this.Utils.isDefined;!this.options.colDefs.length&&this.options.data.length&&this._generateCustomColDefs(),(this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(r):this.options.data).forEach((function(a,s){var u=$.extend(!0,{},a);e.forEach((function(t){if(t.field){var e,n,r,s=t.field.split("."),l=a,c=s.length;for(e=0;e<c;e++)if(r=void 0,-1!==(n=s[e]).indexOf("[0]")&&(n=n.replace("[0]",""),r=!0),i(l)&&!r)l=_.get(l,n);else{if(!r){l=void 0;break}l=_.get(l,n+"[0]")}o(l)?u[t.field]=l:s.length>1&&_.has(a,t.field)&&(u[t.field]=a[t.field])}})),u.$$index=r+s+1,u.$$pk=n.options.isNavTypeScrollOrOndemand()?r+s:s,t.push(u)})),n.options.isNavTypeScrollOrOndemand()?n.options.isSearchTrigerred&&!n.emptySearch||n.options.isDatasetUpdated?n.preparedData=t:n.preparedData.length?t.forEach((function(t,e){var i=r+e;n.preparedData[i]&&t.$$index===n.preparedData[i].$$index?n.preparedData[i]=t:n.preparedData.push(t)})):n.preparedData.push(...t):n.preparedData=t},_reselectColumns:function(){var t=[],e=this;this.gridHeaderElement&&this.options.enableColumnSelection&&(t=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn)).length&&t.each((function(){e.columnSelectionHandler(void 0,$(this))})),this.options.multiselect&&this.updateSelectAllCheckboxState()},_create:function(){$.extend(this,{dataStatus:{message:"",state:"ready"},preparedData:[],preparedHeaderData:[],dataStatusContainer:null,gridContainer:null,gridElement:null,gridHeader:null,gridBody:null,gridFooter:null,gridSearch:null,tableId:null,searchObj:{field:"",value:"",event:null},compiledCellTemplates:{}}),this._setStatus=_.debounce((function(t){this.__setStatus(t)}),100),this._debounceOnEnter=_.debounce((function(t,e,n,r){this._onEnter(t,e,n,r)}),150),this.options.summaryRow=!1,this.options.summaryRowDefs=[],this._prepareHeaderData(),this._prepareData(),this._render(!0)},_setGridEditMode:function(t){$.isFunction(this.options.setGridEditMode)&&this.options.setGridEditMode(t)},_refreshGrid:function(){this._prepareHeaderData(),this._prepareData(),this._render(),this.addOrRemoveScroll(),this._setGridEditMode(!1)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout),this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var t=this.gridElement.find("> tr.app-datagrid-row.always-new-row");t.length&&t.remove(),this._renderGrid(void 0)},refreshGridData:function(){this._prepareData(),this.options.isNavTypeScrollOrOndemand()?this.callRenderGridForInfiniteScroll():(this.gridFooter.remove(),this._renderGrid()),this._reselectColumns(),this.addOrRemoveScroll(),this._setGridEditMode(!1),this.toggleNewRowActions(!1)},setDefaultRowData:function(t){_.forEach(this.preparedHeaderData,(function(e){t[e.field]=e.defaultvalue}))},addNewRow:function(t,e){var n,r,i,o=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,a=this,s={};if(!e&&$.isFunction(this.options.beforeRowInsert)&&this.options.beforeRowInsert(),(i=(r=this.gridElement).find("> tr.app-datagrid-row.always-new-row")).length){if(this.setFocusOnElement(void 0,i),this.options.editmode===this.CONSTANTS.QUICK_EDIT){var u=i.find("input").length>0?$(i.find("input")[0]):null;if(null!==u){var l=$.Event("keydown");l.which=13,u.trigger(l)}}}else s.$index=o,s.$$pk=o,this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG&&(n=$(this._getRowTemplate(s,s.$index)),this.preparedData.length||this.setStatus("ready",this.dataStatus.ready),"top"===this.options.formPosition?r.prepend(n):r.append(n),this._appendRowActions(n,!0,s),this.attachEventHandlers(n),(e||this.options.editmode!==this.CONSTANTS.QUICK_EDIT)&&(n.find(".delete-row-button").hide(),e&&n.find(".edit-row-button").hide()),this._findAndReplaceCompiledTemplates(),e?(this.setDefaultRowData(s),n.addClass("always-new-row").addClass("row-editing"),this.options.runInNgZone((function(){a.makeRowEditable(n,s,!0)}))):n.trigger("click",[void 0,{action:"edit",operation:"new",skipFocus:t}]),this.updateSelectAllCheckboxState(),this.addOrRemoveScroll(),this.options.timeoutCall((function(){a.setColGroupWidths()}),100))},addLoadMoreBtn:function(t,e,n){if(!this.options.isLastPage){var r=this,i=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>'),o=i.find("a");o.append(t),this.element.find(".app-grid-header-inner").append(i),o.on("click",(function(t){n&&"function"==typeof n&&(o.hide(),r.showLoadingIndicator(e,!1),n(t))}))}},showLoadingIndicator:function(t,e){var n=this.element.find(".loading-data-msg"),r=this.element.find(".on-demand-datagrid");if(n.length&&!e)n.show();else if(e&&r.length)r.show();else{var i=$('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin '+this.options.loadingicon+'"></i><span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');if(i.find(".loading-text").html(t),r.length)r.append(i);else{var o=$('<div class="on-demand-datagrid">'+i[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(o)}}},hideLoadingIndicator:function(t,e){t||e?this.element.find(".on-demand-datagrid").hide():(this.element.find(".loading-data-msg").hide(),this.element.find(".on-demand-load-btn").show())},getSelectedRows:function(){this.getSelectedColumns();var t=[],e=this;return this.preparedData.forEach((function(n,r){n._selected&&t.push(e.options.data[r])})),t},selectRows:function(t){var e=this;e.gridElement.find("tr.app-datagrid-row").each((function(t){e.preparedData[t]&&!0===e.preparedData[t]._selected&&$(this).trigger("click",[$(this),{skipSingleCheck:!0}])})),_.isArray(t)?_.forEach(t,(function(t){e.selectRow(t,!0)})):e.selectRow(t,!0)},toggleRowFilter:function(t){this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch&&(t?this.gridSearch.show():this.gridSearch.hide())},setColGroupWidths:function(){var t=this,e=(this.options.isMobile,this.tableContainer.find("col")),n=this.tableContainer.find("col"),r=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),i=this.preparedHeaderData.length,o=this.gridElement.parent().prop("scrollLeft");if(e.length||r.length){this._setColSpan(this.options.headerConfig),this.toggleRowFilter();var a=0,s=e.length;e.each((function(){var t=$(this).width();t&&(a+=t,s-=1)})),r.each((function(){var r,i,o=Number($(this).attr("data-col-id")),a=t.preparedHeaderData[o],s=t.gridContainer.find('th[data-col-id="'+o+'"]'),u=t.gridElement.find('td.app-datagrid-cell[data-col-id="'+o+'"]'),l=t.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+o+'"]'),c=$(e[o]),p=$(n[o]);a&&(r=a.width,_.isUndefined(a.show)||a.show?(s.show(),u.show(),c.show(),p.show(),l.show()):(s.hide(),u.hide(),c.hide(),p.hide(),l.hide()),c.length&&"90px"===c[0].style.width&&(i=_.isUndefined(r)?"":r,c.css("width",i),p.css("width",i)))})),r.each((function(){var r,o,u,l,c=$(this),p=Number(c.attr("data-col-id")),d=t.preparedHeaderData[p];if(d){if(r=d.width,_.isUndefined(d.show)||d.show)if(c.hasClass("grid-col-small"))o=50;else if(_.isUndefined(r)||""===r||_.includes(r,"%")){if((l=$(e[p])).length)if(""===(u=l[0].style.width)||"0px"===u||"90px"===u||_.includes(u,"%"))if((o=c.width())<=0){for(var h=c,f=o,v=0;f<=0;)f=(h=h.parent()).width(),h.find("table").length&&(v=v+parseFloat(h.css("padding-left"))+parseFloat(h.css("padding-right")));if(f>0)if(v&&(f-=v),_.includes(u,"%"))o=f*(parseInt(u)/100);else o=(o=(a&&a>0?f-a:f)/(s||e.length))>90?i===p+1?o-17:o:90;else o=o>90?i===p+1?o-17:o:90}else o=o>90?i===p+1?o-17:o:90;else o=u}else o=r;else o=0;$(e[p]).css("width",o),$(n[p]).css("width",o)}})),this.toggleRowFilter(!0),this.gridElement.parent().prop("scrollLeft",o),this.gridHeaderElement.parent().prop("scrollLeft",o)}},getSelectedColumns:function(){var t,e,n,r={},i=[],o=this;return $.extend(i,this.preparedHeaderData),this.options.multiselect?(i.some((function(e,n){if("checkbox"===e.field)return t=n,!0})),i.splice(t,1)):this.options.showRadioColumn&&(i.some((function(t,n){if("radio"===t.field)return e=n,!0})),i.splice(e,1)),this.options.showRowIndex&&(i.some((function(t,e){if("rowIndex"===t.field)return n=e,!0})),i.splice(n,1)),i.forEach((function(t){var e=t.field;t.selected&&(r[e]={colDef:t,colData:o.options.data.map((function(t){return t[e]}))})})),r},_setOption:function(t,e){switch(this._super(t,e),t){case"showHeader":this._toggleHeader(),this._toggleSearch(),this.setColGroupWidths(),this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":this.gridSearch&&(this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",e),this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",e));break;case"selectFirstRow":this.selectFirstRow(e);break;case"data":this.isResetSortIconsDone||this.setSortIconDefault(),this.refreshGridData();break;case"dataStates":"nodata"===this.dataStatus.state?this.setStatus("nodata",this.dataStatus.nodata):"loading"===this.dataStatus.state&&this.setStatus("loading");break;case"loadingicon":this.dataStatusContainer.find("i").removeClass().addClass(this.options.loadingicon);break;case"colDefs":if(this.options.isNavTypeScrollOrOndemand()&&this.options.isNextPageData){this.tableContainer.find("colgroup").remove(),this._prepareHeaderData(),this.setColGroupWidths(),this._renderHeader(),this._renderSearch(),this.attachEventHandlers(this.gridElement),this._reselectColumns(),this.addOrRemoveScroll();break}case"multiselect":case"showRadioColumn":case"rowActions":case"filterNullRecords":case"showRowIndex":this.refreshGrid();break;case"cssClassNames":var n=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;this.options.rowExpansionEnabled&&(n=n+" "+this.options.cssClassNames.gridRowExpansionClass),this.tableContainer.attr("class",n),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed");break;case"spacing":this._toggleSpacingClasses(e);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(e&&e.selectField)}},getOptions:function(){return this.options},_toggleHeader:function(){this.gridHeaderElement&&this.gridHeaderElement.empty(),this.tableContainer&&(this.tableContainer.find("colgroup").remove(),this.tableContainer.find("thead").remove()),this.setDefaultColsData(),this.options.showHeader&&this._renderHeader()},_toggleSearch:function(){this.gridSearch&&this.gridSearch.remove(),this.options.filtermode===this.CONSTANTS.SEARCH?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&(this._renderRowFilter(),this.setColGroupWidths())},selectFirstRow:function(t,e){var n,r;e&&this.gridElement.find("tr").is(":visible")?(this.__setStatus(),n=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()):n=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first(),r=n.attr("data-row-id"),n.length&&this.preparedData.length&&(this.preparedData[r]._selected=!t,n[0].click())},selectRow:function(t,e){var n,r,i=_.isNumber(t)?t:this.Utils.getObjectIndex(this.options.data,t);-1!==i&&(n="tr.app-datagrid-row[data-row-id="+i+"]",(r=this.gridElement.find(n)).length&&(this.preparedData[i]._selected=!e),e?r.trigger("click"):(this.toggleRowSelection(r,e),this.options.callOnRowDeselectEvent(this.preparedData[i])))},deselectRow:function(t){this.selectRow(t,!1)},toggleRowSelection:function(t,e,n,r){if(t.length){var i=t.attr("data-row-id");this.preparedData[i]&&(this.preparedData[i]._selected=e,e?t.addClass("active"):t.removeClass("active"),this.options.showRadioColumn&&(t.find("td input[rowSelectInput]:radio:not(:disabled)").prop("checked",e),this.preparedData[i]._checked=e),this.options.multiselect?(t.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)').prop("checked",e),this.preparedData[i]._checked=e,r||this.updateSelectAllCheckboxState()):this._deselectPreviousSelection(t,n))}},updateSelectAllCheckboxState:function(){if(this.options.showHeader&&this.options.multiselect){this.__setStatus();var t=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),e=this.gridElement,n=e.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,r=e.find("tr.app-datagrid-row:visible").length;r&&n===r?t.prop("checked",!0):t.prop("checked",!1)}},rowClickHandlerOnCapture:function(t,e,n){e=e||$(t.target).closest("tr.app-datagrid-row");var r=this.gridElement.find(e);if(r.length&&r.closest("tbody").attr("id")===this.gridElement.attr("id")){var i=e.attr("data-row-id"),o=(this.preparedData[i],this.options.data[i]);this.options.assignSelectedItems(o,t)}},rowSelectionHandler:function(t,e,n){var r,i,o,a,s=this,u=(n=n||{}).action,l=$(t.target),c=this.options.editmode===this.CONSTANTS.QUICK_EDIT;function p(){a&&$.isFunction(s.options.onRowSelect)&&s.options.onRowSelect(o,t),!a&&$.isFunction(s.options.onRowDeselect)&&s.options.onRowDeselect(o,t)}e=e||l.closest("tr.app-datagrid-row"),(u||c&&(l.hasClass("app-datagrid-cell")||l.closest("td.app-datagrid-cell").length)&&!e.hasClass("always-new-row"))&&(n.action=n.action||"edit",("new"===n.operation||s.options.actionsEnabled.edit)&&s.toggleEditRow(t,n),n.skipSelect)||(r=e.attr("data-row-id"),i=this.preparedData[r],o=this.options.data[r],a=i&&i._selected||!1,n.skipSingleCheck||(!e.hasClass("active")||this.options.multiselect)&&i?(this.options.callOnRowClickEvent(o,t),a=!a,this.toggleRowSelection(e,a,t),p()):c||"new"===n.operation||p())},rowDblClickHandler:function(t,e){t.stopPropagation();var n,r=(e=e||$(t.target).closest("tr.app-datagrid-row")).attr("data-row-id");(n=this.preparedData[r])&&$.isFunction(this.options.onRowDblClick)&&this.options.onRowDblClick(n,t)},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(t){var e=$(t.target).closest("th.app-datagrid-header-cell").attr("data-col-id");this.closePopover(),this.options.onHeaderClick(this.preparedHeaderData[e],t)},columnSelectionHandler:function(t,e){t&&t.stopImmediatePropagation();var n=t?$(t.target).closest("th.app-datagrid-header-cell"):e,r=n.attr("data-col-id"),i=this.preparedHeaderData[r],o=i.field,a='td[data-col-id="'+r+'"]',s=this.gridElement.find(a),u=s.data("selected")||!1,l={colDef:i,data:this.options.data.map((function(t){return t[o]})),sortDirection:this._getColumnSortDirection(i.field)},c=this.options.cssClassNames.selectedColumn;u=!u,i.selected=u,s.data("selected",u),u?(s.addClass(c),n.addClass(c),$.isFunction(this.options.onColumnSelect)&&t&&this.options.onColumnSelect(l,t)):(s.removeClass(c),n.removeClass(c),$.isFunction(this.options.onColumnDeselect)&&t&&this.options.onColumnDeselect(l,t))},getTextValue:function(t,e){return this.options.getFieldValue(e?t+"_new":t)},getUploadedFiles:function(t,e){return _.get(document.forms,[t.find("form").attr("name"),e,"files",0])},isDataModified:function(t,e,n){var r=!1,i=this;function o(t){return t?moment(t).valueOf():t}return t.each((function(){var t=$(this),a=t.attr("data-col-id"),s=i.preparedHeaderData[a],u=i.getTextValue(s.field,n),l=_.get(e,s.field);if(r="upload"===s.editWidgetType?i.getUploadedFiles(t,s.field)instanceof File:!(!i.Utils.isDefined(u)&&null==l)&&("datetime"===s.editWidgetType?!(o(l)===o(u)):!(l==u)))return!r})),r},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var t=this.gridElement.find("tr.always-new-row"),e=t&&t.find("input")||[];e.length&&e[0].focus()},disableActions:function(t){var e=this.gridElement.find(".delete-row-button"),n=this.gridElement.find(".edit-row-button");t?(n.addClass("disabled-action"),e.addClass("disabled-action")):(n.removeClass("disabled-action"),e.removeClass("disabled-action"))},setFocusOnElement:function(t,e,n){var r,i,o=t&&$(t.target);o&&o.hasClass("app-datagrid-cell")?r=o.find("input"):(e?e.hasClass("app-datagrid-row")&&(e=e.find("td.cell-editing")):e=o.closest("tr.app-datagrid-row").find("td.cell-editing"),(r=$(e).first().find("input")).length||(r=$(e).first().find("textarea")),r.length||(r=$(e).first().find("select"))),r.length&&(i=r.first(),n?(i.focus(),i.select()):this.options.timeoutCall((function(){i.focus(),i.select()})))},removeNewRow:function(t){this.disableActions(!1),this._setGridEditMode(!1),t.hasClass("always-new-row")||(t.attr("data-removed",!0),t.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),this.addOrRemoveScroll(),this.toggleNewRowActions(!1))},saveRow:function(t){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[void 0,{action:"save",skipSelect:!0,noMsg:!0,success:t}])}))},makeRowEditable:function(t,e,n){var r,i=this,o=t.find("td.app-datagrid-cell"),a=parseInt(t.attr("data-row-id"),10),s=_.clone(e);s.$index=a+1,this.options.removeValidations(n),this.options.generateInlineEditRow(s,n),o.each((function(){var t,r,o=$(this),s=o.text(),u=o.attr("data-col-id"),l=i.preparedHeaderData[u];l.readonly||(t=_.get(e,l.field),r=i.options.getInlineEditWidget(l.field,t,n),l.customExpression||l.formatpattern&&"None"!==l.formatpattern?(o.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:a,fieldName:l.field}),o.addClass("cell-editing editable-expression").html(r).data("originalText",s)):o.addClass("cell-editing").html(r).data("originalText",s),o.addClass("form-group"),"rowOperations"!==l.binding?i.options.timeoutCall((function(){i.options.applyValidations(l,n),l.required&&o.addClass("required-field")})):l.required&&o.addClass("required-field"))})),(r=t.find("td.cell-editing")).on("click",(function(t){t.stopPropagation()})),r.on("keydown",(function(t){38!==t.which&&40!==t.which||!t.currentTarget||t.currentTarget.closest(".always-new-row")||t.stopPropagation()}))},toggleNewRowActions:function(t){var e=this,n=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),r=this.gridElement.find("tr.app-datagrid-row.row-editing"),i=n.find("i.wi-plus").closest(".app-button");this.options.editmode!==this.CONSTANTS.INLINE||0!==this.options.rowActions.length&&_.some(this.options.rowActions,{action:"editRow($event)"})||(t?(n.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel"><i aria-hidden="true" class="app-icon wi wi-cancel"></i><span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span></button><button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save"><i aria-hidden="true" class="app-icon wi wi-done"></i><span class="sr-only">Save Icon</span><span class="btn-caption">Save</span></button>'),n.find(".cancelNewRow").on("click",(function(t){e.toggleEditRow(t,{action:"cancel",$row:r})})),n.find(".saveNewRow").on("click",(function(t){e.toggleEditRow(t,{action:"save",$row:r})})),i.hide()):($("typeahead-container").removeClass("open"),n.find(".cancelNewRow").remove(),n.find(".saveNewRow").remove(),i.show()))},_isNewRow:function(t){return parseInt(t.attr("data-row-id"),10)>=this.preparedData.length||t.hasClass("always-new-row")},toggleEditRow:function(t,e){e=e||{},t&&t.stopPropagation(),this.closePopover();var n,r,i,o,a=e.$row||$(t.target).closest("tr.app-datagrid-row"),s=a.find(".edit-row-button"),u=a.find(".cancel-edit-row-button"),l=a.find(".save-edit-row-button"),c=a.find(".delete-row-button"),p=_.cloneDeep(this.options.data[a.attr("data-row-id")])||{},d=this,h=a.hasClass("always-new-row"),f=d.options.editmode===d.CONSTANTS.QUICK_EDIT,v={};function m(t,n){$.isFunction(e.success)&&e.success(t,n),f&&!d.options.actionsEnabled.edit||d.focusActiveRow()}if(this.options.setActionRowIndex(a.attr("data-row-id")),this.options.setLastActionPerformed(this.options.ACTIONS.EDIT),"true"!==a.attr("data-removed")){if(e.selectRow&&this.selectRow(p,!0),(t=t||{}).data=t.data||{},"edit"===(n=t.data.action||e.action)){if(this.options.editmode===this.CONSTANTS.INLINE&&this.options.callLoadInlineWidgetData(),f&&d.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length)return void d.saveRow((function(e,n){d.editSuccessHandler(e,n,t,a,!0)}));if(a.addClass("row-editing"),$.isFunction(this.options.beforeRowUpdate)&&this.options.beforeRowUpdate(p,t),d.options.editmode===d.CONSTANTS.FORM||d.options.editmode===d.CONSTANTS.DIALOG)return;if("new"===e.operation&&(d.setDefaultRowData(p),d.toggleNewRowActions(!0)),$.isFunction(this.options.onBeforeFormRender)&&!1===this.options.onBeforeFormRender(p,t,e.operation||n))return;this._setGridEditMode(!0),this.disableActions(!0),c.removeClass("disabled-action"),this.options.runInNgZone((function(){d.makeRowEditable(a,p)})),s.addClass("hidden"),u.removeClass("hidden"),l.removeClass("hidden"),i=a.find("td.cell-editing"),!e.skipFocus&&i&&this.options.timeoutCall((function(){d.setFocusOnElement(t,i)})),$.isFunction(this.options.onFormRender)&&this.options.onFormRender(a,t,e.operation||n,a.hasClass("always-new-row"))}else if(i=a.find("td.cell-editing"),r=d._isNewRow(a),"save"===n)if(!!r||this.isDataModified(i,p,h)){if(i.each((function(){var t,e=$(this),n=e.attr("data-col-id"),i=d.preparedHeaderData[n],o=_.split(i.field,".");t=d.getTextValue(i.field,h),1===o.length&&"upload"===i.editWidgetType?_.set(p,i.field,d.getUploadedFiles(e,i.field)):(t=1!==o.length&&!r||""!==t?t:void 0,d.Utils.isDefined(t)?null===(t="null"===t?null:t)?o.length>1?_.set(p,o[0],t):r||_.set(p,i.field,""):_.set(p,i.field,t):1!==o.length||r||_.set(p,i.field,t))})),i.find(".ng-pending").length>0)return void setTimeout(this.toggleEditRow.bind(this,t,e),200);if((o=i.find(".ng-invalid")).length>0)return o.each((function(t){var e=$(this).closest("td.app-datagrid-cell");0===t&&e.find("[focus-target]").focus(),d.options.setTouched(e.find("[formcontrolname]").attr("formcontrolname"))})),void($.isFunction(e.success)&&e.success(!1,!0));if(r&&f&&_.isEmpty(p))return d.removeNewRow(a),void($.isFunction(e.success)&&e.success(!1,void 0,!0));if(r){if($.isFunction(this.options.onBeforeRowInsert)&&!1===this.options.onBeforeRowInsert(p,t,v))return;this.options.onRowInsert(p,t,m,v),d.toggleNewRowActions(!1),!a.hasClass("always-new-row")&&d.options.isNavTypeScrollOrOndemand()&&d.removeNewRow(a)}else{if($.isFunction(this.options.onBeforeRowUpdate)&&!1===this.options.onBeforeRowUpdate(p,t,v))return;this.options.afterRowUpdate(p,t,m,v)}}else this.cancelEdit(a),e.noMsg||this.options.noChangesDetected(),$.isFunction(e.success)&&e.success(!1);else{if(r)return void d.removeNewRow(a);this.cancelEdit(a)}this.addOrRemoveScroll()}},cancelEdit:function(t){var e=this,n=t.find("td.cell-editing"),r=t.find(".cancel-edit-row-button"),i=t.find(".save-edit-row-button"),o=t.find(".edit-row-button");this.options.clearActionRowIndex(),this.disableActions(!1),t.removeClass("row-editing"),n.off("click"),n.each((function(){var t=$(this),n=t.data("originalValue");t.removeClass("datetime-wrapper cell-editing required-field form-group"),n?t.html(e.options.getCustomExpression(n.fieldName,n.rowIndex)):t.text(t.data("originalText")||"")})),$("typeahead-container").removeClass("open"),o.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this._setGridEditMode(!1)},closeEditedRow:function(){var t=this.gridElement.find("tr.app-datagrid-row.row-editing");t.length&&(this._isNewRow(t)?this.removeNewRow(t):this.cancelEdit(t))},hideRowEditMode:function(t){if(t.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand())this.resetNewRow(t);else{var e=t.find("td.cell-editing"),n=t.find(".edit-row-button"),r=t.find(".cancel-edit-row-button"),i=t.find(".save-edit-row-button"),o=this;t.removeClass("row-editing"),e.off("click"),this.disableActions(!1),this._setGridEditMode(!1),e.each((function(){var t,e,n=$(this),r=n.data("originalValue");n.removeClass("datetime-wrapper cell-editing required-field form-group"),r?n.html(o.options.getCustomExpression(r.fieldName,r.rowIndex)):(e=o.preparedHeaderData[n.attr("data-col-id")],t=o.getTextValue(e.field),n.text(o.Utils.isDefined(t)?t:""))})),n.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this.addOrRemoveScroll()}},deleteRow:function(t){t.stopPropagation();var e,n,r=$(t.target).closest("tr.app-datagrid-row"),i=r.attr("data-row-id"),o=this.options.data[i],a=this._isNewRow(r),s={},u=this;if(this.options.setActionRowIndex(i),this.options.setLastActionPerformed(this.options.ACTIONS.DELETE),$.isFunction(this.options.beforeRowDelete)&&this.options.beforeRowDelete(o,t),a)return this.disableActions(!1),this._setGridEditMode(!1),r.attr("data-removed",!0),r.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),void this.addOrRemoveScroll();$.isFunction(this.options.onBeforeRowDelete)&&!1===this.options.onBeforeRowDelete(o,t,s)||$.isFunction(this.options.onRowDelete)&&(e=this.options.cssClassNames.deleteRow,(n=-1!==r.attr("class").indexOf("active"))&&r.removeClass("active"),r.addClass(e),this.options.onRowDelete(o,(function(){n&&r.addClass("active"),r.removeClass(e),u.addOrRemoveScroll()}),t,(function(e,n){if(u.options.isNavTypeScrollOrOndemand()){var r=+$(t.target).closest("tr.app-datagrid-row").attr("data-row-id"),i=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+r+'"]');u.options.setDeletedRowIndex(r),u.preparedData.splice(r,1),u.options.data.splice(r,1),u.gridElement.find("tr.app-datagrid-row:gt("+r+")").each((function(t,e){i.is(":last-child")||$(e).hasClass("always-new-row")||($(e).attr("data-row-id",r),u.preparedData[r].$$pk--,u.preparedData[r].$$index--,u.preparedData[r].$index--,r++)})),i.remove()}var o,a;u.options.editmode===u.CONSTANTS.QUICK_EDIT&&($(t.target).hasClass("delete-row-button")||u.Utils.isDeleteKey(t))&&(u.__setStatus(),n||(o=+$(t.target).closest("tr.app-datagrid-row").attr("data-row-id"),(a=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+o+'"]')).length||(a=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+(o-1)+'"]')),a.trigger("click",[void 0,{action:"edit",skipFocus:e}])))}),s))},deleteRowAndUpdateSelectAll:function(t){this.deleteRow(t),this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function(t,e){var n=this.gridElement.find("tr.app-datagrid-row.active"),r=t.attr("data-row-id"),i=this;n.each((function(){var t=$(this).attr("data-row-id"),n=i.preparedData[t];t!==r&&n&&($(this).find("input[rowSelectInput]:radio").prop("checked",!1),n._selected=n._checked=!1,$(this).removeClass("active"),i.options.callOnRowDeselectEvent(n,e))}))},resetSortIcons:function(t){var e;this.isResetSortIconsDone=!0,!t&&this.gridHeaderElement&&(t=(e=this.gridHeaderElement.find(".sort-buttons-container.active")).find("i.sort-icon"),e.removeClass("active")),t.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const t=this.options.sortInfo,e=this.tableContainer.find("[data-col-field='"+t.field+"']").find(".sort-buttons-container"),n=e.find("i.sort-icon"),r=t.direction;"asc"===r?(n.addClass(r+" "+this.options.cssClassNames.ascIcon),e.addClass("active")):"desc"===r&&(n.addClass(r+" "+this.options.cssClassNames.descIcon),e.addClass("active"))},sortHandler:function(t){t.stopImmediatePropagation(),$(t.target).hasClass("header-data")&&this.options.enableColumnSelection&&this.headerClickHandler(t);var e,n,r,i=$(t.target).closest("th.app-datagrid-header-cell"),o=i.attr("data-col-id"),a=i.find(".sort-buttons-container"),s=a.find("i.sort-icon"),u=s.hasClass("asc")?"desc":"asc",l=this.options.sortInfo,c=this.gridHeaderElement.find(".sort-buttons-container.active"),p=i.attr("data-col-field");this.resetSortIcons(s),s.addClass(u),"asc"===u?(s.addClass(this.options.cssClassNames.ascIcon),a.addClass("active")):"desc"===u&&(s.addClass(this.options.cssClassNames.descIcon),a.addClass("active")),c.length&&(n=c.closest("th.app-datagrid-header-cell").attr("data-col-id"),r=this.preparedHeaderData[n],e=c.find("i.sort-icon"),r.field!==p&&(c.removeClass("active"),this.resetSortIcons(e)),r.sortInfo={sorted:!1,direction:""}),l.direction=u,l.field=p,""!==u&&(this.preparedHeaderData[o].sortInfo={sorted:!0,direction:u}),this._setGridEditMode(!1),this.closeEditedRow(),this.options.sortHandler.call(this,this.options.sortInfo,t,"sort")},processUpDownKeys:function(t,e,n){var r=this,i=e.find("input").val();e.hasClass("row-editing")&&r.options.editmode===r.CONSTANTS.QUICK_EDIT&&i?r.toggleEditRow(t,{action:"save",noMsg:!0,success:function(i,o){r.editSuccessHandler(i,o,t,e,!0,n)}}):(e="down"===n?e.next():e.prev(),this.options.rowExpansionEnabled&&!e.is(":visible")&&(e="down"===n?e.next():e.prev()),e.focus())},resetNewRow:function(t){var e={},n=this;this.options.clearForm(!0),n.setDefaultRowData(e),t.find("[data-field-name]").each((function(){var t=$(this),r=t.attr("data-field-name")+"_new";n.options.setFieldValue(r,e[t.attr("data-field-name")]||"")})),n.options.safeApply(),n.setFocusOnElement(void 0,t,!0)},_onEnter:function(t,e,n,r){var i=this;t.is("button")||(n&&t.hasClass("app-datagrid-row")&&!t.hasClass("row-editing")?e.trigger("click",[void 0,{action:"edit"}]):e.hasClass("row-editing")&&t.closest("[data-field-name]").length?(t.blur(),i.toggleEditRow(r,{action:"save",success:function(e,n){n?t.focus():(i.focusActiveRow(),i.focusNewRow())}})):(e.trigger("click"),n&&t.hasClass("always-new-row")&&t.hasClass("row-editing")&&i.focusNewRow()),t.is("button")||r.stopPropagation())},onKeyDown:function(t){var e,n=$(t.target),r=n.closest("tr.app-datagrid-row"),i=this.options.editmode===this.CONSTANTS.QUICK_EDIT;if(this.options.rowExpansionEnabled&&!r.length&&(r=n.closest("tr.app-datagrid-detail-row")),!this.Utils.isDeleteKey(t))return 27===t.which?((e=this._isNewRow(r))&&r.hasClass("always-new-row")?(n.blur(),this.resetNewRow(r)):r.trigger("click",[void 0,{action:"cancel"}]),void(e||r.focus())):13===t.which?(t.stopPropagation(),void this._debounceOnEnter(n,r,i,t)):void(38!==t.which?40===t.which&&this.processUpDownKeys(t,r,"down"):this.processUpDownKeys(t,r,"up"));!this.options.actionsEnabled.delete||n.is("input")||n.hasClass("form-control")||this.deleteRow(t)},editSuccessHandler:function(t,e,n,r,i,o){var a,s,u=this;if(u.__setStatus(),e)u.setFocusOnElement(n);else{if(a=+r.attr("data-row-id"),o)return a="down"===o?++a:--a,void((s=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+a+'"]')).length?s.focus():r.focus());i||_.isUndefined(i)||a++,(s=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+a+'"]')).hasClass("always-new-row")?("top"!==u.options.formPosition||r.hasClass("always-new-row"))&&u.addNewRow(t):s.length?s.trigger("click",[void 0,{action:"edit",skipFocus:t,skipSelect:u.options.multiselect}]):u.options.actionsEnabled.new&&u.addNewRow(t)}},isLastColumn:function(t){var e,n=t.closest("td.app-datagrid-cell");return!!n.is(":last-child")||!!n.hasClass("cell-editing")&&(e=n.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])'),n.attr("data-col-id")===e.last().attr("data-col-id"))},attachEventHandlers:function(t){var e=this.gridHeaderElement,n=this;this.options.enableRowSelection&&(t[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this),!0),t.off(),t[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this),!0),t.on("click",this.rowSelectionHandler.bind(this)),t.on("dblclick",this.rowDblClickHandler.bind(this)),t.on("keydown",this.onKeyDown.bind(this))),e&&(this.options.enableColumnSelection?(e.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this)),e.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))):e.find("th[data-col-selectable]").off("click"),this.options.enableSort?this.options.enableColumnSelection?(e.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this)),e.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))):(e.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this)),e.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))):this.options.enableColumnSelection?e.find("th[data-col-sortable] .header-data").off("click"):e.find("th[data-col-sortable]").off("click")),this.options.rowActions.length&&(t.find(".cancel-edit-row-button").off("click"),t.find(".save-edit-row-button").off("click"),t.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this)),t.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))),n.options.editmode===n.CONSTANTS.QUICK_EDIT&&t.on("focusout","tr.app-datagrid-row",(function(t){var e=$(t.target),r=e.closest("tr.app-datagrid-row"),i=$(t.relatedTarget),o=n.isLastColumn(e,i),a=e.closest("span.actions-column").length>0,s=i.closest("span.actions-column").length>0,u=i.closest("div.app-datagrid-actions").length>0,l=i.closest("div.app-datagrid-actions").length>0;i.is("tr.app-datagrid-row")&&i.attr("data-row-id")===r.attr("data-row-id")||s||r.hasClass("danger")||l||a&&s||a&&null===t.relatedTarget||!i.closest(".app-grid").length||i.is('.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date')||""===i.attr("focus-target")||(u||a||!(!o||o&&null===t.relatedTarget||e.hasClass("file-upload")))&&n.options.timeoutCall((function(){n.toggleEditRow(t,{action:"save",noMsg:!0,success:function(e,i,o){o||n.editSuccessHandler(e,i,t,r)}})}))})),t.find('[data-identifier="rowExpansionButtons"]').off("click"),t.find('[data-identifier="rowExpansionButtons"]').on("click",(function(t){var e=$(t.target).closest("tr.app-datagrid-row");$(this).find(".app-button").attr("disabled")||n.toggleExpandRow(+e.attr("data-row-id"),void 0,t)}))},expandRow:function(t){this.toggleExpandRow(t,!0)},collapseRow:function(t){this.toggleExpandRow(t,!1)},_collapseRow:function(t,e,n,r,i){var o=this.gridElement,a=$(o.find('> tr.app-datagrid-row[data-row-id="'+n+'"]'));a.removeClass(this.options.cssClassNames.expandedRowClass),a.find("button, a").attr("aria-expanded","false").attr("aria-live","polite"),!1!==this.options.onBeforeRowCollapse(t,e,n)&&(i.length&&i.hasClass(this.options.cssClassNames.rowExpandIcon)&&i.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon),r.hide(),this.options.onRowCollapse(t,e))},toggleExpandRow:function(t,e,n){var r=this,i=r.gridElement,o=$(i.find('> tr.app-datagrid-row[data-row-id="'+t+'"]')),a=_.clone(r.options.data[t]),s=o.next("tr.app-datagrid-detail-row"),u=!s.is(":visible"),l=o.find('[data-identifier="rowExpansionButtons"] i.app-icon');a.$index=t+1,e&&!u||!1===e&&u||(u?(o.addClass(r.options.cssClassNames.expandedRowClass),o.find("button, a").attr("aria-expanded","true"),n&&r.preparedData[t]._selected&&n.stopPropagation(),r.options.rowDef.closeothers&&i.find("> tr.app-datagrid-detail-row:visible").each((function(){var t=$(this),e=t.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),i=+t.attr("data-row-id"),o=r.options.data[i];t.hide(),r._collapseRow(n,o,i,t,e)})),r.options.generateRowDetailView(n,a,t,s.find("td.app-datagrid-row-details-cell .details-section"),s.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){l.length&&l.hasClass(r.options.cssClassNames.rowCollapseIcon)&&l.removeClass(r.options.cssClassNames.rowCollapseIcon).addClass(r.options.cssClassNames.rowExpandIcon),s.show()}))):r._collapseRow(n,a,t,s,l))},_findAndReplaceCompiledTemplates:function(){if(this.gridElement){var t=this.gridElement.find("td[data-compiled-template]"),e=this;t.each((function(){var t=$(this),n=t.attr("data-compiled-template");t.replaceWith(e.compiledCellTemplates[n])}))}},_renderSearch:function(){var t,e=$(this._getSearchEl()),n=this;function r(t){t.stopPropagation();var r=e.find('[data-element="dgSearchText"]')[0].value,i=e.find('[data-element="dgFilterValue"]')[0].value,o=e.find("option:selected").attr("data-coldef-index"),a=n.options.colDefs[o],s=a&&a.type?a.type:"";n.searchObj={field:i,value:r,type:s,event:t},n.options.searchHandler.call(n,n.searchObj,t,"search")}this.element.find(".form-search").remove(),e.insertBefore(this.gridContainer),this.gridSearch=this.element.find(".form-search"),t=this.gridSearch.find('[data-element="dgSearchText"]'),this.gridSearch.find(".app-search-button").on("click",r),this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(t){n.dataStatusContainer.find(".status").text()===n.options.dataStates.nodata&&r(t)})),t.on("keyup",(function(t){t.stopPropagation(),$(this).val()?n.emptySearch=!1:(n.emptySearch=!0,n.searchObj.value&&(n.searchObj.value="",r(t))),13===t.which&&r(t)}))},_renderRowFilter:function(){var t=$('<tr class="filter-row"></tr>'),e=this,n=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;n.find(".filter-row").remove(),this.options.generateFilterRow(),this.preparedHeaderData.forEach((function(n,r){var i=n.field,o=$('<th data-col-id="'+r+'"></th>');n.searchable?(o.append(e.options.getFilterWidget(i)),t.append(o)):t.append(o)}),this),this.options.showHeader?this.gridHeaderElement.append(t):(this.options.isMobile,n.empty().append(t)),this.gridSearch=n.find(".filter-row")},_renderHeader:function(){var t,e=this._getHeaderTemplate(),n=e.colgroup,r=this;if(this.gridElement.parent().scroll((function(){r.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)})),!this.options.showHeader)return this.tableContainer.append(n),void this.gridHeaderElement.hide();this.gridHeaderElement.show();var i=(t=e.header).find("th.app-datagrid-header-cell"),o=n.find("col");i.each((function(){var t=Number($(this).attr("data-col-id")),e=r.preparedHeaderData[t],n=$(o[t]);e&&(_.isUndefined(e.show)||e.show||($(this).hide(),n.hide()))})),this.options.isMobile,this.tableContainer.append(n),t.on("click",".app-datagrid-header-cell input:checkbox",(function(t){var e=$('tr.app-datagrid-row:visible td input[name="gridMultiSelect"]:checkbox',r.gridElement),n=this.checked;e.prop("checked",n),e.each((function(){var e=$(this).closest("tr.app-datagrid-row"),i=e.attr("data-row-id"),o=r.options.data[i];r.options.assignSelectedItems(o,t),r.toggleRowSelection(e,n,t,!0),n&&$.isFunction(r.options.onRowSelect)&&r.options.onRowSelect(o,t),!n&&$.isFunction(r.options.onRowDeselect)&&r.options.onRowDeselect(o,t)}))})),$.isFunction(this.options.onHeaderClick)&&this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this)),!this.options.isMobile&&this.gridHeaderElement.length&&this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(t,e){var n,i,o,a,s=+e.helper.attr("data-col-id")+1,u=e.helper.width(),l=e.size.width;i=r.tableContainer.find("colgroup > col:nth-child("+s+")"),n=r.tableContainer.find("colgroup > col:nth-child("+s+")"),o=r.gridElement.find("tr.app-datagrid-row > td:nth-child("+s+") > div"),n.width(l),i.width(l),o.width(l),$(this).css("height","auto"),l>e.originalSize.width&&(a=r.gridHeaderElement.width()+l-u,r.gridHeaderElement.width(a),r.gridElement.width(a)),r.addOrRemoveScroll(),r.options.redrawWidgets()}}),this.isResetSortIconsDone||this.setSortIconDefault()},addOrRemoveScroll:function(){var t=this.gridContainer.find("tbody"),e=this.gridContainer.find(".table-header");t.scrollHeight>t.clientHeight&&!this.Utils.isMac()?e.addClass("scroll-visible"):e.removeClass("scroll-visible")},_handleCustomEvents:function(t,e){this.options.handleCustomEvents(t,e)},_setActionsEnabled:function(){var t=this;_.forEach(this.options.rowActions,(function(e){_.includes(e.action,"editRow(")?t.options.actionsEnabled.edit=!0:_.includes(e.action,"deleteRow(")&&(t.options.actionsEnabled.delete=!0)}))},_appendRowActions:function(t,e,n){var r,i=this._getRowActionsColumnDef();(this.options.rowActions.length||i)&&(this._setActionsEnabled(),r=this,t.find("[data-identifier='actionButtons']").each((function(t){var i,o,a,s=t;e?i=n:(o=$(this).closest("tr.app-datagrid-row"),a=parseInt(o.attr("data-row-id"),10),(i=_.clone(r.options.data[a])).$index=s+1),r.options.generateRowActions(i,s),$(this).empty().append(r.options.getRowAction(s))})))},_renderGrid:function(t){var e,n=this.options.isNavTypeScrollOrOndemand();this.getPageStartIndex();if($("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border"),n){var r=this.gridElement,i=this._getGridTemplate();e=$(i),i&&!r.length&&this.gridElement.append(e)}else{var o=this._getGridTemplate();e=$(o),o&&this.gridElement.append(e)}if(this.options.summaryRow){var a=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove(),this.tableContainer.append(a)}this.options.data.length||"nodata"!==this.dataStatus.state?(this.dataStatus.state=this.dataStatus.state||"loading",this.dataStatus.message=this.dataStatus.message||this.options.dataStates.loading,this.setStatus(this.dataStatus.state,this.dataStatus.message,t)):this.setStatus("nodata"),this.gridBody=this.gridElement.find("tbody"),this.gridFooter=this.gridElement.find("tfoot"),this._findAndReplaceCompiledTemplates(),this.options.clearRowActions(),this._appendRowExpansionButtons(e),this._appendRowActions(e),this.attachEventHandlers(e),this.__setStatus(t),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow&&this.addNewRow(!1,!0),t&&this._setColSpan(this.options.headerConfig),$.isFunction(this.options.onDataRender)&&this.options.onDataRender(),!t&&this.options.selectFirstRow&&(this.options.multiselect&&(this.options.selectFirstRow=!1),this.gridElement.find("tr.app-datagrid-row.active").length<=0&&this.selectFirstRow(!0,!0))},_render:function(t){this.tableId||(this.tableId=this.Utils.generateGuid());!this.options.isNavTypeScrollOrOndemand()||"100%"!==this.options.height&&this.options.height;var e='<div class="overlay"><div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div></div>',n='<div class="table-container table-responsive"><div class="app-grid-header"><div class="app-grid-header-inner"><table tabindex="0" class="'+this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid+'"><thead tabindex="0" class="table-header thead-sticky" id="table_header_'+this.tableId+'"></thead><tbody class="app-grid-content app-datagrid-body" id="table_'+this.tableId+'"></tbody></table></div></div></div>',r=$(e),i=this.element.find(".table-container");this.gridContainer=$(n),this.gridHeaderElement=this.gridContainer.find(".table-header"),this._setStyles(r.find("div.overlay"),"display:none"),this._setStyles(this.gridContainer.find("div.app-grid-header-inner"),"height:"+this.options.height+"; overflow: auto;"),this.tableContainer=this.gridContainer.find("table"),this.gridElement=this.gridContainer.find(".app-grid-content"),(!this.options.isNavTypeScrollOrOndemand()||i.length&&this.options.isNextPageData)&&this.options.isNavTypeScrollOrOndemand()||(this.element.find(".table-container").remove(),this.element.append(this.gridContainer)),this.options.setIsNextPageData(!1),this.gridContainer.find(".overlay").length||(this.dataStatusContainer=$(e),this.gridContainer.append(this.dataStatusContainer)),this.gridHeaderElement&&(this.gridHeaderElement.empty(),this.gridElement.find("colgroup").remove()),this._renderHeader(),this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this._renderRowFilter(),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed"),this._renderGrid(t),this.options.isdynamictable&&(this.element.find(".on-demand-datagrid").remove(),"On-Demand"!==this.options.navigation||this.element.find(".on-demand-datagrid").length?"Scroll"===this.options.navigation&&this.options.bindScrollEvt():this.options.addLoadMoreBtn())},__setStatus:function(t){var e=this.dataStatusContainer.find("i"),n=this.dataStatus.state,r=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message),"loading"===n?e.removeClass("hidden"):e.addClass("hidden"),"ready"===n?this.dataStatusContainer.hide():(this.options.isNavTypeScrollOrOndemand()&&("nodata"===n||this.options.isLastPage)&&this.element.find(".on-demand-datagrid a").hide(),this.dataStatusContainer.show()),"nodata"===n||"loading"===n||"error"===n?("100%"!==this.options.height&&"auto"!==this.options.height||("nodata"===n?(this.dataStatusContainer.css("height","auto"),this.dataStatus.contentHeight=0):this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1?this.dataStatusContainer.hide():(this.dataStatus.height=this.dataStatus.height||this.dataStatusContainer.outerHeight(),this.dataStatus.contentHeight=this.gridElement.outerHeight()||this.dataStatus.contentHeight,this.dataStatusContainer.css("height",this.dataStatus.height>this.dataStatus.contentHeight?"auto":this.dataStatus.contentHeight))),(!r||r&&1===this.options.getCurrentPage())&&this.gridContainer.addClass("show-msg")):(this.gridContainer.removeClass("show-msg"),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&(this.options.activeRow&&this.attachHandlersToActiveRow(this.options.activeRow),this.options.activeRow=void 0)),t||this.setColGroupWidths(),this.addOrRemoveScroll()},attachHandlersToActiveRow(t){var e=this.Utils.getObjectIndex(this.options.data,t),n=this.gridElement.find("tr.app-datagrid-row[data-row-id="+e+"]");n.length&&(n.hasClass("active")||n.addClass("active"),this.focusActiveRow(),this.attachEventHandlers(n))},setActiveRow(t){this.options.activeRow=t},setStatus:function(t,e,n){var r;"nodata"===t&&(t=(r=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row"))&&r.length?"ready":t),this.dataStatus.state=t,this.options.setGridState(t),this.dataStatus.message=e||this.options.dataStates[t],this._setStatusCalled?this._setStatus(n):(this.__setStatus(n),this._setStatusCalled=!0)},setGridDimensions:function(t,e){if(-1===e.indexOf("px")&&-1===e.indexOf("%")&&-1===e.indexOf("em")&&"auto"!=e&&(e+="px"),this.options[t]=e,"height"===t){this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(t,e),this.options.isNavTypeScrollOrOndemand()&&"100%"!=this.options.height&&"auto"!=this.options.height&&this.gridContainer.find(".app-grid-header-inner").css("overflow","auto"),this.dataStatusContainer.css(t,e)}this.addOrRemoveScroll()},setColumnProp:function(t,e,n,r){var i;"displayName"===e&&((i=r?this.gridHeaderElement.find('th[data-col-group="'+t+'"]'):this.gridHeaderElement.find('th[data-col-field="'+t+'"]')).attr("title",n),i.find(".header-data").html(n),this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch&&this.gridSearch.find('select option[value="'+t+'"]').text(n))},applyRowNgClass:function(t,e){var n=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+e+'"]');n.removeClass(t.toRemove),n.addClass(t.toAdd)},applyColNgClass:function(t,e,n){var r=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+e+'"] td.app-datagrid-cell[data-col-id="'+n+'"]');r.removeClass(t.toRemove),r.addClass(t.toAdd)},_destroy:function(){this.element.text(""),window.clearTimeout(this.refreshGridTimeout)}}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs")):"function"==typeof define&&define.amd?define(["exports","rxjs"],e):e((t.awesomeCordova=t.awesomeCordova||{},t.awesomeCordova.core={}),t.rxjs)}(this,(function(t,e){"use strict";var n={error:"cordova_not_available"},r={error:"plugin_not_installed"};function i(t){if("undefined"!=typeof window&&window.angular){var e=window.document,n=window.angular.element(e.querySelector("[ng-app]")||e.body).injector();if(n)return n.get("$q")((function(e,n){t(e,n)}));console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise((function(e,n){t(e,n)}));console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function o(t,e,n,r){var o,a;void 0===r&&(r={});var s=i((function(i,s){o=r.destruct?d(t,e,n,r,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s(t)})):d(t,e,n,r,i,s),a=s}));return o&&o.error&&(s.catch((function(){})),"function"==typeof a&&a(o.error)),s}function a(t,e,n,r){return void 0===r&&(r={}),i((function(i,o){var a=d(t,e,n,r);a?a.error?o(a.error):a.then&&a.then(i).catch(o):o({error:"unexpected_error"})}))}function s(t,n,r,i){return void 0===i&&(i={}),new e.Observable((function(e){var o;return(o=i.destruct?d(t,n,r,i,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(t)}),(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.error(t)})):d(t,n,r,i,e.next.bind(e),e.error.bind(e)))&&o.error&&(e.error(o.error),e.complete()),function(){try{if(i.clearFunction)return i.clearWithArgs?d(t,i.clearFunction,r,i,e.next.bind(e),e.error.bind(e)):d(t,i.clearFunction,[])}catch(e){console.warn("Unable to clear the previous observable watch for",t.constructor.getPluginName(),n),console.warn(e)}}}))}function u(t,n){return n="undefined"!=typeof window&&n?v(window,n):n||("undefined"!=typeof window?window:{}),e.fromEvent(n,t)}function l(t,e,i){var o,a;"string"==typeof t?o=t:(o=t.constructor.getPluginRef(),i=t.constructor.getPluginName(),a=t.constructor.getPluginInstallName());var s=f(o);return!(!s||e&&void 0===s[e])||("undefined"!=typeof window&&window.cordova?(function(t,e,n){n?console.warn("Native: tried calling "+t+"."+n+", but the "+t+" plugin is not installed."):console.warn("Native: tried accessing the "+t+" plugin but it's not installed.");e&&console.warn("Install the "+t+" plugin: 'ionic cordova plugin add "+e+"'")}(i,a,e),r):(function(t,e){"undefined"==typeof process&&(e?console.warn("Native: tried calling "+t+"."+e+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator"):console.warn("Native: tried accessing the "+t+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator"))}(i,e),n))}function c(t,e){return t._objectInstance&&(!e||void 0!==t._objectInstance[e])}function p(t,e,n,r){if(void 0===e&&(e={}),e.sync)return t;if("reverse"===e.callbackOrder)t.unshift(r),t.unshift(n);else if("node"===e.callbackStyle)t.push((function(t,e){t?r(t):n(e)}));else if("object"===e.callbackStyle&&e.successName&&e.errorName){var i={};i[e.successName]=n,i[e.errorName]=r,t.push(i)}else if(void 0!==e.successIndex||void 0!==e.errorIndex){var o=function(){e.successIndex>t.length?t[e.successIndex]=n:t.splice(e.successIndex,0,n)},a=function(){e.errorIndex>t.length?t[e.errorIndex]=r:t.splice(e.errorIndex,0,r)};e.successIndex>e.errorIndex?(a(),o()):(o(),a())}else t.push(n),t.push(r);return t}function d(t,e,n,r,i,o){void 0===r&&(r={}),n=p(n,r,i,o);var a=l(t,e);if(!0===a){var s=f(t.constructor.getPluginRef());return s[e].apply(s,n)}return a}function h(t,e,n,r,i,o){if(void 0===r&&(r={}),n=p(n,r,i,o),c(t,e))return t._objectInstance[e].apply(t._objectInstance,n)}function f(t){return"undefined"!=typeof window?v(window,t):null}function v(t,e){for(var n=e.split("."),r=t,i=0;i<n.length;i++){if(!r)return null;r=r[n[i]]}return r}var m=function(t,e,n){return void 0===n&&(n={}),function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n.sync?d(t,e,r,n):n.observable?s(t,e,r,n):n.eventObservable&&n.event?u(n.event,n.element):n.otherPromise?a(t,e,r,n):o(t,e,r,n)}};var g=function(){function t(){}return t.installed=function(){return!0===l(this.pluginRef)},t.getPlugin=function(){return"undefined"!=typeof window?function(t,e){for(var n=e.split("."),r=t,i=0;i<n.length;i++){if(!r)return null;r=r[n[i]]}return r}(window,this.pluginRef):null},t.getPluginName=function(){return this.pluginName},t.getPluginRef=function(){return this.pluginRef},t.getPluginInstallName=function(){return this.plugin},t.getSupportedPlatforms=function(){return this.platforms},t.pluginName="",t.pluginRef="",t.plugin="",t.repo="",t.platforms=[],t.install="",t}();!function(){if("undefined"==typeof process){var t="undefined"!=typeof window?window:{},e=Date.now(),n=!1;t.document.addEventListener("deviceready",(function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-e)+" ms"),n=!0})),setTimeout((function(){!n&&t.cordova&&console.warn("Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")}),5e3)}}(),window.rxjs._throw=window.rxjs.throwError,t.AwesomeCordovaNativePlugin=g,t.checkAvailability=l,t.instanceAvailability=c,t.wrap=m,t.getPromise=i,t.cordova=function(t,e,n,r){return m(t,e,n).apply(this,r)},t.cordovaFunctionOverride=function(t,n,r){return void 0===r&&(r=[]),function(t,n){return new e.Observable((function(e){var r=l(t,n);if(!0===r){var i=f(t.constructor.getPluginRef());return i[n]=e.next.bind(e),function(){return i[n]=function(){}}}e.error(r),e.complete()}))}(t,n)},t.cordovaInstance=function(t,n,r,o){return o=Array.from(o),function(t,n,r){return void 0===r&&(r={}),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(r.sync)return h(t,n,o,r);if(r.observable)return new e.Observable((function(e){var i;return(i=r.destruct?h(t,n,o,r,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(t)}),(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.error(t)})):h(t,n,o,r,e.next.bind(e),e.error.bind(e)))&&i.error&&e.error(i.error),function(){try{return r.clearWithArgs?h(t,r.clearFunction,o,r,e.next.bind(e),e.error.bind(e)):h(t,r.clearFunction,[])}catch(e){console.warn("Unable to clear the previous observable watch for",t.constructor.getPluginName(),n),console.warn(e)}}}));if(r.otherPromise)return i((function(e,i){var a;(a=r.destruct?h(t,n,o,r,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)})):h(t,n,o,r,e,i))&&a.then?a.then(e,i):i()}));var s,u,l=i((function(e,i){s=r.destruct?h(t,n,o,r,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)})):h(t,n,o,r,e,i),u=i}));return s&&s.error&&(l.catch((function(){})),"function"==typeof u&&u(s.error)),l}}(t,n,r).apply(this,o)},t.cordovaPropertyGet=function(t,e){return!0===l(t,e)?f(t.constructor.getPluginRef())[e]:null},t.cordovaPropertySet=function(t,e,n){!0===l(t,e)&&(f(t.constructor.getPluginRef())[e]=n)},t.instancePropertyGet=function(t,e){return t._objectInstance&&t._objectInstance[e]?t._objectInstance[e]:null},t.instancePropertySet=function(t,e,n){t._objectInstance&&(t._objectInstance[e]=n)},Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@awesome-cordova-plugins/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@awesome-cordova-plugins/core","rxjs","rxjs/operators"],e):(t.awesomeCordova=t.awesomeCordova||{},t.awesomeCordova.plugins=e(t.tslib,t.ng.core,t.awesomeCordova.core,t.rxjs,t.operators))}(this,(function(t,e,n,r,i){"use strict";var o,a,s,u,l,c,p=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.getAppName=function(){return n.cordova(this,"getAppName",{},arguments)},i.prototype.getPackageName=function(){return n.cordova(this,"getPackageName",{},arguments)},i.prototype.getVersionCode=function(){return n.cordova(this,"getVersionCode",{},arguments)},i.prototype.getVersionNumber=function(){return n.cordova(this,"getVersionNumber",{},arguments)},i.pluginName="AppVersion",i.plugin="cordova-plugin-app-version",i.pluginRef="cordova.getAppVersion",i.repo="https://github.com/whiteoctober/cordova-plugin-app-version",i.platforms=["Android","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),d=Object.freeze({AppVersion:p}),h=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.Encode={TEXT_TYPE:"TEXT_TYPE",EMAIL_TYPE:"EMAIL_TYPE",PHONE_TYPE:"PHONE_TYPE",SMS_TYPE:"SMS_TYPE"},t}return t.__extends(i,r),i.prototype.scan=function(t){return n.cordova(this,"scan",{callbackOrder:"reverse"},arguments)},i.prototype.encode=function(t,e){return n.cordova(this,"encode",{},arguments)},i.pluginName="BarcodeScanner",i.plugin="phonegap-plugin-barcodescanner",i.pluginRef="cordova.plugins.barcodeScanner",i.repo="https://github.com/phonegap/phonegap-plugin-barcodescanner",i.platforms=["Android","BlackBerry 10","Browser","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),f=Object.freeze({BarcodeScanner:h}),v=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.hasReadWritePermission=function(){return n.cordova(this,"hasReadWritePermission",{},arguments)},i.prototype.hasReadPermission=function(){return n.cordova(this,"hasReadPermission",{},arguments)},i.prototype.hasWritePermission=function(){return n.cordova(this,"hasWritePermission",{},arguments)},i.prototype.requestWritePermission=function(){return n.cordova(this,"requestWritePermission",{},arguments)},i.prototype.requestReadPermission=function(){return n.cordova(this,"requestReadPermission",{},arguments)},i.prototype.requestReadWritePermission=function(){return n.cordova(this,"requestReadWritePermission",{},arguments)},i.prototype.createCalendar=function(t){return n.cordova(this,"createCalendar",{},arguments)},i.prototype.deleteCalendar=function(t){return n.cordova(this,"deleteCalendar",{},arguments)},i.prototype.getCalendarOptions=function(){return n.cordova(this,"getCalendarOptions",{sync:!0},arguments)},i.prototype.getCreateCalendarOptions=function(){return n.cordova(this,"getCreateCalendarOptions",{sync:!0},arguments)},i.prototype.createEvent=function(t,e,r,i,o){return n.cordova(this,"createEvent",{},arguments)},i.prototype.createEventWithOptions=function(t,e,r,i,o,a){return n.cordova(this,"createEventWithOptions",{},arguments)},i.prototype.createEventInteractively=function(t,e,r,i,o){return n.cordova(this,"createEventInteractively",{},arguments)},i.prototype.createEventInteractivelyWithOptions=function(t,e,r,i,o,a){return n.cordova(this,"createEventInteractivelyWithOptions",{},arguments)},i.prototype.findEvent=function(t,e,r,i,o){return n.cordova(this,"findEvent",{},arguments)},i.prototype.findEventWithOptions=function(t,e,r,i,o,a){return n.cordova(this,"findEventWithOptions",{},arguments)},i.prototype.listEventsInRange=function(t,e){return n.cordova(this,"listEventsInRange",{platforms:["Android"]},arguments)},i.prototype.listCalendars=function(){return n.cordova(this,"listCalendars",{},arguments)},i.prototype.findAllEventsInNamedCalendar=function(t){return n.cordova(this,"findAllEventsInNamedCalendar",{platforms:["iOS"]},arguments)},i.prototype.modifyEvent=function(t,e,r,i,o,a,s,u,l,c){return n.cordova(this,"modifyEvent",{platforms:["iOS"]},arguments)},i.prototype.modifyEventWithOptions=function(t,e,r,i,o,a,s,u,l,c,p,d){return n.cordova(this,"modifyEventWithOptions",{platforms:["iOS"]},arguments)},i.prototype.deleteEvent=function(t,e,r,i,o){return n.cordova(this,"deleteEvent",{},arguments)},i.prototype.deleteEventFromNamedCalendar=function(t,e,r,i,o,a){return n.cordova(this,"deleteEventFromNamedCalendar",{platforms:["iOS"]},arguments)},i.prototype.deleteEventById=function(t,e){return n.cordova(this,"deleteEventById",{},arguments)},i.prototype.openCalendar=function(t){return n.cordova(this,"openCalendar",{},arguments)},i.pluginName="Calendar",i.plugin="cordova-plugin-calendar",i.pluginRef="plugins.calendar",i.repo="https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin",i.platforms=["Android","iOS"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),m=Object.freeze({Calendar:v});!function(t){t[t.DATA_URL=0]="DATA_URL",t[t.FILE_URL=1]="FILE_URL",t[t.NATIVE_URI=2]="NATIVE_URI"}(o||(o={})),function(t){t[t.JPEG=0]="JPEG",t[t.PNG=1]="PNG"}(a||(a={})),function(t){t[t.PICTURE=0]="PICTURE",t[t.VIDEO=1]="VIDEO",t[t.ALLMEDIA=2]="ALLMEDIA"}(s||(s={})),function(t){t[t.PHOTOLIBRARY=0]="PHOTOLIBRARY",t[t.CAMERA=1]="CAMERA",t[t.SAVEDPHOTOALBUM=2]="SAVEDPHOTOALBUM"}(u||(u={})),function(t){t[t.ARROW_UP=1]="ARROW_UP",t[t.ARROW_DOWN=2]="ARROW_DOWN",t[t.ARROW_LEFT=3]="ARROW_LEFT",t[t.ARROW_RIGHT=4]="ARROW_RIGHT",t[t.ARROW_ANY=5]="ARROW_ANY"}(l||(l={})),function(t){t[t.BACK=0]="BACK",t[t.FRONT=1]="FRONT"}(c||(c={}));var g,y=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.DestinationType={DATA_URL:0,FILE_URI:1,NATIVE_URI:2},t.EncodingType={JPEG:0,PNG:1},t.MediaType={PICTURE:0,VIDEO:1,ALLMEDIA:2},t.PictureSourceType={PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2},t.PopoverArrowDirection={ARROW_UP:1,ARROW_DOWN:2,ARROW_LEFT:4,ARROW_RIGHT:8,ARROW_ANY:15},t.Direction={BACK:0,FRONT:1},t}return t.__extends(i,r),i.prototype.getPicture=function(t){return n.cordova(this,"getPicture",{callbackOrder:"reverse"},arguments)},i.prototype.cleanup=function(){return n.cordova(this,"cleanup",{platforms:["iOS"]},arguments)},i.pluginName="Camera",i.plugin="cordova-plugin-camera",i.pluginRef="navigator.camera",i.repo="https://github.com/apache/cordova-plugin-camera",i.platforms=["Android","Browser","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),b=Object.freeze({get DestinationType(){return o},get EncodingType(){return a},get MediaType(){return s},get PictureSourceType(){return u},get PopoverArrowDirection(){return l},get Direction(){return c},Camera:y}),_=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),Object.defineProperty(i.prototype,"cordova",{get:function(){return n.cordovaPropertyGet(this,"cordova")},set:function(t){n.cordovaPropertySet(this,"cordova",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"model",{get:function(){return n.cordovaPropertyGet(this,"model")},set:function(t){n.cordovaPropertySet(this,"model",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"platform",{get:function(){return n.cordovaPropertyGet(this,"platform")},set:function(t){n.cordovaPropertySet(this,"platform",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"uuid",{get:function(){return n.cordovaPropertyGet(this,"uuid")},set:function(t){n.cordovaPropertySet(this,"uuid",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"version",{get:function(){return n.cordovaPropertyGet(this,"version")},set:function(t){n.cordovaPropertySet(this,"version",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"manufacturer",{get:function(){return n.cordovaPropertyGet(this,"manufacturer")},set:function(t){n.cordovaPropertySet(this,"manufacturer",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isVirtual",{get:function(){return n.cordovaPropertyGet(this,"isVirtual")},set:function(t){n.cordovaPropertySet(this,"isVirtual",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"serial",{get:function(){return n.cordovaPropertyGet(this,"serial")},set:function(t){n.cordovaPropertySet(this,"serial",t)},enumerable:!1,configurable:!0}),i.pluginName="Device",i.plugin="cordova-plugin-device",i.pluginRef="device",i.repo="https://github.com/apache/cordova-plugin-device",i.platforms=["Android","Browser","iOS","macOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),w=Object.freeze({Device:_}),E=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.cordovaFileError={1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR",13:"WRONG_ENTRY_TYPE",14:"DIR_READ_ERR"},t}return t.__extends(i,r),i.prototype.getFreeDiskSpace=function(){var t=this;return function(){if(!0===n.checkAvailability(t))return n.getPromise((function(t,e){cordova.exec(t,e,"File","getFreeDiskSpace",[])}))}()},i.prototype.checkDir=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}var o=t+e;return r.resolveDirectoryUrl(o).then((function(){return!0}))}}()},i.prototype.createDir=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i)){if(/^\//.test(e)){var o=new FileError(5);return o.message="directory cannot start with /",Promise.reject(o)}var a={create:!0};return r||(a.exclusive=!0),i.resolveDirectoryUrl(t).then((function(t){return i.getDirectory(t,e,a)}))}}()},i.prototype.removeDir=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getDirectory(t,e,{create:!1})})).then((function(t){return r.remove(t)}))}}()},i.prototype.moveDir=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i=i||e)){var a=new FileError(5);return a.message="directory cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getDirectory(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.move(t,e,i)}))}))}}()},i.prototype.copyDir=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i)){var a=new FileError(5);return a.message="directory cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getDirectory(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.copy(t,e,i)}))}))}}()},i.prototype.listDir=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getDirectory(t,e,{create:!1,exclusive:!1})})).then((function(t){var e=t.createReader();return r.readEntries(e)}))}}()},i.prototype.removeRecursively=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getDirectory(t,e,{create:!1})})).then((function(t){return r.rimraf(t)}))}}()},i.prototype.checkFile=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="file cannot start with /",Promise.reject(i)}return r.resolveLocalFilesystemUrl(t+e).then((function(t){if(t.isFile)return!0;var e=new FileError(13);return e.message="input is not a file",Promise.reject(e)}))}}()},i.prototype.createFile=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i)){if(/^\//.test(e)){var o=new FileError(5);return o.message="file-name cannot start with /",Promise.reject(o)}var a={create:!0};return r||(a.exclusive=!0),i.resolveDirectoryUrl(t).then((function(t){return i.getFile(t,e,a)}))}}()},i.prototype.removeFile=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="file-name cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getFile(t,e,{create:!1})})).then((function(t){return r.remove(t)}))}}()},i.prototype.writeFile=function(t,e,r,i){var o=this;return void 0===i&&(i={}),function(){if(!0===n.checkAvailability(o)){if(/^\//.test(e)){var a=new FileError(5);return a.message="file-name cannot start with /",Promise.reject(a)}var s={create:!i.append,exclusive:!i.replace};return o.resolveDirectoryUrl(t).then((function(t){return o.getFile(t,e,s)})).then((function(t){return o.writeFileEntry(t,r,i)}))}}()},i.prototype.writeFileEntry=function(t,e,n){var r=this;return this.createWriter(t).then((function(t){return n.append&&t.seek(t.length),n.truncate&&t.truncate(n.truncate),r.write(t,e)})).then((function(){return t}))},i.prototype.writeExistingFile=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i))return i.writeFile(t,e,r,{replace:!0})}()},i.prototype.readAsText=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"Text")}()},i.prototype.readAsDataURL=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"DataURL")}()},i.prototype.readAsBinaryString=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"BinaryString")}()},i.prototype.readAsArrayBuffer=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"ArrayBuffer")}()},i.prototype.moveFile=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i=i||e)){var a=new FileError(5);return a.message="file name cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getFile(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.move(t,e,i)}))}))}}()},i.prototype.copyFile=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i=i||e)){var a=new FileError(5);return a.message="file name cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getFile(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.copy(t,e,i)}))}))}}()},i.prototype.fillErrorMessage=function(t){try{t.message=this.cordovaFileError[t.code]}catch(t){}},i.prototype.resolveLocalFilesystemUrl=function(t){var e=this;return function(){if(!0===n.checkAvailability(e))return n.getPromise((function(n,r){try{window.resolveLocalFileSystemURL(t,(function(t){n(t)}),(function(t){e.fillErrorMessage(t),r(t)}))}catch(t){e.fillErrorMessage(t),r(t)}}))}()},i.prototype.resolveDirectoryUrl=function(t){var e=this;return function(){if(!0===n.checkAvailability(e))return e.resolveLocalFilesystemUrl(t).then((function(t){if(t.isDirectory)return t;var e=new FileError(13);return e.message="input is not a directory",Promise.reject(e)}))}()},i.prototype.getDirectory=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i))return new Promise((function(n,o){try{t.getDirectory(e,r,(function(t){n(t)}),(function(t){i.fillErrorMessage(t),o(t)}))}catch(t){i.fillErrorMessage(t),o(t)}}))}()},i.prototype.getFile=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i))return new Promise((function(n,o){try{t.getFile(e,r,n,(function(t){i.fillErrorMessage(t),o(t)}))}catch(t){i.fillErrorMessage(t),o(t)}}))}()},i.prototype.readFile=function(t,e,r){var i=this;if(/^\//.test(e)){var o=new FileError(5);return o.message="file-name cannot start with /",Promise.reject(o)}return this.resolveDirectoryUrl(t).then((function(t){return i.getFile(t,e,{create:!1})})).then((function(t){var e=new FileReader;return n.getPromise((function(n,i){e.onloadend=function(){void 0!==e.result||null!==e.result?n(e.result):void 0!==e.error||null!==e.error?i(e.error):i({code:null,message:"READER_ONLOADEND_ERR"})},t.file((function(t){e["readAs"+r].call(e,t)}),(function(t){i(t)}))}))}))},i.prototype.remove=function(t){var e=this;return new Promise((function(n,r){t.remove((function(){n({success:!0,fileRemoved:t})}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.move=function(t,e,n){var r=this;return new Promise((function(i,o){t.moveTo(e,n,(function(t){i(t)}),(function(t){r.fillErrorMessage(t),o(t)}))}))},i.prototype.copy=function(t,e,n){var r=this;return new Promise((function(i,o){t.copyTo(e,n,(function(t){i(t)}),(function(t){r.fillErrorMessage(t),o(t)}))}))},i.prototype.readEntries=function(t){var e=this;return new Promise((function(n,r){t.readEntries((function(t){n(t)}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.rimraf=function(t){var e=this;return new Promise((function(n,r){t.removeRecursively((function(){n({success:!0,fileRemoved:t})}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.createWriter=function(t){var e=this;return new Promise((function(n,r){t.createWriter((function(t){n(t)}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.write=function(t,e){return e instanceof Blob?this.writeFileInChunks(t,e):new Promise((function(n,r){t.onwriteend=function(e){t.error?r(t.error):n(e)},t.write(e)}))},i.prototype.writeFileInChunks=function(t,e){var r=0;function i(){var n=Math.min(1048576,e.size-r),i=e.slice(r,r+n);r+=n,t.write(i)}return n.getPromise((function(n,o){t.onerror=o,t.onwrite=function(){r<e.size?i():n()},i()}))},Object.defineProperty(i.prototype,"applicationDirectory",{get:function(){return n.cordovaPropertyGet(this,"applicationDirectory")},set:function(t){n.cordovaPropertySet(this,"applicationDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"applicationStorageDirectory",{get:function(){return n.cordovaPropertyGet(this,"applicationStorageDirectory")},set:function(t){n.cordovaPropertySet(this,"applicationStorageDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dataDirectory",{get:function(){return n.cordovaPropertyGet(this,"dataDirectory")},set:function(t){n.cordovaPropertySet(this,"dataDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cacheDirectory",{get:function(){return n.cordovaPropertyGet(this,"cacheDirectory")},set:function(t){n.cordovaPropertySet(this,"cacheDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalApplicationStorageDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalApplicationStorageDirectory")},set:function(t){n.cordovaPropertySet(this,"externalApplicationStorageDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalDataDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalDataDirectory")},set:function(t){n.cordovaPropertySet(this,"externalDataDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalCacheDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalCacheDirectory")},set:function(t){n.cordovaPropertySet(this,"externalCacheDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalRootDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalRootDirectory")},set:function(t){n.cordovaPropertySet(this,"externalRootDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tempDirectory",{get:function(){return n.cordovaPropertyGet(this,"tempDirectory")},set:function(t){n.cordovaPropertySet(this,"tempDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"syncedDataDirectory",{get:function(){return n.cordovaPropertyGet(this,"syncedDataDirectory")},set:function(t){n.cordovaPropertySet(this,"syncedDataDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"documentsDirectory",{get:function(){return n.cordovaPropertyGet(this,"documentsDirectory")},set:function(t){n.cordovaPropertySet(this,"documentsDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"sharedDirectory",{get:function(){return n.cordovaPropertyGet(this,"sharedDirectory")},set:function(t){n.cordovaPropertySet(this,"sharedDirectory",t)},enumerable:!1,configurable:!0}),i.pluginName="File",i.plugin="cordova-plugin-file",i.pluginRef="cordova.file",i.repo="https://github.com/apache/cordova-plugin-file",i.platforms=["Android","Browser","iOS","macOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),x=Object.freeze({File:E}),S=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.open=function(t,e){return n.cordova(this,"open",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.prototype.uninstall=function(t){return n.cordova(this,"uninstall",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.prototype.appIsInstalled=function(t){return n.cordova(this,"appIsInstalled",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.prototype.showOpenWithDialog=function(t,e){return n.cordova(this,"showOpenWithDialog",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.pluginName="FileOpener",i.plugin="cordova-plugin-file-opener2",i.pluginRef="cordova.plugins.fileOpener2",i.repo="https://github.com/pwlin/cordova-plugin-file-opener2",i.platforms=["Android","iOS","Windows","Windows Phone 8"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),C=Object.freeze({FileOpener:S}),T=function(i){function o(){return null!==i&&i.apply(this,arguments)||this}return t.__extends(o,i),o.prototype.getCurrentPosition=function(t){return n.cordova(this,"getCurrentPosition",{callbackOrder:"reverse"},arguments)},o.prototype.watchPosition=function(t){return new r.Observable((function(e){var n=navigator.geolocation.watchPosition(e.next.bind(e),e.next.bind(e),t);return function(){return navigator.geolocation.clearWatch(n)}}))},o.pluginName="Geolocation",o.plugin="cordova-plugin-geolocation",o.pluginRef="navigator.geolocation",o.repo="https://github.com/apache/cordova-plugin-geolocation",o.install='ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',o.installVariables=["GEOLOCATION_USAGE_DESCRIPTION"],o.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"],o.decorators=[{type:e.Injectable}],o}(n.AwesomeCordovaNativePlugin),k=Object.freeze({Geolocation:T}),D=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.captureAudio=function(t){return n.cordova(this,"captureAudio",{callbackOrder:"reverse"},arguments)},i.prototype.captureImage=function(t){return n.cordova(this,"captureImage",{callbackOrder:"reverse"},arguments)},i.prototype.captureVideo=function(t){return n.cordova(this,"captureVideo",{callbackOrder:"reverse"},arguments)},i.prototype.onPendingCaptureResult=function(){return n.cordova(this,"onPendingCaptureResult",{eventObservable:!0,event:"pendingcaptureresult"},arguments)},i.prototype.onPendingCaptureError=function(){return n.cordova(this,"onPendingCaptureError",{eventObservable:!0,event:"pendingcaptureerror"},arguments)},Object.defineProperty(i.prototype,"supportedImageModes",{get:function(){return n.cordovaPropertyGet(this,"supportedImageModes")},set:function(t){n.cordovaPropertySet(this,"supportedImageModes",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"supportedAudioModes",{get:function(){return n.cordovaPropertyGet(this,"supportedAudioModes")},set:function(t){n.cordovaPropertySet(this,"supportedAudioModes",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"supportedVideoModes",{get:function(){return n.cordovaPropertyGet(this,"supportedVideoModes")},set:function(t){n.cordovaPropertySet(this,"supportedVideoModes",t)},enumerable:!1,configurable:!0}),i.pluginName="MediaCapture",i.plugin="cordova-plugin-media-capture",i.pluginRef="navigator.device.capture",i.repo="https://github.com/apache/cordova-plugin-media-capture",i.platforms=["Android","Browser","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),A=Object.freeze({MediaCapture:D});!function(t){t.UNKNOWN="unknown",t.ETHERNET="ethernet",t.WIFI="wifi",t.CELL_2G="2g",t.CELL_3G="3g",t.CELL_4G="4g",t.CELL="cellular",t.NONE="none"}(g||(g={}));var M=function(o){function a(){var t=null!==o&&o.apply(this,arguments)||this;return t.Connection={UNKNOWN:"unknown",ETHERNET:"ethernet",WIFI:"wifi",CELL_2G:"2g",CELL_3G:"3g",CELL_4G:"4g",CELL:"cellular",NONE:"none"},t}return t.__extends(a,o),a.prototype.onChange=function(){var t=this;return function(){if(!0===n.checkAvailability(t))return r.merge(t.onConnect().pipe(i.mapTo("connected")),t.onDisconnect().pipe(i.mapTo("disconnected")))}()},a.prototype.onDisconnect=function(){return n.cordova(this,"onDisconnect",{eventObservable:!0,event:"offline",element:"document"},arguments)},a.prototype.onConnect=function(){return n.cordova(this,"onConnect",{eventObservable:!0,event:"online",element:"document"},arguments)},Object.defineProperty(a.prototype,"type",{get:function(){return n.cordovaPropertyGet(this,"type")},set:function(t){n.cordovaPropertySet(this,"type",t)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"downlinkMax",{get:function(){return n.cordovaPropertyGet(this,"downlinkMax")},set:function(t){n.cordovaPropertySet(this,"downlinkMax",t)},enumerable:!1,configurable:!0}),a.pluginName="Network",a.plugin="cordova-plugin-network-information",a.pluginRef="navigator.connection",a.repo="https://github.com/apache/cordova-plugin-network-information",a.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"],a.decorators=[{type:e.Injectable}],a}(n.AwesomeCordovaNativePlugin),O=Object.freeze({get Connection(){return g},Network:M}),I=function(){function t(t){this._objectInstance=t}return t.prototype.addTransaction=function(t){return n.cordovaInstance(this,"addTransaction",{sync:!0},arguments)},t.prototype.transaction=function(t){return n.cordovaInstance(this,"transaction",{successIndex:2,errorIndex:1},arguments)},t.prototype.readTransaction=function(t){return n.cordovaInstance(this,"readTransaction",{},arguments)},t.prototype.startNextTransaction=function(){return n.cordovaInstance(this,"startNextTransaction",{sync:!0},arguments)},t.prototype.open=function(){return n.cordovaInstance(this,"open",{},arguments)},t.prototype.close=function(){return n.cordovaInstance(this,"close",{},arguments)},t.prototype.executeSql=function(t,e){return n.cordovaInstance(this,"executeSql",{},arguments)},t.prototype.sqlBatch=function(t){return n.cordovaInstance(this,"sqlBatch",{},arguments)},t.prototype.abortallPendingTransactions=function(){return n.cordovaInstance(this,"abortallPendingTransactions",{sync:!0},arguments)},Object.defineProperty(t.prototype,"databaseFeatures",{get:function(){return n.instancePropertyGet(this,"databaseFeatures")},set:function(t){n.instancePropertySet(this,"databaseFeatures",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"openDBs",{get:function(){return n.instancePropertyGet(this,"openDBs")},set:function(t){n.instancePropertySet(this,"openDBs",t)},enumerable:!1,configurable:!0}),t}(),P=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.create=function(t){var e=this;return function(){if(!0===n.checkAvailability(e))return new Promise((function(e,n){sqlitePlugin.openDatabase(t,(function(t){return e(new I(t))}),n)}))}()},i.prototype.echoTest=function(){return n.cordova(this,"echoTest",{},arguments)},i.prototype.selfTest=function(){return n.cordova(this,"selfTest",{},arguments)},i.prototype.deleteDatabase=function(t){return n.cordova(this,"deleteDatabase",{},arguments)},i.pluginName="SQLite",i.pluginRef="sqlitePlugin",i.plugin="cordova-sqlite-storage",i.repo="https://github.com/litehelpers/Cordova-sqlite-storage",i.platforms=["Android","iOS","macOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),R=Object.freeze({SQLiteObject:I,SQLite:P}),N=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.vibrate=function(t){return n.cordova(this,"vibrate",{sync:!0},arguments)},i.pluginName="Vibration",i.plugin="cordova-plugin-vibration",i.pluginRef="navigator",i.repo="https://github.com/apache/cordova-plugin-vibration",i.platforms=["Android","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),L=Object.freeze({Vibration:N}),F=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.REQUEST_PRIORITY_NO_POWER=0,t.REQUEST_PRIORITY_LOW_POWER=1,t.REQUEST_PRIORITY_BALANCED_POWER_ACCURACY=2,t.REQUEST_PRIORITY_HIGH_ACCURACY=3,t.SUCCESS_SETTINGS_SATISFIED=0,t.SUCCESS_USER_AGREED=1,t.ERROR_ALREADY_REQUESTING=-1,t.ERROR_INVALID_ACTION=0,t.ERROR_INVALID_ACCURACY=1,t.ERROR_EXCEPTION=1,t.ERROR_CANNOT_CHANGE_ACCURACY=3,t.ERROR_USER_DISAGREED=4,t.ERROR_GOOGLE_API_CONNECTION_FAILED=4,t}return t.__extends(i,r),i.prototype.canRequest=function(){return n.cordova(this,"canRequest",{},arguments)},i.prototype.isRequesting=function(){return n.cordova(this,"isRequesting",{},arguments)},i.prototype.request=function(t){return n.cordova(this,"request",{callbackOrder:"reverse"},arguments)},i.pluginName="LocationAccuracy",i.plugin="cordova-plugin-request-location-accuracy",i.pluginRef="cordova.plugins.locationAccuracy",i.repo="https://github.com/dpa99c/cordova-plugin-request-location-accuracy",i.platforms=["Android","iOS"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),j=Object.freeze({LocationAccuracy:F}),B=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.permission={READ_CALENDAR:"READ_CALENDAR",WRITE_CALENDAR:"WRITE_CALENDAR",CAMERA:"CAMERA",READ_CONTACTS:"READ_CONTACTS",WRITE_CONTACTS:"WRITE_CONTACTS",GET_ACCOUNTS:"GET_ACCOUNTS",ACCESS_FINE_LOCATION:"ACCESS_FINE_LOCATION",ACCESS_COARSE_LOCATION:"ACCESS_COARSE_LOCATION",RECORD_AUDIO:"RECORD_AUDIO",READ_PHONE_STATE:"READ_PHONE_STATE",CALL_PHONE:"CALL_PHONE",ADD_VOICEMAIL:"ADD_VOICEMAIL",USE_SIP:"USE_SIP",PROCESS_OUTGOING_CALLS:"PROCESS_OUTGOING_CALLS",READ_CALL_LOG:"READ_CALL_LOG",WRITE_CALL_LOG:"WRITE_CALL_LOG",SEND_SMS:"SEND_SMS",RECEIVE_SMS:"RECEIVE_SMS",READ_SMS:"READ_SMS",RECEIVE_WAP_PUSH:"RECEIVE_WAP_PUSH",RECEIVE_MMS:"RECEIVE_MMS",WRITE_EXTERNAL_STORAGE:"WRITE_EXTERNAL_STORAGE",READ_EXTERNAL_STORAGE:"READ_EXTERNAL_STORAGE",BODY_SENSORS:"BODY_SENSORS"},t.locationAuthorizationMode={ALWAYS:"always",WHEN_IN_USE:"when_in_use"},t.permissionGroups={CALENDAR:["READ_CALENDAR","WRITE_CALENDAR"],CAMERA:["CAMERA"],CONTACTS:["READ_CONTACTS","WRITE_CONTACTS","GET_ACCOUNTS"],LOCATION:["ACCESS_FINE_LOCATION","ACCESS_COARSE_LOCATION"],MICROPHONE:["RECORD_AUDIO"],PHONE:["READ_PHONE_STATE","CALL_PHONE","ADD_VOICEMAIL","USE_SIP","PROCESS_OUTGOING_CALLS","READ_CALL_LOG","WRITE_CALL_LOG"],SENSORS:["BODY_SENSORS"],SMS:["SEND_SMS","RECEIVE_SMS","READ_SMS","RECEIVE_WAP_PUSH","RECEIVE_MMS"],STORAGE:["READ_EXTERNAL_STORAGE","WRITE_EXTERNAL_STORAGE"]},t.locationMode={HIGH_ACCURACY:"high_accuracy",DEVICE_ONLY:"device_only",BATTERY_SAVING:"battery_saving",LOCATION_OFF:"location_off"},t.bluetoothState={UNKNOWN:"unknown",RESETTING:"resetting",UNSUPPORTED:"unsupported",UNAUTHORIZED:"unauthorized",POWERED_OFF:"powered_off",POWERED_ON:"powered_on",POWERING_OFF:"powering_off",POWERING_ON:"powering_on"},t}return t.__extends(i,r),i.prototype.isLocationAvailable=function(){return n.cordova(this,"isLocationAvailable",{},arguments)},i.prototype.isWifiAvailable=function(){return n.cordova(this,"isWifiAvailable",{},arguments)},i.prototype.isCameraAvailable=function(t){return n.cordova(this,"isCameraAvailable",{callbackOrder:"reverse"},arguments)},i.prototype.isBluetoothAvailable=function(){return n.cordova(this,"isBluetoothAvailable",{},arguments)},i.prototype.switchToLocationSettings=function(){return n.cordova(this,"switchToLocationSettings",{sync:!0,platforms:["Android","Windows 10","iOS"]},arguments)},i.prototype.switchToMobileDataSettings=function(){return n.cordova(this,"switchToMobileDataSettings",{sync:!0,platforms:["Android","Windows 10"]},arguments)},i.prototype.switchToBluetoothSettings=function(){return n.cordova(this,"switchToBluetoothSettings",{sync:!0,platforms:["Android","Windows 10"]},arguments)},i.prototype.switchToWifiSettings=function(){return n.cordova(this,"switchToWifiSettings",{sync:!0,platforms:["Android","Windows 10"]},arguments)},i.prototype.isWifiEnabled=function(){return n.cordova(this,"isWifiEnabled",{platforms:["Android","Windows 10"]},arguments)},i.prototype.setWifiState=function(t){return n.cordova(this,"setWifiState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)},i.prototype.setBluetoothState=function(t){return n.cordova(this,"setBluetoothState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)},i.prototype.isLocationEnabled=function(){return n.cordova(this,"isLocationEnabled",{platforms:["Android","iOS"]},arguments)},i.prototype.isLocationAuthorized=function(){return n.cordova(this,"isLocationAuthorized",{},arguments)},i.prototype.getLocationAuthorizationStatus=function(){return n.cordova(this,"getLocationAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestLocationAuthorization=function(t){return n.cordova(this,"requestLocationAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.isCameraPresent=function(){return n.cordova(this,"isCameraPresent",{platforms:["Android","iOS"]},arguments)},i.prototype.isCameraAuthorized=function(t){return n.cordova(this,"isCameraAuthorized",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.getCameraAuthorizationStatus=function(t){return n.cordova(this,"getCameraAuthorizationStatus",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.requestCameraAuthorization=function(t){return n.cordova(this,"requestCameraAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.isMicrophoneAuthorized=function(){return n.cordova(this,"isMicrophoneAuthorized",{platforms:["Android","iOS"]},arguments)},i.prototype.getMicrophoneAuthorizationStatus=function(){return n.cordova(this,"getMicrophoneAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestMicrophoneAuthorization=function(){return n.cordova(this,"requestMicrophoneAuthorization",{platforms:["Android","iOS"]},arguments)},i.prototype.isContactsAuthorized=function(){return n.cordova(this,"isContactsAuthorized",{platforms:["Android","iOS"]},arguments)},i.prototype.getContactsAuthorizationStatus=function(){return n.cordova(this,"getContactsAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestContactsAuthorization=function(){return n.cordova(this,"requestContactsAuthorization",{platforms:["Android","iOS"]},arguments)},i.prototype.isCalendarAuthorized=function(){return n.cordova(this,"isCalendarAuthorized",{platforms:["Android","iOS"]},arguments)},i.prototype.getCalendarAuthorizationStatus=function(){return n.cordova(this,"getCalendarAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestCalendarAuthorization=function(){return n.cordova(this,"requestCalendarAuthorization",{platforms:["Android","iOS"]},arguments)},i.prototype.switchToSettings=function(){return n.cordova(this,"switchToSettings",{platforms:["Android","iOS"]},arguments)},i.prototype.getBluetoothState=function(){return n.cordova(this,"getBluetoothState",{platforms:["Android","iOS"]},arguments)},i.prototype.registerBluetoothStateChangeHandler=function(t){return n.cordova(this,"registerBluetoothStateChangeHandler",{platforms:["Android","iOS"],sync:!0},arguments)},i.prototype.registerLocationStateChangeHandler=function(t){return n.cordova(this,"registerLocationStateChangeHandler",{platforms:["Android","iOS"],sync:!0},arguments)},i.prototype.isGpsLocationAvailable=function(){return n.cordova(this,"isGpsLocationAvailable",{platforms:["Android"]},arguments)},i.prototype.isGpsLocationEnabled=function(){return n.cordova(this,"isGpsLocationEnabled",{platforms:["Android"]},arguments)},i.prototype.isNetworkLocationAvailable=function(){return n.cordova(this,"isNetworkLocationAvailable",{platforms:["Android"]},arguments)},i.prototype.isNetworkLocationEnabled=function(){return n.cordova(this,"isNetworkLocationEnabled",{platforms:["Android"]},arguments)},i.prototype.getLocationMode=function(){return n.cordova(this,"getLocationMode",{platforms:["Android"]},arguments)},i.prototype.getPermissionAuthorizationStatus=function(t){return n.cordova(this,"getPermissionAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.getPermissionsAuthorizationStatus=function(t){return n.cordova(this,"getPermissionsAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.requestRuntimePermission=function(t){return n.cordova(this,"requestRuntimePermission",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.requestRuntimePermissions=function(t){return n.cordova(this,"requestRuntimePermissions",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.isRequestingPermission=function(){return n.cordova(this,"isRequestingPermission",{sync:!0},arguments)},i.prototype.registerPermissionRequestCompleteHandler=function(t){return n.cordova(this,"registerPermissionRequestCompleteHandler",{sync:!0},arguments)},i.prototype.isBluetoothEnabled=function(){return n.cordova(this,"isBluetoothEnabled",{platforms:["Android"]},arguments)},i.prototype.hasBluetoothSupport=function(){return n.cordova(this,"hasBluetoothSupport",{platforms:["Android"]},arguments)},i.prototype.hasBluetoothLESupport=function(){return n.cordova(this,"hasBluetoothLESupport",{platforms:["Android"]},arguments)},i.prototype.hasBluetoothLEPeripheralSupport=function(){return n.cordova(this,"hasBluetoothLEPeripheralSupport",{platforms:["Android"]},arguments)},i.prototype.isExternalStorageAuthorized=function(){return n.cordova(this,"isExternalStorageAuthorized",{platforms:["Android"]},arguments)},i.prototype.getExternalStorageAuthorizationStatus=function(){return n.cordova(this,"getExternalStorageAuthorizationStatus",{platforms:["Android"]},arguments)},i.prototype.requestExternalStorageAuthorization=function(){return n.cordova(this,"requestExternalStorageAuthorization",{platforms:["Android"]},arguments)},i.prototype.getExternalSdCardDetails=function(){return n.cordova(this,"getExternalSdCardDetails",{platforms:["Android"]},arguments)},i.prototype.switchToWirelessSettings=function(){return n.cordova(this,"switchToWirelessSettings",{platforms:["Android"],sync:!0},arguments)},i.prototype.switchToNFCSettings=function(){return n.cordova(this,"switchToNFCSettings",{platforms:["Android"],sync:!0},arguments)},i.prototype.isNFCPresent=function(){return n.cordova(this,"isNFCPresent",{platforms:["Android"]},arguments)},i.prototype.isNFCEnabled=function(){return n.cordova(this,"isNFCEnabled",{platforms:["Android"]},arguments)},i.prototype.isNFCAvailable=function(){return n.cordova(this,"isNFCAvailable",{platforms:["Android"]},arguments)},i.prototype.registerNFCStateChangeHandler=function(t){return n.cordova(this,"registerNFCStateChangeHandler",{platforms:["Android"],sync:!0},arguments)},i.prototype.isDataRoamingEnabled=function(){return n.cordova(this,"isDataRoamingEnabled",{platforms:["Android"]},arguments)},i.prototype.isADBModeEnabled=function(){return n.cordova(this,"isADBModeEnabled",{platforms:["Android"]},arguments)},i.prototype.isDeviceRooted=function(){return n.cordova(this,"isDeviceRooted",{platforms:["Android"]},arguments)},i.prototype.isCameraRollAuthorized=function(){return n.cordova(this,"isCameraRollAuthorized",{platforms:["iOS"]},arguments)},i.prototype.getCameraRollAuthorizationStatus=function(){return n.cordova(this,"getCameraRollAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.requestCameraRollAuthorization=function(){return n.cordova(this,"requestCameraRollAuthorization",{platforms:["iOS"]},arguments)},i.prototype.isRemoteNotificationsEnabled=function(){return n.cordova(this,"isRemoteNotificationsEnabled",{platforms:["iOS","Android"]},arguments)},i.prototype.isRegisteredForRemoteNotifications=function(){return n.cordova(this,"isRegisteredForRemoteNotifications",{platforms:["iOS"]},arguments)},i.prototype.getRemoteNotificationsAuthorizationStatus=function(){return n.cordova(this,"getRemoteNotificationsAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.requestRemoteNotificationsAuthorization=function(t,e){return n.cordova(this,"requestRemoteNotificationsAuthorization",{platforms:["iOS"]},arguments)},i.prototype.getRemoteNotificationTypes=function(){return n.cordova(this,"getRemoteNotificationTypes",{platforms:["iOS"]},arguments)},i.prototype.isRemindersAuthorized=function(){return n.cordova(this,"isRemindersAuthorized",{platforms:["iOS"]},arguments)},i.prototype.getRemindersAuthorizationStatus=function(){return n.cordova(this,"getRemindersAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.requestRemindersAuthorization=function(){return n.cordova(this,"requestRemindersAuthorization",{platforms:["iOS"]},arguments)},i.prototype.isBackgroundRefreshAuthorized=function(){return n.cordova(this,"isBackgroundRefreshAuthorized",{platforms:["iOS"]},arguments)},i.prototype.getBackgroundRefreshStatus=function(){return n.cordova(this,"getBackgroundRefreshStatus",{platforms:["iOS"]},arguments)},i.prototype.requestBluetoothAuthorization=function(){return n.cordova(this,"requestBluetoothAuthorization",{platforms:["iOS"]},arguments)},i.prototype.isMotionAvailable=function(){return n.cordova(this,"isMotionAvailable",{platforms:["iOS"]},arguments)},i.prototype.isMotionRequestOutcomeAvailable=function(){return n.cordova(this,"isMotionRequestOutcomeAvailable",{platforms:["iOS"]},arguments)},i.prototype.requestMotionAuthorization=function(){return n.cordova(this,"requestMotionAuthorization",{platforms:["iOS"]},arguments)},i.prototype.getMotionAuthorizationStatus=function(){return n.cordova(this,"getMotionAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.getLocationAccuracyAuthorization=function(){return n.cordova(this,"getLocationAccuracyAuthorization",{platform:["iOS"]},arguments)},i.prototype.requestTemporaryFullAccuracyAuthorization=function(t){return n.cordova(this,"requestTemporaryFullAccuracyAuthorization",{platforms:["iOS"]},arguments)},i.prototype.registerLocationAccuracyAuthorizationChangeHandler=function(t){return n.cordova(this,"registerLocationAccuracyAuthorizationChangeHandler",{platforms:["iOS"],sync:!0},arguments)},Object.defineProperty(i.prototype,"permissionStatus",{get:function(){return n.cordovaPropertyGet(this,"permissionStatus")},set:function(t){n.cordovaPropertySet(this,"permissionStatus",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"NFCState",{get:function(){return n.cordovaPropertyGet(this,"NFCState")},set:function(t){n.cordovaPropertySet(this,"NFCState",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"motionStatus",{get:function(){return n.cordovaPropertyGet(this,"motionStatus")},set:function(t){n.cordovaPropertySet(this,"motionStatus",t)},enumerable:!1,configurable:!0}),i.pluginName="Diagnostic",i.plugin="cordova.plugins.diagnostic",i.pluginRef="cordova.plugins.diagnostic",i.repo="https://github.com/dpa99c/cordova-diagnostic-plugin",i.platforms=["Android","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin);return{...d,...f,...m,...b,...w,...x,...C,...k,...A,...O,...R,...L,...j,...Object.freeze({Diagnostic:B})}})),
|
|
3627
|
+
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],t):t(jQuery)}((function(t){"use strict";return t.widget("ui.droppable",{version:"1.13.2",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 t,e=this.options,n=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof n?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});t=arguments[0]},this._addToManager(e.scope),e.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,n){if("accept"===e)this.accept="function"==typeof n?n:function(t){return t.is(n)};else if("scope"===e){var r=t.ui.ddmanager.droppables[this.options.scope];this._splice(r),this._addToManager(n)}this._super(e,n)},_activate:function(e){var n=t.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",e,this.ui(n))},_deactivate:function(e){var n=t.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",e,this.ui(n))},_over:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(n)))},_out:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(n)))},_drop:function(e,n){var r=n||t.ui.ddmanager.current,i=!1;return!(!r||(r.currentItem||r.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var n=t(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===r.options.scope&&n.accept.call(n.element[0],r.currentItem||r.element)&&t.ui.intersect(r,t.extend(n,{offset:n.element.offset()}),n.options.tolerance,e))return i=!0,!1})),!i&&(!!this.accept.call(this.element[0],r.currentItem||r.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(r)),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")}}),t.ui.intersect=function(){function t(t,e,n){return t>=e&&t<e+n}return function(e,n,r,i){if(!n.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,s=o+e.helperProportions.width,u=a+e.helperProportions.height,l=n.offset.left,c=n.offset.top,p=l+n.proportions().width,d=c+n.proportions().height;switch(r){case"fit":return l<=o&&s<=p&&c<=a&&u<=d;case"intersect":return l<o+e.helperProportions.width/2&&s-e.helperProportions.width/2<p&&c<a+e.helperProportions.height/2&&u-e.helperProportions.height/2<d;case"pointer":return t(i.pageY,c,n.proportions().height)&&t(i.pageX,l,n.proportions().width);case"touch":return(a>=c&&a<=d||u>=c&&u<=d||a<c&&u>d)&&(o>=l&&o<=p||s>=l&&s<=p||o<l&&s>p);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,n){var r,i,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=n?n.type:null,s=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(r=0;r<o.length;r++)if(!(o[r].options.disabled||e&&!o[r].accept.call(o[r].element[0],e.currentItem||e.element))){for(i=0;i<s.length;i++)if(s[i]===o[r].element[0]){o[r].proportions().height=0;continue t}o[r].visible="none"!==o[r].element.css("display"),o[r].visible&&("mousedown"===a&&o[r]._activate.call(o[r],n),o[r].offset=o[r].element.offset(),o[r].proportions({width:o[r].element[0].offsetWidth,height:o[r].element[0].offsetHeight}))}},drop:function(e,n){var r=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,n)&&(r=this._drop.call(this,n)||r),!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,n)))})),r},dragStart:function(e,n){e.element.parentsUntil("body").on("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}))},drag:function(e,n){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,n),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,i,o,a=t.ui.intersect(e,this,this.options.tolerance,n),s=!a&&this.isover?"isout":a&&!this.isover?"isover":null;s&&(this.options.greedy&&(i=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===i}))).length&&((r=t(o[0]).droppable("instance")).greedyChild="isover"===s)),r&&"isover"===s&&(r.isover=!1,r.isout=!0,r._out.call(r,n)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,n),r&&"isout"===s&&(r.isout=!1,r.isover=!0,r._over.call(r,n)))}}))},dragStop:function(e,n){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}},!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})),function(t,e,n,r){"use strict";function i(t,e,n){return setTimeout(l(t,n),e)}function o(t,e,n){return!!Array.isArray(t)&&(a(t,n[e],n),!0)}function a(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==r)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function s(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}function u(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&rt(r,n)}function l(t,e){return function(){return t.apply(e,arguments)}}function c(t,e){return typeof t==at?t.apply(e&&e[0]||r,e):t}function p(t,e){return t===r?e:t}function d(t,e,n){a(m(e),(function(e){t.addEventListener(e,n,!1)}))}function h(t,e,n){a(m(e),(function(e){t.removeEventListener(e,n,!1)}))}function f(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function v(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function g(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function y(t){return Array.prototype.slice.call(t,0)}function b(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];g(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function _(t,e){for(var n,i,o=e[0].toUpperCase()+e.slice(1),a=0;a<it.length;){if((i=(n=it[a])?n+o:e)in t)return i;a++}return r}function w(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}function E(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){c(t.options.enable,[t])&&n.handler(e)},this.init()}function x(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&bt&&r-i==0,a=e&(wt|Et)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=C(e)),i>1&&!n.firstMultiple?n.firstMultiple=C(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=T(r);e.timeStamp=lt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=M(s,u),e.distance=A(s,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==bt&&o.eventType!==wt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=D(e.deltaX,e.deltaY);var l=k(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=ut(l.x)>ut(l.y)?l.x:l.y,e.scale=a?function(t,e){return A(e[0],e[1],It)/A(t[0],t[1],It)}(a.pointers,r):1,e.rotation=a?function(t,e){return M(e[1],e[0],It)+M(t[1],t[0],It)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,S(n,e);var c=t.element;f(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function S(t,e){var n,i,o,a,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=Et&&(u>yt||s.velocity===r)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,p=k(u,l,c);i=p.x,o=p.y,n=ut(p.x)>ut(p.y)?p.x:p.y,a=D(l,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=o,e.direction=a}function C(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:st(t.pointers[n].clientX),clientY:st(t.pointers[n].clientY)},n++;return{timeStamp:lt(),pointers:e,center:T(e),deltaX:t.deltaX,deltaY:t.deltaY}}function T(t){var e=t.length;if(1===e)return{x:st(t[0].clientX),y:st(t[0].clientY)};for(var n=0,r=0,i=0;e>i;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:st(n/e),y:st(r/e)}}function k(t,e,n){return{x:e/t||0,y:n/t||0}}function D(t,e){return t===e?xt:ut(t)>=ut(e)?0>t?St:Ct:0>e?Tt:kt}function A(t,e,n){n||(n=Ot);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function M(t,e,n){n||(n=Ot);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function O(){this.evEl=Rt,this.evWin=Nt,this.pressed=!1,E.apply(this,arguments)}function I(){this.evEl=jt,this.evWin=Bt,E.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function P(){this.evTarget=Ht,this.evWin=Ut,this.started=!1,E.apply(this,arguments)}function R(t,e){var n=y(t.touches),r=y(t.changedTouches);return e&(wt|Et)&&(n=b(n.concat(r),"identifier",!0)),[n,r]}function N(){this.evTarget=Yt,this.targetIds={},E.apply(this,arguments)}function L(t,e){var n=y(t.touches),r=this.targetIds;if(e&(bt|_t)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=y(t.changedTouches),s=[],u=this.target;if(o=n.filter((function(t){return f(t.target,u)})),e===bt)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),e&(wt|Et)&&delete r[a[i].identifier],i++;return s.length?[b(o.concat(s),"identifier",!0),s]:void 0}function F(){E.apply(this,arguments);var t=l(this.handler,this);this.touch=new N(this.manager,t),this.mouse=new O(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function j(t,e){t&bt?(this.primaryTouch=e.changedPointers[0].identifier,B.call(this,e)):t&(wt|Et)&&B.call(this,e)}function B(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),zt)}}function V(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(Wt>=o&&Wt>=a)return!0}return!1}function H(t,e){this.manager=t,this.set(e)}function U(t){this.options=rt({},this.defaults,t||{}),this.id=dt++,this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=ne,this.simultaneous={},this.requireFail=[]}function q(t){return t&se?"cancel":t&oe?"end":t&ie?"move":t&re?"start":""}function Y(t){return t==kt?"down":t==Tt?"up":t==St?"left":t==Ct?"right":""}function z(t,e){var n=e.manager;return n?n.get(t):t}function W(){U.apply(this,arguments)}function G(){W.apply(this,arguments),this.pX=null,this.pY=null}function K(){W.apply(this,arguments)}function $(){U.apply(this,arguments),this._timer=null,this._input=null}function Z(){W.apply(this,arguments)}function X(){W.apply(this,arguments)}function Q(){U.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function J(t,e){return(e=e||{}).recognizers=p(e.recognizers,J.defaults.preset),new tt(t,e)}function tt(t,e){this.options=rt({},J.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){return new(t.options.inputClass||(ft?I:vt?N:ht?F:O))(t,x)}(this),this.touchAction=new H(this,this.options.touchAction),et(this,!0),a(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function et(t,e){var n,r=t.element;r.style&&(a(t.options.cssProps,(function(i,o){n=_(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}function nt(t,n){var r=e.createEvent("Event");r.initEvent(t,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}var rt,it=["","webkit","Moz","MS","ms","o"],ot=e.createElement("div"),at="function",st=Math.round,ut=Math.abs,lt=Date.now;rt="function"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(e[o]=i[o])}return e}:Object.assign;var ct=s((function(t,e,n){for(var i=Object.keys(e),o=0;o<i.length;)(!n||n&&t[i[o]]===r)&&(t[i[o]]=e[i[o]]),o++;return t}),"extend","Use `assign`."),pt=s((function(t,e){return ct(t,e,!0)}),"merge","Use `assign`."),dt=1,ht="ontouchstart"in t,ft=_(t,"PointerEvent")!==r,vt=ht&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),mt="touch",gt="mouse",yt=25,bt=1,_t=2,wt=4,Et=8,xt=1,St=2,Ct=4,Tt=8,kt=16,Dt=St|Ct,At=Tt|kt,Mt=Dt|At,Ot=["x","y"],It=["clientX","clientY"];E.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(w(this.element),this.evWin,this.domHandler)}};var Pt={mousedown:bt,mousemove:_t,mouseup:wt},Rt="mousedown",Nt="mousemove mouseup";u(O,E,{handler:function(t){var e=Pt[t.type];e&bt&&0===t.button&&(this.pressed=!0),e&_t&&1!==t.which&&(e=wt),this.pressed&&(e&wt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:gt,srcEvent:t}))}});var Lt={pointerdown:bt,pointermove:_t,pointerup:wt,pointercancel:Et,pointerout:Et},Ft={2:mt,3:"pen",4:gt,5:"kinect"},jt="pointerdown",Bt="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(jt="MSPointerDown",Bt="MSPointerMove MSPointerUp MSPointerCancel"),u(I,E,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=Lt[r],o=Ft[t.pointerType]||t.pointerType,a=o==mt,s=g(e,t.pointerId,"pointerId");i&bt&&(0===t.button||a)?0>s&&(e.push(t),s=e.length-1):i&(wt|Et)&&(n=!0),0>s||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var Vt={touchstart:bt,touchmove:_t,touchend:wt,touchcancel:Et},Ht="touchstart",Ut="touchstart touchmove touchend touchcancel";u(P,E,{handler:function(t){var e=Vt[t.type];if(e===bt&&(this.started=!0),this.started){var n=R.call(this,t,e);e&(wt|Et)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:mt,srcEvent:t})}}});var qt={touchstart:bt,touchmove:_t,touchend:wt,touchcancel:Et},Yt="touchstart touchmove touchend touchcancel";u(N,E,{handler:function(t){var e=qt[t.type],n=L.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:mt,srcEvent:t})}});var zt=2500,Wt=25;u(F,E,{handler:function(t,e,n){var r=n.pointerType==mt,i=n.pointerType==gt;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)j.call(this,e,n);else if(i&&V.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Gt=_(ot.style,"touchAction"),Kt=Gt!==r,$t="compute",Zt="auto",Xt="manipulation",Qt="none",Jt="pan-x",te="pan-y",ee=function(){if(!Kt)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){e[r]=!n||t.CSS.supports("touch-action",r)})),e}();H.prototype={set:function(t){t==$t&&(t=this.compute()),Kt&&this.manager.element.style&&ee[t]&&(this.manager.element.style[Gt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return a(this.manager.recognizers,(function(e){c(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(v(t,Qt))return Qt;var e=v(t,Jt),n=v(t,te);return e&&n?Qt:e||n?e?Jt:te:v(t,Xt)?Xt:Zt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(!this.manager.session.prevented){var r=this.actions,i=v(r,Qt)&&!ee[Qt],o=v(r,te)&&!ee[te],a=v(r,Jt)&&!ee[Jt];if(i){var s=1===t.pointers.length,u=t.distance<2,l=t.deltaTime<250;if(s&&u&&l)return}return a&&o?void 0:i||o&&n&Dt||a&&n&At?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ne=1,re=2,ie=4,oe=8,ae=oe,se=16,ue=32;U.prototype={defaults:{},set:function(t){return rt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(o(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=z(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return o(t,"dropRecognizeWith",this)||(t=z(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(o(t,"requireFailure",this))return this;var e=this.requireFail;return-1===g(e,t=z(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(o(t,"dropRequireFailure",this))return this;t=z(t,this);var e=g(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;oe>r&&e(n.options.event+q(r)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),r>=oe&&e(n.options.event+q(r))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ue)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(ue|ne)))return!1;t++}return!0},recognize:function(t){var e=rt({},t);return c(this.options.enable,[this,e])?(this.state&(ae|se|ue)&&(this.state=ne),this.state=this.process(e),void(this.state&(re|ie|oe|se)&&this.tryEmit(e))):(this.reset(),void(this.state=ue))},process:function(t){},getTouchAction:function(){},reset:function(){}},u(W,U,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=e&(re|ie),i=this.attrTest(t);return r&&(n&Et||!i)?e|se:r||i?n&wt?e|oe:e&re?e|ie:re:ue}}),u(G,W,{defaults:{event:"pan",threshold:10,pointers:1,direction:Mt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Dt&&e.push(te),t&At&&e.push(Jt),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(e.direction&Dt?(i=0===o?xt:0>o?St:Ct,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?xt:0>a?Tt:kt,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return W.prototype.attrTest.call(this,t)&&(this.state&re||!(this.state&re)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Y(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(K,W,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&re)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u($,U,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Zt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!r||!n||t.eventType&(wt|Et)&&!o)this.reset();else if(t.eventType&bt)this.reset(),this._timer=i((function(){this.state=ae,this.tryEmit()}),e.time,this);else if(t.eventType&wt)return ae;return ue},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ae&&(t&&t.eventType&wt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=lt(),this.manager.emit(this.options.event,this._input)))}}),u(Z,W,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Qt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&re)}}),u(X,W,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Dt|At,pointers:1},getTouchAction:function(){return G.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Dt|At)?e=t.overallVelocity:n&Dt?e=t.overallVelocityX:n&At&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&ut(e)>this.options.velocity&&t.eventType&wt},emit:function(t){var e=Y(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(Q,U,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),t.eventType&bt&&0===this.count)return this.failTimeout();if(r&&o&&n){if(t.eventType!=wt)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||A(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=i((function(){this.state=ae,this.tryEmit()}),e.interval,this),re):ae}return ue},failTimeout:function(){return this._timer=i((function(){this.state=ue}),this.options.interval,this),ue},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ae&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),J.VERSION="2.0.7",J.defaults={domEvents:!1,touchAction:$t,enable:!0,inputTarget:null,inputClass:null,preset:[[Z,{enable:!1}],[K,{enable:!1},["rotate"]],[X,{direction:Dt}],[G,{direction:Dt},["swipe"]],[Q],[Q,{event:"doubletap",taps:2},["tap"]],[$]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};tt.prototype={set:function(t){return rt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,r=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&ae)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&n.state&(re|ie|oe)&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof U)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(o(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(o(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=g(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==r&&e!==r){var n=this.handlers;return a(m(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==r){var n=this.handlers;return a(m(t),(function(t){e?n[t]&&n[t].splice(g(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&nt(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&et(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},rt(J,{INPUT_START:bt,INPUT_MOVE:_t,INPUT_END:wt,INPUT_CANCEL:Et,STATE_POSSIBLE:ne,STATE_BEGAN:re,STATE_CHANGED:ie,STATE_ENDED:oe,STATE_RECOGNIZED:ae,STATE_CANCELLED:se,STATE_FAILED:ue,DIRECTION_NONE:xt,DIRECTION_LEFT:St,DIRECTION_RIGHT:Ct,DIRECTION_UP:Tt,DIRECTION_DOWN:kt,DIRECTION_HORIZONTAL:Dt,DIRECTION_VERTICAL:At,DIRECTION_ALL:Mt,Manager:tt,Input:E,TouchAction:H,TouchInput:N,MouseInput:O,PointerEventInput:I,TouchMouseInput:F,SingleTouchInput:P,Recognizer:U,AttrRecognizer:W,Tap:Q,Pan:G,Swipe:X,Pinch:K,Rotate:Z,Press:$,on:d,off:h,each:a,merge:pt,extend:ct,assign:rt,inherit:u,bindFn:l,prefixed:_}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=J,"function"==typeof define&&define.amd?define((function(){return J})):"undefined"!=typeof module&&module.exports?module.exports=J:t.Hammer=J}(window,document),$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:!1,enableSort:!0,filtermode:"",activeRow:void 0,height:"100%",showHeader:!0,selectFirstRow:!1,showNewRow:!0,showRowIndex:!1,enableRowSelection:!0,enableColumnSelection:!1,multiselect:!1,filterNullRecords:!0,navigation:"",isdynamictable:"",cssClassNames:{tableRow:"app-datagrid-row",headerCell:"app-datagrid-header-cell",groupHeaderCell:"app-datagrid-group-header-cell",tableCell:"app-datagrid-cell",grid:"",gridDefault:"table",gridBody:"app-datagrid-body",gridFooter:"app-datagrid-footer",deleteRow:"danger",ascIcon:"wi wi-long-arrow-up",descIcon:"wi wi-long-arrow-down",selectedColumn:"selected-column",rowExpandIcon:"wi wi-minus-square",rowCollapseIcon:"wi wi-plus-square",gridRowExpansionClass:"table-row-expansion",expandedRowClass:"expanded"},dataStates:{loading:"Loading...",ready:"",error:"An error occurred in loading the data.",nodata:"No data found."},messages:{selectField:"Select Field"},loadingicon:"",startRowIndex:1,editmode:"",actionsEnabled:{edit:!0,new:!0},rowExpansionEnabled:!1,rowDef:{position:"0",closeothers:!1,columnwidth:"30px"},summaryRow:!1,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:!0,show:!0},radio:{field:"radio",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",show:!0},__expand:{field:"__expand",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"text-align: center;",textAlignment:"center",show:!0,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:!1,searchable:!1,selectable:!1,readonly:!0,style:"text-align: left;",textAlignment:"left",show:!0}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},isDefined:function(t){return void 0!==t},isObject:function(t){return null!==t&&"object"==typeof t},getObjectIndex:function(t,e){var n=-1;return Array.isArray(t)?(t.some((function(t,r){if(_.isEqual(t,e))return n=r,!0})),n):-1},generateGuid:function(){var t=this.random;return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},isValidHtml:function(t){return/<[a-z][\s\S]*>/i.test(t)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(t){return this.isMac()&&8===t.which||46===t.which}},_setStyles:function(t,e){if(e)return e.split(";").forEach((function(e){var n,r,i=e.split(":");2===i.length&&(n=i[0].trim(),r=i[1].trim(),t.css(n,r))})),e},_getColumnSortDirection:function(t){var e=this.options.sortInfo;return t===e.field?e.direction:""},_toggleSpacingClasses:function(t){switch(t){case"normal":this.tableContainer.removeClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").removeClass("form-group-sm"),this.gridSearch.find("select").removeClass("input-sm"),this.gridSearch.find(".input-group").removeClass("input-group-sm"));break;case"condensed":this.tableContainer.addClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").addClass("form-group-sm"),this.gridSearch.find("select").addClass("input-sm"),this.gridSearch.find(".input-group").addClass("input-group-sm"))}},_getColSpan:function(t){var e=0,n=this;return _.forEach(t,(function(t){var r;t.isGroup?e+=n._getColSpan(t.columns):(r=_.find(n.preparedHeaderData,{field:t.field}),e=_.isUndefined(r.show)||r.show?e+1:e)})),e},_setColSpan:function(t){var e=this;_.forEach(t,(function(t){t.isGroup&&(t.colspan=e._getColSpan(t.columns),e.gridHeaderElement.find('th[data-col-group="'+t.field+'"]').attr("colspan",t.colspan),e._setColSpan(t.columns))}))},_getHeaderTemplate:function(){var t,e=$("<colgroup></colgroup>"),n=this.gridHeaderElement.empty(),r=this.Utils.isDefined,i=this.options.sortInfo,o=i.field,a=this,s=[],u=this.options.headerConfig,l=a.options.cssClassNames.groupHeaderCell;function c(t,n){var s,u,l,c,p,d=n,h=t.field,f=a.Utils.isDefined(t.displayName)?t.displayName:h||"",v=f,m=a.options.enableSort&&(_.isUndefined(t.show)||t.show)&&(_.isUndefined(t.sortable)||t.sortable),g=a.options.cssClassNames.headerCell,y="";return f=a.Utils.isDefined(f)&&""!==f?f:" ",l=$("<col/>"),t.style&&a._setStyles(l,t.style),e.append(l),r(t.class)&&(g+=" "+t.class),t.selected&&(g+=" "+a.options.cssClassNames.selectedColumn+" "),"checkbox"!==h&&"radio"!==h||(g+=" grid-col-small"),y+="<th",(_.isUndefined(t.resizable)||t.resizable)&&(_.isUndefined(t.show)||t.show)&&(y+=" data-col-resizable"),a.options.enableColumnSelection&&(_.isUndefined(t.selectable)||t.selectable)&&(y+=" data-col-selectable"),m&&(y+=" data-col-sortable"),y+="></th>",(u=$(y)).attr({"data-col-id":d,"data-col-field":h,title:v}),a._setStyles(u,"text-align: "+t.textAlignment),u.addClass(g),"checkbox"===h&&u.append('<input type="checkbox" />'),u.append('<span class="header-data">'+f+"</span>"),m&&(c=$('<span class="sort-buttons-container"></span>'),p=$('<i class="sort-icon"></i>'),o&&o===t.field&&i.direction&&(s="asc"===i.direction?a.options.cssClassNames.ascIcon:a.options.cssClassNames.descIcon,c.addClass("active"),p.addClass(s+" "+i.direction)),u.append(c.append(p))),u}return _.isEmpty(u)?(t=$("<tr></tr>"),a.preparedHeaderData.forEach((function(e,n){t.append(c(e,n))})),n.append(t)):(!function t(e,n){var r=[];_.forEach(e,(function(e){var i,o,s,u,p;e.columns&&e.columns.length?(p=$("<th></th>"),s=l+" "+(e.class||""),u="text-align: "+e.textAlignment+";background-color: "+(e.backgroundColor||"")+";",p.attr({"data-col-group":e.field,class:s,title:e.displayName}),a._setStyles(p,u),p.append('<span class="header-data">'+e.displayName+"</span>"),r.push(p),t(e.columns,n+1)):(i=_.findIndex(a.preparedHeaderData,{field:e.field}),(o=a.preparedHeaderData[i])&&r.push(c(o,i)))})),s[n]=s[n]||[],s[n]=s[n].concat(r)}(u,0),s.forEach((function(e,r){t=$('<tr role="row" tabindex="0"></tr>');var i=s.length-r;e.forEach((function(e){i>1&&e.hasClass("app-datagrid-header-cell")&&e.attr("rowspan",i),t.append(e)})),n.append(t)}))),{colgroup:e,header:n}},_getSearchEl:function(){var t='<select name="wm-datatable" data-element="dgFilterValue" class="form-control app-select"><option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",e=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(e,n){"none"!==e.field&&"rowOperations"!==e.field&&e.searchable&&"false"!==_.toString(e.showinfilter)&&(t+='<option value="'+e.field+'" data-coldef-index="'+n+'">'+(e.displayName||e.field)+"</option>")})),t+="</select>";var n=$('<form class="form-search form-inline" onsubmit="return false;"><div class="form-group"><input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="'+e+'"/></div><div class="input-append input-group">'+t+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+e+'"><i class="wi wi-search"></i></button></span></div></div></form>');return this._setStyles(n.find('[data-element="dgSearchText"]'),"display: inline-block;"),n},_appendRowExpansionButtons:function(t){var e=this;t.find("[data-identifier='rowExpansionButtons']").each((function(t){var n,r,i,o=t;r=$(this).closest("tr.app-datagrid-row"),i=parseInt(r.attr("data-row-id"),10),(n=_.clone(e.options.data[i])).$index=o+1,e.options.generateRowExpansionCell(n,o),$(this).empty().append(e.options.getRowExpansionAction(o))}))},setSummaryRowDef:function(t,e,n,r){this.options.summaryRow=!0,null==this.options.summaryRowDefs[n]&&(this.options.summaryRowDefs[n]={},this.options.summaryRowDefsObject[n]={}),this.options.summaryRowDefsObject[n][t]=e,this.options.summaryRowDefs[n][t]=e&&e.value?e.value:e,r&&this.refreshGridData()},_getSummaryRowTemplate:function(){var t=this,e=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');return this._setStyles(e,"border-top: 3px solid #eee;"),_.forEach(this.options.summaryRowDefs,(function(n,r){n.$$pk=r,e.append(t._getRowTemplate(n,r,!0))})),e},getPageStartIndex:function(){var t=this.options.getCurrentPage(),e=this.options.getPageSize();return((this.options.actionRowPage<t?this.options.actionRowPage:t)-1)*e},_getPreparedDataForInfiniteScroll:function(t,e){return e=e.filter((function(e,n){if(!t.find("tr.app-datagrid-row[data-row-id="+e.$$pk+"]").length)return e}))},_updateTrData:function(t){var e,n,r=this;e=t.find("tr.app-datagrid-row[data-row-id="+r.options.actionRowIndex+"]"),n=r.preparedData[r.options.actionRowIndex],r.options.generateCustomExpressions(n,r.options.actionRowIndex);var i=r._getRowTemplate(n,r.options.actionRowIndex);e.replaceWith(i[0])},_handleCRUDForInfiniteScroll:function(t){var e=this;e.options.lastActionPerformed!==e.options.ACTIONS.SEARCH_OR_SORT&&e.options.lastActionPerformed!==e.options.ACTIONS.FILTER_CRITERIA&&e.options.lastActionPerformed!==e.options.ACTIONS.DATASET_UPDATE||!(e.options.isSearchTrigerred||e.options.isDatasetUpdated||e.options.isDataUpdatedByUser)?e.options.lastActionPerformed===e.options.ACTIONS.EDIT&&void 0!==e.options.actionRowIndex&&e.options.editmode!==this.CONSTANTS.QUICK_EDIT&&e._updateTrData(t):(t.html(""),"On-Demand"!==this.options.navigation||this.options.isLastPage||this.element.find(".on-demand-datagrid").show(),e.options.clearCustomExpression(),e.options.clearRowDetailExpression(),e.options.setIsSearchTrigerred(!1),e.options.setIsDatasetUpdated(!1))},_getGridTemplate:function(){var t,e,n=this,r=n.getPageStartIndex(),i=n.options.startRowIndex,o=n.options.isNavTypeScrollOrOndemand();return o?(e=this.gridElement,this.renderTableOnViewLess&&(e=this.gridElement.empty(),this.hideLoadingIndicator(),this.renderTableOnViewLess=!1)):e=this.gridElement.empty(),o?(this._handleCRUDForInfiniteScroll(e),n.options.lastActionPerformed===n.options.ACTIONS.DELETE&&(i=n.options.actionRowIndex+1),t=this._getPreparedDataForInfiniteScroll(e,this.preparedData.slice(r))):(this.options.clearCustomExpression(),this.options.clearRowDetailExpression(),t=this.preparedData),_.forEach(t,(function(t,r){var a,s=_.clone(t),u=o?i+r-1:r;if(s.$index=u+1,n.options.generateCustomExpressions(s,u),n.options.registerRowNgClassWatcher(s,u),a=n._getRowTemplate(t,u),e.append(a),n.options.rowExpansionEnabled){var l=n.options.rowDef.height,c=_.filter(n.preparedHeaderData,(function(t){return t.show})).length-1,p=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+t.$$pk+'"><td></td><td colspan="'+c+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td></tr>');l&&p.find("div.row-overlay").css("min-height",l),p.css("display","none"),p.find(".details-section").css("display","none"),e.append(p)}})),this.options.isdynamictable||(this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT),this.options.setIsDataUpdatedByUser(!1),this.options.clearActionRowIndex()),e},_getRowTemplate:function(t,e,n){var r,i=this,o=i.options;return r=$('<tr role="row" tabindex="0" class="'+o.cssClassNames.tableRow+" "+(o.rowClass||"")+'" data-row-id="'+t.$$pk+'"></tr>'),this.preparedHeaderData.forEach((function(o,a){r.append(i._getColumnTemplate(t,a,o,e,n))})),r},_getRowActionsColumnDefIndex:function(){var t,e=this.preparedHeaderData.length;for(t=0;t<e;t+=1)if("rowOperations"===this.preparedHeaderData[t].field)return t;return-1},_getRowActionsColumnDef:function(){var t=this._getRowActionsColumnDefIndex();return-1!==t?this.preparedHeaderData[t]:null},_getCheckboxTemplate:function(t,e){return'<input name="'+(e?"gridMultiSelect":"")+'" type="checkbox"'+(!0===t._checked?" checked":"")+(t.disabed?" disabled":"")+"/>"},_getRadioTemplate:function(t){return'<input type="radio" rowSelectInput name="" value=""'+(!0===t._checked?" checked":"")+(t.disabed?" disabled":"")+"/>"},_getColumnTemplate:function(t,e,n,r,i){var o,a,s,u,l=this.options.cssClassNames.tableCell+" "+(n.class||""),c=n.customExpression,p="text-align: "+n.textAlignment+";position: relative;";if(o=$('<td class="'+l+'" data-col-id="'+e+'" role="cell"></td>'),this._setStyles(o,p),a=_.get(t,n.field),i)(s=this.options.summaryRowDefsObject[r][n.field])instanceof Object&&s.class&&o.addClass(s.class),a instanceof Promise?('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',o.html('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>')):(u=_.isUndefined(a)||null===a?"":a,o.html(u));else if(c)o.html(this.options.getCustomExpression(n.field,r));else if("custom"!==n.type)a=_.get(t,n.field),(this.options.filterNullRecords&&null===a||_.isUndefined(a))&&(a=""),o.attr("title",a),o.text(""+a);else{switch(n.field){case"checkbox":u=this._getCheckboxTemplate(t,n.isMultiSelectCol);break;case"__expand":u='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":u=this._getRadioTemplate(t);break;case"rowOperations":u='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":u=t.$$index;break;case"none":u="";break;default:u=_.isUndefined(a)||null===a?"":a}o.html(u)}return t.$index=r+1,this.options.registerColNgClassWatcher(t,n,r,e),o},_getEventTemplate:function(t){var e,n=_.filter(_.keys(t),(function(t){return _.startsWith(t,"on")})),r="";return e="autocomplete"===t.editWidgetType?"onSubmit":"onChange",n=_.union(n,[e]),_.forEach(n,(function(e){r+=" "+_.kebabCase(e)+'="',"onSubmit"!==e&&"onChange"!==e||(r+="_"+e+"Field($event, $scope, newVal, oldVal);"),r+=(t[e]||"")+'" '})),r},_insertFieldInHeaderConfig:function(t,e,n){var r=_.findIndex(t,{field:n}),i=this;-1===r?_.forEach(t,(function(t){t.isGroup&&i._insertFieldInHeaderConfig(t.columns,e,n)})):t.splice(r+1,0,{field:e,isPredefined:!0})},setHeaderConfigForDefaultFields:function(t,e){if(!_.isEmpty(this.options.headerConfig)){var n=this.customColumnDefs[t].field;_.remove(this.options.headerConfig,{field:n}),"0"===e?this.options.headerConfig.unshift({field:n,isPredefined:!0}):"-1"===e?this.options.headerConfig.push({field:n,isPredefined:!0}):this._insertFieldInHeaderConfig(this.options.headerConfig,n,e)}},setDefaultColsData:function(t){if(!_.isEmpty(this.preparedHeaderData)){var e,n;if(this.options.rowExpansionEnabled){if(e=this.options.rowDef.position,(n=_.clone(this.customColumnDefs.__expand)).width=this.options.rowDef.columnwidth,t)if("-1"===e)this.preparedHeaderData.push(n);else if("0"===e)this.preparedHeaderData.unshift(n);else{var r=_.findIndex(this.preparedHeaderData,{field:e});this.preparedHeaderData.splice(r+1,0,n)}this.setHeaderConfigForDefaultFields("__expand",e)}this.options.showRowIndex&&(t&&this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex),this.setHeaderConfigForDefaultFields("rowIndex","0")),this.options.multiselect&&(t&&this.preparedHeaderData.unshift(this.customColumnDefs.checkbox),this.setHeaderConfigForDefaultFields("checkbox","0")),!this.options.multiselect&&this.options.showRadioColumn&&(t&&this.preparedHeaderData.unshift(this.customColumnDefs.radio),this.setHeaderConfigForDefaultFields("radio","0"))}},_prepareHeaderData:function(){this.preparedHeaderData=[],$.extend(this.preparedHeaderData,this.options.colDefs),this.setDefaultColsData(!0)},_generateCustomColDefs:function(){var t=[],e={};function n(n){if(!e[n]){var r={type:"string",field:n};t.push(r),e[n]=!0}}this.options.data.forEach((function(t){_.keys(t).forEach(n)})),this.options.colDefs=t,this._prepareHeaderData()},_prepareData:function(){var t=[],e=this.options.colDefs,n=this,r=n.getPageStartIndex(),i=this.Utils.isObject,o=this.Utils.isDefined;!this.options.colDefs.length&&this.options.data.length&&this._generateCustomColDefs(),(this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(r):this.options.data).forEach((function(a,s){var u=$.extend(!0,{},a);e.forEach((function(t){if(t.field){var e,n,r,s=t.field.split("."),l=a,c=s.length;for(e=0;e<c;e++)if(r=void 0,-1!==(n=s[e]).indexOf("[0]")&&(n=n.replace("[0]",""),r=!0),i(l)&&!r)l=_.get(l,n);else{if(!r){l=void 0;break}l=_.get(l,n+"[0]")}o(l)?u[t.field]=l:s.length>1&&_.has(a,t.field)&&(u[t.field]=a[t.field])}})),u.$$index=r+s+1,u.$$pk=n.options.isNavTypeScrollOrOndemand()?r+s:s,t.push(u)})),n.options.isNavTypeScrollOrOndemand()?n.options.isSearchTrigerred&&!n.emptySearch||n.options.isDatasetUpdated?n.preparedData=t:n.preparedData.length?t.forEach((function(t,e){var i=r+e;n.preparedData[i]&&t.$$index===n.preparedData[i].$$index?n.preparedData[i]=t:n.preparedData.push(t)})):n.preparedData.push(...t):n.preparedData=t},_reselectColumns:function(){var t=[],e=this;this.gridHeaderElement&&this.options.enableColumnSelection&&(t=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn)).length&&t.each((function(){e.columnSelectionHandler(void 0,$(this))})),this.options.multiselect&&this.updateSelectAllCheckboxState()},_create:function(){$.extend(this,{dataStatus:{message:"",state:"ready"},preparedData:[],preparedHeaderData:[],dataStatusContainer:null,gridContainer:null,gridElement:null,gridHeader:null,gridBody:null,gridFooter:null,gridSearch:null,tableId:null,searchObj:{field:"",value:"",event:null},compiledCellTemplates:{}}),this._setStatus=_.debounce((function(t){this.__setStatus(t)}),100),this._debounceOnEnter=_.debounce((function(t,e,n,r){this._onEnter(t,e,n,r)}),150),this.options.summaryRow=!1,this.options.summaryRowDefs=[],this._prepareHeaderData(),this._prepareData(),this._render(!0)},_setGridEditMode:function(t){$.isFunction(this.options.setGridEditMode)&&this.options.setGridEditMode(t)},_refreshGrid:function(){this._prepareHeaderData(),this._prepareData(),this._render(),this.addOrRemoveScroll(),this._setGridEditMode(!1)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout),this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var t=this.gridElement.find("> tr.app-datagrid-row.always-new-row");t.length&&t.remove(),this._renderGrid(void 0)},refreshGridData:function(){this._prepareData(),this.options.isNavTypeScrollOrOndemand()?this.callRenderGridForInfiniteScroll():(this.gridFooter.remove(),this._renderGrid()),this._reselectColumns(),this.addOrRemoveScroll(),this._setGridEditMode(!1),this.toggleNewRowActions(!1)},setDefaultRowData:function(t){_.forEach(this.preparedHeaderData,(function(e){t[e.field]=e.defaultvalue}))},addNewRow:function(t,e){var n,r,i,o=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,a=this,s={};if(!e&&$.isFunction(this.options.beforeRowInsert)&&this.options.beforeRowInsert(),(i=(r=this.gridElement).find("> tr.app-datagrid-row.always-new-row")).length){if(this.setFocusOnElement(void 0,i),this.options.editmode===this.CONSTANTS.QUICK_EDIT){var u=i.find("input").length>0?$(i.find("input")[0]):null;if(null!==u){var l=$.Event("keydown");l.which=13,u.trigger(l)}}}else s.$index=o,s.$$pk=o,this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG&&(n=$(this._getRowTemplate(s,s.$index)),this.preparedData.length||this.setStatus("ready",this.dataStatus.ready),"top"===this.options.formPosition?r.prepend(n):r.append(n),this._appendRowActions(n,!0,s),this.attachEventHandlers(n),(e||this.options.editmode!==this.CONSTANTS.QUICK_EDIT)&&(n.find(".delete-row-button").hide(),e&&n.find(".edit-row-button").hide()),this._findAndReplaceCompiledTemplates(),e?(this.setDefaultRowData(s),n.addClass("always-new-row").addClass("row-editing"),this.options.runInNgZone((function(){a.makeRowEditable(n,s,!0)}))):n.trigger("click",[void 0,{action:"edit",operation:"new",skipFocus:t}]),this.updateSelectAllCheckboxState(),this.addOrRemoveScroll(),this.options.timeoutCall((function(){a.setColGroupWidths()}),100))},addLoadMoreBtn:function(t,e,n,r){var i;if(!this.options.isLastPage||r){var o=this,a=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');(i=a.find("a")).append(t),this.element.find(".app-grid-header-inner").append(a),r&&this.element.find(".on-demand-load-btn").length&&this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage),i.on("click",(function(t){var a=o.options.getCurrentPage()==o.options.getPageCount();a||o.showLoadingIndicator(e,!1),o.options.showviewlessbutton||i.hide(),r&&a&&o.element.find(".on-demand-datagrid").remove(),a&&o.options.showviewlessbutton&&(i.hide(),o.renderTableOnViewLess=!0,o.renderPaginationOnViewLess=!0,o.options.enableNavigation(),o._renderGrid()),n&&"function"==typeof n&&n(t)}))}},showLoadingIndicator:function(t,e){var n=this.element.find(".loading-data-msg"),r=this.element.find(".on-demand-datagrid");if(n.length&&!e)n.show();else if(e&&r.length)r.show();else{var i=$('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin '+this.options.loadingicon+'"></i><span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');if(i.find(".loading-text").html(t),r.length)r.append(i);else{var o=$('<div class="on-demand-datagrid">'+i[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(o)}}},hideLoadingIndicator:function(t,e){t||e?this.options.getCurrentPage()==this.options.getPageCount()&&this.options.showviewlessbutton?(this.element.find(".on-demand-load-btn").show().text(this.options.viewlessmessage),this.element.find(".loading-data-msg").hide(),e&&(this.element.find(".on-demand-load-btn").length||this.options.addLoadMoreBtn(),this.element.find(".loading-data-msg").hide())):this.element.find(".on-demand-datagrid").hide():(this.element.find(".loading-data-msg").hide(),this.element.find(".on-demand-load-btn").text(this.options.ondemandmessage),this.element.find(".on-demand-load-btn").show())},getSelectedRows:function(){this.getSelectedColumns();var t=[],e=this;return this.preparedData.forEach((function(n,r){n._selected&&t.push(e.options.data[r])})),t},selectRows:function(t){var e=this;e.gridElement.find("tr.app-datagrid-row").each((function(t){e.preparedData[t]&&!0===e.preparedData[t]._selected&&$(this).trigger("click",[$(this),{skipSingleCheck:!0}])})),_.isArray(t)?_.forEach(t,(function(t){e.selectRow(t,!0)})):e.selectRow(t,!0)},toggleRowFilter:function(t){this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch&&(t?this.gridSearch.show():this.gridSearch.hide())},setColGroupWidths:function(){var t=this,e=(this.options.isMobile,this.tableContainer.find("col")),n=this.tableContainer.find("col"),r=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),i=this.preparedHeaderData.length,o=this.gridElement.parent().prop("scrollLeft");if(e.length||r.length){this._setColSpan(this.options.headerConfig),this.toggleRowFilter();var a=0,s=e.length;e.each((function(){var t=$(this).width();t&&(a+=t,s-=1)})),r.each((function(){var r,i,o=Number($(this).attr("data-col-id")),a=t.preparedHeaderData[o],s=t.gridContainer.find('th[data-col-id="'+o+'"]'),u=t.gridElement.find('td.app-datagrid-cell[data-col-id="'+o+'"]'),l=t.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+o+'"]'),c=$(e[o]),p=$(n[o]);a&&(r=a.width,_.isUndefined(a.show)||a.show?(s.show(),u.show(),c.show(),p.show(),l.show()):(s.hide(),u.hide(),c.hide(),p.hide(),l.hide()),c.length&&"90px"===c[0].style.width&&(i=_.isUndefined(r)?"":r,c.css("width",i),p.css("width",i)))})),r.each((function(){var r,o,u,l,c=$(this),p=Number(c.attr("data-col-id")),d=t.preparedHeaderData[p];if(d){if(r=d.width,_.isUndefined(d.show)||d.show)if(c.hasClass("grid-col-small"))o=50;else if(_.isUndefined(r)||""===r||_.includes(r,"%")){if((l=$(e[p])).length)if(""===(u=l[0].style.width)||"0px"===u||"90px"===u||_.includes(u,"%"))if((o=c.width())<=0){for(var h=c,f=o,v=0;f<=0;)f=(h=h.parent()).width(),h.find("table").length&&(v=v+parseFloat(h.css("padding-left"))+parseFloat(h.css("padding-right")));if(f>0)if(v&&(f-=v),_.includes(u,"%"))o=f*(parseInt(u)/100);else o=(o=(a&&a>0?f-a:f)/(s||e.length))>90?i===p+1?o-17:o:90;else o=o>90?i===p+1?o-17:o:90}else o=o>90?i===p+1?o-17:o:90;else o=u}else o=r;else o=0;$(e[p]).css("width",o),$(n[p]).css("width",o)}})),this.toggleRowFilter(!0),this.gridElement.parent().prop("scrollLeft",o),this.gridHeaderElement.parent().prop("scrollLeft",o)}},getSelectedColumns:function(){var t,e,n,r={},i=[],o=this;return $.extend(i,this.preparedHeaderData),this.options.multiselect?(i.some((function(e,n){if("checkbox"===e.field)return t=n,!0})),i.splice(t,1)):this.options.showRadioColumn&&(i.some((function(t,n){if("radio"===t.field)return e=n,!0})),i.splice(e,1)),this.options.showRowIndex&&(i.some((function(t,e){if("rowIndex"===t.field)return n=e,!0})),i.splice(n,1)),i.forEach((function(t){var e=t.field;t.selected&&(r[e]={colDef:t,colData:o.options.data.map((function(t){return t[e]}))})})),r},_setOption:function(t,e){switch(this._super(t,e),t){case"showHeader":this._toggleHeader(),this._toggleSearch(),this.setColGroupWidths(),this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":this.gridSearch&&(this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",e),this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",e));break;case"selectFirstRow":this.selectFirstRow(e);break;case"data":this.isResetSortIconsDone||this.setSortIconDefault(),this.refreshGridData();break;case"dataStates":"nodata"===this.dataStatus.state?this.setStatus("nodata",this.dataStatus.nodata):"loading"===this.dataStatus.state&&this.setStatus("loading");break;case"loadingicon":this.dataStatusContainer.find("i").removeClass().addClass(this.options.loadingicon);break;case"colDefs":if(this.options.isNavTypeScrollOrOndemand()&&this.options.isNextPageData){this.tableContainer.find("colgroup").remove(),this._prepareHeaderData(),this.setColGroupWidths(),this._renderHeader(),this._renderSearch(),this.attachEventHandlers(this.gridElement),this._reselectColumns(),this.addOrRemoveScroll();break}case"multiselect":case"showRadioColumn":case"rowActions":case"filterNullRecords":case"showRowIndex":this.refreshGrid();break;case"cssClassNames":var n=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;this.options.rowExpansionEnabled&&(n=n+" "+this.options.cssClassNames.gridRowExpansionClass),this.tableContainer.attr("class",n),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed");break;case"spacing":this._toggleSpacingClasses(e);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(e&&e.selectField)}},getOptions:function(){return this.options},_toggleHeader:function(){this.gridHeaderElement&&this.gridHeaderElement.empty(),this.tableContainer&&(this.tableContainer.find("colgroup").remove(),this.tableContainer.find("thead").remove()),this.setDefaultColsData(),this.options.showHeader&&this._renderHeader()},_toggleSearch:function(){this.gridSearch&&this.gridSearch.remove(),this.options.filtermode===this.CONSTANTS.SEARCH?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&(this._renderRowFilter(),this.setColGroupWidths())},selectFirstRow:function(t,e){var n,r;e&&this.gridElement.find("tr").is(":visible")?(this.__setStatus(),n=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()):n=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first(),r=n.attr("data-row-id"),n.length&&this.preparedData.length&&(this.preparedData[r]._selected=!t,n[0].click())},selectRow:function(t,e){var n,r,i=_.isNumber(t)?t:this.Utils.getObjectIndex(this.options.data,t);-1!==i&&(n="tr.app-datagrid-row[data-row-id="+i+"]",(r=this.gridElement.find(n)).length&&(this.preparedData[i]._selected=!e),e?r.trigger("click"):(this.toggleRowSelection(r,e),this.options.callOnRowDeselectEvent(this.preparedData[i])))},deselectRow:function(t){this.selectRow(t,!1)},toggleRowSelection:function(t,e,n,r){if(t.length){var i=t.attr("data-row-id");this.preparedData[i]&&(this.preparedData[i]._selected=e,e?t.addClass("active"):t.removeClass("active"),this.options.showRadioColumn&&(t.find("td input[rowSelectInput]:radio:not(:disabled)").prop("checked",e),this.preparedData[i]._checked=e),this.options.multiselect?(t.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)').prop("checked",e),this.preparedData[i]._checked=e,r||this.updateSelectAllCheckboxState()):this._deselectPreviousSelection(t,n))}},updateSelectAllCheckboxState:function(){if(this.options.showHeader&&this.options.multiselect){this.__setStatus();var t=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),e=this.gridElement,n=e.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,r=e.find("tr.app-datagrid-row:visible").length;r&&n===r?t.prop("checked",!0):t.prop("checked",!1)}},rowClickHandlerOnCapture:function(t,e,n){e=e||$(t.target).closest("tr.app-datagrid-row");var r=this.gridElement.find(e);if(r.length&&r.closest("tbody").attr("id")===this.gridElement.attr("id")){var i=e.attr("data-row-id"),o=(this.preparedData[i],this.options.data[i]);this.options.assignSelectedItems(o,t)}},rowSelectionHandler:function(t,e,n){var r,i,o,a,s=this,u=(n=n||{}).action,l=$(t.target),c=this.options.editmode===this.CONSTANTS.QUICK_EDIT;function p(){a&&$.isFunction(s.options.onRowSelect)&&s.options.onRowSelect(o,t),!a&&$.isFunction(s.options.onRowDeselect)&&s.options.onRowDeselect(o,t)}e=e||l.closest("tr.app-datagrid-row"),(u||c&&(l.hasClass("app-datagrid-cell")||l.closest("td.app-datagrid-cell").length)&&!e.hasClass("always-new-row"))&&(n.action=n.action||"edit",("new"===n.operation||s.options.actionsEnabled.edit)&&s.toggleEditRow(t,n),n.skipSelect)||(r=e.attr("data-row-id"),i=this.preparedData[r],o=this.options.data[r],a=i&&i._selected||!1,n.skipSingleCheck||(!e.hasClass("active")||this.options.multiselect)&&i?(this.options.callOnRowClickEvent(o,t),a=!a,this.toggleRowSelection(e,a,t),p()):c||"new"===n.operation||p())},rowDblClickHandler:function(t,e){t.stopPropagation();var n,r=(e=e||$(t.target).closest("tr.app-datagrid-row")).attr("data-row-id");(n=this.preparedData[r])&&$.isFunction(this.options.onRowDblClick)&&this.options.onRowDblClick(n,t)},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(t){var e=$(t.target).closest("th.app-datagrid-header-cell").attr("data-col-id");this.closePopover(),this.options.onHeaderClick(this.preparedHeaderData[e],t)},columnSelectionHandler:function(t,e){t&&t.stopImmediatePropagation();var n=t?$(t.target).closest("th.app-datagrid-header-cell"):e,r=n.attr("data-col-id"),i=this.preparedHeaderData[r],o=i.field,a='td[data-col-id="'+r+'"]',s=this.gridElement.find(a),u=s.data("selected")||!1,l={colDef:i,data:this.options.data.map((function(t){return t[o]})),sortDirection:this._getColumnSortDirection(i.field)},c=this.options.cssClassNames.selectedColumn;u=!u,i.selected=u,s.data("selected",u),u?(s.addClass(c),n.addClass(c),$.isFunction(this.options.onColumnSelect)&&t&&this.options.onColumnSelect(l,t)):(s.removeClass(c),n.removeClass(c),$.isFunction(this.options.onColumnDeselect)&&t&&this.options.onColumnDeselect(l,t))},getTextValue:function(t,e){return this.options.getFieldValue(e?t+"_new":t)},getUploadedFiles:function(t,e){return _.get(document.forms,[t.find("form").attr("name"),e,"files",0])},isDataModified:function(t,e,n){var r=!1,i=this;function o(t){return t?moment(t).valueOf():t}return t.each((function(){var t=$(this),a=t.attr("data-col-id"),s=i.preparedHeaderData[a],u=i.getTextValue(s.field,n),l=_.get(e,s.field);if(r="upload"===s.editWidgetType?i.getUploadedFiles(t,s.field)instanceof File:!(!i.Utils.isDefined(u)&&null==l)&&("datetime"===s.editWidgetType?!(o(l)===o(u)):!(l==u)))return!r})),r},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var t=this.gridElement.find("tr.always-new-row"),e=t&&t.find("input")||[];e.length&&e[0].focus()},disableActions:function(t){var e=this.gridElement.find(".delete-row-button"),n=this.gridElement.find(".edit-row-button");t?(n.addClass("disabled-action"),e.addClass("disabled-action")):(n.removeClass("disabled-action"),e.removeClass("disabled-action"))},setFocusOnElement:function(t,e,n){var r,i,o=t&&$(t.target);o&&o.hasClass("app-datagrid-cell")?r=o.find("input"):(e?e.hasClass("app-datagrid-row")&&(e=e.find("td.cell-editing")):e=o.closest("tr.app-datagrid-row").find("td.cell-editing"),(r=$(e).first().find("input")).length||(r=$(e).first().find("textarea")),r.length||(r=$(e).first().find("select"))),r.length&&(i=r.first(),n?(i.focus(),i.select()):this.options.timeoutCall((function(){i.focus(),i.select()})))},removeNewRow:function(t){this.disableActions(!1),this._setGridEditMode(!1),t.hasClass("always-new-row")||(t.attr("data-removed",!0),t.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),this.addOrRemoveScroll(),this.toggleNewRowActions(!1))},saveRow:function(t){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[void 0,{action:"save",skipSelect:!0,noMsg:!0,success:t}])}))},makeRowEditable:function(t,e,n){var r,i=this,o=t.find("td.app-datagrid-cell"),a=parseInt(t.attr("data-row-id"),10),s=_.clone(e);s.$index=a+1,this.options.removeValidations(n),this.options.generateInlineEditRow(s,n),o.each((function(){var t,r,o=$(this),s=o.text(),u=o.attr("data-col-id"),l=i.preparedHeaderData[u];l.readonly||(t=_.get(e,l.field),r=i.options.getInlineEditWidget(l.field,t,n),l.customExpression||l.formatpattern&&"None"!==l.formatpattern?(o.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:a,fieldName:l.field}),o.addClass("cell-editing editable-expression").html(r).data("originalText",s)):o.addClass("cell-editing").html(r).data("originalText",s),o.addClass("form-group"),"rowOperations"!==l.binding?i.options.timeoutCall((function(){i.options.applyValidations(l,n),l.required&&o.addClass("required-field")})):l.required&&o.addClass("required-field"))})),(r=t.find("td.cell-editing")).on("click",(function(t){t.stopPropagation()})),r.on("keydown",(function(t){38!==t.which&&40!==t.which||!t.currentTarget||t.currentTarget.closest(".always-new-row")||t.stopPropagation()}))},toggleNewRowActions:function(t){var e=this,n=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),r=this.gridElement.find("tr.app-datagrid-row.row-editing"),i=n.find("i.wi-plus").closest(".app-button");this.options.editmode!==this.CONSTANTS.INLINE||0!==this.options.rowActions.length&&_.some(this.options.rowActions,{action:"editRow($event)"})||(t?(n.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel"><i aria-hidden="true" class="app-icon wi wi-cancel"></i><span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span></button><button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save"><i aria-hidden="true" class="app-icon wi wi-done"></i><span class="sr-only">Save Icon</span><span class="btn-caption">Save</span></button>'),n.find(".cancelNewRow").on("click",(function(t){e.toggleEditRow(t,{action:"cancel",$row:r})})),n.find(".saveNewRow").on("click",(function(t){e.toggleEditRow(t,{action:"save",$row:r})})),i.hide()):($("typeahead-container").removeClass("open"),n.find(".cancelNewRow").remove(),n.find(".saveNewRow").remove(),i.show()))},_isNewRow:function(t){return parseInt(t.attr("data-row-id"),10)>=this.preparedData.length||t.hasClass("always-new-row")},toggleEditRow:function(t,e){e=e||{},t&&t.stopPropagation(),this.closePopover();var n,r,i,o,a=e.$row||$(t.target).closest("tr.app-datagrid-row"),s=a.find(".edit-row-button"),u=a.find(".cancel-edit-row-button"),l=a.find(".save-edit-row-button"),c=a.find(".delete-row-button"),p=_.cloneDeep(this.options.data[a.attr("data-row-id")])||{},d=this,h=a.hasClass("always-new-row"),f=d.options.editmode===d.CONSTANTS.QUICK_EDIT,v={};function m(t,n){$.isFunction(e.success)&&e.success(t,n),f&&!d.options.actionsEnabled.edit||d.focusActiveRow()}if(this.options.setActionRowIndex(a.attr("data-row-id")),this.options.setLastActionPerformed(this.options.ACTIONS.EDIT),"true"!==a.attr("data-removed")){if(e.selectRow&&this.selectRow(p,!0),(t=t||{}).data=t.data||{},"edit"===(n=t.data.action||e.action)){if(this.options.editmode===this.CONSTANTS.INLINE&&this.options.callLoadInlineWidgetData(),f&&d.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length)return void d.saveRow((function(e,n){d.editSuccessHandler(e,n,t,a,!0)}));if(a.addClass("row-editing"),$.isFunction(this.options.beforeRowUpdate)&&this.options.beforeRowUpdate(p,t),d.options.editmode===d.CONSTANTS.FORM||d.options.editmode===d.CONSTANTS.DIALOG)return;if("new"===e.operation&&(d.setDefaultRowData(p),d.toggleNewRowActions(!0)),$.isFunction(this.options.onBeforeFormRender)&&!1===this.options.onBeforeFormRender(p,t,e.operation||n))return;this._setGridEditMode(!0),this.disableActions(!0),c.removeClass("disabled-action"),this.options.runInNgZone((function(){d.makeRowEditable(a,p)})),s.addClass("hidden"),u.removeClass("hidden"),l.removeClass("hidden"),i=a.find("td.cell-editing"),!e.skipFocus&&i&&this.options.timeoutCall((function(){d.setFocusOnElement(t,i)})),$.isFunction(this.options.onFormRender)&&this.options.onFormRender(a,t,e.operation||n,a.hasClass("always-new-row"))}else if(i=a.find("td.cell-editing"),r=d._isNewRow(a),"save"===n)if(!!r||this.isDataModified(i,p,h)){if(i.each((function(){var t,e=$(this),n=e.attr("data-col-id"),i=d.preparedHeaderData[n],o=_.split(i.field,".");t=d.getTextValue(i.field,h),1===o.length&&"upload"===i.editWidgetType?_.set(p,i.field,d.getUploadedFiles(e,i.field)):(t=1!==o.length&&!r||""!==t?t:void 0,d.Utils.isDefined(t)?null===(t="null"===t?null:t)?o.length>1?_.set(p,o[0],t):r||_.set(p,i.field,""):_.set(p,i.field,t):1!==o.length||r||_.set(p,i.field,t))})),i.find(".ng-pending").length>0)return void setTimeout(this.toggleEditRow.bind(this,t,e),200);if((o=i.find(".ng-invalid")).length>0)return o.each((function(t){var e=$(this).closest("td.app-datagrid-cell");0===t&&e.find("[focus-target]").focus(),d.options.setTouched(e.find("[formcontrolname]").attr("formcontrolname"))})),void($.isFunction(e.success)&&e.success(!1,!0));if(r&&f&&_.isEmpty(p))return d.removeNewRow(a),void($.isFunction(e.success)&&e.success(!1,void 0,!0));if(r){if($.isFunction(this.options.onBeforeRowInsert)&&!1===this.options.onBeforeRowInsert(p,t,v))return;this.options.onRowInsert(p,t,m,v),d.toggleNewRowActions(!1),!a.hasClass("always-new-row")&&d.options.isNavTypeScrollOrOndemand()&&d.removeNewRow(a)}else{if($.isFunction(this.options.onBeforeRowUpdate)&&!1===this.options.onBeforeRowUpdate(p,t,v))return;this.options.afterRowUpdate(p,t,m,v)}}else this.cancelEdit(a),e.noMsg||this.options.noChangesDetected(),$.isFunction(e.success)&&e.success(!1);else{if(r)return void d.removeNewRow(a);this.cancelEdit(a)}this.addOrRemoveScroll()}},cancelEdit:function(t){var e=this,n=t.find("td.cell-editing"),r=t.find(".cancel-edit-row-button"),i=t.find(".save-edit-row-button"),o=t.find(".edit-row-button");this.options.clearActionRowIndex(),this.disableActions(!1),t.removeClass("row-editing"),n.off("click"),n.each((function(){var t=$(this),n=t.data("originalValue");t.removeClass("datetime-wrapper cell-editing required-field form-group"),n?t.html(e.options.getCustomExpression(n.fieldName,n.rowIndex)):t.text(t.data("originalText")||"")})),$("typeahead-container").removeClass("open"),o.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this._setGridEditMode(!1)},closeEditedRow:function(){var t=this.gridElement.find("tr.app-datagrid-row.row-editing");t.length&&(this._isNewRow(t)?this.removeNewRow(t):this.cancelEdit(t))},hideRowEditMode:function(t){if(t.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand())this.resetNewRow(t);else{var e=t.find("td.cell-editing"),n=t.find(".edit-row-button"),r=t.find(".cancel-edit-row-button"),i=t.find(".save-edit-row-button"),o=this;t.removeClass("row-editing"),e.off("click"),this.disableActions(!1),this._setGridEditMode(!1),e.each((function(){var t,e,n=$(this),r=n.data("originalValue");n.removeClass("datetime-wrapper cell-editing required-field form-group"),r?n.html(o.options.getCustomExpression(r.fieldName,r.rowIndex)):(e=o.preparedHeaderData[n.attr("data-col-id")],t=o.getTextValue(e.field),n.text(o.Utils.isDefined(t)?t:""))})),n.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this.addOrRemoveScroll()}},deleteRow:function(t){t.stopPropagation();var e,n,r=$(t.target).closest("tr.app-datagrid-row"),i=r.attr("data-row-id"),o=this.options.data[i],a=this._isNewRow(r),s={},u=this;if(this.options.setActionRowIndex(i),this.options.setLastActionPerformed(this.options.ACTIONS.DELETE),$.isFunction(this.options.beforeRowDelete)&&this.options.beforeRowDelete(o,t),a)return this.disableActions(!1),this._setGridEditMode(!1),r.attr("data-removed",!0),r.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),void this.addOrRemoveScroll();$.isFunction(this.options.onBeforeRowDelete)&&!1===this.options.onBeforeRowDelete(o,t,s)||$.isFunction(this.options.onRowDelete)&&(e=this.options.cssClassNames.deleteRow,(n=-1!==r.attr("class").indexOf("active"))&&r.removeClass("active"),r.addClass(e),this.options.onRowDelete(o,(function(){n&&r.addClass("active"),r.removeClass(e),u.addOrRemoveScroll()}),t,(function(e,n){if(u.options.isNavTypeScrollOrOndemand()){var r=+$(t.target).closest("tr.app-datagrid-row").attr("data-row-id"),i=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+r+'"]');u.options.setDeletedRowIndex(r),u.preparedData.splice(r,1),u.options.data.splice(r,1),u.gridElement.find("tr.app-datagrid-row:gt("+r+")").each((function(t,e){i.is(":last-child")||$(e).hasClass("always-new-row")||($(e).attr("data-row-id",r),u.preparedData[r].$$pk--,u.preparedData[r].$$index--,u.preparedData[r].$index--,r++)})),i.remove()}var o,a;u.options.editmode===u.CONSTANTS.QUICK_EDIT&&($(t.target).hasClass("delete-row-button")||u.Utils.isDeleteKey(t))&&(u.__setStatus(),n||(o=+$(t.target).closest("tr.app-datagrid-row").attr("data-row-id"),(a=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+o+'"]')).length||(a=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+(o-1)+'"]')),a.trigger("click",[void 0,{action:"edit",skipFocus:e}])))}),s))},deleteRowAndUpdateSelectAll:function(t){this.deleteRow(t),this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function(t,e){var n=this.gridElement.find("tr.app-datagrid-row.active"),r=t.attr("data-row-id"),i=this;n.each((function(){var t=$(this).attr("data-row-id"),n=i.preparedData[t];t!==r&&n&&($(this).find("input[rowSelectInput]:radio").prop("checked",!1),n._selected=n._checked=!1,$(this).removeClass("active"),i.options.callOnRowDeselectEvent(n,e))}))},resetSortIcons:function(t){var e;this.isResetSortIconsDone=!0,!t&&this.gridHeaderElement&&(t=(e=this.gridHeaderElement.find(".sort-buttons-container.active")).find("i.sort-icon"),e.removeClass("active")),t.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const t=this.options.sortInfo,e=this.tableContainer.find("[data-col-field='"+t.field+"']").find(".sort-buttons-container"),n=e.find("i.sort-icon"),r=t.direction;"asc"===r?(n.addClass(r+" "+this.options.cssClassNames.ascIcon),e.addClass("active")):"desc"===r&&(n.addClass(r+" "+this.options.cssClassNames.descIcon),e.addClass("active"))},sortHandler:function(t){t.stopImmediatePropagation(),$(t.target).hasClass("header-data")&&this.options.enableColumnSelection&&this.headerClickHandler(t);var e,n,r,i=$(t.target).closest("th.app-datagrid-header-cell"),o=i.attr("data-col-id"),a=i.find(".sort-buttons-container"),s=a.find("i.sort-icon"),u=s.hasClass("asc")?"desc":"asc",l=this.options.sortInfo,c=this.gridHeaderElement.find(".sort-buttons-container.active"),p=i.attr("data-col-field");this.resetSortIcons(s),s.addClass(u),"asc"===u?(s.addClass(this.options.cssClassNames.ascIcon),a.addClass("active")):"desc"===u&&(s.addClass(this.options.cssClassNames.descIcon),a.addClass("active")),c.length&&(n=c.closest("th.app-datagrid-header-cell").attr("data-col-id"),r=this.preparedHeaderData[n],e=c.find("i.sort-icon"),r.field!==p&&(c.removeClass("active"),this.resetSortIcons(e)),r.sortInfo={sorted:!1,direction:""}),l.direction=u,l.field=p,""!==u&&(this.preparedHeaderData[o].sortInfo={sorted:!0,direction:u}),this._setGridEditMode(!1),this.closeEditedRow(),this.options.sortHandler.call(this,this.options.sortInfo,t,"sort")},processUpDownKeys:function(t,e,n){var r=this,i=e.find("input").val();e.hasClass("row-editing")&&r.options.editmode===r.CONSTANTS.QUICK_EDIT&&i?r.toggleEditRow(t,{action:"save",noMsg:!0,success:function(i,o){r.editSuccessHandler(i,o,t,e,!0,n)}}):(e="down"===n?e.next():e.prev(),this.options.rowExpansionEnabled&&!e.is(":visible")&&(e="down"===n?e.next():e.prev()),e.focus())},resetNewRow:function(t){var e={},n=this;this.options.clearForm(!0),n.setDefaultRowData(e),t.find("[data-field-name]").each((function(){var t=$(this),r=t.attr("data-field-name")+"_new";n.options.setFieldValue(r,e[t.attr("data-field-name")]||"")})),n.options.safeApply(),n.setFocusOnElement(void 0,t,!0)},_onEnter:function(t,e,n,r){var i=this;t.is("button")||(n&&t.hasClass("app-datagrid-row")&&!t.hasClass("row-editing")?e.trigger("click",[void 0,{action:"edit"}]):e.hasClass("row-editing")&&t.closest("[data-field-name]").length?(t.blur(),i.toggleEditRow(r,{action:"save",success:function(e,n){n?t.focus():(i.focusActiveRow(),i.focusNewRow())}})):(e.trigger("click"),n&&t.hasClass("always-new-row")&&t.hasClass("row-editing")&&i.focusNewRow()),t.is("button")||r.stopPropagation())},onKeyDown:function(t){var e,n=$(t.target),r=n.closest("tr.app-datagrid-row"),i=this.options.editmode===this.CONSTANTS.QUICK_EDIT;if(this.options.rowExpansionEnabled&&!r.length&&(r=n.closest("tr.app-datagrid-detail-row")),!this.Utils.isDeleteKey(t))return 27===t.which?((e=this._isNewRow(r))&&r.hasClass("always-new-row")?(n.blur(),this.resetNewRow(r)):r.trigger("click",[void 0,{action:"cancel"}]),void(e||r.focus())):13===t.which?(t.stopPropagation(),void this._debounceOnEnter(n,r,i,t)):void(38!==t.which?40===t.which&&this.processUpDownKeys(t,r,"down"):this.processUpDownKeys(t,r,"up"));!this.options.actionsEnabled.delete||n.is("input")||n.hasClass("form-control")||this.deleteRow(t)},editSuccessHandler:function(t,e,n,r,i,o){var a,s,u=this;if(u.__setStatus(),e)u.setFocusOnElement(n);else{if(a=+r.attr("data-row-id"),o)return a="down"===o?++a:--a,void((s=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+a+'"]')).length?s.focus():r.focus());i||_.isUndefined(i)||a++,(s=u.gridElement.find('tr.app-datagrid-row[data-row-id="'+a+'"]')).hasClass("always-new-row")?("top"!==u.options.formPosition||r.hasClass("always-new-row"))&&u.addNewRow(t):s.length?s.trigger("click",[void 0,{action:"edit",skipFocus:t,skipSelect:u.options.multiselect}]):u.options.actionsEnabled.new&&u.addNewRow(t)}},isLastColumn:function(t){var e,n=t.closest("td.app-datagrid-cell");return!!n.is(":last-child")||!!n.hasClass("cell-editing")&&(e=n.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])'),n.attr("data-col-id")===e.last().attr("data-col-id"))},attachEventHandlers:function(t){var e=this.gridHeaderElement,n=this;this.options.enableRowSelection&&(t[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this),!0),t.off(),t[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this),!0),t.on("click",this.rowSelectionHandler.bind(this)),t.on("dblclick",this.rowDblClickHandler.bind(this)),t.on("keydown",this.onKeyDown.bind(this))),e&&(this.options.enableColumnSelection?(e.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this)),e.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))):e.find("th[data-col-selectable]").off("click"),this.options.enableSort?this.options.enableColumnSelection?(e.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this)),e.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))):(e.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this)),e.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))):this.options.enableColumnSelection?e.find("th[data-col-sortable] .header-data").off("click"):e.find("th[data-col-sortable]").off("click")),this.options.rowActions.length&&(t.find(".cancel-edit-row-button").off("click"),t.find(".save-edit-row-button").off("click"),t.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this)),t.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))),n.options.editmode===n.CONSTANTS.QUICK_EDIT&&t.on("focusout","tr.app-datagrid-row",(function(t){var e=$(t.target),r=e.closest("tr.app-datagrid-row"),i=$(t.relatedTarget),o=n.isLastColumn(e,i),a=e.closest("span.actions-column").length>0,s=i.closest("span.actions-column").length>0,u=i.closest("div.app-datagrid-actions").length>0,l=i.closest("div.app-datagrid-actions").length>0;i.is("tr.app-datagrid-row")&&i.attr("data-row-id")===r.attr("data-row-id")||s||r.hasClass("danger")||l||a&&s||a&&null===t.relatedTarget||!i.closest(".app-grid").length||i.is('.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date')||""===i.attr("focus-target")||(u||a||!(!o||o&&null===t.relatedTarget||e.hasClass("file-upload")))&&n.options.timeoutCall((function(){n.toggleEditRow(t,{action:"save",noMsg:!0,success:function(e,i,o){o||n.editSuccessHandler(e,i,t,r)}})}))})),t.find('[data-identifier="rowExpansionButtons"]').off("click"),t.find('[data-identifier="rowExpansionButtons"]').on("click",(function(t){var e=$(t.target).closest("tr.app-datagrid-row");$(this).find(".app-button").attr("disabled")||n.toggleExpandRow(+e.attr("data-row-id"),void 0,t)}))},expandRow:function(t){this.toggleExpandRow(t,!0)},collapseRow:function(t){this.toggleExpandRow(t,!1)},_collapseRow:function(t,e,n,r,i){var o=this.gridElement,a=$(o.find('> tr.app-datagrid-row[data-row-id="'+n+'"]'));a.removeClass(this.options.cssClassNames.expandedRowClass),a.find("button, a").attr("aria-expanded","false").attr("aria-live","polite"),!1!==this.options.onBeforeRowCollapse(t,e,n)&&(i.length&&i.hasClass(this.options.cssClassNames.rowExpandIcon)&&i.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon),r.hide(),this.options.onRowCollapse(t,e))},toggleExpandRow:function(t,e,n){var r=this,i=r.gridElement,o=$(i.find('> tr.app-datagrid-row[data-row-id="'+t+'"]')),a=_.clone(r.options.data[t]),s=o.next("tr.app-datagrid-detail-row"),u=!s.is(":visible"),l=o.find('[data-identifier="rowExpansionButtons"] i.app-icon');a.$index=t+1,e&&!u||!1===e&&u||(u?(o.addClass(r.options.cssClassNames.expandedRowClass),o.find("button, a").attr("aria-expanded","true"),n&&r.preparedData[t]._selected&&n.stopPropagation(),r.options.rowDef.closeothers&&i.find("> tr.app-datagrid-detail-row:visible").each((function(){var t=$(this),e=t.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),i=+t.attr("data-row-id"),o=r.options.data[i];t.hide(),r._collapseRow(n,o,i,t,e)})),r.options.generateRowDetailView(n,a,t,s.find("td.app-datagrid-row-details-cell .details-section"),s.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){l.length&&l.hasClass(r.options.cssClassNames.rowCollapseIcon)&&l.removeClass(r.options.cssClassNames.rowCollapseIcon).addClass(r.options.cssClassNames.rowExpandIcon),s.show()}))):r._collapseRow(n,a,t,s,l))},_findAndReplaceCompiledTemplates:function(){if(this.gridElement){var t=this.gridElement.find("td[data-compiled-template]"),e=this;t.each((function(){var t=$(this),n=t.attr("data-compiled-template");t.replaceWith(e.compiledCellTemplates[n])}))}},_renderSearch:function(){var t,e=$(this._getSearchEl()),n=this;function r(t){t.stopPropagation();var r=e.find('[data-element="dgSearchText"]')[0].value,i=e.find('[data-element="dgFilterValue"]')[0].value,o=e.find("option:selected").attr("data-coldef-index"),a=n.options.colDefs[o],s=a&&a.type?a.type:"";n.searchObj={field:i,value:r,type:s,event:t},n.options.searchHandler.call(n,n.searchObj,t,"search")}this.element.find(".form-search").remove(),e.insertBefore(this.gridContainer),this.gridSearch=this.element.find(".form-search"),t=this.gridSearch.find('[data-element="dgSearchText"]'),this.gridSearch.find(".app-search-button").on("click",r),this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(t){n.dataStatusContainer.find(".status").text()===n.options.dataStates.nodata&&r(t)})),t.on("keyup",(function(t){t.stopPropagation(),$(this).val()?n.emptySearch=!1:(n.emptySearch=!0,n.searchObj.value&&(n.searchObj.value="",r(t))),13===t.which&&r(t)}))},_renderRowFilter:function(){var t=$('<tr class="filter-row"></tr>'),e=this,n=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;n.find(".filter-row").remove(),this.options.generateFilterRow(),this.preparedHeaderData.forEach((function(n,r){var i=n.field,o=$('<th data-col-id="'+r+'"></th>');n.searchable?(o.append(e.options.getFilterWidget(i)),t.append(o)):t.append(o)}),this),this.options.showHeader?this.gridHeaderElement.append(t):(this.options.isMobile,n.empty().append(t)),this.gridSearch=n.find(".filter-row")},_renderHeader:function(){var t,e=this._getHeaderTemplate(),n=e.colgroup,r=this;if(this.gridElement.parent().scroll((function(){r.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)})),!this.options.showHeader)return this.tableContainer.append(n),void this.gridHeaderElement.hide();this.gridHeaderElement.show();var i=(t=e.header).find("th.app-datagrid-header-cell"),o=n.find("col");i.each((function(){var t=Number($(this).attr("data-col-id")),e=r.preparedHeaderData[t],n=$(o[t]);e&&(_.isUndefined(e.show)||e.show||($(this).hide(),n.hide()))})),this.options.isMobile,this.tableContainer.append(n),t.on("click",".app-datagrid-header-cell input:checkbox",(function(t){var e=$('tr.app-datagrid-row:visible td input[name="gridMultiSelect"]:checkbox',r.gridElement),n=this.checked;e.prop("checked",n),e.each((function(){var e=$(this).closest("tr.app-datagrid-row"),i=e.attr("data-row-id"),o=r.options.data[i];r.options.assignSelectedItems(o,t),r.toggleRowSelection(e,n,t,!0),n&&$.isFunction(r.options.onRowSelect)&&r.options.onRowSelect(o,t),!n&&$.isFunction(r.options.onRowDeselect)&&r.options.onRowDeselect(o,t)}))})),$.isFunction(this.options.onHeaderClick)&&this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this)),!this.options.isMobile&&this.gridHeaderElement.length&&this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(t,e){var n,i,o,a,s=+e.helper.attr("data-col-id")+1,u=e.helper.width(),l=e.size.width;i=r.tableContainer.find("colgroup > col:nth-child("+s+")"),n=r.tableContainer.find("colgroup > col:nth-child("+s+")"),o=r.gridElement.find("tr.app-datagrid-row > td:nth-child("+s+") > div"),n.width(l),i.width(l),o.width(l),$(this).css("height","auto"),l>e.originalSize.width&&(a=r.gridHeaderElement.width()+l-u,r.gridHeaderElement.width(a),r.gridElement.width(a)),r.addOrRemoveScroll(),r.options.redrawWidgets()}}),this.isResetSortIconsDone||this.setSortIconDefault()},addOrRemoveScroll:function(){var t=this.gridContainer.find("tbody"),e=this.gridContainer.find(".table-header");t.scrollHeight>t.clientHeight&&!this.Utils.isMac()?e.addClass("scroll-visible"):e.removeClass("scroll-visible")},_handleCustomEvents:function(t,e){this.options.handleCustomEvents(t,e)},_setActionsEnabled:function(){var t=this;_.forEach(this.options.rowActions,(function(e){_.includes(e.action,"editRow(")?t.options.actionsEnabled.edit=!0:_.includes(e.action,"deleteRow(")&&(t.options.actionsEnabled.delete=!0)}))},_appendRowActions:function(t,e,n){var r,i=this._getRowActionsColumnDef();(this.options.rowActions.length||i)&&(this._setActionsEnabled(),r=this,t.find("[data-identifier='actionButtons']").each((function(t){var i,o,a,s=t;e?i=n:(o=$(this).closest("tr.app-datagrid-row"),a=parseInt(o.attr("data-row-id"),10),(i=_.clone(r.options.data[a])).$index=s+1),r.options.generateRowActions(i,s),$(this).empty().append(r.options.getRowAction(s))})))},_renderGrid:function(t){var e,n=this.options.isNavTypeScrollOrOndemand();this.getPageStartIndex();if($("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border"),n){var r=this.gridElement,i=this._getGridTemplate();e=$(i),i&&!r.length&&this.gridElement.append(e)}else{var o=this._getGridTemplate();e=$(o),o&&this.gridElement.append(e)}if(this.options.summaryRow){var a=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove(),this.options.data.length&&this.tableContainer.append(a)}this.options.data.length||"nodata"!==this.dataStatus.state?(this.dataStatus.state=this.dataStatus.state||"loading",this.dataStatus.message=this.dataStatus.message||this.options.dataStates.loading,this.setStatus(this.dataStatus.state,this.dataStatus.message,t)):this.setStatus("nodata"),this.gridBody=this.gridElement.find("tbody"),this.gridFooter=this.tableContainer.find("tfoot"),this._findAndReplaceCompiledTemplates(),this.options.clearRowActions(),this._appendRowExpansionButtons(e),this._appendRowActions(e),this.attachEventHandlers(e),this.__setStatus(t),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow&&this.addNewRow(!1,!0),t&&this._setColSpan(this.options.headerConfig),$.isFunction(this.options.onDataRender)&&this.options.onDataRender(),!t&&this.options.selectFirstRow&&(this.options.multiselect&&(this.options.selectFirstRow=!1),this.gridElement.find("tr.app-datagrid-row.active").length<=0&&this.selectFirstRow(!0,!0))},_render:function(t){this.tableId||(this.tableId=this.Utils.generateGuid());!this.options.isNavTypeScrollOrOndemand()||"100%"!==this.options.height&&this.options.height;var e='<div class="overlay"><div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div></div>',n='<div class="table-container table-responsive"><div class="app-grid-header"><div class="app-grid-header-inner"><table tabindex="0" class="'+this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid+'"><thead tabindex="0" class="table-header thead-sticky" id="table_header_'+this.tableId+'"></thead><tbody class="app-grid-content app-datagrid-body" id="table_'+this.tableId+'"></tbody></table></div></div></div>',r=$(e),i=this.element.find(".table-container");this.gridContainer=$(n),this.gridHeaderElement=this.gridContainer.find(".table-header"),this._setStyles(r.find("div.overlay"),"display:none"),this._setStyles(this.gridContainer.find("div.app-grid-header-inner"),"height:"+this.options.height+"; overflow: auto;"),this.tableContainer=this.gridContainer.find("table"),this.gridElement=this.gridContainer.find(".app-grid-content"),(!this.options.isNavTypeScrollOrOndemand()||i.length&&this.options.isNextPageData)&&this.options.isNavTypeScrollOrOndemand()||(this.element.find(".table-container").remove(),this.element.append(this.gridContainer)),this.options.setIsNextPageData(!1),this.gridContainer.find(".overlay").length||(this.dataStatusContainer=$(e),this.gridContainer.append(this.dataStatusContainer)),this.gridHeaderElement&&(this.gridHeaderElement.empty(),this.gridElement.find("colgroup").remove()),this._renderHeader(),this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this._renderRowFilter(),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed"),this._renderGrid(t),this.addNavigationControls()},addNavigationControls:function(){this.options.isdynamictable&&(this.element.find(".on-demand-datagrid").remove(),"On-Demand"!==this.options.navigation||this.element.find(".on-demand-datagrid").length?"Scroll"===this.options.navigation&&this.options.bindScrollEvt():this.options.addLoadMoreBtn())},__setStatus:function(t){var e=this.dataStatusContainer.find("i"),n=this.dataStatus.state,r=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message),"loading"===n?e.removeClass("hidden"):e.addClass("hidden"),"ready"===n?this.dataStatusContainer.hide():(this.options.isNavTypeScrollOrOndemand()&&("nodata"===n||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)&&this.element.find(".on-demand-datagrid a").hide(),this.dataStatusContainer.show()),"nodata"===n||"loading"===n||"error"===n?("100%"!==this.options.height&&"auto"!==this.options.height||("nodata"===n?(this.dataStatusContainer.css("height","auto"),this.dataStatus.contentHeight=0):this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1?this.dataStatusContainer.hide():(this.dataStatus.height=this.dataStatus.height||this.dataStatusContainer.outerHeight(),this.dataStatus.contentHeight=this.gridElement.outerHeight()||this.dataStatus.contentHeight,this.dataStatusContainer.css("height",this.dataStatus.height>this.dataStatus.contentHeight?"auto":this.dataStatus.contentHeight))),(!r||r&&1===this.options.getCurrentPage())&&this.gridContainer.addClass("show-msg")):(this.gridContainer.removeClass("show-msg"),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&(this.options.activeRow&&this.attachHandlersToActiveRow(this.options.activeRow),this.options.activeRow=void 0)),t||this.setColGroupWidths(),this.addOrRemoveScroll()},attachHandlersToActiveRow(t){var e=this.Utils.getObjectIndex(this.options.data,t),n=this.gridElement.find("tr.app-datagrid-row[data-row-id="+e+"]");n.length&&(n.hasClass("active")||n.addClass("active"),this.focusActiveRow(),this.attachEventHandlers(n))},setActiveRow(t){this.options.activeRow=t},setStatus:function(t,e,n){var r;"nodata"===t&&(t=(r=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row"))&&r.length?"ready":t),this.dataStatus.state=t,this.options.setGridState(t),this.dataStatus.message=e||this.options.dataStates[t],this._setStatusCalled?this._setStatus(n):(this.__setStatus(n),this._setStatusCalled=!0)},setGridDimensions:function(t,e){if(-1===e.indexOf("px")&&-1===e.indexOf("%")&&-1===e.indexOf("em")&&"auto"!=e&&(e+="px"),this.options[t]=e,"height"===t){this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(t,e),this.options.isNavTypeScrollOrOndemand()&&"100%"!=this.options.height&&"auto"!=this.options.height&&this.gridContainer.find(".app-grid-header-inner").css("overflow","auto"),this.dataStatusContainer.css(t,e)}this.addOrRemoveScroll()},setColumnProp:function(t,e,n,r){var i;"displayName"===e&&((i=r?this.gridHeaderElement.find('th[data-col-group="'+t+'"]'):this.gridHeaderElement.find('th[data-col-field="'+t+'"]')).attr("title",n),i.find(".header-data").html(n),this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch&&this.gridSearch.find('select option[value="'+t+'"]').text(n))},applyRowNgClass:function(t,e){var n=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+e+'"]');n.removeClass(t.toRemove),n.addClass(t.toAdd)},applyColNgClass:function(t,e,n){var r=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+e+'"] td.app-datagrid-cell[data-col-id="'+n+'"]');r.removeClass(t.toRemove),r.addClass(t.toAdd)},_destroy:function(){this.element.text(""),window.clearTimeout(this.refreshGridTimeout)}}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs")):"function"==typeof define&&define.amd?define(["exports","rxjs"],e):e((t.awesomeCordova=t.awesomeCordova||{},t.awesomeCordova.core={}),t.rxjs)}(this,(function(t,e){"use strict";var n={error:"cordova_not_available"},r={error:"plugin_not_installed"};function i(t){if("undefined"!=typeof window&&window.angular){var e=window.document,n=window.angular.element(e.querySelector("[ng-app]")||e.body).injector();if(n)return n.get("$q")((function(e,n){t(e,n)}));console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return function(){if(Promise)return new Promise((function(e,n){t(e,n)}));console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}()}function o(t,e,n,r){var o,a;void 0===r&&(r={});var s=i((function(i,s){o=r.destruct?d(t,e,n,r,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s(t)})):d(t,e,n,r,i,s),a=s}));return o&&o.error&&(s.catch((function(){})),"function"==typeof a&&a(o.error)),s}function a(t,e,n,r){return void 0===r&&(r={}),i((function(i,o){var a=d(t,e,n,r);a?a.error?o(a.error):a.then&&a.then(i).catch(o):o({error:"unexpected_error"})}))}function s(t,n,r,i){return void 0===i&&(i={}),new e.Observable((function(e){var o;return(o=i.destruct?d(t,n,r,i,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(t)}),(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.error(t)})):d(t,n,r,i,e.next.bind(e),e.error.bind(e)))&&o.error&&(e.error(o.error),e.complete()),function(){try{if(i.clearFunction)return i.clearWithArgs?d(t,i.clearFunction,r,i,e.next.bind(e),e.error.bind(e)):d(t,i.clearFunction,[])}catch(e){console.warn("Unable to clear the previous observable watch for",t.constructor.getPluginName(),n),console.warn(e)}}}))}function u(t,n){return n="undefined"!=typeof window&&n?v(window,n):n||("undefined"!=typeof window?window:{}),e.fromEvent(n,t)}function l(t,e,i){var o,a;"string"==typeof t?o=t:(o=t.constructor.getPluginRef(),i=t.constructor.getPluginName(),a=t.constructor.getPluginInstallName());var s=f(o);return!(!s||e&&void 0===s[e])||("undefined"!=typeof window&&window.cordova?(function(t,e,n){n?console.warn("Native: tried calling "+t+"."+n+", but the "+t+" plugin is not installed."):console.warn("Native: tried accessing the "+t+" plugin but it's not installed.");e&&console.warn("Install the "+t+" plugin: 'ionic cordova plugin add "+e+"'")}(i,a,e),r):(function(t,e){"undefined"==typeof process&&(e?console.warn("Native: tried calling "+t+"."+e+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator"):console.warn("Native: tried accessing the "+t+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator"))}(i,e),n))}function c(t,e){return t._objectInstance&&(!e||void 0!==t._objectInstance[e])}function p(t,e,n,r){if(void 0===e&&(e={}),e.sync)return t;if("reverse"===e.callbackOrder)t.unshift(r),t.unshift(n);else if("node"===e.callbackStyle)t.push((function(t,e){t?r(t):n(e)}));else if("object"===e.callbackStyle&&e.successName&&e.errorName){var i={};i[e.successName]=n,i[e.errorName]=r,t.push(i)}else if(void 0!==e.successIndex||void 0!==e.errorIndex){var o=function(){e.successIndex>t.length?t[e.successIndex]=n:t.splice(e.successIndex,0,n)},a=function(){e.errorIndex>t.length?t[e.errorIndex]=r:t.splice(e.errorIndex,0,r)};e.successIndex>e.errorIndex?(a(),o()):(o(),a())}else t.push(n),t.push(r);return t}function d(t,e,n,r,i,o){void 0===r&&(r={}),n=p(n,r,i,o);var a=l(t,e);if(!0===a){var s=f(t.constructor.getPluginRef());return s[e].apply(s,n)}return a}function h(t,e,n,r,i,o){if(void 0===r&&(r={}),n=p(n,r,i,o),c(t,e))return t._objectInstance[e].apply(t._objectInstance,n)}function f(t){return"undefined"!=typeof window?v(window,t):null}function v(t,e){for(var n=e.split("."),r=t,i=0;i<n.length;i++){if(!r)return null;r=r[n[i]]}return r}var m=function(t,e,n){return void 0===n&&(n={}),function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return n.sync?d(t,e,r,n):n.observable?s(t,e,r,n):n.eventObservable&&n.event?u(n.event,n.element):n.otherPromise?a(t,e,r,n):o(t,e,r,n)}};var g=function(){function t(){}return t.installed=function(){return!0===l(this.pluginRef)},t.getPlugin=function(){return"undefined"!=typeof window?function(t,e){for(var n=e.split("."),r=t,i=0;i<n.length;i++){if(!r)return null;r=r[n[i]]}return r}(window,this.pluginRef):null},t.getPluginName=function(){return this.pluginName},t.getPluginRef=function(){return this.pluginRef},t.getPluginInstallName=function(){return this.plugin},t.getSupportedPlatforms=function(){return this.platforms},t.pluginName="",t.pluginRef="",t.plugin="",t.repo="",t.platforms=[],t.install="",t}();!function(){if("undefined"==typeof process){var t="undefined"!=typeof window?window:{},e=Date.now(),n=!1;t.document.addEventListener("deviceready",(function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-e)+" ms"),n=!0})),setTimeout((function(){!n&&t.cordova&&console.warn("Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")}),5e3)}}(),window.rxjs._throw=window.rxjs.throwError,t.AwesomeCordovaNativePlugin=g,t.checkAvailability=l,t.instanceAvailability=c,t.wrap=m,t.getPromise=i,t.cordova=function(t,e,n,r){return m(t,e,n).apply(this,r)},t.cordovaFunctionOverride=function(t,n,r){return void 0===r&&(r=[]),function(t,n){return new e.Observable((function(e){var r=l(t,n);if(!0===r){var i=f(t.constructor.getPluginRef());return i[n]=e.next.bind(e),function(){return i[n]=function(){}}}e.error(r),e.complete()}))}(t,n)},t.cordovaInstance=function(t,n,r,o){return o=Array.from(o),function(t,n,r){return void 0===r&&(r={}),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(r.sync)return h(t,n,o,r);if(r.observable)return new e.Observable((function(e){var i;return(i=r.destruct?h(t,n,o,r,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(t)}),(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.error(t)})):h(t,n,o,r,e.next.bind(e),e.error.bind(e)))&&i.error&&e.error(i.error),function(){try{return r.clearWithArgs?h(t,r.clearFunction,o,r,e.next.bind(e),e.error.bind(e)):h(t,r.clearFunction,[])}catch(e){console.warn("Unable to clear the previous observable watch for",t.constructor.getPluginName(),n),console.warn(e)}}}));if(r.otherPromise)return i((function(e,i){var a;(a=r.destruct?h(t,n,o,r,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)})):h(t,n,o,r,e,i))&&a.then?a.then(e,i):i()}));var s,u,l=i((function(e,i){s=r.destruct?h(t,n,o,r,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(t)}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(t)})):h(t,n,o,r,e,i),u=i}));return s&&s.error&&(l.catch((function(){})),"function"==typeof u&&u(s.error)),l}}(t,n,r).apply(this,o)},t.cordovaPropertyGet=function(t,e){return!0===l(t,e)?f(t.constructor.getPluginRef())[e]:null},t.cordovaPropertySet=function(t,e,n){!0===l(t,e)&&(f(t.constructor.getPluginRef())[e]=n)},t.instancePropertyGet=function(t,e){return t._objectInstance&&t._objectInstance[e]?t._objectInstance[e]:null},t.instancePropertySet=function(t,e,n){t._objectInstance&&(t._objectInstance[e]=n)},Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@awesome-cordova-plugins/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@awesome-cordova-plugins/core","rxjs","rxjs/operators"],e):(t.awesomeCordova=t.awesomeCordova||{},t.awesomeCordova.plugins=e(t.tslib,t.ng.core,t.awesomeCordova.core,t.rxjs,t.operators))}(this,(function(t,e,n,r,i){"use strict";var o,a,s,u,l,c,p=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.getAppName=function(){return n.cordova(this,"getAppName",{},arguments)},i.prototype.getPackageName=function(){return n.cordova(this,"getPackageName",{},arguments)},i.prototype.getVersionCode=function(){return n.cordova(this,"getVersionCode",{},arguments)},i.prototype.getVersionNumber=function(){return n.cordova(this,"getVersionNumber",{},arguments)},i.pluginName="AppVersion",i.plugin="cordova-plugin-app-version",i.pluginRef="cordova.getAppVersion",i.repo="https://github.com/whiteoctober/cordova-plugin-app-version",i.platforms=["Android","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),d=Object.freeze({AppVersion:p}),h=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.Encode={TEXT_TYPE:"TEXT_TYPE",EMAIL_TYPE:"EMAIL_TYPE",PHONE_TYPE:"PHONE_TYPE",SMS_TYPE:"SMS_TYPE"},t}return t.__extends(i,r),i.prototype.scan=function(t){return n.cordova(this,"scan",{callbackOrder:"reverse"},arguments)},i.prototype.encode=function(t,e){return n.cordova(this,"encode",{},arguments)},i.pluginName="BarcodeScanner",i.plugin="phonegap-plugin-barcodescanner",i.pluginRef="cordova.plugins.barcodeScanner",i.repo="https://github.com/phonegap/phonegap-plugin-barcodescanner",i.platforms=["Android","BlackBerry 10","Browser","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),f=Object.freeze({BarcodeScanner:h}),v=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.hasReadWritePermission=function(){return n.cordova(this,"hasReadWritePermission",{},arguments)},i.prototype.hasReadPermission=function(){return n.cordova(this,"hasReadPermission",{},arguments)},i.prototype.hasWritePermission=function(){return n.cordova(this,"hasWritePermission",{},arguments)},i.prototype.requestWritePermission=function(){return n.cordova(this,"requestWritePermission",{},arguments)},i.prototype.requestReadPermission=function(){return n.cordova(this,"requestReadPermission",{},arguments)},i.prototype.requestReadWritePermission=function(){return n.cordova(this,"requestReadWritePermission",{},arguments)},i.prototype.createCalendar=function(t){return n.cordova(this,"createCalendar",{},arguments)},i.prototype.deleteCalendar=function(t){return n.cordova(this,"deleteCalendar",{},arguments)},i.prototype.getCalendarOptions=function(){return n.cordova(this,"getCalendarOptions",{sync:!0},arguments)},i.prototype.getCreateCalendarOptions=function(){return n.cordova(this,"getCreateCalendarOptions",{sync:!0},arguments)},i.prototype.createEvent=function(t,e,r,i,o){return n.cordova(this,"createEvent",{},arguments)},i.prototype.createEventWithOptions=function(t,e,r,i,o,a){return n.cordova(this,"createEventWithOptions",{},arguments)},i.prototype.createEventInteractively=function(t,e,r,i,o){return n.cordova(this,"createEventInteractively",{},arguments)},i.prototype.createEventInteractivelyWithOptions=function(t,e,r,i,o,a){return n.cordova(this,"createEventInteractivelyWithOptions",{},arguments)},i.prototype.findEvent=function(t,e,r,i,o){return n.cordova(this,"findEvent",{},arguments)},i.prototype.findEventWithOptions=function(t,e,r,i,o,a){return n.cordova(this,"findEventWithOptions",{},arguments)},i.prototype.listEventsInRange=function(t,e){return n.cordova(this,"listEventsInRange",{platforms:["Android"]},arguments)},i.prototype.listCalendars=function(){return n.cordova(this,"listCalendars",{},arguments)},i.prototype.findAllEventsInNamedCalendar=function(t){return n.cordova(this,"findAllEventsInNamedCalendar",{platforms:["iOS"]},arguments)},i.prototype.modifyEvent=function(t,e,r,i,o,a,s,u,l,c){return n.cordova(this,"modifyEvent",{platforms:["iOS"]},arguments)},i.prototype.modifyEventWithOptions=function(t,e,r,i,o,a,s,u,l,c,p,d){return n.cordova(this,"modifyEventWithOptions",{platforms:["iOS"]},arguments)},i.prototype.deleteEvent=function(t,e,r,i,o){return n.cordova(this,"deleteEvent",{},arguments)},i.prototype.deleteEventFromNamedCalendar=function(t,e,r,i,o,a){return n.cordova(this,"deleteEventFromNamedCalendar",{platforms:["iOS"]},arguments)},i.prototype.deleteEventById=function(t,e){return n.cordova(this,"deleteEventById",{},arguments)},i.prototype.openCalendar=function(t){return n.cordova(this,"openCalendar",{},arguments)},i.pluginName="Calendar",i.plugin="cordova-plugin-calendar",i.pluginRef="plugins.calendar",i.repo="https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin",i.platforms=["Android","iOS"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),m=Object.freeze({Calendar:v});!function(t){t[t.DATA_URL=0]="DATA_URL",t[t.FILE_URL=1]="FILE_URL",t[t.NATIVE_URI=2]="NATIVE_URI"}(o||(o={})),function(t){t[t.JPEG=0]="JPEG",t[t.PNG=1]="PNG"}(a||(a={})),function(t){t[t.PICTURE=0]="PICTURE",t[t.VIDEO=1]="VIDEO",t[t.ALLMEDIA=2]="ALLMEDIA"}(s||(s={})),function(t){t[t.PHOTOLIBRARY=0]="PHOTOLIBRARY",t[t.CAMERA=1]="CAMERA",t[t.SAVEDPHOTOALBUM=2]="SAVEDPHOTOALBUM"}(u||(u={})),function(t){t[t.ARROW_UP=1]="ARROW_UP",t[t.ARROW_DOWN=2]="ARROW_DOWN",t[t.ARROW_LEFT=3]="ARROW_LEFT",t[t.ARROW_RIGHT=4]="ARROW_RIGHT",t[t.ARROW_ANY=5]="ARROW_ANY"}(l||(l={})),function(t){t[t.BACK=0]="BACK",t[t.FRONT=1]="FRONT"}(c||(c={}));var g,y=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.DestinationType={DATA_URL:0,FILE_URI:1,NATIVE_URI:2},t.EncodingType={JPEG:0,PNG:1},t.MediaType={PICTURE:0,VIDEO:1,ALLMEDIA:2},t.PictureSourceType={PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2},t.PopoverArrowDirection={ARROW_UP:1,ARROW_DOWN:2,ARROW_LEFT:4,ARROW_RIGHT:8,ARROW_ANY:15},t.Direction={BACK:0,FRONT:1},t}return t.__extends(i,r),i.prototype.getPicture=function(t){return n.cordova(this,"getPicture",{callbackOrder:"reverse"},arguments)},i.prototype.cleanup=function(){return n.cordova(this,"cleanup",{platforms:["iOS"]},arguments)},i.pluginName="Camera",i.plugin="cordova-plugin-camera",i.pluginRef="navigator.camera",i.repo="https://github.com/apache/cordova-plugin-camera",i.platforms=["Android","Browser","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),b=Object.freeze({get DestinationType(){return o},get EncodingType(){return a},get MediaType(){return s},get PictureSourceType(){return u},get PopoverArrowDirection(){return l},get Direction(){return c},Camera:y}),_=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),Object.defineProperty(i.prototype,"cordova",{get:function(){return n.cordovaPropertyGet(this,"cordova")},set:function(t){n.cordovaPropertySet(this,"cordova",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"model",{get:function(){return n.cordovaPropertyGet(this,"model")},set:function(t){n.cordovaPropertySet(this,"model",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"platform",{get:function(){return n.cordovaPropertyGet(this,"platform")},set:function(t){n.cordovaPropertySet(this,"platform",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"uuid",{get:function(){return n.cordovaPropertyGet(this,"uuid")},set:function(t){n.cordovaPropertySet(this,"uuid",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"version",{get:function(){return n.cordovaPropertyGet(this,"version")},set:function(t){n.cordovaPropertySet(this,"version",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"manufacturer",{get:function(){return n.cordovaPropertyGet(this,"manufacturer")},set:function(t){n.cordovaPropertySet(this,"manufacturer",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isVirtual",{get:function(){return n.cordovaPropertyGet(this,"isVirtual")},set:function(t){n.cordovaPropertySet(this,"isVirtual",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"serial",{get:function(){return n.cordovaPropertyGet(this,"serial")},set:function(t){n.cordovaPropertySet(this,"serial",t)},enumerable:!1,configurable:!0}),i.pluginName="Device",i.plugin="cordova-plugin-device",i.pluginRef="device",i.repo="https://github.com/apache/cordova-plugin-device",i.platforms=["Android","Browser","iOS","macOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),w=Object.freeze({Device:_}),E=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.cordovaFileError={1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR",13:"WRONG_ENTRY_TYPE",14:"DIR_READ_ERR"},t}return t.__extends(i,r),i.prototype.getFreeDiskSpace=function(){var t=this;return function(){if(!0===n.checkAvailability(t))return n.getPromise((function(t,e){cordova.exec(t,e,"File","getFreeDiskSpace",[])}))}()},i.prototype.checkDir=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}var o=t+e;return r.resolveDirectoryUrl(o).then((function(){return!0}))}}()},i.prototype.createDir=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i)){if(/^\//.test(e)){var o=new FileError(5);return o.message="directory cannot start with /",Promise.reject(o)}var a={create:!0};return r||(a.exclusive=!0),i.resolveDirectoryUrl(t).then((function(t){return i.getDirectory(t,e,a)}))}}()},i.prototype.removeDir=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getDirectory(t,e,{create:!1})})).then((function(t){return r.remove(t)}))}}()},i.prototype.moveDir=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i=i||e)){var a=new FileError(5);return a.message="directory cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getDirectory(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.move(t,e,i)}))}))}}()},i.prototype.copyDir=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i)){var a=new FileError(5);return a.message="directory cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getDirectory(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.copy(t,e,i)}))}))}}()},i.prototype.listDir=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getDirectory(t,e,{create:!1,exclusive:!1})})).then((function(t){var e=t.createReader();return r.readEntries(e)}))}}()},i.prototype.removeRecursively=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="directory cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getDirectory(t,e,{create:!1})})).then((function(t){return r.rimraf(t)}))}}()},i.prototype.checkFile=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="file cannot start with /",Promise.reject(i)}return r.resolveLocalFilesystemUrl(t+e).then((function(t){if(t.isFile)return!0;var e=new FileError(13);return e.message="input is not a file",Promise.reject(e)}))}}()},i.prototype.createFile=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i)){if(/^\//.test(e)){var o=new FileError(5);return o.message="file-name cannot start with /",Promise.reject(o)}var a={create:!0};return r||(a.exclusive=!0),i.resolveDirectoryUrl(t).then((function(t){return i.getFile(t,e,a)}))}}()},i.prototype.removeFile=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r)){if(/^\//.test(e)){var i=new FileError(5);return i.message="file-name cannot start with /",Promise.reject(i)}return r.resolveDirectoryUrl(t).then((function(t){return r.getFile(t,e,{create:!1})})).then((function(t){return r.remove(t)}))}}()},i.prototype.writeFile=function(t,e,r,i){var o=this;return void 0===i&&(i={}),function(){if(!0===n.checkAvailability(o)){if(/^\//.test(e)){var a=new FileError(5);return a.message="file-name cannot start with /",Promise.reject(a)}var s={create:!i.append,exclusive:!i.replace};return o.resolveDirectoryUrl(t).then((function(t){return o.getFile(t,e,s)})).then((function(t){return o.writeFileEntry(t,r,i)}))}}()},i.prototype.writeFileEntry=function(t,e,n){var r=this;return this.createWriter(t).then((function(t){return n.append&&t.seek(t.length),n.truncate&&t.truncate(n.truncate),r.write(t,e)})).then((function(){return t}))},i.prototype.writeExistingFile=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i))return i.writeFile(t,e,r,{replace:!0})}()},i.prototype.readAsText=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"Text")}()},i.prototype.readAsDataURL=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"DataURL")}()},i.prototype.readAsBinaryString=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"BinaryString")}()},i.prototype.readAsArrayBuffer=function(t,e){var r=this;return function(){if(!0===n.checkAvailability(r))return r.readFile(t,e,"ArrayBuffer")}()},i.prototype.moveFile=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i=i||e)){var a=new FileError(5);return a.message="file name cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getFile(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.move(t,e,i)}))}))}}()},i.prototype.copyFile=function(t,e,r,i){var o=this;return function(){if(!0===n.checkAvailability(o)){if(/^\//.test(i=i||e)){var a=new FileError(5);return a.message="file name cannot start with /",Promise.reject(a)}return o.resolveDirectoryUrl(t).then((function(t){return o.getFile(t,e,{create:!1})})).then((function(t){return o.resolveDirectoryUrl(r).then((function(e){return o.copy(t,e,i)}))}))}}()},i.prototype.fillErrorMessage=function(t){try{t.message=this.cordovaFileError[t.code]}catch(t){}},i.prototype.resolveLocalFilesystemUrl=function(t){var e=this;return function(){if(!0===n.checkAvailability(e))return n.getPromise((function(n,r){try{window.resolveLocalFileSystemURL(t,(function(t){n(t)}),(function(t){e.fillErrorMessage(t),r(t)}))}catch(t){e.fillErrorMessage(t),r(t)}}))}()},i.prototype.resolveDirectoryUrl=function(t){var e=this;return function(){if(!0===n.checkAvailability(e))return e.resolveLocalFilesystemUrl(t).then((function(t){if(t.isDirectory)return t;var e=new FileError(13);return e.message="input is not a directory",Promise.reject(e)}))}()},i.prototype.getDirectory=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i))return new Promise((function(n,o){try{t.getDirectory(e,r,(function(t){n(t)}),(function(t){i.fillErrorMessage(t),o(t)}))}catch(t){i.fillErrorMessage(t),o(t)}}))}()},i.prototype.getFile=function(t,e,r){var i=this;return function(){if(!0===n.checkAvailability(i))return new Promise((function(n,o){try{t.getFile(e,r,n,(function(t){i.fillErrorMessage(t),o(t)}))}catch(t){i.fillErrorMessage(t),o(t)}}))}()},i.prototype.readFile=function(t,e,r){var i=this;if(/^\//.test(e)){var o=new FileError(5);return o.message="file-name cannot start with /",Promise.reject(o)}return this.resolveDirectoryUrl(t).then((function(t){return i.getFile(t,e,{create:!1})})).then((function(t){var e=new FileReader;return n.getPromise((function(n,i){e.onloadend=function(){void 0!==e.result||null!==e.result?n(e.result):void 0!==e.error||null!==e.error?i(e.error):i({code:null,message:"READER_ONLOADEND_ERR"})},t.file((function(t){e["readAs"+r].call(e,t)}),(function(t){i(t)}))}))}))},i.prototype.remove=function(t){var e=this;return new Promise((function(n,r){t.remove((function(){n({success:!0,fileRemoved:t})}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.move=function(t,e,n){var r=this;return new Promise((function(i,o){t.moveTo(e,n,(function(t){i(t)}),(function(t){r.fillErrorMessage(t),o(t)}))}))},i.prototype.copy=function(t,e,n){var r=this;return new Promise((function(i,o){t.copyTo(e,n,(function(t){i(t)}),(function(t){r.fillErrorMessage(t),o(t)}))}))},i.prototype.readEntries=function(t){var e=this;return new Promise((function(n,r){t.readEntries((function(t){n(t)}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.rimraf=function(t){var e=this;return new Promise((function(n,r){t.removeRecursively((function(){n({success:!0,fileRemoved:t})}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.createWriter=function(t){var e=this;return new Promise((function(n,r){t.createWriter((function(t){n(t)}),(function(t){e.fillErrorMessage(t),r(t)}))}))},i.prototype.write=function(t,e){return e instanceof Blob?this.writeFileInChunks(t,e):new Promise((function(n,r){t.onwriteend=function(e){t.error?r(t.error):n(e)},t.write(e)}))},i.prototype.writeFileInChunks=function(t,e){var r=0;function i(){var n=Math.min(1048576,e.size-r),i=e.slice(r,r+n);r+=n,t.write(i)}return n.getPromise((function(n,o){t.onerror=o,t.onwrite=function(){r<e.size?i():n()},i()}))},Object.defineProperty(i.prototype,"applicationDirectory",{get:function(){return n.cordovaPropertyGet(this,"applicationDirectory")},set:function(t){n.cordovaPropertySet(this,"applicationDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"applicationStorageDirectory",{get:function(){return n.cordovaPropertyGet(this,"applicationStorageDirectory")},set:function(t){n.cordovaPropertySet(this,"applicationStorageDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dataDirectory",{get:function(){return n.cordovaPropertyGet(this,"dataDirectory")},set:function(t){n.cordovaPropertySet(this,"dataDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cacheDirectory",{get:function(){return n.cordovaPropertyGet(this,"cacheDirectory")},set:function(t){n.cordovaPropertySet(this,"cacheDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalApplicationStorageDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalApplicationStorageDirectory")},set:function(t){n.cordovaPropertySet(this,"externalApplicationStorageDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalDataDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalDataDirectory")},set:function(t){n.cordovaPropertySet(this,"externalDataDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalCacheDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalCacheDirectory")},set:function(t){n.cordovaPropertySet(this,"externalCacheDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"externalRootDirectory",{get:function(){return n.cordovaPropertyGet(this,"externalRootDirectory")},set:function(t){n.cordovaPropertySet(this,"externalRootDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tempDirectory",{get:function(){return n.cordovaPropertyGet(this,"tempDirectory")},set:function(t){n.cordovaPropertySet(this,"tempDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"syncedDataDirectory",{get:function(){return n.cordovaPropertyGet(this,"syncedDataDirectory")},set:function(t){n.cordovaPropertySet(this,"syncedDataDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"documentsDirectory",{get:function(){return n.cordovaPropertyGet(this,"documentsDirectory")},set:function(t){n.cordovaPropertySet(this,"documentsDirectory",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"sharedDirectory",{get:function(){return n.cordovaPropertyGet(this,"sharedDirectory")},set:function(t){n.cordovaPropertySet(this,"sharedDirectory",t)},enumerable:!1,configurable:!0}),i.pluginName="File",i.plugin="cordova-plugin-file",i.pluginRef="cordova.file",i.repo="https://github.com/apache/cordova-plugin-file",i.platforms=["Android","Browser","iOS","macOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),x=Object.freeze({File:E}),S=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.open=function(t,e){return n.cordova(this,"open",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.prototype.uninstall=function(t){return n.cordova(this,"uninstall",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.prototype.appIsInstalled=function(t){return n.cordova(this,"appIsInstalled",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.prototype.showOpenWithDialog=function(t,e){return n.cordova(this,"showOpenWithDialog",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)},i.pluginName="FileOpener",i.plugin="cordova-plugin-file-opener2",i.pluginRef="cordova.plugins.fileOpener2",i.repo="https://github.com/pwlin/cordova-plugin-file-opener2",i.platforms=["Android","iOS","Windows","Windows Phone 8"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),C=Object.freeze({FileOpener:S}),T=function(i){function o(){return null!==i&&i.apply(this,arguments)||this}return t.__extends(o,i),o.prototype.getCurrentPosition=function(t){return n.cordova(this,"getCurrentPosition",{callbackOrder:"reverse"},arguments)},o.prototype.watchPosition=function(t){return new r.Observable((function(e){var n=navigator.geolocation.watchPosition(e.next.bind(e),e.next.bind(e),t);return function(){return navigator.geolocation.clearWatch(n)}}))},o.pluginName="Geolocation",o.plugin="cordova-plugin-geolocation",o.pluginRef="navigator.geolocation",o.repo="https://github.com/apache/cordova-plugin-geolocation",o.install='ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',o.installVariables=["GEOLOCATION_USAGE_DESCRIPTION"],o.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"],o.decorators=[{type:e.Injectable}],o}(n.AwesomeCordovaNativePlugin),k=Object.freeze({Geolocation:T}),D=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.captureAudio=function(t){return n.cordova(this,"captureAudio",{callbackOrder:"reverse"},arguments)},i.prototype.captureImage=function(t){return n.cordova(this,"captureImage",{callbackOrder:"reverse"},arguments)},i.prototype.captureVideo=function(t){return n.cordova(this,"captureVideo",{callbackOrder:"reverse"},arguments)},i.prototype.onPendingCaptureResult=function(){return n.cordova(this,"onPendingCaptureResult",{eventObservable:!0,event:"pendingcaptureresult"},arguments)},i.prototype.onPendingCaptureError=function(){return n.cordova(this,"onPendingCaptureError",{eventObservable:!0,event:"pendingcaptureerror"},arguments)},Object.defineProperty(i.prototype,"supportedImageModes",{get:function(){return n.cordovaPropertyGet(this,"supportedImageModes")},set:function(t){n.cordovaPropertySet(this,"supportedImageModes",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"supportedAudioModes",{get:function(){return n.cordovaPropertyGet(this,"supportedAudioModes")},set:function(t){n.cordovaPropertySet(this,"supportedAudioModes",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"supportedVideoModes",{get:function(){return n.cordovaPropertyGet(this,"supportedVideoModes")},set:function(t){n.cordovaPropertySet(this,"supportedVideoModes",t)},enumerable:!1,configurable:!0}),i.pluginName="MediaCapture",i.plugin="cordova-plugin-media-capture",i.pluginRef="navigator.device.capture",i.repo="https://github.com/apache/cordova-plugin-media-capture",i.platforms=["Android","Browser","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),A=Object.freeze({MediaCapture:D});!function(t){t.UNKNOWN="unknown",t.ETHERNET="ethernet",t.WIFI="wifi",t.CELL_2G="2g",t.CELL_3G="3g",t.CELL_4G="4g",t.CELL="cellular",t.NONE="none"}(g||(g={}));var M=function(o){function a(){var t=null!==o&&o.apply(this,arguments)||this;return t.Connection={UNKNOWN:"unknown",ETHERNET:"ethernet",WIFI:"wifi",CELL_2G:"2g",CELL_3G:"3g",CELL_4G:"4g",CELL:"cellular",NONE:"none"},t}return t.__extends(a,o),a.prototype.onChange=function(){var t=this;return function(){if(!0===n.checkAvailability(t))return r.merge(t.onConnect().pipe(i.mapTo("connected")),t.onDisconnect().pipe(i.mapTo("disconnected")))}()},a.prototype.onDisconnect=function(){return n.cordova(this,"onDisconnect",{eventObservable:!0,event:"offline",element:"document"},arguments)},a.prototype.onConnect=function(){return n.cordova(this,"onConnect",{eventObservable:!0,event:"online",element:"document"},arguments)},Object.defineProperty(a.prototype,"type",{get:function(){return n.cordovaPropertyGet(this,"type")},set:function(t){n.cordovaPropertySet(this,"type",t)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"downlinkMax",{get:function(){return n.cordovaPropertyGet(this,"downlinkMax")},set:function(t){n.cordovaPropertySet(this,"downlinkMax",t)},enumerable:!1,configurable:!0}),a.pluginName="Network",a.plugin="cordova-plugin-network-information",a.pluginRef="navigator.connection",a.repo="https://github.com/apache/cordova-plugin-network-information",a.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"],a.decorators=[{type:e.Injectable}],a}(n.AwesomeCordovaNativePlugin),O=Object.freeze({get Connection(){return g},Network:M}),I=function(){function t(t){this._objectInstance=t}return t.prototype.addTransaction=function(t){return n.cordovaInstance(this,"addTransaction",{sync:!0},arguments)},t.prototype.transaction=function(t){return n.cordovaInstance(this,"transaction",{successIndex:2,errorIndex:1},arguments)},t.prototype.readTransaction=function(t){return n.cordovaInstance(this,"readTransaction",{},arguments)},t.prototype.startNextTransaction=function(){return n.cordovaInstance(this,"startNextTransaction",{sync:!0},arguments)},t.prototype.open=function(){return n.cordovaInstance(this,"open",{},arguments)},t.prototype.close=function(){return n.cordovaInstance(this,"close",{},arguments)},t.prototype.executeSql=function(t,e){return n.cordovaInstance(this,"executeSql",{},arguments)},t.prototype.sqlBatch=function(t){return n.cordovaInstance(this,"sqlBatch",{},arguments)},t.prototype.abortallPendingTransactions=function(){return n.cordovaInstance(this,"abortallPendingTransactions",{sync:!0},arguments)},Object.defineProperty(t.prototype,"databaseFeatures",{get:function(){return n.instancePropertyGet(this,"databaseFeatures")},set:function(t){n.instancePropertySet(this,"databaseFeatures",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"openDBs",{get:function(){return n.instancePropertyGet(this,"openDBs")},set:function(t){n.instancePropertySet(this,"openDBs",t)},enumerable:!1,configurable:!0}),t}(),P=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.create=function(t){var e=this;return function(){if(!0===n.checkAvailability(e))return new Promise((function(e,n){sqlitePlugin.openDatabase(t,(function(t){return e(new I(t))}),n)}))}()},i.prototype.echoTest=function(){return n.cordova(this,"echoTest",{},arguments)},i.prototype.selfTest=function(){return n.cordova(this,"selfTest",{},arguments)},i.prototype.deleteDatabase=function(t){return n.cordova(this,"deleteDatabase",{},arguments)},i.pluginName="SQLite",i.pluginRef="sqlitePlugin",i.plugin="cordova-sqlite-storage",i.repo="https://github.com/litehelpers/Cordova-sqlite-storage",i.platforms=["Android","iOS","macOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),R=Object.freeze({SQLiteObject:I,SQLite:P}),N=function(r){function i(){return null!==r&&r.apply(this,arguments)||this}return t.__extends(i,r),i.prototype.vibrate=function(t){return n.cordova(this,"vibrate",{sync:!0},arguments)},i.pluginName="Vibration",i.plugin="cordova-plugin-vibration",i.pluginRef="navigator",i.repo="https://github.com/apache/cordova-plugin-vibration",i.platforms=["Android","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),L=Object.freeze({Vibration:N}),F=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.REQUEST_PRIORITY_NO_POWER=0,t.REQUEST_PRIORITY_LOW_POWER=1,t.REQUEST_PRIORITY_BALANCED_POWER_ACCURACY=2,t.REQUEST_PRIORITY_HIGH_ACCURACY=3,t.SUCCESS_SETTINGS_SATISFIED=0,t.SUCCESS_USER_AGREED=1,t.ERROR_ALREADY_REQUESTING=-1,t.ERROR_INVALID_ACTION=0,t.ERROR_INVALID_ACCURACY=1,t.ERROR_EXCEPTION=1,t.ERROR_CANNOT_CHANGE_ACCURACY=3,t.ERROR_USER_DISAGREED=4,t.ERROR_GOOGLE_API_CONNECTION_FAILED=4,t}return t.__extends(i,r),i.prototype.canRequest=function(){return n.cordova(this,"canRequest",{},arguments)},i.prototype.isRequesting=function(){return n.cordova(this,"isRequesting",{},arguments)},i.prototype.request=function(t){return n.cordova(this,"request",{callbackOrder:"reverse"},arguments)},i.pluginName="LocationAccuracy",i.plugin="cordova-plugin-request-location-accuracy",i.pluginRef="cordova.plugins.locationAccuracy",i.repo="https://github.com/dpa99c/cordova-plugin-request-location-accuracy",i.platforms=["Android","iOS"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin),j=Object.freeze({LocationAccuracy:F}),B=function(r){function i(){var t=null!==r&&r.apply(this,arguments)||this;return t.permission={READ_CALENDAR:"READ_CALENDAR",WRITE_CALENDAR:"WRITE_CALENDAR",CAMERA:"CAMERA",READ_CONTACTS:"READ_CONTACTS",WRITE_CONTACTS:"WRITE_CONTACTS",GET_ACCOUNTS:"GET_ACCOUNTS",ACCESS_FINE_LOCATION:"ACCESS_FINE_LOCATION",ACCESS_COARSE_LOCATION:"ACCESS_COARSE_LOCATION",RECORD_AUDIO:"RECORD_AUDIO",READ_PHONE_STATE:"READ_PHONE_STATE",CALL_PHONE:"CALL_PHONE",ADD_VOICEMAIL:"ADD_VOICEMAIL",USE_SIP:"USE_SIP",PROCESS_OUTGOING_CALLS:"PROCESS_OUTGOING_CALLS",READ_CALL_LOG:"READ_CALL_LOG",WRITE_CALL_LOG:"WRITE_CALL_LOG",SEND_SMS:"SEND_SMS",RECEIVE_SMS:"RECEIVE_SMS",READ_SMS:"READ_SMS",RECEIVE_WAP_PUSH:"RECEIVE_WAP_PUSH",RECEIVE_MMS:"RECEIVE_MMS",WRITE_EXTERNAL_STORAGE:"WRITE_EXTERNAL_STORAGE",READ_EXTERNAL_STORAGE:"READ_EXTERNAL_STORAGE",BODY_SENSORS:"BODY_SENSORS"},t.locationAuthorizationMode={ALWAYS:"always",WHEN_IN_USE:"when_in_use"},t.permissionGroups={CALENDAR:["READ_CALENDAR","WRITE_CALENDAR"],CAMERA:["CAMERA"],CONTACTS:["READ_CONTACTS","WRITE_CONTACTS","GET_ACCOUNTS"],LOCATION:["ACCESS_FINE_LOCATION","ACCESS_COARSE_LOCATION"],MICROPHONE:["RECORD_AUDIO"],PHONE:["READ_PHONE_STATE","CALL_PHONE","ADD_VOICEMAIL","USE_SIP","PROCESS_OUTGOING_CALLS","READ_CALL_LOG","WRITE_CALL_LOG"],SENSORS:["BODY_SENSORS"],SMS:["SEND_SMS","RECEIVE_SMS","READ_SMS","RECEIVE_WAP_PUSH","RECEIVE_MMS"],STORAGE:["READ_EXTERNAL_STORAGE","WRITE_EXTERNAL_STORAGE"]},t.locationMode={HIGH_ACCURACY:"high_accuracy",DEVICE_ONLY:"device_only",BATTERY_SAVING:"battery_saving",LOCATION_OFF:"location_off"},t.bluetoothState={UNKNOWN:"unknown",RESETTING:"resetting",UNSUPPORTED:"unsupported",UNAUTHORIZED:"unauthorized",POWERED_OFF:"powered_off",POWERED_ON:"powered_on",POWERING_OFF:"powering_off",POWERING_ON:"powering_on"},t}return t.__extends(i,r),i.prototype.isLocationAvailable=function(){return n.cordova(this,"isLocationAvailable",{},arguments)},i.prototype.isWifiAvailable=function(){return n.cordova(this,"isWifiAvailable",{},arguments)},i.prototype.isCameraAvailable=function(t){return n.cordova(this,"isCameraAvailable",{callbackOrder:"reverse"},arguments)},i.prototype.isBluetoothAvailable=function(){return n.cordova(this,"isBluetoothAvailable",{},arguments)},i.prototype.switchToLocationSettings=function(){return n.cordova(this,"switchToLocationSettings",{sync:!0,platforms:["Android","Windows 10","iOS"]},arguments)},i.prototype.switchToMobileDataSettings=function(){return n.cordova(this,"switchToMobileDataSettings",{sync:!0,platforms:["Android","Windows 10"]},arguments)},i.prototype.switchToBluetoothSettings=function(){return n.cordova(this,"switchToBluetoothSettings",{sync:!0,platforms:["Android","Windows 10"]},arguments)},i.prototype.switchToWifiSettings=function(){return n.cordova(this,"switchToWifiSettings",{sync:!0,platforms:["Android","Windows 10"]},arguments)},i.prototype.isWifiEnabled=function(){return n.cordova(this,"isWifiEnabled",{platforms:["Android","Windows 10"]},arguments)},i.prototype.setWifiState=function(t){return n.cordova(this,"setWifiState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)},i.prototype.setBluetoothState=function(t){return n.cordova(this,"setBluetoothState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)},i.prototype.isLocationEnabled=function(){return n.cordova(this,"isLocationEnabled",{platforms:["Android","iOS"]},arguments)},i.prototype.isLocationAuthorized=function(){return n.cordova(this,"isLocationAuthorized",{},arguments)},i.prototype.getLocationAuthorizationStatus=function(){return n.cordova(this,"getLocationAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestLocationAuthorization=function(t){return n.cordova(this,"requestLocationAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.isCameraPresent=function(){return n.cordova(this,"isCameraPresent",{platforms:["Android","iOS"]},arguments)},i.prototype.isCameraAuthorized=function(t){return n.cordova(this,"isCameraAuthorized",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.getCameraAuthorizationStatus=function(t){return n.cordova(this,"getCameraAuthorizationStatus",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.requestCameraAuthorization=function(t){return n.cordova(this,"requestCameraAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)},i.prototype.isMicrophoneAuthorized=function(){return n.cordova(this,"isMicrophoneAuthorized",{platforms:["Android","iOS"]},arguments)},i.prototype.getMicrophoneAuthorizationStatus=function(){return n.cordova(this,"getMicrophoneAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestMicrophoneAuthorization=function(){return n.cordova(this,"requestMicrophoneAuthorization",{platforms:["Android","iOS"]},arguments)},i.prototype.isContactsAuthorized=function(){return n.cordova(this,"isContactsAuthorized",{platforms:["Android","iOS"]},arguments)},i.prototype.getContactsAuthorizationStatus=function(){return n.cordova(this,"getContactsAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestContactsAuthorization=function(){return n.cordova(this,"requestContactsAuthorization",{platforms:["Android","iOS"]},arguments)},i.prototype.isCalendarAuthorized=function(){return n.cordova(this,"isCalendarAuthorized",{platforms:["Android","iOS"]},arguments)},i.prototype.getCalendarAuthorizationStatus=function(){return n.cordova(this,"getCalendarAuthorizationStatus",{platforms:["Android","iOS"]},arguments)},i.prototype.requestCalendarAuthorization=function(){return n.cordova(this,"requestCalendarAuthorization",{platforms:["Android","iOS"]},arguments)},i.prototype.switchToSettings=function(){return n.cordova(this,"switchToSettings",{platforms:["Android","iOS"]},arguments)},i.prototype.getBluetoothState=function(){return n.cordova(this,"getBluetoothState",{platforms:["Android","iOS"]},arguments)},i.prototype.registerBluetoothStateChangeHandler=function(t){return n.cordova(this,"registerBluetoothStateChangeHandler",{platforms:["Android","iOS"],sync:!0},arguments)},i.prototype.registerLocationStateChangeHandler=function(t){return n.cordova(this,"registerLocationStateChangeHandler",{platforms:["Android","iOS"],sync:!0},arguments)},i.prototype.isGpsLocationAvailable=function(){return n.cordova(this,"isGpsLocationAvailable",{platforms:["Android"]},arguments)},i.prototype.isGpsLocationEnabled=function(){return n.cordova(this,"isGpsLocationEnabled",{platforms:["Android"]},arguments)},i.prototype.isNetworkLocationAvailable=function(){return n.cordova(this,"isNetworkLocationAvailable",{platforms:["Android"]},arguments)},i.prototype.isNetworkLocationEnabled=function(){return n.cordova(this,"isNetworkLocationEnabled",{platforms:["Android"]},arguments)},i.prototype.getLocationMode=function(){return n.cordova(this,"getLocationMode",{platforms:["Android"]},arguments)},i.prototype.getPermissionAuthorizationStatus=function(t){return n.cordova(this,"getPermissionAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.getPermissionsAuthorizationStatus=function(t){return n.cordova(this,"getPermissionsAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.requestRuntimePermission=function(t){return n.cordova(this,"requestRuntimePermission",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.requestRuntimePermissions=function(t){return n.cordova(this,"requestRuntimePermissions",{platforms:["Android"],callbackOrder:"reverse"},arguments)},i.prototype.isRequestingPermission=function(){return n.cordova(this,"isRequestingPermission",{sync:!0},arguments)},i.prototype.registerPermissionRequestCompleteHandler=function(t){return n.cordova(this,"registerPermissionRequestCompleteHandler",{sync:!0},arguments)},i.prototype.isBluetoothEnabled=function(){return n.cordova(this,"isBluetoothEnabled",{platforms:["Android"]},arguments)},i.prototype.hasBluetoothSupport=function(){return n.cordova(this,"hasBluetoothSupport",{platforms:["Android"]},arguments)},i.prototype.hasBluetoothLESupport=function(){return n.cordova(this,"hasBluetoothLESupport",{platforms:["Android"]},arguments)},i.prototype.hasBluetoothLEPeripheralSupport=function(){return n.cordova(this,"hasBluetoothLEPeripheralSupport",{platforms:["Android"]},arguments)},i.prototype.isExternalStorageAuthorized=function(){return n.cordova(this,"isExternalStorageAuthorized",{platforms:["Android"]},arguments)},i.prototype.getExternalStorageAuthorizationStatus=function(){return n.cordova(this,"getExternalStorageAuthorizationStatus",{platforms:["Android"]},arguments)},i.prototype.requestExternalStorageAuthorization=function(){return n.cordova(this,"requestExternalStorageAuthorization",{platforms:["Android"]},arguments)},i.prototype.getExternalSdCardDetails=function(){return n.cordova(this,"getExternalSdCardDetails",{platforms:["Android"]},arguments)},i.prototype.switchToWirelessSettings=function(){return n.cordova(this,"switchToWirelessSettings",{platforms:["Android"],sync:!0},arguments)},i.prototype.switchToNFCSettings=function(){return n.cordova(this,"switchToNFCSettings",{platforms:["Android"],sync:!0},arguments)},i.prototype.isNFCPresent=function(){return n.cordova(this,"isNFCPresent",{platforms:["Android"]},arguments)},i.prototype.isNFCEnabled=function(){return n.cordova(this,"isNFCEnabled",{platforms:["Android"]},arguments)},i.prototype.isNFCAvailable=function(){return n.cordova(this,"isNFCAvailable",{platforms:["Android"]},arguments)},i.prototype.registerNFCStateChangeHandler=function(t){return n.cordova(this,"registerNFCStateChangeHandler",{platforms:["Android"],sync:!0},arguments)},i.prototype.isDataRoamingEnabled=function(){return n.cordova(this,"isDataRoamingEnabled",{platforms:["Android"]},arguments)},i.prototype.isADBModeEnabled=function(){return n.cordova(this,"isADBModeEnabled",{platforms:["Android"]},arguments)},i.prototype.isDeviceRooted=function(){return n.cordova(this,"isDeviceRooted",{platforms:["Android"]},arguments)},i.prototype.isCameraRollAuthorized=function(){return n.cordova(this,"isCameraRollAuthorized",{platforms:["iOS"]},arguments)},i.prototype.getCameraRollAuthorizationStatus=function(){return n.cordova(this,"getCameraRollAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.requestCameraRollAuthorization=function(){return n.cordova(this,"requestCameraRollAuthorization",{platforms:["iOS"]},arguments)},i.prototype.isRemoteNotificationsEnabled=function(){return n.cordova(this,"isRemoteNotificationsEnabled",{platforms:["iOS","Android"]},arguments)},i.prototype.isRegisteredForRemoteNotifications=function(){return n.cordova(this,"isRegisteredForRemoteNotifications",{platforms:["iOS"]},arguments)},i.prototype.getRemoteNotificationsAuthorizationStatus=function(){return n.cordova(this,"getRemoteNotificationsAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.requestRemoteNotificationsAuthorization=function(t,e){return n.cordova(this,"requestRemoteNotificationsAuthorization",{platforms:["iOS"]},arguments)},i.prototype.getRemoteNotificationTypes=function(){return n.cordova(this,"getRemoteNotificationTypes",{platforms:["iOS"]},arguments)},i.prototype.isRemindersAuthorized=function(){return n.cordova(this,"isRemindersAuthorized",{platforms:["iOS"]},arguments)},i.prototype.getRemindersAuthorizationStatus=function(){return n.cordova(this,"getRemindersAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.requestRemindersAuthorization=function(){return n.cordova(this,"requestRemindersAuthorization",{platforms:["iOS"]},arguments)},i.prototype.isBackgroundRefreshAuthorized=function(){return n.cordova(this,"isBackgroundRefreshAuthorized",{platforms:["iOS"]},arguments)},i.prototype.getBackgroundRefreshStatus=function(){return n.cordova(this,"getBackgroundRefreshStatus",{platforms:["iOS"]},arguments)},i.prototype.requestBluetoothAuthorization=function(){return n.cordova(this,"requestBluetoothAuthorization",{platforms:["iOS"]},arguments)},i.prototype.isMotionAvailable=function(){return n.cordova(this,"isMotionAvailable",{platforms:["iOS"]},arguments)},i.prototype.isMotionRequestOutcomeAvailable=function(){return n.cordova(this,"isMotionRequestOutcomeAvailable",{platforms:["iOS"]},arguments)},i.prototype.requestMotionAuthorization=function(){return n.cordova(this,"requestMotionAuthorization",{platforms:["iOS"]},arguments)},i.prototype.getMotionAuthorizationStatus=function(){return n.cordova(this,"getMotionAuthorizationStatus",{platforms:["iOS"]},arguments)},i.prototype.getLocationAccuracyAuthorization=function(){return n.cordova(this,"getLocationAccuracyAuthorization",{platform:["iOS"]},arguments)},i.prototype.requestTemporaryFullAccuracyAuthorization=function(t){return n.cordova(this,"requestTemporaryFullAccuracyAuthorization",{platforms:["iOS"]},arguments)},i.prototype.registerLocationAccuracyAuthorizationChangeHandler=function(t){return n.cordova(this,"registerLocationAccuracyAuthorizationChangeHandler",{platforms:["iOS"],sync:!0},arguments)},Object.defineProperty(i.prototype,"permissionStatus",{get:function(){return n.cordovaPropertyGet(this,"permissionStatus")},set:function(t){n.cordovaPropertySet(this,"permissionStatus",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"NFCState",{get:function(){return n.cordovaPropertyGet(this,"NFCState")},set:function(t){n.cordovaPropertySet(this,"NFCState",t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"motionStatus",{get:function(){return n.cordovaPropertyGet(this,"motionStatus")},set:function(t){n.cordovaPropertySet(this,"motionStatus",t)},enumerable:!1,configurable:!0}),i.pluginName="Diagnostic",i.plugin="cordova.plugins.diagnostic",i.pluginRef="cordova.plugins.diagnostic",i.repo="https://github.com/dpa99c/cordova-diagnostic-plugin",i.platforms=["Android","iOS","Windows"],i.decorators=[{type:e.Injectable}],i}(n.AwesomeCordovaNativePlugin);return{...d,...f,...m,...b,...w,...x,...C,...k,...A,...O,...R,...L,...j,...Object.freeze({Diagnostic:B})}})),
|
|
3628
3628
|
/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
|
|
3629
3629
|
function(t,e,n){var r=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout(e,1e3/60)},i=function(){var r={},i=e.createElement("div").style,o=function(){for(var t=["t","webkitT","MozT","msT","OT"],e=0,n=t.length;e<n;e++)if(t[e]+"ransform"in i)return t[e].substr(0,t[e].length-1);return!1}();function a(t){return!1!==o&&(""===o?t:o+t.charAt(0).toUpperCase()+t.substr(1))}r.getTime=Date.now||function(){return(new Date).getTime()},r.extend=function(t,e){for(var n in e)t[n]=e[n]},r.addEvent=function(t,e,n,r){t.addEventListener(e,n,!!r)},r.removeEvent=function(t,e,n,r){t.removeEventListener(e,n,!!r)},r.prefixPointerEvent=function(e){return t.MSPointerEvent?"MSPointer"+e.charAt(7).toUpperCase()+e.substr(8):e},r.momentum=function(t,e,r,i,o,a){var s,u,l=t-e,c=n.abs(l)/r;return u=c/(a=void 0===a?6e-4:a),(s=t+c*c/(2*a)*(l<0?-1:1))<i?(s=o?i-o/2.5*(c/8):i,u=(l=n.abs(s-t))/c):s>0&&(s=o?o/2.5*(c/8):0,u=(l=n.abs(t)+s)/c),{destination:n.round(s),duration:u}};var s=a("transform");return r.extend(r,{hasTransform:!1!==s,hasPerspective:a("perspective")in i,hasTouch:"ontouchstart"in t,hasPointer:!(!t.PointerEvent&&!t.MSPointerEvent),hasTransition:a("transition")in i}),r.isBadAndroid=function(){var e=t.navigator.appVersion;if(/Android/.test(e)&&!/Chrome\/\d/.test(e)){var n=e.match(/Safari\/(\d+.\d)/);return!(n&&"object"==typeof n&&n.length>=2)||parseFloat(n[1])<535.19}return!1}(),r.extend(r.style={},{transform:s,transitionTimingFunction:a("transitionTimingFunction"),transitionDuration:a("transitionDuration"),transitionDelay:a("transitionDelay"),transformOrigin:a("transformOrigin")}),r.hasClass=function(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},r.addClass=function(t,e){if(!r.hasClass(t,e)){var n=t.className.split(" ");n.push(e),t.className=n.join(" ")}},r.removeClass=function(t,e){if(r.hasClass(t,e)){var n=new RegExp("(^|\\s)"+e+"(\\s|$)","g");t.className=t.className.replace(n," ")}},r.offset=function(t){for(var e=-t.offsetLeft,n=-t.offsetTop;t=t.offsetParent;)e-=t.offsetLeft,n-=t.offsetTop;return{left:e,top:n}},r.preventDefaultException=function(t,e){for(var n in e)if(e[n].test(t[n]))return!0;return!1},r.extend(r.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),r.extend(r.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return n.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){return(t-=1)*t*(5*t+4)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){return 0===t?0:1==t?1:.4*n.pow(2,-10*t)*n.sin((t-.055)*(2*n.PI)/.22)+1}}}),r.tap=function(t,n){var r=e.createEvent("Event");r.initEvent(n,!0,!0),r.pageX=t.pageX,r.pageY=t.pageY,t.target.dispatchEvent(r)},r.click=function(t){var n,r=t.target;/(SELECT|INPUT|TEXTAREA)/i.test(r.tagName)||((n=e.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,t.view,1,r.screenX,r.screenY,r.clientX,r.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),n._constructed=!0,r.dispatchEvent(n))},r}();function o(n,r){for(var o in this.wrapper="string"==typeof n?e.querySelector(n):n,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!i.hasPointer,disableTouch:i.hasPointer||!i.hasTouch,disableMouse:i.hasPointer||i.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===t.onmousedown},r)this.options[o]=r[o];this.translateZ=this.options.HWCompositing&&i.hasPerspective?" translateZ(0)":"",this.options.useTransition=i.hasTransition&&this.options.useTransition,this.options.useTransform=i.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?i.ease[this.options.bounceEasing]||i.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function a(t,n,r){var i=e.createElement("div"),o=e.createElement("div");return!0===r&&(i.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==t?(!0===r&&(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),i.className="iScrollHorizontalScrollbar"):(!0===r&&(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),i.className="iScrollVerticalScrollbar"),i.style.cssText+=";overflow:hidden",n||(i.style.pointerEvents="none"),i.appendChild(o),i}function s(n,o){for(var a in this.wrapper="string"==typeof o.el?e.querySelector(o.el):o.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=n,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},o)this.options[a]=o[a];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(i.addEvent(this.indicator,"touchstart",this),i.addEvent(t,"touchend",this)),this.options.disablePointer||(i.addEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.addEvent(t,i.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(i.addEvent(this.indicator,"mousedown",this),i.addEvent(t,"mouseup",this))),this.options.fade){this.wrapperStyle[i.style.transform]=this.scroller.translateZ;var s=i.style.transitionDuration;this.wrapperStyle[s]=i.isBadAndroid?"0.0001ms":"0ms";var u=this;i.isBadAndroid&&r((function(){"0.0001ms"===u.wrapperStyle[s]&&(u.wrapperStyle[s]="0s")})),this.wrapperStyle.opacity="0"}}o.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(1!=i.eventType[t.type]&&0!==(t.which?t.button:t.button<2?0:4==t.button?1:2))return;if(this.enabled&&(!this.initiated||i.eventType[t.type]===this.initiated)){!this.options.preventDefault||i.isBadAndroid||i.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var e,r=t.touches?t.touches[0]:t;this.initiated=i.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=i.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,e=this.getComputedPosition(),this._translate(n.round(e.x),n.round(e.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=r.pageX,this.pointY=r.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&i.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var e,r,o,a,s=t.touches?t.touches[0]:t,u=s.pageX-this.pointX,l=s.pageY-this.pointY,c=i.getTime();if(this.pointX=s.pageX,this.pointY=s.pageY,this.distX+=u,this.distY+=l,o=n.abs(this.distX),a=n.abs(this.distY),!(c-this.endTime>300&&o<10&&a<10)){if(this.directionLocked||this.options.freeScroll||(o>a+this.options.directionLockThreshold?this.directionLocked="h":a>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);u=0}u=this.hasHorizontalScroll?u:0,l=this.hasVerticalScroll?l:0,e=this.x+u,r=this.y+l,(e>0||e<this.maxScrollX)&&(e=this.options.bounce?this.x+u/3:e>0?0:this.maxScrollX),(r>0||r<this.maxScrollY)&&(r=this.options.bounce?this.y+l/3:r>0?0:this.maxScrollY),this.directionX=u>0?-1:u<0?1:0,this.directionY=l>0?-1:l<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(e,r),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(t){if(this.enabled&&i.eventType[t.type]===this.initiated){this.options.preventDefault&&!i.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();t.changedTouches&&t.changedTouches[0];var e,r,o=i.getTime()-this.startTime,a=n.round(this.x),s=n.round(this.y),u=n.abs(a-this.startX),l=n.abs(s-this.startY),c=0,p="";if(this.isInTransition=0,this.initiated=0,this.endTime=i.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(a,s),!this.moved)return this.options.tap&&i.tap(t,this.options.tap),this.options.click&&i.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&o<200&&u<100&&l<100)this._execEvent("flick");else{if(this.options.momentum&&o<300&&(e=this.hasHorizontalScroll?i.momentum(this.x,this.startX,o,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:a,duration:0},r=this.hasVerticalScroll?i.momentum(this.y,this.startY,o,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:s,duration:0},a=e.destination,s=r.destination,c=n.max(e.duration,r.duration),this.isInTransition=1),this.options.snap){var d=this._nearestSnap(a,s);this.currentPage=d,c=this.options.snapSpeed||n.max(n.max(n.min(n.abs(a-d.x),1e3),n.min(n.abs(s-d.y),1e3)),300),a=d.x,s=d.y,this.directionX=0,this.directionY=0,p=this.options.bounceEasing}if(a!=this.x||s!=this.y)return(a>0||a<this.maxScrollX||s>0||s<this.maxScrollY)&&(p=i.ease.quadratic),void this.scrollTo(a,s,c,p);this._execEvent("scrollEnd")}}}},_resize:function(){var t=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){t.refresh()}),this.options.resizePolling)},resetPosition:function(t){var e=this.x,n=this.y;return t=t||0,!this.hasHorizontalScroll||this.x>0?e=0:this.x<this.maxScrollX&&(e=this.maxScrollX),!this.hasVerticalScroll||this.y>0?n=0:this.y<this.maxScrollY&&(n=this.maxScrollY),(e!=this.x||n!=this.y)&&(this.scrollTo(e,n,t,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=i.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)},off:function(t,e){if(this._events[t]){var n=this._events[t].indexOf(e);n>-1&&this._events[t].splice(n,1)}},_execEvent:function(t){if(this._events[t]){var e=0,n=this._events[t].length;if(n)for(;e<n;e++)this._events[t][e].apply(this,[].slice.call(arguments,1))}},scrollBy:function(t,e,n,r){t=this.x+t,e=this.y+e,n=n||0,this.scrollTo(t,e,n,r)},scrollTo:function(t,e,n,r){r=r||i.ease.circular,this.isInTransition=this.options.useTransition&&n>0;var o=this.options.useTransition&&r.style;!n||o?(o&&(this._transitionTimingFunction(r.style),this._transitionTime(n)),this._translate(t,e)):this._animate(t,e,n,r.fn)},scrollToElement:function(t,e,r,o,a){if(t=t.nodeType?t:this.scroller.querySelector(t)){var s=i.offset(t);s.left-=this.wrapperOffset.left,s.top-=this.wrapperOffset.top,!0===r&&(r=n.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=n.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),s.left-=r||0,s.top-=o||0,s.left=s.left>0?0:s.left<this.maxScrollX?this.maxScrollX:s.left,s.top=s.top>0?0:s.top<this.maxScrollY?this.maxScrollY:s.top,e=null==e||"auto"===e?n.max(n.abs(this.x-s.left),n.abs(this.y-s.top)):e,this.scrollTo(s.left,s.top,e,a)}},_transitionTime:function(t){t=t||0;var e=i.style.transitionDuration;if(this.scrollerStyle[e]=t+"ms",!t&&i.isBadAndroid){this.scrollerStyle[e]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.scrollerStyle[e]&&(n.scrollerStyle[e]="0s")}))}if(this.indicators)for(var o=this.indicators.length;o--;)this.indicators[o].transitionTime(t)},_transitionTimingFunction:function(t){if(this.scrollerStyle[i.style.transitionTimingFunction]=t,this.indicators)for(var e=this.indicators.length;e--;)this.indicators[e].transitionTimingFunction(t)},_translate:function(t,e){if(this.options.useTransform?this.scrollerStyle[i.style.transform]="translate("+t+"px,"+e+"px)"+this.translateZ:(t=n.round(t),e=n.round(e),this.scrollerStyle.left=t+"px",this.scrollerStyle.top=e+"px"),this.x=t,this.y=e,this.indicators)for(var r=this.indicators.length;r--;)this.indicators[r].updatePosition()},_initEvents:function(e){var n=e?i.removeEvent:i.addEvent,r=this.options.bindToWrapper?this.wrapper:t;n(t,"orientationchange",this),n(t,"resize",this),this.options.click&&n(this.wrapper,"click",this,!0),this.options.disableMouse||(n(this.wrapper,"mousedown",this),n(r,"mousemove",this),n(r,"mousecancel",this),n(r,"mouseup",this)),i.hasPointer&&!this.options.disablePointer&&(n(this.wrapper,i.prefixPointerEvent("pointerdown"),this),n(r,i.prefixPointerEvent("pointermove"),this),n(r,i.prefixPointerEvent("pointercancel"),this),n(r,i.prefixPointerEvent("pointerup"),this)),i.hasTouch&&!this.options.disableTouch&&(n(this.wrapper,"touchstart",this),n(r,"touchmove",this),n(r,"touchcancel",this),n(r,"touchend",this)),n(this.scroller,"transitionend",this),n(this.scroller,"webkitTransitionEnd",this),n(this.scroller,"oTransitionEnd",this),n(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var e,n,r=t.getComputedStyle(this.scroller,null);return this.options.useTransform?(e=+((r=r[i.style.transform].split(")")[0].split(", "))[12]||r[4]),n=+(r[13]||r[5])):(e=+r.left.replace(/[^-\d.]/g,""),n=+r.top.replace(/[^-\d.]/g,"")),{x:e,y:n}},_initIndicators:function(){var t,e=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],i=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(t={el:a("v",e,this.options.scrollbars),interactive:e,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(t.el),r.push(t)),this.options.scrollX&&(t={el:a("h",e,this.options.scrollbars),interactive:e,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(t.el),r.push(t))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new s(this,r[o]));function u(t){if(i.indicators)for(var e=i.indicators.length;e--;)t.call(i.indicators[e])}this.options.fadeScrollbars&&(this.on("scrollEnd",(function(){u((function(){this.fade()}))})),this.on("scrollCancel",(function(){u((function(){this.fade()}))})),this.on("scrollStart",(function(){u((function(){this.fade(1)}))})),this.on("beforeScrollStart",(function(){u((function(){this.fade(1,!0)}))}))),this.on("refresh",(function(){u((function(){this.refresh()}))})),this.on("destroy",(function(){u((function(){this.destroy()})),delete this.indicators}))},_initWheel:function(){i.addEvent(this.wrapper,"wheel",this),i.addEvent(this.wrapper,"mousewheel",this),i.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",(function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,i.removeEvent(this.wrapper,"wheel",this),i.removeEvent(this.wrapper,"mousewheel",this),i.removeEvent(this.wrapper,"DOMMouseScroll",this)}))},_wheel:function(t){if(this.enabled){t.preventDefault();var e,r,i,o,a=this;if(void 0===this.wheelTimeout&&a._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout((function(){a.options.snap||a._execEvent("scrollEnd"),a.wheelTimeout=void 0}),400),"deltaX"in t)1===t.deltaMode?(e=-t.deltaX*this.options.mouseWheelSpeed,r=-t.deltaY*this.options.mouseWheelSpeed):(e=-t.deltaX,r=-t.deltaY);else if("wheelDeltaX"in t)e=t.wheelDeltaX/120*this.options.mouseWheelSpeed,r=t.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in t)e=r=t.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in t))return;e=r=-t.detail/3*this.options.mouseWheelSpeed}if(e*=this.options.invertWheelDirection,r*=this.options.invertWheelDirection,this.hasVerticalScroll||(e=r,r=0),this.options.snap)return i=this.currentPage.pageX,o=this.currentPage.pageY,e>0?i--:e<0&&i++,r>0?o--:r<0&&o++,void this.goToPage(i,o);i=this.x+n.round(this.hasHorizontalScroll?e:0),o=this.y+n.round(this.hasVerticalScroll?r:0),this.directionX=e>0?-1:e<0?1:0,this.directionY=r>0?-1:r<0?1:0,i>0?i=0:i<this.maxScrollX&&(i=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(i,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",(function(){var t,e,r,i,o,a,s=0,u=0,l=0,c=this.options.snapStepX||this.wrapperWidth,p=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(r=n.round(c/2),i=n.round(p/2);l>-this.scrollerWidth;){for(this.pages[s]=[],t=0,o=0;o>-this.scrollerHeight;)this.pages[s][t]={x:n.max(l,this.maxScrollX),y:n.max(o,this.maxScrollY),width:c,height:p,cx:l-r,cy:o-i},o-=p,t++;l-=c,s++}else for(t=(a=this.options.snap).length,e=-1;s<t;s++)(0===s||a[s].offsetLeft<=a[s-1].offsetLeft)&&(u=0,e++),this.pages[u]||(this.pages[u]=[]),l=n.max(-a[s].offsetLeft,this.maxScrollX),o=n.max(-a[s].offsetTop,this.maxScrollY),r=l-n.round(a[s].offsetWidth/2),i=o-n.round(a[s].offsetHeight/2),this.pages[u][e]={x:l,y:o,width:a[s].offsetWidth,height:a[s].offsetHeight,cx:r,cy:i},l>this.maxScrollX&&u++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}})),this.on("flick",(function(){var t=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.x-this.startX),1e3),n.min(n.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)}))},_nearestSnap:function(t,e){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var r=0,i=this.pages.length,o=0;if(n.abs(t-this.absStartX)<this.snapThresholdX&&n.abs(e-this.absStartY)<this.snapThresholdY)return this.currentPage;for(t>0?t=0:t<this.maxScrollX&&(t=this.maxScrollX),e>0?e=0:e<this.maxScrollY&&(e=this.maxScrollY);r<i;r++)if(t>=this.pages[r][0].cx){t=this.pages[r][0].x;break}for(i=this.pages[r].length;o<i;o++)if(e>=this.pages[0][o].cy){e=this.pages[0][o].y;break}return r==this.currentPage.pageX&&((r+=this.directionX)<0?r=0:r>=this.pages.length&&(r=this.pages.length-1),t=this.pages[r][0].x),o==this.currentPage.pageY&&((o+=this.directionY)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),e=this.pages[0][o].y),{x:t,y:e,pageX:r,pageY:o}},goToPage:function(t,e,r,i){i=i||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),e>=this.pages[t].length?e=this.pages[t].length-1:e<0&&(e=0);var o=this.pages[t][e].x,a=this.pages[t][e].y;r=void 0===r?this.options.snapSpeed||n.max(n.max(n.min(n.abs(o-this.x),1e3),n.min(n.abs(a-this.y),1e3)),300):r,this.currentPage={x:o,y:a,pageX:t,pageY:e},this.scrollTo(o,a,r,i)},next:function(t,e){var n=this.currentPage.pageX,r=this.currentPage.pageY;++n>=this.pages.length&&this.hasVerticalScroll&&(n=0,r++),this.goToPage(n,r,t,e)},prev:function(t,e){var n=this.currentPage.pageX,r=this.currentPage.pageY;--n<0&&this.hasVerticalScroll&&(n=0,r--),this.goToPage(n,r,t,e)},_initKeys:function(e){var n,r={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(n in this.options.keyBindings)"string"==typeof this.options.keyBindings[n]&&(this.options.keyBindings[n]=this.options.keyBindings[n].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(n in r)this.options.keyBindings[n]=this.options.keyBindings[n]||r[n];i.addEvent(t,"keydown",this),this.on("destroy",(function(){i.removeEvent(t,"keydown",this)}))},_key:function(t){if(this.enabled){var e,r=this.options.snap,o=r?this.currentPage.pageX:this.x,a=r?this.currentPage.pageY:this.y,s=i.getTime(),u=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(e=this.getComputedPosition(),this._translate(n.round(e.x),n.round(e.y)),this.isInTransition=!1),this.keyAcceleration=s-u<200?n.min(this.keyAcceleration+.25,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?o+=r?1:this.wrapperWidth:a+=r?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?o-=r?1:this.wrapperWidth:a-=r?1:this.wrapperHeight;break;case this.options.keyBindings.end:o=r?this.pages.length-1:this.maxScrollX,a=r?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:o=0,a=0;break;case this.options.keyBindings.left:o+=r?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:a+=r?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:o-=r?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:a-=r?1:5+this.keyAcceleration>>0;break;default:return}r?this.goToPage(o,a):(o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollX&&(o=this.maxScrollX,this.keyAcceleration=0),a>0?(a=0,this.keyAcceleration=0):a<this.maxScrollY&&(a=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(o,a,0),this.keyTime=s)}},_animate:function(t,e,n,o){var a=this,s=this.x,u=this.y,l=i.getTime(),c=l+n;this.isAnimating=!0,function p(){var d,h,f,v=i.getTime();if(v>=c)return a.isAnimating=!1,a._translate(t,e),void(a.resetPosition(a.options.bounceTime)||a._execEvent("scrollEnd"));f=o(v=(v-l)/n),d=(t-s)*f+s,h=(e-u)*f+u,a._translate(d,h),a.isAnimating&&r(p)}()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}},s.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(i.removeEvent(this.indicator,"touchstart",this),i.removeEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.removeEvent(this.indicator,"mousedown",this),i.removeEvent(t,"touchmove",this),i.removeEvent(t,i.prefixPointerEvent("pointermove"),this),i.removeEvent(t,"mousemove",this),i.removeEvent(t,"touchend",this),i.removeEvent(t,i.prefixPointerEvent("pointerup"),this),i.removeEvent(t,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(e){var n=e.touches?e.touches[0]:e;e.preventDefault(),e.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=n.pageX,this.lastPointY=n.pageY,this.startTime=i.getTime(),this.options.disableTouch||i.addEvent(t,"touchmove",this),this.options.disablePointer||i.addEvent(t,i.prefixPointerEvent("pointermove"),this),this.options.disableMouse||i.addEvent(t,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var e,n,r,o,a=t.touches?t.touches[0]:t;i.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,e=a.pageX-this.lastPointX,this.lastPointX=a.pageX,n=a.pageY-this.lastPointY,this.lastPointY=a.pageY,r=this.x+e,o=this.y+n,this._pos(r,o),t.preventDefault(),t.stopPropagation()},_end:function(e){if(this.initiated){if(this.initiated=!1,e.preventDefault(),e.stopPropagation(),i.removeEvent(t,"touchmove",this),i.removeEvent(t,i.prefixPointerEvent("pointermove"),this),i.removeEvent(t,"mousemove",this),this.scroller.options.snap){var r=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),o=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.scroller.x-r.x),1e3),n.min(n.abs(this.scroller.y-r.y),1e3)),300);this.scroller.x==r.x&&this.scroller.y==r.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=r,this.scroller.scrollTo(r.x,r.y,o,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var e=i.style.transitionDuration;if(this.indicatorStyle[e]=t+"ms",!t&&i.isBadAndroid){this.indicatorStyle[e]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.indicatorStyle[e]&&(n.indicatorStyle[e]="0s")}))}},transitionTimingFunction:function(t){this.indicatorStyle[i.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(i.addClass(this.wrapper,"iScrollBothScrollbars"),i.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(i.removeClass(this.wrapper,"iScrollBothScrollbars"),i.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=n.max(n.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=n.max(n.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&n.round(this.sizeRatioX*this.scroller.x)||0,e=this.options.listenY&&n.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(t<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=n.max(this.indicatorWidth+t,8),this.indicatorStyle.width=this.width+"px"),t=this.minBoundaryX):t>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=n.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),e<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=n.max(this.indicatorHeight+3*e,8),this.indicatorStyle.height=this.height+"px"),e=this.minBoundaryY):e>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=n.max(this.indicatorHeight-3*(e-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",e=this.maxPosY+this.indicatorHeight-this.height):e=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=e,this.scroller.options.useTransform?this.indicatorStyle[i.style.transform]="translate("+t+"px,"+e+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=e+"px")},_pos:function(t,e){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),e<0?e=0:e>this.maxPosY&&(e=this.maxPosY),t=this.options.listenX?n.round(t/this.sizeRatioX):this.scroller.x,e=this.options.listenY?n.round(e/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,e)},fade:function(t,e){if(!e||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var n=t?250:500,r=t?0:300;t=t?"1":"0",this.wrapperStyle[i.style.transitionDuration]=n+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),r)}}},o.utils=i,"undefined"!=typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define((function(){return o})):t.IScroll=o}(window,document,Math),function(t){var e=!1;if("function"==typeof define&&define.amd&&(define(t),e=!0),"object"==typeof exports&&(module.exports=t(),e=!0),!e){var n=window.Cookies,r=window.Cookies=t();r.noConflict=function(){return window.Cookies=n,r}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function e(n){function r(e,i,o){var a;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=t({path:"/"},r.defaults,o)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*o.expires),o.expires=s}o.expires=o.expires?o.expires.toUTCString():"";try{a=JSON.stringify(i),/^[\{\[]/.test(a)&&(i=a)}catch(t){}i=n.write?n.write(i,e):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var u="";for(var l in o)o[l]&&(u+="; "+l,!0!==o[l]&&(u+="="+o[l]));return document.cookie=e+"="+i+u}e||(a={});for(var c=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,d=0;d<c.length;d++){var h=c[d].split("="),f=h.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var v=h[0].replace(p,decodeURIComponent);if(f=n.read?n.read(f,v):n(f,v)||f.replace(p,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(t){}if(e===v){a=f;break}e||(a[v]=f)}catch(t){}}return a}}return r.set=r,r.get=function(t){return r.call(r,t)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(e,n){r(e,"",t(n,{expires:-1}))},r.withConverter=e,r}((function(){}))})),window.requestAnimationFrame=function(){"use strict";return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimaitonFrame||function(t){window.setTimeout(t,1e3/60)}}(),function(t){"use strict";var e,n,r={NONE:0,HORIZONTAL:1,LEFT_TO_RIGHT:2,RIGHT_TO_LEFT:3,VERTICAL:4,TOP_TO_DOWN:5,DOWN_TO_TOP:6},i=Math.abs,o=Math.max,a=["INPUT","SELECT","OPTION"],s=t("<div></div>");s.css({"background-color":"rgba(0, 0, 0, 0)",position:"fixed",top:0,width:"100vw",height:"100vh","z-index":1e5});var u=[],l=[],c=null,p=function(e){e&&(e.pointerId&&e.pointerId!==c||e.touches&&e.touches.length>1)&&d(e),t.each(u,(function(t,n){return n(e)}))},d=function(e){c=null,t.each(l,(function(t,n){return n(e)})),u.length=0,l.length=0};function h(t,e,n){(t.__zone_symbol__addEventListener||t.addEventListener).call(t,e,n,{passive:!0})}function f(e,n,r){var i=function(e){for(var r=n;r;)e.push({$ele:t(r),last:{scrollLeft:r.iscroll?r.iscroll.x:r.scrollLeft,scrollTop:r.iscroll?r.iscroll.y:r.scrollTop}}),r=r.parentElement;return e}([]);this.hasSrcolled=function(){return r===t.fn.swipey.DIRECTIONS.VERTICAL?(t.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.y)||0===this.$ele[0].iscroll.y||(e=!0):0!==this.$ele[0].scrollTop&&(e=!0)})),e):r===t.fn.swipey.DIRECTIONS.HORIZONTAL?function(){var e;return t.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.x)||0===this.$ele[0].iscroll.x||(e=!0):0!==this.$ele[0].scrollLeft&&(e=!0)})),e}():void 0;var e}}function v(t){return t.originalEvent&&"mouse"!==t.originalEvent.pointerType?t.originalEvent:t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0]||t&&t.touches&&t.touches[0]||t}function m(t,e,n){var a,s,u=0;return n===r.HORIZONTAL?u=e.x-t.x:n===r.LEFT_TO_RIGHT?u=o(e.x-t.x,0):n===r.RIGHT_TO_LEFT?u=o(t.x-e.x,0):n===r.VERTICAL?u=e.y-t.y:n===r.TOP_TO_DOWN?u=o(e.y-t.y,0):n===r.DOWN_TO_TOP?u=o(t.y-e.y,0):(a=e.x-t.x,s=e.y-t.y,u=o(i(a),i(s)),(a<0&&i(a)===u||s<0&&i(s)===u)&&(u=-u)),u}function g(t,r){var i=v(t);i&&r.data.path.push({x:i.pageX,y:i.pageY}),n.push((function(){e.onSwipeEnd(t,r.data),r.onSwipeEnd.call(r.target,t,r.data)})),n.process()}function y(r,o){var a,c,p=v(r),d=o.data.path[0],h={x:p.pageX,y:p.pageY};return c=m(d,h,o.direction),o.data.length=c<0?-1:1,o.lastDistance=o.data.length,o.data.path=[h],o.data.totalLength=i(o.data.length),o.data.startTime=Date.now(),!1!==o.onSwipeStart.call(o.target,r,o.data)&&(s.appendTo(t("body")),a=function(t){s.remove(),g(t,o)},(u=[]).push((function(r){!function(r,o){var a,s,u=v(r),l=o.data.path[0],c={x:u.pageX,y:u.pageY},p=m(l,c,o.direction),d=[];if(o.renderInProgress=!1,p!==o.lastDistance){a=30*(p<o.lastDistance?-1:1),s=p-o.lastDistance;for(var h=a;a>0&&h<=s||a<0&&h>=s;h+=a)d.push(h+o.lastDistance);s%a!=0&&d.push(s%i(a)+(0===d.length?o.lastDistance:d[d.length-1])),o.lastDistance=p,t.each(d,(function(){var t=this;n.push((function(){o.data.length=t,o.data.totalLength+=i(t),o.data.velocity=i(o.data.totalLength/(Date.now()-o.data.startTime)),o.data.path.push(c),!1===o.onSwipe.call(o.target,r,o.data)&&g(r,o),e.onSwipe(r,o.data)}))})),n.process()}}(r,o)})),(l=[]).push(a),e.onSwipeStart(r,o.data),!0)}function b(t,e){var n=e.data.path[0],o={x:t.pageX,y:t.pageY},a=m(n,o,e.direction);return i(a)>e.threshold&&function(t,e,n){if(n===r.HORIZONTAL){if(Math.abs((e.y-t.y)/(e.x-t.x))<=.36397023426)return!0}else if(n===r.VERTICAL&&Math.abs((e.y-t.y)/(e.x-t.x))>=2.74747741945)return!0;return!1}(n,o,e.direction)}function w(t){var e=t.bindEvents,n="";_.includes(e,"touch")?n+="touchstart":_.includes(e,"mouse")?n+="mousedown":_.includes(e,"pointer")&&(n+="pointerdown"),n&&h(t.target[0],n,(function(e){if(!t.disableMouse||"mouse"!==e.pointerType){if("mouse"!==e.pointerType&&e.MSPOINTER_TYPE_MOUSE&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){if(!(a.indexOf(e.target.tagName)<0))return;e.preventDefault()}var n=v(e);n&&function(t,e){var n;e.scrollObserver=new f(event.currentTarget,event.target,e.direction),n=function(t){if(b(v(t),e)&&(e.scrollObserver.hasSrcolled()||y(t,e)))return!1},u.push(n),e.data={path:[{x:t.pageX,y:t.pageY}]}}(n,t)}}))}window.PointerEvent&&function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(t[1],10)}}()>=13?(h(document,"pointerdown",(function(t){c&&c!==t.pointerId?d(t):c=t.pointerId})),h(document,"pointermove",p),h(document,"pointerup",d),h(document,"pointercancel",d)):(h(document,"mousemove",p),h(document,"touchmove",p),h(document,"mouseup",d),h(document,"touchcancel",d),h(document,"touchend",d)),n=new function(){var t=[],e=!1;function n(){if(t.length>0){try{t.shift()()}catch(t){console.error("Function invocation failed",t)}window.requestAnimationFrame(n)}else e=!1}this.push=function(e){t.push(e)},this.process=function(){e||(e=!0,n())}},t.fn.swipey=function(e){return this.each((function(){w(t.extend({direction:r.NONE,target:t(this),bindEvents:["touch","mouse"],swipeTarget:document,threshold:30,onSwipeStart:t.noop,onSwipe:t.noop,onSwipeEnd:t.noop,disableMouse:!0},e))})),this},e={onSwipeStart:function(e,n){if(t.fn.swipey.trace){var r='<svg height="100vh" width="100vw" id ="canvas"> <path stroke="rgba(0, 0, 0, 0.5)" stroke-linecap="round" stroke-width="20" fill-opacity="0" stroke-opacity="0.8" d="M'+n.path[0].x+" "+n.path[0].y+' " /> </svg>';r.css({position:"fixed",top:0,left:0,width:"100vw",height:"100vh","z-index":1e4}),t("body").append(r),n.tracer={pathd:t("#canvas path")}}},onSwipe:function(t,e){if(e.tracer){var n=e.tracer.pathd.attr("d"),r=e.path[e.path.length-1];e.tracer.pathd.attr("d",n+" L"+r.x+" "+r.y+" ")}},onSwipeEnd:function(e,n){if(n.tracer){var r=n.path[0],i=[r,{y:r.y-50},{x:r.x+50},{y:r.y+50}],o=0;_.forEach(n.path,(function(t){var e;o!==i.length&&(!(e=i[o]).x||e.x<=t.x)&&(!e.y||e.y<=t.y)&&o++})),setTimeout((function(){t("body >#canvas").remove()}),500)}}},t.fn.swipey.DIRECTIONS=r}(jQuery),function(t){var e,n=/\$\{\{[a-zA-Z\+-/%\.\*\s\(\)\d,\\'"\$_]*\}\}/;function r(r){var i,o=[];if(e=e||(t.fn.swipeAnimation.expressionEvaluator?t.fn.swipeAnimation.expressionEvaluator:window.exprEval&&window.exprEval.Parser?function(t){var e=(new window.exprEval.Parser).parse(t);return function(t){return e.evaluate(t)}}:void 0),_.isFunction(r))return r;if(e){for(;null!==(i=n.exec(r));){var a=i[0],s=r.substring(0,i.index);r=r.substring(i.index+a.length),a=a.substring(3,a.length-2),o.push(s),o.push(e(a).bind({}))}return o.push(r),function(){var t=arguments;return _.map(o,(function(e){return _.isFunction(e)?e.apply(void 0,t):e})).join("")}}}function i(t,e,n){return _.isFunction(t)?t.apply(e,n):t}function o(t,e,n){var r=0,o=i(e.bounds,t,n);return _.isUndefined(o.center)||(r=o.center),_.isUndefined(o.lower)||(o.lower=o.lower+r),_.isUndefined(o.upper)||(o.upper=o.upper+r),o}function a(t){_.forEach(t.animation,(function(t){(_.isFunction(t.target)||t.targetFn)&&(t.targetFn=_.isUndefined(t.targetFn)?t.target:t.targetFn,t.target=t.targetFn())}))}function s(){this.setSettings=function(t,e){e.data("swipeAnimationDefaults",t)},this.getSettings=function(t){return t.data("swipeAnimationDefaults")}}function u(e,n,r,i,o,a){_.forEach(e.animation,(function(e){e.target&&(e.target.length>1?e.target.each((function(r){n.$i=r,t(this).css(_.mapValues(e.css,(function(t,e){return t(n)})))})):(n.$i=0,e.target.css(_.mapValues(e.css,(function(t,e){return t(n)})))),e.target.css({transition:"all ease-out "+r+"ms"}),e.target.one("webkitTransitionEnd transitionend",(function(){e.target.css({transition:""})})))})),setTimeout((function(){window.requestAnimationFrame((function(){n.$D===n.bounds.lower?e.onLower.call(i,a):n.$D===n.bounds.upper&&e.onUpper.call(i,a),e.onAnimation(a,o)}))}),r)}var l={gotoUpper:function(){c(this,"upper",arguments[1])},gotoLower:function(t){c(this,"lower",arguments[1])}};function c(t,e,n){var r,l=(new s).getSettings(t),c={},p=o(t,l);a(l),n=n||300,r=i(l.context,t),(c=_.extend({},r)).$d=0,c.$D="lower"===e?p.lower:p.upper,c.bounds=p,u(l,c,n,t)}function p(e,n){var l={$D:0},c={max:Math.max,min:Math.min,abs:Math.abs};if(!_.isArray(n.animation)){var p=n.animation.target||e,d=n.animation.css||n.animation;delete d[e],n.animation=[{target:p,css:d}]}_.forEach(n.animation,(function(t){t.css=_.mapValues(t.css,(function(t,e){return r(t)}))})),(new s).setSettings(n,e),e.swipey({direction:n.direction,threshold:n.threshold,bindEvents:n.bindEvents,target:n.target,onSwipeStart:function(t,r){var s,u,p,d;if(l.$d=0,l.bounds=o(this,n,[t,r.length]),_.isUndefined(l.bounds.center)?l.$D=0:l.$D=l.bounds.center,s=l.$D+r.length,l.bounds.strictLower=!(!1===l.bounds.strict||!1===l.bounds.strictLower),l.bounds.strictUpper=!(!1===l.bounds.strict||!1===l.bounds.strictUpper),!n.enableGestures()||l.bounds.strictLower&&(_.isUndefined(l.bounds.lower)&&r.length<0||!_.isUndefined(l.bounds.lower)&&l.bounds.lower>s)||l.bounds.strictUpper&&(_.isUndefined(l.bounds.upper)&&r.length>0||!_.isUndefined(l.bounds.upper)&&l.bounds.upper<s))return!1;l.vc=(u=0,p=0,d=0,{addDistance:function(t){var e=Date.now();return Math.abs(t-u)>10&&e!==p&&(d=(t-u)/(e-p),u=t,p=e),d=d<0?Math.min(d,-1):Math.max(d,1),this},getVelocity:function(){return d},getTime:function(t){return Math.abs(t/d)}}),l.context=_.extend(c,i(n.context,e)),l.localState=_.extend({},l.context),a(n),_.forEach(n.animation,(function(t){t.target&&t.target.css({transition:"none"})}))},onSwipe:function(e,r){var i=l.localState,o=l.$D+r.length;i.$d=r.length,i.$D=l.$D,l.bounds.strictLower&&!_.isUndefined(l.bounds.lower)&&l.bounds.lower>o?i.$d=l.bounds.lower-l.$D:l.bounds.strictUpper&&!_.isUndefined(l.bounds.upper)&&l.bounds.upper<o&&(i.$d=l.bounds.upper-l.$D),l.vc.addDistance(r.length),_.forEach(n.animation,(function(e){e.target&&(e.target.length>1?e.target.each((function(n){i.$i=n,t(this).css(_.mapValues(e.css,(function(t,e){return t(i)})))})):(i.$i=0,e.target.css(_.mapValues(e.css,(function(t,e){return t(i)})))))}))},onSwipeEnd:function(t,r){var i,o=l.localState,a=l.$D+r.length,s=l.vc.getVelocity();o.$d=r.length,o.$D=l.$D,!_.isUndefined(l.bounds.lower)&&s<=0&&l.$D>a?o.$D=l.bounds.lower:!_.isUndefined(l.bounds.upper)&&s>=0&&l.$D<a&&(o.$D=l.bounds.upper),o.$d=0,o.bounds=l.bounds,l.$D=o.$D,i=l.vc.getTime(o.$D-a),u(n,o,i,e,a,t)}})}t.fn.swipeAnimation=function(e){return l[e]?l[e].apply(this,arguments):(this.each((function(){p(t(this),t.extend({direction:t.fn.swipey.DIRECTIONS.HORIZONTAL,target:t(this),threshold:30,enableGestures:function(){return!0},bindEvents:["touch"],bounds:{},context:{},animation:{},onLower:t.noop,onUpper:t.noop,onAnimation:t.noop},e))})),this)}}(jQuery),function(t){function e(t,e){if(!(t.originalEvent.touches.length>1)){$(t.target).is("input")||$(t.target).is("textarea")||$(t.target).is("select")||$(t.target).is("button")||$(t.target).is("option")?t.stopPropagation():t.preventDefault();var n=t.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(e,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(r)}}if(t.support.touch="ontouchend"in document,t.support.touch){var n,r=t.ui.mouse.prototype,i=r._mouseInit,o=r._mouseDestroy;r._touchStart=function(t){!n&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,e(t,"mouseover"),e(t,"mousemove"),e(t,"mousedown"))},r._touchMove=function(t){n&&(this._touchMoved=!0,e(t,"mousemove"))},r._touchEnd=function(t){n&&(e(t,"mouseup"),e(t,"mouseout"),this._touchMoved||e(t,"click"),n=!1)},r._mouseInit=function(){var e=this;e.element.bind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),i.call(e)},r._mouseDestroy=function(){var e=this;e.element.unbind({touchstart:t.proxy(e,"_touchStart"),touchmove:t.proxy(e,"_touchMove"),touchend:t.proxy(e,"_touchEnd")}),o.call(e)}}}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).IMask={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i={},o=function(t){try{return!!t()}catch(t){return!0}},a=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={},u={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c=l&&!u.call({1:2},1);s.f=c?function(t){var e=l(this,t);return!!e&&e.enumerable}:u;var p,d,h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,v="".split,m=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==function(t){return f.call(t).slice(8,-1)}(t)?v.call(t,""):Object(t)}:Object,g=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=m,b=g,_=function(t){return y(b(t))},w=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=r,x=function(t){return"function"==typeof t?t:void 0},S=function(t,e){return arguments.length<2?x(E[t]):E[t]&&E[t][e]},C=S("navigator","userAgent")||"",T=r,k=C,D=T.process,A=T.Deno,M=D&&D.versions||A&&A.version,O=M&&M.v8;O?d=(p=O.split("."))[0]<4?1:p[0]+p[1]:k&&(!(p=k.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=k.match(/Chrome\/(\d+)/))&&(d=p[1]);var I=d&&+d,P=o,R=!!Object.getOwnPropertySymbols&&!P((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&I&&I<41})),N=R&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,L=S,F=N?function(t){return"symbol"==typeof t}:function(t){var e=L("Symbol");return"function"==typeof e&&Object(t)instanceof e},j=w,B={exports:{}},V=r,H=function(t,e){try{Object.defineProperty(V,t,{value:e,configurable:!0,writable:!0})}catch(n){V[t]=e}return e},U=H,q="__core-js_shared__",Y=r[q]||U(q,{}),z=Y;(B.exports=function(t,e){return z[t]||(z[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"});var W=g,G=function(t){return Object(W(t))},K=G,$={}.hasOwnProperty,Z=Object.hasOwn||function(t,e){return $.call(K(t),e)},X=0,Q=Math.random(),J=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+Q).toString(36)},tt=r,et=B.exports,nt=Z,rt=J,it=R,ot=N,at=et("wks"),st=tt.Symbol,ut=ot?st:st&&st.withoutSetter||rt,lt=w,ct=F,pt=function(t){return nt(at,t)&&(it||"string"==typeof at[t])||(it&&nt(st,t)?at[t]=st[t]:at[t]=ut("Symbol."+t)),at[t]}("toPrimitive"),dt=function(t,e){if(!lt(t)||ct(t))return t;var n,r=t[pt];if(void 0!==r){if(void 0===e&&(e="default"),n=r.call(t,e),!lt(n)||ct(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!j(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!j(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!j(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(t,e)},ht=F,ft=function(t){var e=dt(t,"string");return ht(e)?e:String(e)},vt=w,mt=r.document,gt=vt(mt)&&vt(mt.createElement),yt=!a&&!o((function(){return 7!=Object.defineProperty(function(t){return gt?mt.createElement(t):{}}("div"),"a",{get:function(){return 7}}).a})),bt=a,_t=s,wt=h,Et=_,xt=ft,St=Z,Ct=yt,Tt=Object.getOwnPropertyDescriptor;i.f=bt?Tt:function(t,e){if(t=Et(t),e=xt(e),Ct)try{return Tt(t,e)}catch(t){}if(St(t,e))return wt(!_t.f.call(t,e),t[e])};var kt={},Dt=w,At=function(t){if(!Dt(t))throw TypeError(String(t)+" is not an object");return t},Mt=a,Ot=yt,It=At,Pt=ft,Rt=Object.defineProperty;kt.f=Mt?Rt:function(t,e,n){if(It(t),e=Pt(e),It(n),Ot)try{return Rt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Nt=kt,Lt=h,Ft=a?function(t,e,n){return Nt.f(t,e,Lt(1,n))}:function(t,e,n){return t[e]=n,t},jt={exports:{}},Bt=Y,Vt=Function.toString;"function"!=typeof Bt.inspectSource&&(Bt.inspectSource=function(t){return Vt.call(t)});var Ht,Ut,qt,Yt=Bt.inspectSource,zt=Yt,Wt=r.WeakMap,Gt="function"==typeof Wt&&/native code/.test(zt(Wt)),Kt=B.exports,$t=J,Zt=Kt("keys"),Xt={},Qt=Gt,Jt=w,te=Ft,ee=Z,ne=Y,re=Xt,ie="Object already initialized",oe=r.WeakMap;if(Qt||ne.state){var ae=ne.state||(ne.state=new oe),se=ae.get,ue=ae.has,le=ae.set;Ht=function(t,e){if(ue.call(ae,t))throw new TypeError(ie);return e.facade=t,le.call(ae,t,e),e},Ut=function(t){return se.call(ae,t)||{}},qt=function(t){return ue.call(ae,t)}}else{var ce=function(t){return Zt[t]||(Zt[t]=$t(t))}("state");re[ce]=!0,Ht=function(t,e){if(ee(t,ce))throw new TypeError(ie);return e.facade=t,te(t,ce,e),e},Ut=function(t){return ee(t,ce)?t[ce]:{}},qt=function(t){return ee(t,ce)}}var pe={set:Ht,get:Ut,has:qt,enforce:function(t){return qt(t)?Ut(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!Jt(e)||(n=Ut(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},de=r,he=Ft,fe=Z,ve=H,me=Yt,ge=pe.get,ye=pe.enforce,be=String(String).split("String");(jt.exports=function(t,e,n,r){var i,o=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||fe(n,"name")||he(n,"name",e),(i=ye(n)).source||(i.source=be.join("string"==typeof e?e:""))),t!==de?(o?!s&&t[e]&&(a=!0):delete t[e],a?t[e]=n:he(t,e,n)):a?t[e]=n:ve(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&ge(this).source||me(this)}));var _e={},we=Math.ceil,Ee=Math.floor,xe=function(t){return isNaN(t=+t)?0:(t>0?Ee:we)(t)},Se=xe,Ce=Math.min,Te=function(t){return t>0?Ce(Se(t),9007199254740991):0},ke=xe,De=Math.max,Ae=Math.min,Me=_,Oe=Te,Ie=function(t){return function(e,n,r){var i,o=Me(e),a=Oe(o.length),s=function(t,e){var n=ke(t);return n<0?De(n+e,0):Ae(n,e)}(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},Pe={includes:Ie(!0),indexOf:Ie(!1)},Re=Z,Ne=_,Le=Pe.indexOf,Fe=Xt,je=function(t,e){var n,r=Ne(t),i=0,o=[];for(n in r)!Re(Fe,n)&&Re(r,n)&&o.push(n);for(;e.length>i;)Re(r,n=e[i++])&&(~Le(o,n)||o.push(n));return o},Be=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ve=je,He=Be.concat("length","prototype");_e.f=Object.getOwnPropertyNames||function(t){return Ve(t,He)};var Ue={};Ue.f=Object.getOwnPropertySymbols;var qe=_e,Ye=Ue,ze=At,We=S("Reflect","ownKeys")||function(t){var e=qe.f(ze(t)),n=Ye.f;return n?e.concat(n(t)):e},Ge=Z,Ke=We,$e=i,Ze=kt,Xe=o,Qe=/#|\.prototype\./,Je=function(t,e){var n=en[tn(t)];return n==rn||n!=nn&&("function"==typeof e?Xe(e):!!e)},tn=Je.normalize=function(t){return String(t).replace(Qe,".").toLowerCase()},en=Je.data={},nn=Je.NATIVE="N",rn=Je.POLYFILL="P",on=Je,an=r,sn=i.f,un=Ft,ln=jt.exports,cn=H,pn=function(t,e){for(var n=Ke(e),r=Ze.f,i=$e.f,o=0;o<n.length;o++){var a=n[o];Ge(t,a)||r(t,a,i(e,a))}},dn=on,hn=function(t,e){var n,r,i,o,a,s=t.target,u=t.global,l=t.stat;if(n=u?an:l?an[s]||cn(s,{}):(an[s]||{}).prototype)for(r in e){if(o=e[r],i=t.noTargetGet?(a=sn(n,r))&&a.value:n[r],!dn(u?r:s+(l?".":"#")+r,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;pn(o,i)}(t.sham||i&&i.sham)&&un(o,"sham",!0),ln(n,r,o,t)}},fn=je,vn=Be,mn=Object.keys||function(t){return fn(t,vn)},gn=a,yn=o,bn=mn,_n=Ue,wn=s,En=G,xn=m,Sn=Object.assign,Cn=Object.defineProperty,Tn=!Sn||yn((function(){if(gn&&1!==Sn({b:1},Sn(Cn({},"a",{enumerable:!0,get:function(){Cn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Sn({},t)[n]||bn(Sn({},e)).join("")!=r}))?function(t,e){for(var n=En(t),r=arguments.length,i=1,o=_n.f,a=wn.f;r>i;)for(var s,u=xn(arguments[i++]),l=o?bn(u).concat(o(u)):bn(u),c=l.length,p=0;c>p;)s=l[p++],gn&&!a.call(u,s)||(n[s]=u[s]);return n}:Sn;hn({target:"Object",stat:!0,forced:Object.assign!==Tn},{assign:Tn});var kn=F,Dn=function(t){if(kn(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},An=xe,Mn=Dn,On=g,In=function(t){var e=Mn(On(this)),n="",r=An(t);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n};hn({target:"String",proto:!0},{repeat:In});var Pn=Te,Rn=Dn,Nn=In,Ln=g,Fn=Math.ceil,jn=function(t){return function(e,n,r){var i,o,a=Rn(Ln(e)),s=a.length,u=void 0===r?" ":Rn(r),l=Pn(n);return l<=s||""==u?a:(i=l-s,(o=Nn.call(u,Fn(i/u.length))).length>i&&(o=o.slice(0,i)),t?a+o:o+a)}},Bn={start:jn(!1),end:jn(!0)},Vn=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(C),Hn=Bn.start;hn({target:"String",proto:!0,forced:Vn},{padStart:function(t){return Hn(this,t,arguments.length>1?arguments[1]:void 0)}});var Un=Bn.end;function qn(t){return(qn="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 Yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wn(t,e,n){return e&&zn(t.prototype,e),n&&zn(t,n),t}function Gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$n(t,e)}function Kn(t){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $n(t,e){return($n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zn(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Xn(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Kn(t);if(e){var i=Kn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xn(this,n)}}function Jn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}function tr(t,e,n){return(tr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Jn(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function er(t,e,n,r){return(er="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,r){var i,o=Jn(t,e);if(o){if((i=Object.getOwnPropertyDescriptor(o,e)).set)return i.set.call(r,n),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(r,e)){if(!i.writable)return!1;i.value=n,Object.defineProperty(r,e,i)}else!function(t,e,n){e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(r,e,n);return!0})(t,e,n,r)}function nr(t,e,n,r,i){if(!er(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}function rr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function or(t){return"string"==typeof t||t instanceof String}hn({target:"String",proto:!0,forced:Vn},{padEnd:function(t){return Un(this,t,arguments.length>1?arguments[1]:void 0)}}),hn({global:!0},{globalThis:r});var ar="NONE",sr="LEFT",ur="FORCE_LEFT",lr="RIGHT",cr="FORCE_RIGHT";function pr(t){switch(t){case sr:return ur;case lr:return cr;default:return t}}function dr(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function hr(t,e){if(e===t)return!0;var n,r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}if(r!=i)return!1;if(e&&t&&"object"===qn(e)&&"object"===qn(t)){var o=e instanceof Date,a=t instanceof Date;if(o&&a)return e.getTime()==t.getTime();if(o!=a)return!1;var s=e instanceof RegExp,u=t instanceof RegExp;if(s&&u)return e.toString()==t.toString();if(s!=u)return!1;var l=Object.keys(e);for(n=0;n<l.length;n++)if(!Object.prototype.hasOwnProperty.call(t,l[n]))return!1;for(n=0;n<l.length;n++)if(!hr(t[l[n]],e[l[n]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}var fr=function(){function t(e,n,r,i){for(Yn(this,t),this.value=e,this.cursorPos=n,this.oldValue=r,this.oldSelection=i;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}return Wn(t,[{key:"startChangePos",get:function(){return Math.min(this.cursorPos,this.oldSelection.start)}},{key:"insertedCount",get:function(){return this.cursorPos-this.startChangePos}},{key:"inserted",get:function(){return this.value.substr(this.startChangePos,this.insertedCount)}},{key:"removedCount",get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}},{key:"removed",get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)}},{key:"head",get:function(){return this.value.substring(0,this.startChangePos)}},{key:"tail",get:function(){return this.value.substring(this.startChangePos+this.insertedCount)}},{key:"removeDirection",get:function(){return!this.removedCount||this.insertedCount?ar:this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos?lr:sr}}]),t}(),vr=function(){function t(e){Yn(this,t),Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}return Wn(t,[{key:"aggregate",value:function(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}},{key:"offset",get:function(){return this.tailShift+this.inserted.length}}]),t}(),mr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;Yn(this,t),this.value=e,this.from=n,this.stop=r}return Wn(t,[{key:"toString",value:function(){return this.value}},{key:"extend",value:function(t){this.value+=String(t)}},{key:"appendTo",value:function(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}},{key:"state",get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(t){Object.assign(this,t)}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.value.length)return"";var e=this.value[0];return this.value=this.value.slice(1),e}}]),t}();function gr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new gr.InputMask(t,e)}var yr=function(){function t(e){Yn(this,t),this._value="",this._update(Object.assign({},t.DEFAULTS,e)),this.isInitialized=!0}return Wn(t,[{key:"updateOptions",value:function(t){Object.keys(t).length&&this.withValueRefresh(this._update.bind(this,t))}},{key:"_update",value:function(t){Object.assign(this,t)}},{key:"state",get:function(){return{_value:this.value}},set:function(t){this._value=t._value}},{key:"reset",value:function(){this._value=""}},{key:"value",get:function(){return this._value},set:function(t){this.resolve(t)}},{key:"resolve",value:function(t){return this.reset(),this.append(t,{input:!0},""),this.doCommit(),this.value}},{key:"unmaskedValue",get:function(){return this.value},set:function(t){this.reset(),this.append(t,{},""),this.doCommit()}},{key:"typedValue",get:function(){return this.doParse(this.value)},set:function(t){this.value=this.doFormat(t)}},{key:"rawInputValue",get:function(){return this.extractInput(0,this.value.length,{raw:!0})},set:function(t){this.reset(),this.append(t,{raw:!0},""),this.doCommit()}},{key:"isComplete",get:function(){return!0}},{key:"nearestInputPos",value:function(t,e){return t}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(t,e)}},{key:"extractTail",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new mr(this.extractInput(t,e),t)}},{key:"appendTail",value:function(t){return or(t)&&(t=new mr(String(t))),t.appendTo(this)}},{key:"_appendCharRaw",value:function(t){return t?(this._value+=t,new vr({inserted:t,rawInserted:t})):new vr}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=this.state,i=this._appendCharRaw(this.doPrepare(t,e),e);if(i.inserted){var o,a=!1!==this.doValidate(e);if(a&&null!=n){var s=this.state;this.overwrite&&(o=n.state,n.shiftBefore(this.value.length));var u=this.appendTail(n);(a=u.rawInserted===n.toString())&&u.inserted&&(this.state=s)}a||(i=new vr,this.state=r,n&&o&&(n.state=o))}return i}},{key:"_appendPlaceholder",value:function(){return new vr}},{key:"append",value:function(t,e,n){if(!or(t))throw new Error("value should be string");var r=new vr,i=or(n)?new mr(String(n)):n;e&&e.tail&&(e._beforeTailState=this.state);for(var o=0;o<t.length;++o)r.aggregate(this._appendChar(t[o],e,i));return null!=i&&(r.tailShift+=this.appendTail(i).tailShift),r}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,t)+this.value.slice(e),new vr}},{key:"withValueRefresh",value:function(t){if(this._refreshing||!this.isInitialized)return t();this._refreshing=!0;var e=this.rawInputValue,n=this.value,r=t();return this.rawInputValue=e,this.value&&this.value!==n&&0===n.indexOf(this.value)&&this.append(n.slice(this.value.length),{},""),delete this._refreshing,r}},{key:"runIsolated",value:function(t){if(this._isolated||!this.isInitialized)return t(this);this._isolated=!0;var e=this.state,n=t(this);return this.state=e,delete this._isolated,n}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(t,this,e):t}},{key:"doValidate",value:function(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}},{key:"doCommit",value:function(){this.commit&&this.commit(this.value,this)}},{key:"doFormat",value:function(t){return this.format?this.format(t,this):t}},{key:"doParse",value:function(t){return this.parse?this.parse(t,this):t}},{key:"splice",value:function(t,e,n,r){var i=t+e,o=this.extractTail(i),a=this.nearestInputPos(t,r);return new vr({tailShift:a-t}).aggregate(this.remove(a)).aggregate(this.append(n,{input:!0},o))}}]),t}();function br(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?gr.MaskedRegExp:or(t)?gr.MaskedPattern:t instanceof Date||t===Date?gr.MaskedDate:t instanceof Number||"number"==typeof t||t===Number?gr.MaskedNumber:Array.isArray(t)||t===Array?gr.MaskedDynamic:gr.Masked&&t.prototype instanceof gr.Masked?t:t instanceof Function?gr.MaskedFunction:t instanceof gr.Masked?t.constructor:(console.warn("Mask not found for mask",t),gr.Masked)}function _r(t){if(gr.Masked&&t instanceof gr.Masked)return t;var e=(t=Object.assign({},t)).mask;if(gr.Masked&&e instanceof gr.Masked)return e;var n=br(e);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new n(t)}yr.DEFAULTS={format:function(t){return t},parse:function(t){return t}},gr.Masked=yr,gr.createMask=_r;var wr=["mask"],Er={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},xr=function(){function t(e){Yn(this,t);var n=e.mask,r=Zn(e,wr);this.masked=_r({mask:n}),Object.assign(this,r)}return Wn(t,[{key:"reset",value:function(){this._isFilled=!1,this.masked.reset()}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===t&&e>=1?(this._isFilled=!1,this.masked.remove(t,e)):new vr}},{key:"value",get:function(){return this.masked.value||(this._isFilled&&!this.isOptional?this.placeholderChar:"")}},{key:"unmaskedValue",get:function(){return this.masked.unmaskedValue}},{key:"isComplete",get:function(){return Boolean(this.masked.value)||this.isOptional}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._isFilled)return new vr;var n=this.masked.state,r=this.masked._appendChar(t,e);return r.inserted&&!1===this.doValidate(e)&&(r.inserted=r.rawInserted="",this.masked.state=n),r.inserted||this.isOptional||this.lazy||e.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this._isFilled=Boolean(r.inserted),r}},{key:"append",value:function(){var t;return(t=this.masked).append.apply(t,arguments)}},{key:"_appendPlaceholder",value:function(){var t=new vr;return this._isFilled||this.isOptional||(this._isFilled=!0,t.inserted=this.placeholderChar),t}},{key:"extractTail",value:function(){var t;return(t=this.masked).extractTail.apply(t,arguments)}},{key:"appendTail",value:function(){var t;return(t=this.masked).appendTail.apply(t,arguments)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(t,e,n)}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ar,n=0,r=this.value.length,i=Math.min(Math.max(t,n),r);switch(e){case sr:case ur:return this.isComplete?i:n;case lr:case cr:return this.isComplete?i:r;default:return i}}},{key:"doValidate",value:function(){var t,e;return(t=this.masked).doValidate.apply(t,arguments)&&(!this.parent||(e=this.parent).doValidate.apply(e,arguments))}},{key:"doCommit",value:function(){this.masked.doCommit()}},{key:"state",get:function(){return{masked:this.masked.state,_isFilled:this._isFilled}},set:function(t){this.masked.state=t.masked,this._isFilled=t._isFilled}}]),t}(),Sr=function(){function t(e){Yn(this,t),Object.assign(this,e),this._value=""}return Wn(t,[{key:"value",get:function(){return this._value}},{key:"unmaskedValue",get:function(){return this.isUnmasking?this.value:""}},{key:"reset",value:function(){this._isRawInput=!1,this._value=""}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new vr}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ar,n=0,r=this._value.length;switch(e){case sr:case ur:return n;default:return r}}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.raw&&this._isRawInput&&this._value.slice(t,e)||""}},{key:"isComplete",get:function(){return!0}},{key:"_appendChar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new vr;if(this._value)return n;var r=this.char===t[0],i=r&&(this.isUnmasking||e.input||e.raw)&&!e.tail;return i&&(n.rawInserted=this.char),this._value=n.inserted=this.char,this._isRawInput=i&&(e.raw||e.input),n}},{key:"_appendPlaceholder",value:function(){var t=new vr;return this._value||(this._value=t.inserted=this.char),t}},{key:"extractTail",value:function(){return arguments.length>1&&void 0!==arguments[1]||this.value.length,new mr("")}},{key:"appendTail",value:function(t){return or(t)&&(t=new mr(String(t))),t.appendTo(this)}},{key:"append",value:function(t,e,n){var r=this._appendChar(t,e);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}},{key:"doCommit",value:function(){}},{key:"state",get:function(){return{_value:this._value,_isRawInput:this._isRawInput}},set:function(t){Object.assign(this,t)}}]),t}(),Cr=["chunks"],Tr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Yn(this,t),this.chunks=e,this.from=n}return Wn(t,[{key:"toString",value:function(){return this.chunks.map(String).join("")}},{key:"extend",value:function(e){if(String(e)){or(e)&&(e=new mr(String(e)));var n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||null==e.stop)&&e.from===n.from+n.toString().length;if(e instanceof mr)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof t){if(null==e.stop)for(var i;e.chunks.length&&null==e.chunks[0].stop;)(i=e.chunks.shift()).from+=e.from,this.extend(i);e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}}},{key:"appendTo",value:function(e){if(!(e instanceof gr.MaskedPattern))return new mr(this.toString()).appendTo(e);for(var n=new vr,r=0;r<this.chunks.length&&!n.skip;++r){var i=this.chunks[r],o=e._mapPosToBlock(e.value.length),a=i.stop,s=void 0;if(null!=a&&(!o||o.index<=a)&&((i instanceof t||e._stops.indexOf(a)>=0)&&n.aggregate(e._appendPlaceholder(a)),s=i instanceof t&&e._blocks[a]),s){var u=s.appendTail(i);u.skip=!1,n.aggregate(u),e._value+=u.inserted;var l=i.toString().slice(u.rawInserted.length);l&&n.aggregate(e.append(l,{tail:!0}))}else n.aggregate(e.append(i.toString(),{tail:!0}))}return n}},{key:"state",get:function(){return{chunks:this.chunks.map((function(t){return t.state})),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(e){var n=e.chunks,r=Zn(e,Cr);Object.assign(this,r),this.chunks=n.map((function(e){var n="chunks"in e?new t:new mr;return n.state=e,n}))}},{key:"shiftBefore",value:function(t){if(this.from>=t||!this.chunks.length)return"";for(var e=t-this.from,n=0;n<this.chunks.length;){var r=this.chunks[n],i=r.shiftBefore(e);if(r.toString()){if(!i)break;++n}else this.chunks.splice(n,1);if(i)return i}return""}}]),t}(),kr=function(t){Gn(n,t);var e=Qn(n);function n(){return Yn(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_update",value:function(t){t.mask&&(t.validate=function(e){return e.search(t.mask)>=0}),tr(Kn(n.prototype),"_update",this).call(this,t)}}]),n}(yr);gr.MaskedRegExp=kr;var Dr=["_blocks"],Ar=function(t){Gn(n,t);var e=Qn(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Yn(this,n),t.definitions=Object.assign({},Er,t.definitions),e.call(this,Object.assign({},n.DEFAULTS,t))}return Wn(n,[{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.definitions=Object.assign({},this.definitions,t.definitions),tr(Kn(n.prototype),"_update",this).call(this,t),this._rebuildMask()}},{key:"_rebuildMask",value:function(){var t=this,e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};var r=this.mask;if(r&&e)for(var i=!1,o=!1,a=0;a<r.length;++a)if(!this.blocks||"continue"!==function(){var e=r.slice(a),n=Object.keys(t.blocks).filter((function(t){return 0===e.indexOf(t)}));n.sort((function(t,e){return e.length-t.length}));var i=n[0];if(i){var o=_r(Object.assign({parent:t,lazy:t.lazy,placeholderChar:t.placeholderChar,overwrite:t.overwrite},t.blocks[i]));return o&&(t._blocks.push(o),t._maskedBlocks[i]||(t._maskedBlocks[i]=[]),t._maskedBlocks[i].push(t._blocks.length-1)),a+=i.length-1,"continue"}}()){var s=r[a],u=s in e;if(s!==n.STOP_CHAR)if("{"!==s&&"}"!==s)if("["!==s&&"]"!==s){if(s===n.ESCAPE_CHAR){if(++a,!(s=r[a]))break;u=!1}var l=u?new xr({parent:this,lazy:this.lazy,placeholderChar:this.placeholderChar,mask:e[s],isOptional:o}):new Sr({char:s,isUnmasking:i});this._blocks.push(l)}else o=!o;else i=!i;else this._stops.push(this._blocks.length)}}},{key:"state",get:function(){return Object.assign({},tr(Kn(n.prototype),"state",this),{_blocks:this._blocks.map((function(t){return t.state}))})},set:function(t){var e=t._blocks,r=Zn(t,Dr);this._blocks.forEach((function(t,n){return t.state=e[n]})),nr(Kn(n.prototype),"state",r,this,!0)}},{key:"reset",value:function(){tr(Kn(n.prototype),"reset",this).call(this),this._blocks.forEach((function(t){return t.reset()}))}},{key:"isComplete",get:function(){return this._blocks.every((function(t){return t.isComplete}))}},{key:"doCommit",value:function(){this._blocks.forEach((function(t){return t.doCommit()})),tr(Kn(n.prototype),"doCommit",this).call(this)}},{key:"unmaskedValue",get:function(){return this._blocks.reduce((function(t,e){return t+e.unmaskedValue}),"")},set:function(t){nr(Kn(n.prototype),"unmaskedValue",t,this,!0)}},{key:"value",get:function(){return this._blocks.reduce((function(t,e){return t+e.value}),"")},set:function(t){nr(Kn(n.prototype),"value",t,this,!0)}},{key:"appendTail",value:function(t){return tr(Kn(n.prototype),"appendTail",this).call(this,t).aggregate(this._appendPlaceholder())}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._mapPosToBlock(this.value.length),r=new vr;if(!n)return r;for(var i=n.index;;++i){var o=this._blocks[i];if(!o)break;var a=o._appendChar(t,e),s=a.skip;if(r.aggregate(a),s||a.rawInserted)break}return r}},{key:"extractTail",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,r=new Tr;return e===n||this._forEachBlocksInRange(e,n,(function(e,n,i,o){var a=e.extractTail(i,o);a.stop=t._findStopBefore(n),a.from=t._blockStartPos(n),a instanceof Tr&&(a.blockIndex=n),r.extend(a)})),r}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===e)return"";var r="";return this._forEachBlocksInRange(t,e,(function(t,e,i,o){r+=t.extractInput(i,o,n)})),r}},{key:"_findStopBefore",value:function(t){for(var e,n=0;n<this._stops.length;++n){var r=this._stops[n];if(!(r<=t))break;e=r}return e}},{key:"_appendPlaceholder",value:function(t){var e=this,n=new vr;if(this.lazy&&null==t)return n;var r=this._mapPosToBlock(this.value.length);if(!r)return n;var i=r.index,o=null!=t?t:this._blocks.length;return this._blocks.slice(i,o).forEach((function(r){if(!r.lazy||null!=t){var i=null!=r._blocks?[r._blocks.length]:[],o=r._appendPlaceholder.apply(r,i);e._value+=o.inserted,n.aggregate(o)}})),n}},{key:"_mapPosToBlock",value:function(t){for(var e="",n=0;n<this._blocks.length;++n){var r=this._blocks[n],i=e.length;if(t<=(e+=r.value).length)return{index:n,offset:t-i}}}},{key:"_blockStartPos",value:function(t){return this._blocks.slice(0,t).reduce((function(t,e){return t+e.value.length}),0)}},{key:"_forEachBlocksInRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=arguments.length>2?arguments[2]:void 0,r=this._mapPosToBlock(t);if(r){var i=this._mapPosToBlock(e),o=i&&r.index===i.index,a=r.offset,s=i&&o?i.offset:this._blocks[r.index].value.length;if(n(this._blocks[r.index],r.index,a,s),i&&!o){for(var u=r.index+1;u<i.index;++u)n(this._blocks[u],u,0,this._blocks[u].value.length);n(this._blocks[i.index],i.index,0,i.offset)}}}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,r=tr(Kn(n.prototype),"remove",this).call(this,t,e);return this._forEachBlocksInRange(t,e,(function(t,e,n,i){r.aggregate(t.remove(n,i))})),r}},{key:"nearestInputPos",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ar,n=this._mapPosToBlock(t)||{index:0,offset:0},r=n.offset,i=n.index,o=this._blocks[i];if(!o)return t;var a=r;0!==a&&a<o.value.length&&(a=o.nearestInputPos(r,pr(e)));var s=a===o.value.length,u=0===a;if(!u&&!s)return this._blockStartPos(i)+a;var l=s?i+1:i;if(e===ar){if(l>0){var c=l-1,p=this._blocks[c],d=p.nearestInputPos(0,ar);if(!p.value.length||d!==p.value.length)return this._blockStartPos(l)}for(var h=l,f=h;f<this._blocks.length;++f){var v=this._blocks[f],m=v.nearestInputPos(0,ar);if(!v.value.length||m!==v.value.length)return this._blockStartPos(f)+m}for(var g=l-1;g>=0;--g){var y=this._blocks[g],b=y.nearestInputPos(0,ar);if(!y.value.length||b!==y.value.length)return this._blockStartPos(g)+y.value.length}return t}if(e===sr||e===ur){for(var _,w=l;w<this._blocks.length;++w)if(this._blocks[w].value){_=w;break}if(null!=_){var E=this._blocks[_],x=E.nearestInputPos(0,lr);if(0===x&&E.unmaskedValue.length)return this._blockStartPos(_)+x}for(var S,C=-1,T=l-1;T>=0;--T){var k=this._blocks[T],D=k.nearestInputPos(k.value.length,ur);if(k.value&&0===D||(S=T),0!==D){if(D!==k.value.length)return this._blockStartPos(T)+D;C=T;break}}if(e===sr)for(var A=C+1;A<=Math.min(l,this._blocks.length-1);++A){var M=this._blocks[A],O=M.nearestInputPos(0,ar),I=this._blockStartPos(A)+O;if(I>t)break;if(O!==M.value.length)return I}if(C>=0)return this._blockStartPos(C)+this._blocks[C].value.length;if(e===ur||this.lazy&&!this.extractInput()&&!Mr(this._blocks[l]))return 0;if(null!=S)return this._blockStartPos(S);for(var P=l;P<this._blocks.length;++P){var R=this._blocks[P],N=R.nearestInputPos(0,ar);if(!R.value.length||N!==R.value.length)return this._blockStartPos(P)+N}return 0}if(e===lr||e===cr){for(var L,F,j=l;j<this._blocks.length;++j){var B=this._blocks[j],V=B.nearestInputPos(0,ar);if(V!==B.value.length){F=this._blockStartPos(j)+V,L=j;break}}if(null!=L&&null!=F){for(var H=L;H<this._blocks.length;++H){var U=this._blocks[H],q=U.nearestInputPos(0,cr);if(q!==U.value.length)return this._blockStartPos(H)+q}return e===cr?this.value.length:F}for(var Y=Math.min(l,this._blocks.length-1);Y>=0;--Y){var z=this._blocks[Y],W=z.nearestInputPos(z.value.length,sr);if(0!==W){var G=this._blockStartPos(Y)+W;if(G>=t)return G;break}}}return t}},{key:"maskedBlock",value:function(t){return this.maskedBlocks(t)[0]}},{key:"maskedBlocks",value:function(t){var e=this,n=this._maskedBlocks[t];return n?n.map((function(t){return e._blocks[t]})):[]}}]),n}(yr);function Mr(t){if(!t)return!1;var e=t.value;return!e||t.nearestInputPos(0,ar)!==e.length}Ar.DEFAULTS={lazy:!0,placeholderChar:"_"},Ar.STOP_CHAR="`",Ar.ESCAPE_CHAR="\\",Ar.InputDefinition=xr,Ar.FixedDefinition=Sr,gr.MaskedPattern=Ar;var Or=function(t){Gn(n,t);var e=Qn(n);function n(){return Yn(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_matchFrom",get:function(){return this.maxLength-String(this.from).length}},{key:"_update",value:function(t){t=Object.assign({to:this.to||0,from:this.from||0},t);var e=String(t.to).length;null!=t.maxLength&&(e=Math.max(e,t.maxLength)),t.maxLength=e;for(var r=String(t.from).padStart(e,"0"),i=String(t.to).padStart(e,"0"),o=0;o<i.length&&i[o]===r[o];)++o;t.mask=i.slice(0,o).replace(/0/g,"\\0")+"0".repeat(e-o),tr(Kn(n.prototype),"_update",this).call(this,t)}},{key:"isComplete",get:function(){return tr(Kn(n.prototype),"isComplete",this)&&Boolean(this.value)}},{key:"boundaries",value:function(t){var e="",n="",r=rr(t.match(/^(\D*)(\d*)(\D*)/)||[],3),i=r[1],o=r[2];return o&&(e="0".repeat(i.length)+o,n="9".repeat(i.length)+o),[e=e.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9")]}},{key:"doPrepare",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t=tr(Kn(n.prototype),"doPrepare",this).call(this,t,e).replace(/\D/g,""),!this.autofix)return t;for(var r=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),o=this.value,a="",s=0;s<t.length;++s){var u=o+a+t[s],l=this.boundaries(u),c=rr(l,2),p=c[0],d=c[1];Number(d)<this.from?a+=r[u.length-1]:Number(p)>this.to?a+=i[u.length-1]:a+=t[s]}return a}},{key:"doValidate",value:function(){var t,e=this.value,r=e.search(/[^0]/);if(-1===r&&e.length<=this._matchFrom)return!0;for(var i=this.boundaries(e),o=rr(i,2),a=o[0],s=o[1],u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return this.from<=Number(s)&&Number(a)<=this.to&&(t=tr(Kn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(l))}}]),n}(Ar);gr.MaskedRange=Or;var Ir=function(t){Gn(n,t);var e=Qn(n);function n(t){return Yn(this,n),e.call(this,Object.assign({},n.DEFAULTS,t))}return Wn(n,[{key:"_update",value:function(t){t.mask===Date&&delete t.mask,t.pattern&&(t.mask=t.pattern);var e=t.blocks;t.blocks=Object.assign({},n.GET_DEFAULT_BLOCKS()),t.min&&(t.blocks.Y.from=t.min.getFullYear()),t.max&&(t.blocks.Y.to=t.max.getFullYear()),t.min&&t.max&&t.blocks.Y.from===t.blocks.Y.to&&(t.blocks.m.from=t.min.getMonth()+1,t.blocks.m.to=t.max.getMonth()+1,t.blocks.m.from===t.blocks.m.to&&(t.blocks.d.from=t.min.getDate(),t.blocks.d.to=t.max.getDate())),Object.assign(t.blocks,e),Object.keys(t.blocks).forEach((function(e){var n=t.blocks[e];"autofix"in n||(n.autofix=t.autofix)})),tr(Kn(n.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this.date,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=tr(Kn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(i))&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}},{key:"isDateExist",value:function(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}},{key:"date",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"typedValue",get:function(){return this.isComplete?tr(Kn(n.prototype),"typedValue",this):null},set:function(t){nr(Kn(n.prototype),"typedValue",t,this,!0)}}]),n}(Ar);Ir.DEFAULTS={pattern:"d{.}`m{.}`Y",format:function(t){return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:function(t){var e=rr(t.split("."),3),n=e[0],r=e[1],i=e[2];return new Date(i,r-1,n)}},Ir.GET_DEFAULT_BLOCKS=function(){return{d:{mask:Or,from:1,to:31,maxLength:2},m:{mask:Or,from:1,to:12,maxLength:2},Y:{mask:Or,from:1900,to:9999}}},gr.MaskedDate=Ir;var Pr=function(){function t(){Yn(this,t)}return Wn(t,[{key:"selectionStart",get:function(){var t;try{t=this._unsafeSelectionStart}catch(t){}return null!=t?t:this.value.length}},{key:"selectionEnd",get:function(){var t;try{t=this._unsafeSelectionEnd}catch(t){}return null!=t?t:this.value.length}},{key:"select",value:function(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch(t){}}},{key:"_unsafeSelect",value:function(t,e){}},{key:"isActive",get:function(){return!1}},{key:"bindEvents",value:function(t){}},{key:"unbindEvents",value:function(){}}]),t}();gr.MaskElement=Pr;var Rr=function(t){Gn(n,t);var e=Qn(n);function n(t){var r;return Yn(this,n),(r=e.call(this)).input=t,r._handlers={},r}return Wn(n,[{key:"rootElement",get:function(){return this.input.getRootNode?this.input.getRootNode():document}},{key:"isActive",get:function(){return this.input===this.rootElement.activeElement}},{key:"_unsafeSelectionStart",get:function(){return this.input.selectionStart}},{key:"_unsafeSelectionEnd",get:function(){return this.input.selectionEnd}},{key:"_unsafeSelect",value:function(t,e){this.input.setSelectionRange(t,e)}},{key:"value",get:function(){return this.input.value},set:function(t){this.input.value=t}},{key:"bindEvents",value:function(t){var e=this;Object.keys(t).forEach((function(r){return e._toggleEventHandler(n.EVENTS_MAP[r],t[r])}))}},{key:"unbindEvents",value:function(){var t=this;Object.keys(this._handlers).forEach((function(e){return t._toggleEventHandler(e)}))}},{key:"_toggleEventHandler",value:function(t,e){this._handlers[t]&&(this.input.removeEventListener(t,this._handlers[t]),delete this._handlers[t]),e&&(this.input.addEventListener(t,e),this._handlers[t]=e)}}]),n}(Pr);Rr.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},gr.HTMLMaskElement=Rr;var Nr=function(t){Gn(n,t);var e=Qn(n);function n(){return Yn(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_unsafeSelectionStart",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&e.anchorOffset}},{key:"_unsafeSelectionEnd",get:function(){var t=this.rootElement,e=t.getSelection&&t.getSelection();return e&&this._unsafeSelectionStart+String(e).length}},{key:"_unsafeSelect",value:function(t,e){if(this.rootElement.createRange){var n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,e);var r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}}},{key:"value",get:function(){return this.input.textContent},set:function(t){this.input.textContent=t}}]),n}(Rr);gr.HTMLContenteditableMaskElement=Nr;var Lr=["mask"],Fr=function(){function t(e,n){Yn(this,t),this.el=e instanceof Pr?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new Nr(e):new Rr(e),this.masked=_r(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}return Wn(t,[{key:"mask",get:function(){return this.masked.mask},set:function(t){if(!this.maskEquals(t))if(t instanceof gr.Masked||this.masked.constructor!==br(t)){var e=_r({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}else this.masked.updateOptions({mask:t})}},{key:"maskEquals",value:function(t){return null==t||t===this.masked.mask||t===Date&&this.masked instanceof Ir}},{key:"value",get:function(){return this._value},set:function(t){this.masked.value=t,this.updateControl(),this.alignCursor()}},{key:"unmaskedValue",get:function(){return this._unmaskedValue},set:function(t){this.masked.unmaskedValue=t,this.updateControl(),this.alignCursor()}},{key:"typedValue",get:function(){return this.masked.typedValue},set:function(t){this.masked.typedValue=t,this.updateControl(),this.alignCursor()}},{key:"_bindEvents",value:function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}},{key:"_unbindEvents",value:function(){this.el&&this.el.unbindEvents()}},{key:"_fireEvent",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=this._listeners[t];i&&i.forEach((function(t){return t.apply(void 0,n)}))}},{key:"selectionStart",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}},{key:"cursorPos",get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}},{key:"_saveSelection",value:function(){this.value!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}},{key:"updateValue",value:function(){this.masked.value=this.el.value,this._value=this.masked.value}},{key:"updateControl",value:function(){var t=this.masked.unmaskedValue,e=this.masked.value,n=this.unmaskedValue!==t||this.value!==e;this._unmaskedValue=t,this._value=e,this.el.value!==e&&(this.el.value=e),n&&this._fireChangeEvents()}},{key:"updateOptions",value:function(t){var e=t.mask,n=Zn(t,Lr),r=!this.maskEquals(e),i=!hr(this.masked,n);r&&(this.mask=e),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}},{key:"updateCursor",value:function(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}},{key:"_delayUpdateCursor",value:function(t){var e=this;this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((function(){e.el&&(e.cursorPos=e._changingCursorPos,e._abortUpdateCursor())}),10)}},{key:"_fireChangeEvents",value:function(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}},{key:"_abortUpdateCursor",value:function(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}},{key:"alignCursor",value:function(){this.cursorPos=this.masked.nearestInputPos(this.cursorPos,sr)}},{key:"alignCursorFriendly",value:function(){this.selectionStart===this.cursorPos&&this.alignCursor()}},{key:"on",value:function(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}},{key:"off",value:function(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;var n=this._listeners[t].indexOf(e);return n>=0&&this._listeners[t].splice(n,1),this}},{key:"_onInput",value:function(t){if(this._inputEvent=t,this._abortUpdateCursor(),!this._selection)return this.updateValue();var e=new fr(this.el.value,this.cursorPos,this.value,this._selection),n=this.masked.rawInputValue,r=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection).offset,i=n===this.masked.rawInputValue?e.removeDirection:ar,o=this.masked.nearestInputPos(e.startChangePos+r,i);this.updateControl(),this.updateCursor(o),delete this._inputEvent}},{key:"_onChange",value:function(){this.value!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}},{key:"_onDrop",value:function(t){t.preventDefault(),t.stopPropagation()}},{key:"_onFocus",value:function(t){this.alignCursorFriendly()}},{key:"_onClick",value:function(t){this.alignCursorFriendly()}},{key:"destroy",value:function(){this._unbindEvents(),this._listeners.length=0,delete this.el}}]),t}();gr.InputMask=Fr;var jr=function(t){Gn(n,t);var e=Qn(n);function n(){return Yn(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_update",value:function(t){t.enum&&(t.mask="*".repeat(t.enum[0].length)),tr(Kn(n.prototype),"_update",this).call(this,t)}},{key:"doValidate",value:function(){for(var t,e=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return this.enum.some((function(t){return t.indexOf(e.unmaskedValue)>=0}))&&(t=tr(Kn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(i))}}]),n}(Ar);gr.MaskedEnum=jr;var Br=function(t){Gn(n,t);var e=Qn(n);function n(t){return Yn(this,n),e.call(this,Object.assign({},n.DEFAULTS,t))}return Wn(n,[{key:"_update",value:function(t){tr(Kn(n.prototype),"_update",this).call(this,t),this._updateRegExps()}},{key:"_updateRegExps",value:function(){var t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+dr(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExpInput=new RegExp(t+"(0|([1-9]+\\d*))?"+e),this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(dr).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(dr(this.thousandsSeparator),"g")}},{key:"_removeThousandsSeparators",value:function(t){return t.replace(this._thousandsSeparatorRegExp,"")}},{key:"_insertThousandsSeparators",value:function(t){var e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}},{key:"doPrepare",value:function(t){for(var e,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return(e=tr(Kn(n.prototype),"doPrepare",this)).call.apply(e,[this,this._removeThousandsSeparators(t.replace(this._mapToRadixRegExp,this.radix))].concat(i))}},{key:"_separatorsCount",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,e&&(t+=this.thousandsSeparator.length));return n}},{key:"_separatorsCountFromSlice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}},{key:"extractInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,r=arguments.length>2?arguments[2]:void 0,i=this._adjustRangeWithSeparators(t,e),o=rr(i,2);return t=o[0],e=o[1],this._removeThousandsSeparators(tr(Kn(n.prototype),"extractInput",this).call(this,t,e,r))}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return tr(Kn(n.prototype),"_appendCharRaw",this).call(this,t,e);var r=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);var o=tr(Kn(n.prototype),"_appendCharRaw",this).call(this,t,e);this._value=this._insertThousandsSeparators(this._value);var a=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(a);return o.tailShift+=(s-i)*this.thousandsSeparator.length,o.skip=!o.rawInserted&&t===this.thousandsSeparator,o}},{key:"_findSeparatorAround",value:function(t){if(this.thousandsSeparator){var e=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,e);if(n<=t)return n}return-1}},{key:"_adjustRangeWithSeparators",value:function(t,e){var n=this._findSeparatorAround(t);n>=0&&(t=n);var r=this._findSeparatorAround(e);return r>=0&&(e=r+this.thousandsSeparator.length),[t,e]}},{key:"remove",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,n=this._adjustRangeWithSeparators(t,e),r=rr(n,2);t=r[0],e=r[1];var i=this.value.slice(0,t),o=this.value.slice(e),a=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+o));var s=this._separatorsCountFromSlice(i);return new vr({tailShift:(s-a)*this.thousandsSeparator.length})}},{key:"nearestInputPos",value:function(t,e){if(!this.thousandsSeparator)return t;switch(e){case ar:case sr:case ur:var n=this._findSeparatorAround(t-1);if(n>=0){var r=n+this.thousandsSeparator.length;if(t<r||this.value.length<=r||e===ur)return n}break;case lr:case cr:var i=this._findSeparatorAround(t);if(i>=0)return i+this.thousandsSeparator.length}return t}},{key:"doValidate",value:function(t){var e=(t.input?this._numberRegExpInput:this._numberRegExp).test(this._removeThousandsSeparators(this.value));if(e){var r=this.number;e=e&&!isNaN(r)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)}return e&&tr(Kn(n.prototype),"doValidate",this).call(this,t)}},{key:"doCommit",value:function(){if(this.value){var t=this.number,e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=String(e));var r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&(r=this._padFractionalZeros(r)),this._value=r}tr(Kn(n.prototype),"doCommit",this).call(this)}},{key:"_normalizeZeros",value:function(t){var e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,(function(t,e,n,r){return e+r})),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}},{key:"_padFractionalZeros",value:function(t){if(!t)return t;var e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}},{key:"unmaskedValue",get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,".")},set:function(t){nr(Kn(n.prototype),"unmaskedValue",t.replace(".",this.radix),this,!0)}},{key:"typedValue",get:function(){return Number(this.unmaskedValue)},set:function(t){nr(Kn(n.prototype),"unmaskedValue",String(t),this,!0)}},{key:"number",get:function(){return this.typedValue},set:function(t){this.typedValue=t}},{key:"allowNegative",get:function(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}}]),n}(yr);Br.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:["."],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1},gr.MaskedNumber=Br;var Vr=function(t){Gn(n,t);var e=Qn(n);function n(){return Yn(this,n),e.apply(this,arguments)}return Wn(n,[{key:"_update",value:function(t){t.mask&&(t.validate=t.mask),tr(Kn(n.prototype),"_update",this).call(this,t)}}]),n}(yr);gr.MaskedFunction=Vr;var Hr=["compiledMasks","currentMaskRef","currentMask"],Ur=function(t){Gn(n,t);var e=Qn(n);function n(t){var r;return Yn(this,n),(r=e.call(this,Object.assign({},n.DEFAULTS,t))).currentMask=null,r}return Wn(n,[{key:"_update",value:function(t){tr(Kn(n.prototype),"_update",this).call(this,t),"mask"in t&&(this.compiledMasks=Array.isArray(t.mask)?t.mask.map((function(t){return _r(t)})):[])}},{key:"_appendCharRaw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this._applyDispatch(t,e);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,e)),n}},{key:"_applyDispatch",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,r=this.rawInputValue,i=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:r,o=r.slice(i.length),a=this.currentMask,s=new vr,u=a&&a.state;if(this.currentMask=this.doDispatch(t,Object.assign({},e)),this.currentMask)if(this.currentMask!==a){if(this.currentMask.reset(),i){var l=this.currentMask.append(i,{raw:!0});s.tailShift=l.inserted.length-n.length}o&&(s.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=u;return s}},{key:"_appendPlaceholder",value:function(){var t=this._applyDispatch.apply(this,arguments);return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}},{key:"doDispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatch(t,this,e)}},{key:"doValidate",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=tr(Kn(n.prototype),"doValidate",this)).call.apply(t,[this].concat(i))&&(!this.currentMask||(e=this.currentMask).doValidate.apply(e,i))}},{key:"reset",value:function(){this.currentMask&&this.currentMask.reset(),this.compiledMasks.forEach((function(t){return t.reset()}))}},{key:"value",get:function(){return this.currentMask?this.currentMask.value:""},set:function(t){nr(Kn(n.prototype),"value",t,this,!0)}},{key:"unmaskedValue",get:function(){return this.currentMask?this.currentMask.unmaskedValue:""},set:function(t){nr(Kn(n.prototype),"unmaskedValue",t,this,!0)}},{key:"typedValue",get:function(){return this.currentMask?this.currentMask.typedValue:""},set:function(t){var e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}},{key:"isComplete",get:function(){return!!this.currentMask&&this.currentMask.isComplete}},{key:"remove",value:function(){var t,e=new vr;return this.currentMask&&e.aggregate((t=this.currentMask).remove.apply(t,arguments)).aggregate(this._applyDispatch()),e}},{key:"state",get:function(){return Object.assign({},tr(Kn(n.prototype),"state",this),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((function(t){return t.state})),currentMaskRef:this.currentMask,currentMask:this.currentMask&&this.currentMask.state})},set:function(t){var e=t.compiledMasks,r=t.currentMaskRef,i=t.currentMask,o=Zn(t,Hr);this.compiledMasks.forEach((function(t,n){return t.state=e[n]})),null!=r&&(this.currentMask=r,this.currentMask.state=i),nr(Kn(n.prototype),"state",o,this,!0)}},{key:"extractInput",value:function(){var t;return this.currentMask?(t=this.currentMask).extractInput.apply(t,arguments):""}},{key:"extractTail",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return this.currentMask?(t=this.currentMask).extractTail.apply(t,i):(e=tr(Kn(n.prototype),"extractTail",this)).call.apply(e,[this].concat(i))}},{key:"doCommit",value:function(){this.currentMask&&this.currentMask.doCommit(),tr(Kn(n.prototype),"doCommit",this).call(this)}},{key:"nearestInputPos",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return this.currentMask?(t=this.currentMask).nearestInputPos.apply(t,i):(e=tr(Kn(n.prototype),"nearestInputPos",this)).call.apply(e,[this].concat(i))}},{key:"overwrite",get:function(){return this.currentMask?this.currentMask.overwrite:tr(Kn(n.prototype),"overwrite",this)},set:function(t){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}}]),n}(yr);Ur.DEFAULTS={dispatch:function(t,e,n){if(e.compiledMasks.length){var r=e.rawInputValue,i=e.compiledMasks.map((function(e,i){return e.reset(),e.append(r,{raw:!0}),e.append(t,n),{weight:e.rawInputValue.length,index:i}}));return i.sort((function(t,e){return e.weight-t.weight})),e.compiledMasks[i[0].index]}}},gr.MaskedDynamic=Ur;var qr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Yr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qr.MASKED,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qr.MASKED,r=_r(t);return function(t){return r.runIsolated((function(r){return r[e]=t,r[n]}))}}function zr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Yr.apply(void 0,n)(t)}gr.PIPE_TYPE=qr,gr.createPipe=Yr,gr.pipe=zr;try{globalThis.IMask=gr}catch(t){}t.HTMLContenteditableMaskElement=Nr,t.HTMLMaskElement=Rr,t.InputMask=Fr,t.MaskElement=Pr,t.Masked=yr,t.MaskedDate=Ir,t.MaskedDynamic=Ur,t.MaskedEnum=jr,t.MaskedFunction=Vr,t.MaskedNumber=Br,t.MaskedPattern=Ar,t.MaskedRange=Or,t.MaskedRegExp=kr,t.PIPE_TYPE=qr,t.createMask=_r,t.createPipe=Yr,t.default=gr,t.pipe=zr,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.wm_common_variables=e():t.wm_common_variables=e()}(window,(()=>(()=>{var t={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
|
|
3630
3630
|
/*!***************************************************************!*\
|
|
@@ -3792,10 +3792,10 @@ function(t,e){var n,r,i;!function(o,a){"use strict";r=[],void 0===(i="function"=
|
|
|
3792
3792
|
!*** ./index.ts ***!
|
|
3793
3793
|
\******************/n.r(r),n.d(r,{$rootScope:()=>t.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>t.CONSTANTS,CrudVariable:()=>l.CrudVariable,DB_CONSTANTS:()=>t.DB_CONSTANTS,LVService:()=>p.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>d.LiveVariableUtils,ModelVariable:()=>s.ModelVariable,SWAGGER_CONSTANTS:()=>t.SWAGGER_CONSTANTS,ServiceVariable:()=>u.ServiceVariable,TEST:()=>h,TimerAction:()=>a.TimerAction,VARIABLE_CONSTANTS:()=>t.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>t.VARIABLE_URLS,WS_CONSTANTS:()=>t.WS_CONSTANTS,appManager:()=>e.appManager,debounceVariableCall:()=>e.debounceVariableCall,decodeData:()=>e.decodeData,dialogService:()=>e.dialogService,formatDate:()=>e.formatDate,formatExportExpression:()=>e.formatExportExpression,generateConnectionParams:()=>p.generateConnectionParams,getBlob:()=>e.getBlob,getErrMessage:()=>e.getErrMessage,getEvaluatedOrderBy:()=>e.getEvaluatedOrderBy,getTarget:()=>e.getTarget,getTargetNodeKey:()=>e.getTargetNodeKey,getTargetObj:()=>e.getTargetObj,httpService:()=>e.httpService,initiateCallback:()=>e.initiateCallback,internalBoundNodeMap:()=>e.internalBoundNodeMap,isFileUploadSupported:()=>e.isFileUploadSupported,metadataService:()=>e.metadataService,navigationService:()=>e.navigationService,oauthService:()=>e.oauthService,parseConfig:()=>p.parseConfig,routerService:()=>e.routerService,securityService:()=>e.securityService,setInput:()=>e.setInput,setValueToNode:()=>e.setValueToNode,toasterService:()=>e.toasterService,updateInternalNodes:()=>e.updateInternalNodes,wmSetDependency:()=>e.wmSetDependency});var t=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),e=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),a=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),s=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),u=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),l=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),p=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),d=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),h="hello from variables"})(),r})())),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jmespath={})}(this,(function(t){"use strict";const e=t=>null!==t&&"[object Object]"===Object.prototype.toString.call(t),n=(t,r)=>{if(t===r)return!0;if(typeof t!=typeof r)return!1;if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;for(let e=0;e<t.length;e+=1)if(!n(t[e],r[e]))return!1;return!0}if(e(t)&&e(r)){const e=Object.entries(t),i=new Set(Object.keys(r));if(e.length!==i.size)return!1;for(const[t,o]of e){if(!n(o,r[t]))return!1;i.delete(t)}return 0===i.size}return!1},r=t=>{if(""===t||!1===t||null==t)return!0;if(Array.isArray(t)&&0===t.length)return!0;if(e(t)){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}return!1},i=t=>t>="0"&&t<="9"||"-"===t;var o;!function(t){t.TOK_EOF="EOF",t.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",t.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",t.TOK_RBRACKET="Rbracket",t.TOK_RPAREN="Rparen",t.TOK_COMMA="Comma",t.TOK_COLON="Colon",t.TOK_RBRACE="Rbrace",t.TOK_NUMBER="Number",t.TOK_CURRENT="Current",t.TOK_ROOT="Root",t.TOK_EXPREF="Expref",t.TOK_PIPE="Pipe",t.TOK_OR="Or",t.TOK_AND="And",t.TOK_EQ="EQ",t.TOK_GT="GT",t.TOK_LT="LT",t.TOK_GTE="GTE",t.TOK_LTE="LTE",t.TOK_NE="NE",t.TOK_FLATTEN="Flatten",t.TOK_STAR="Star",t.TOK_FILTER="Filter",t.TOK_DOT="Dot",t.TOK_NOT="Not",t.TOK_LBRACE="Lbrace",t.TOK_LBRACKET="Lbracket",t.TOK_LPAREN="Lparen",t.TOK_LITERAL="Literal"}(o||(o={}));const a={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},s={"!":!0,"<":!0,"=":!0,">":!0},u={"\t":!0,"\n":!0,"\r":!0," ":!0};const l=new class{constructor(){this._current=0}tokenize(t){const e=[];let n,r,l;for(this._current=0;this._current<t.length;)if((c=t[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(t),e.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==a[t[this._current]])e.push({start:this._current,type:a[t[this._current]],value:t[this._current]}),this._current+=1;else if(i(t[this._current]))l=this.consumeNumber(t),e.push(l);else if("["===t[this._current])l=this.consumeLBracket(t),e.push(l);else if('"'===t[this._current])n=this._current,r=this.consumeQuotedIdentifier(t),e.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===t[this._current])n=this._current,r=this.consumeRawStringLiteral(t),e.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===t[this._current]){n=this._current;const r=this.consumeLiteral(t);e.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==s[t[this._current]])l=this.consumeOperator(t),l&&e.push(l);else if(void 0!==u[t[this._current]])this._current+=1;else if("&"===t[this._current])n=this._current,this._current+=1,"&"===t[this._current]?(this._current+=1,e.push({start:n,type:o.TOK_AND,value:"&&"})):e.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==t[this._current]){const e=new Error(`Unknown character: ${t[this._current]}`);throw e.name="LexerError",e}n=this._current,this._current+=1,"|"===t[this._current]?(this._current+=1,e.push({start:n,type:o.TOK_OR,value:"||"})):e.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return e}consumeUnquotedIdentifier(t){const e=this._current;for(this._current+=1;this._current<t.length&&((n=t[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return t.slice(e,this._current)}consumeQuotedIdentifier(t){const e=this._current;this._current+=1;const n=t.length;for(;'"'!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&'"'!==t[e+1]?e+=1:e+=2,this._current=e}return this._current+=1,JSON.parse(t.slice(e,this._current))}consumeRawStringLiteral(t){const e=this._current;this._current+=1;const n=t.length;for(;"'"!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&"'"!==t[e+1]?e+=1:e+=2,this._current=e}this._current+=1;return t.slice(e+1,this._current-1).replace("\\'","'")}consumeNumber(t){const e=this._current;this._current+=1;const n=t.length;for(;i(t[this._current])&&this._current<n;)this._current+=1;return{start:e,value:parseInt(t.slice(e,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(t){const e=this._current;return this._current+=1,"?"===t[this._current]?(this._current+=1,{start:e,type:o.TOK_FILTER,value:"[?"}):"]"===t[this._current]?(this._current+=1,{start:e,type:o.TOK_FLATTEN,value:"[]"}):{start:e,type:o.TOK_LBRACKET,value:"["}}consumeOperator(t){const e=this._current,n=t[e];return this._current+=1,"!"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_NE,value:"!="}):{start:e,type:o.TOK_NOT,value:"!"}:"<"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_LTE,value:"<="}):{start:e,type:o.TOK_LT,value:"<"}:">"===n?"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_GTE,value:">="}):{start:e,type:o.TOK_GT,value:">"}:"="===n&&"="===t[this._current]?(this._current+=1,{start:e,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(t){this._current+=1;const e=this._current,n=t.length;for(;"`"!==t[this._current]&&this._current<n;){let e=this._current;"\\"!==t[e]||"\\"!==t[e+1]&&"`"!==t[e+1]?e+=1:e+=2,this._current=e}let r=t.slice(e,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(t){if(""===t)return!1;if('[{"'.includes(t[0]))return!0;if(["true","false","null"].includes(t))return!0;if("-0123456789".includes(t[0]))try{return JSON.parse(t),!0}catch(t){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const p=new class{constructor(){this.index=0,this.tokens=[]}parse(t){this.loadTokens(t),this.index=0;const e=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const t=this.lookaheadToken(0);this.errorToken(t,`Unexpected token type: ${t.type}, value: ${t.value}`)}return e}loadTokens(t){this.tokens=[...l.tokenize(t),{type:o.TOK_EOF,value:"",start:t.length}]}expression(t){const e=this.lookaheadToken(0);this.advance();let n=this.nud(e),r=this.lookahead(0);for(;t<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(t){return this.tokens[this.index+t].type}lookaheadToken(t){return this.tokens[this.index+t]}advance(){this.index+=1}nud(t){let e,n,r;switch(t.type){case o.TOK_LITERAL:return{type:"Literal",value:t.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:t.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:t.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return e={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[e,n]};case o.TOK_FILTER:return this.led(t.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return e={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[e,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const a=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),a.push(r);return this.match(o.TOK_RPAREN),a[0];default:this.errorToken(t)}}led(t,e){let n;switch(t){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[e,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[e,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[e,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[e,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[e,n]};case o.TOK_LPAREN:const i=e.name,a=[];let s;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(s={type:o.TOK_CURRENT},this.advance()):s=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),a.push(s);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:a};case o.TOK_FILTER:const u=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[e,n,u]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[e]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(e,t);case o.TOK_LBRACKET:const l=this.lookaheadToken(0);return l.type===o.TOK_NUMBER||l.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(e,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[e,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(t){if(this.lookahead(0)!==t){const e=this.lookaheadToken(0);this.errorToken(e,`Expected ${t}, got: ${e.type}`)}else this.advance()}errorToken(t,e=""){const n=new Error(e||`Invalid token (${t.type}): "${t.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const t={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),t}projectIfSlice(t,e){const n={type:"IndexExpression",children:[t,e]};return"Slice"===e.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const t=[null,null,null];let e=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&e<3;){if(n===o.TOK_COLON)e+=1,this.advance();else if(n===o.TOK_NUMBER)t[e]=this.lookaheadToken(0).value,this.advance();else{const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:t,type:"Slice"}}parseComparator(t,e){return{type:"Comparator",name:e,children:[t,this.expression(c[e])]}}parseDotRHS(t){const e=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(e))return this.expression(t);if(e===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(e===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(t){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(t);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(t);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(t);const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}parseMultiselectList(){const t=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const e=this.expression(0);if(t.push(e),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:t}}parseMultiselectHash(){const t=[],e=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!e.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),t.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:t}}};var d;!function(t){t[t.TYPE_NUMBER=0]="TYPE_NUMBER",t[t.TYPE_ANY=1]="TYPE_ANY",t[t.TYPE_STRING=2]="TYPE_STRING",t[t.TYPE_ARRAY=3]="TYPE_ARRAY",t[t.TYPE_OBJECT=4]="TYPE_OBJECT",t[t.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",t[t.TYPE_EXPREF=6]="TYPE_EXPREF",t[t.TYPE_NULL=7]="TYPE_NULL",t[t.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",t[t.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(d||(d={}));class h{constructor(t){this.TYPE_NAME_TABLE={[d.TYPE_NUMBER]:"number",[d.TYPE_ANY]:"any",[d.TYPE_STRING]:"string",[d.TYPE_ARRAY]:"array",[d.TYPE_OBJECT]:"object",[d.TYPE_BOOLEAN]:"boolean",[d.TYPE_EXPREF]:"expression",[d.TYPE_NULL]:"null",[d.TYPE_ARRAY_NUMBER]:"Array<number>",[d.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([t])=>Math.abs(t),this.functionAvg=([t])=>{let e=0;for(let n=0;n<t.length;n+=1)e+=t[n];return e/t.length},this.functionCeil=([t])=>Math.ceil(t),this.functionContains=t=>{const[e,n]=t;return e.includes(n)},this.functionEndsWith=t=>{const[e,n]=t;return e.includes(n,e.length-n.length)},this.functionFloor=([t])=>Math.floor(t),this.functionJoin=t=>{const[e,n]=t;return n.join(e)},this.functionKeys=([t])=>Object.keys(t),this.functionLength=([t])=>e(t)?Object.keys(t).length:t.length,this.functionMap=t=>{if(!this._interpreter)return[];const e=[],n=this._interpreter,r=t[0],i=t[1];for(let t=0;t<i.length;t+=1)e.push(n.visit(r,i[t]));return e},this.functionMax=([t])=>{if(!t.length)return null;if(this.getTypeName(t[0])===d.TYPE_NUMBER)return Math.max(...t);const e=t;let n=e[0];for(let t=1;t<e.length;t+=1)n.localeCompare(e[t])<0&&(n=e[t]);return n},this.functionMaxBy=t=>{const e=t[1],n=t[0],r=this.createKeyFunction(e,[d.TYPE_NUMBER,d.TYPE_STRING]);let i,o,a=-1/0;for(let t=0;t<n.length;t+=1)o=r&&r(n[t]),void 0!==o&&o>a&&(a=o,i=n[t]);return i},this.functionMerge=t=>{let e={};for(let n=0;n<t.length;n+=1){const r=t[n];e=Object.assign(e,r)}return e},this.functionMin=([t])=>{if(!t.length)return null;if(this.getTypeName(t[0])===d.TYPE_NUMBER)return Math.min(...t);const e=t;let n=e[0];for(let t=1;t<e.length;t+=1)e[t].localeCompare(n)<0&&(n=e[t]);return n},this.functionMinBy=t=>{const e=t[1],n=t[0],r=this.createKeyFunction(e,[d.TYPE_NUMBER,d.TYPE_STRING]);let i,o,a=1/0;for(let t=0;t<n.length;t+=1)o=r&&r(n[t]),void 0!==o&&o<a&&(a=o,i=n[t]);return i},this.functionNotNull=t=>{for(let e=0;e<t.length;e+=1)if(this.getTypeName(t[e])!==d.TYPE_NULL)return t[e];return null},this.functionReverse=([t])=>{if(this.getTypeName(t)===d.TYPE_STRING){const e=t;let n="";for(let t=e.length-1;t>=0;t-=1)n+=e[t];return n}const e=t.slice(0);return e.reverse(),e},this.functionSort=([t])=>[...t].sort(),this.functionSortBy=t=>{if(!this._interpreter)return[];const e=t[0].slice(0);if(0===e.length)return e;const n=this._interpreter,r=t[1],i=this.getTypeName(n.visit(r,e[0]));if(void 0!==i&&![d.TYPE_NUMBER,d.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let t=0;t<e.length;t+=1)o.push([t,e[t]]);o.sort(((t,e)=>{const o=n.visit(r,t[1]),a=n.visit(r,e[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(a)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(a)]}`);return o>a?1:o<a?-1:t[0]-e[0]}));for(let t=0;t<o.length;t+=1)e[t]=o[t][1];return e},this.functionStartsWith=([t,e])=>t.startsWith(e),this.functionSum=([t])=>t.reduce(((t,e)=>t+e),0),this.functionToArray=([t])=>this.getTypeName(t)===d.TYPE_ARRAY?t:[t],this.functionToNumber=([t])=>{const e=this.getTypeName(t);let n;return e===d.TYPE_NUMBER?t:e!==d.TYPE_STRING||(n=+t,isNaN(n))?null:n},this.functionToString=([t])=>this.getTypeName(t)===d.TYPE_STRING?t:JSON.stringify(t),this.functionType=([t])=>{switch(this.getTypeName(t)){case d.TYPE_NUMBER:return"number";case d.TYPE_STRING:return"string";case d.TYPE_ARRAY:return"array";case d.TYPE_OBJECT:return"object";case d.TYPE_BOOLEAN:return"boolean";case d.TYPE_EXPREF:return"expref";case d.TYPE_NULL:return"null";default:return}},this.functionValues=([t])=>Object.values(t),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[d.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[d.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[d.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY]},{types:[d.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[d.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[d.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY,d.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[d.TYPE_EXPREF]},{types:[d.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[d.TYPE_ARRAY_NUMBER,d.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[d.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[d.TYPE_ARRAY_NUMBER,d.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[d.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[d.TYPE_STRING,d.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[d.TYPE_ARRAY_STRING,d.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[d.TYPE_ARRAY]},{types:[d.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[d.TYPE_STRING]},{types:[d.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[d.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[d.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[d.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[d.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[d.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[d.TYPE_OBJECT]}]}},this._interpreter=t}registerFunction(t,e,n){if(t in this.functionTable)throw new Error(`Function already defined: ${t}()`);this.functionTable[t]={_func:e.bind(this),_signature:n}}callFunction(t,e){const n=this.functionTable[t];if(void 0===n)throw new Error(`Unknown function: ${t}()`);return this.validateArgs(t,e,n._signature),n._func.call(this,e)}validateInputSignatures(t,e){for(let n=0;n<e.length;n+=1)if("variadic"in e[n]&&n!==e.length-1)throw new Error(`ArgumentError: ${t}() 'variadic' argument ${n+1} must occur last`)}validateArgs(t,e,n){var r,i;let o;this.validateInputSignatures(t,n);const a=n.filter((t=>{var e;return null!==(e=!t.optional)&&void 0!==e&&e})).length,s=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,u=e.length<a,l=e.length>n.length,c=u&&(!s&&a>1||s)?"at least ":"";if(s&&u||!s&&(u||l))throw o=n.length>1,new Error(`ArgumentError: ${t}() takes ${c}${a} argument${o?"s":""} but received ${e.length}`);let p,d,h;for(let r=0;r<n.length;r+=1){let i;for(h=!1,p=n[r].types,d=this.getTypeName(e[r]),i=0;i<p.length;i+=1)if(void 0!==d&&this.typeMatches(d,p[i],e[r])){h=!0;break}if(!h&&void 0!==d){const e=p.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ");throw new Error(`TypeError: ${t}() expected argument ${r+1} to be type (${e}) but received type ${this.TYPE_NAME_TABLE[d]} instead.`)}}}typeMatches(t,e,n){if(e===d.TYPE_ANY)return!0;if(e!==d.TYPE_ARRAY_STRING&&e!==d.TYPE_ARRAY_NUMBER&&e!==d.TYPE_ARRAY)return t===e;if(e===d.TYPE_ARRAY)return t===d.TYPE_ARRAY;if(t===d.TYPE_ARRAY){let t;e===d.TYPE_ARRAY_NUMBER?t=d.TYPE_NUMBER:e===d.TYPE_ARRAY_STRING&&(t=d.TYPE_STRING);for(let e=0;e<n.length;e+=1){const r=this.getTypeName(n[e]);if(void 0!==r&&void 0!==t&&!this.typeMatches(r,t,n[e]))return!1}return!0}return!1}getTypeName(t){switch(Object.prototype.toString.call(t)){case"[object String]":return d.TYPE_STRING;case"[object Number]":return d.TYPE_NUMBER;case"[object Array]":return d.TYPE_ARRAY;case"[object Boolean]":return d.TYPE_BOOLEAN;case"[object Null]":return d.TYPE_NULL;case"[object Object]":return t.jmespathType===o.TOK_EXPREF?d.TYPE_EXPREF:d.TYPE_OBJECT;default:return}}createKeyFunction(t,e){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(t,r);if(!e.includes(this.getTypeName(i))){const t=`TypeError: expected one of (${e.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(t)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new h(this)}search(t,e){return this._rootValue=e,this.visit(t,e)}visit(t,i){let a,s,u,l,c,p,d,h,f,v,m;switch(t.type){case"Field":return null===i?null:e(i)?(p=i[t.name],void 0===p?null:p):null;case"Subexpression":for(u=this.visit(t.children[0],i),v=1;v<t.children.length;v+=1)if(u=this.visit(t.children[1],u),null===u)return null;return u;case"IndexExpression":return d=this.visit(t.children[0],i),h=this.visit(t.children[1],d),h;case"Index":if(!Array.isArray(i))return null;let g=t.value;return g<0&&(g=i.length+g),u=i[g],void 0===u&&(u=null),u;case"Slice":if(!Array.isArray(i))return null;const y=[...t.children],b=this.computeSliceParams(i.length,y),[_,w,E]=b;if(u=[],E>0)for(v=_;v<w;v+=E)u.push(i[v]);else for(v=_;v>w;v+=E)u.push(i[v]);return u;case"Projection":if(m=this.visit(t.children[0],i),!Array.isArray(m))return null;for(f=[],v=0;v<m.length;v+=1)s=this.visit(t.children[1],m[v]),null!==s&&f.push(s);return f;case"ValueProjection":if(m=this.visit(t.children[0],i),!e(m))return null;f=[];const x=Object.values(m);for(v=0;v<x.length;v+=1)s=this.visit(t.children[1],x[v]),null!==s&&f.push(s);return f;case"FilterProjection":if(m=this.visit(t.children[0],i),!Array.isArray(m))return null;const S=[],C=[];for(v=0;v<m.length;v+=1)a=this.visit(t.children[2],m[v]),r(a)||S.push(m[v]);for(let e=0;e<S.length;e+=1)s=this.visit(t.children[1],S[e]),null!==s&&C.push(s);return C;case"Comparator":switch(l=this.visit(t.children[0],i),c=this.visit(t.children[1],i),t.name){case o.TOK_EQ:u=n(l,c);break;case o.TOK_NE:u=!n(l,c);break;case o.TOK_GT:u=l>c;break;case o.TOK_GTE:u=l>=c;break;case o.TOK_LT:u=l<c;break;case o.TOK_LTE:u=l<=c;break;default:throw new Error(`Unknown comparator: ${t.name}`)}return u;case o.TOK_FLATTEN:const T=this.visit(t.children[0],i);if(!Array.isArray(T))return null;let k=[];for(v=0;v<T.length;v+=1)s=T[v],Array.isArray(s)?k=[...k,...s]:k.push(s);return k;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],v=0;v<t.children.length;v+=1)f.push(this.visit(t.children[v],i));return f;case"MultiSelectHash":if(null===i)return null;let D;for(f={},v=0;v<t.children.length;v+=1)D=t.children[v],f[D.name]=this.visit(D.value,i);return f;case"OrExpression":return a=this.visit(t.children[0],i),r(a)&&(a=this.visit(t.children[1],i)),a;case"AndExpression":return l=this.visit(t.children[0],i),r(l)?l:this.visit(t.children[1],i);case"NotExpression":return l=this.visit(t.children[0],i),r(l);case"Literal":return t.value;case o.TOK_PIPE:return d=this.visit(t.children[0],i),this.visit(t.children[1],d);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const A=[];for(let e=0;e<t.children.length;e+=1)A.push(this.visit(t.children[e],i));return this.runtime.callFunction(t.name,A);case"ExpressionReference":const M=t.children[0];return M.jmespathType=o.TOK_EXPREF,M;default:throw new Error(`Unknown node type: ${t.type}`)}}computeSliceParams(t,e){let[n,r,i]=e;if(null===i)i=1;else if(0===i){const t=new Error("Invalid slice, step cannot be 0");throw t.name="RuntimeError",t}const o=i<0;return n=null===n?o?t-1:0:this.capSliceRange(t,n,i),r=null===r?o?-1:t:this.capSliceRange(t,r,i),[n,r,i]}capSliceRange(t,e,n){let r=e;return r<0?(r+=t,r<0&&(r=n<0?-1:0)):r>=t&&(r=n<0?t-1:t),r}},v=d.TYPE_ANY,m=d.TYPE_ARRAY,g=d.TYPE_ARRAY_NUMBER,y=d.TYPE_ARRAY_STRING,b=d.TYPE_BOOLEAN,_=d.TYPE_EXPREF,w=d.TYPE_NULL,E=d.TYPE_NUMBER,x=d.TYPE_OBJECT,S=d.TYPE_STRING;function C(t){return p.parse(t)}function T(t){return l.tokenize(t)}const k=(t,e,n)=>{f.runtime.registerFunction(t,e,n)};function D(t,e){const n=p.parse(e);return f.search(n,t)}const A=f,M={compile:C,registerFunction:k,search:D,tokenize:T,TreeInterpreter:A,TYPE_ANY:v,TYPE_ARRAY_NUMBER:g,TYPE_ARRAY_STRING:y,TYPE_ARRAY:m,TYPE_BOOLEAN:b,TYPE_EXPREF:_,TYPE_NULL:w,TYPE_NUMBER:E,TYPE_OBJECT:x,TYPE_STRING:S};t.TYPE_ANY=v,t.TYPE_ARRAY=m,t.TYPE_ARRAY_NUMBER=g,t.TYPE_ARRAY_STRING=y,t.TYPE_BOOLEAN=b,t.TYPE_EXPREF=_,t.TYPE_NULL=w,t.TYPE_NUMBER=E,t.TYPE_OBJECT=x,t.TYPE_STRING=S,t.TreeInterpreter=A,t.compile=C,t.default=M,t.jmespath=M,t.registerFunction=k,t.search=D,t.tokenize=T,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/platform-browser"),require("imask"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-imask",["exports","@angular/core","@angular/forms","@angular/platform-browser","imask","@angular/common"],e):e((t=t||self)["angular-imask"]={},t.ng.core,t.ng.forms,t.ng.platformBrowser,t.IMask,t.ng.common)}(this,(function(t,e,n,r,i,o){"use strict";var a="default"in i?i.default:i;var s={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef((function(){return l})),multi:!0},u=function(t){return t.nativeElement},l=function(){function t(t,n,i){var o;this._elementRef=t,this._renderer=n,this._compositionMode=i,this.onTouched=function(){},this.onChange=function(){},this.imaskElement=u,this.accept=new e.EventEmitter,this.complete=new e.EventEmitter,this._viewInitialized=!1,this._composing=!1,this._writing=!1,null==this._compositionMode&&(this._compositionMode=(o=r.\u0275getDOM()?r.\u0275getDOM().getUserAgent():"",!/android (\d+)/.test(o.toLowerCase())))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.imaskElement(this._elementRef,this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maskValue",{get:function(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element.value},set:function(t){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=t:this.unmask?this.maskRef.unmaskedValue=t:this.maskRef.value=t:this._renderer.setProperty(this.element,"value",t)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.imask&&this.initMask(),this._viewInitialized=!0},t.prototype.ngOnChanges=function(t){t.elementRef&&!this.imaskElement&&(this.imaskElement=u),t.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())},t.prototype.destroyMask=function(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)},t.prototype.ngOnDestroy=function(){this.destroyMask(),this.accept.complete(),this.complete.complete()},t.prototype.beginWrite=function(t){this._writing=!0,this._writingValue=t},t.prototype.endWrite=function(){return this._writing=!1,this._writingValue},t.prototype.writeValue=function(t){t=null==t?"":t,this.maskRef?(this.beginWrite(t),(this.maskValue!==t||"string"!=typeof t&&""===this.maskRef.value&&!this.maskRef.el.isActive)&&(this.maskValue=t)):this._renderer.setProperty(this.element,"value",t)},t.prototype._onAccept=function(){var t=this.maskValue;this._writing&&t===this.endWrite()||(this.onChange(t),this.accept.emit(t))},t.prototype._onComplete=function(){this.complete.emit(this.maskValue)},t.prototype.initMask=function(){this.maskRef=a(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this))},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this.element,"disabled",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype._handleInput=function(t){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this._handleInput(t)},t.decorators=[{type:e.Directive,args:[{selector:"[imask]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[s]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:Boolean,decorators:[{type:e.Optional},{type:e.Inject,args:[n.COMPOSITION_BUFFER_MODE]}]}]},t.propDecorators={imask:[{type:e.Input}],unmask:[{type:e.Input}],imaskElement:[{type:e.Input}],accept:[{type:e.Output}],complete:[{type:e.Output}]},t}();var c=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},p=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t},d=function(){function t(){}return t.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i.pipe.apply(void 0,p(t))},t.decorators=[{type:e.Pipe,args:[{name:"imask"}]}],t}(),h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.CommonModule],declarations:[l,d],exports:[l,d]}]}],t}();Object.defineProperty(t,"PIPE_TYPE",{enumerable:!0,get:function(){return i.PIPE_TYPE}}),Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return i.pipe}}),t.IMaskDirective=l,t.IMaskModule=h,t.IMaskPipe=d,t.MASKEDINPUT_VALUE_ACCESSOR=s,Object.defineProperty(t,"__esModule",{value:!0})})),
|
|
3794
3794
|
/*!
|
|
3795
|
-
* tabbable 6.2
|
|
3795
|
+
* tabbable 6.1.2
|
|
3796
3796
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
3797
3797
|
*/
|
|
3798
|
-
function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,function(){var n=t.tabbable,r=t.tabbable={};e(r),r.noConflict=function(){return t.tabbable=n,r}}())}(this,(function(t){"use strict";var e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=e.join(","),r="undefined"==typeof Element,i=r?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=!r&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},a=function t(e,n){var r;void 0===n&&(n=!0);var i=null==e||null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"inert");return""===i||"true"===i||n&&e&&t(e.parentNode)},s=function(t,e,r){if(a(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(n));return e&&i.call(t,n)&&o.unshift(t),o=o.filter(r)},u=function t(e,r,o){for(var s=[],u=Array.from(e);u.length;){var l=u.shift();if(!a(l,!1))if("SLOT"===l.tagName){var c=l.assignedElements(),p=t(c.length?c:l.children,!0,o);o.flatten?s.push.apply(s,p):s.push({scopeParent:l,candidates:p})}else{i.call(l,n)&&o.filter(l)&&(r||!e.includes(l))&&s.push(l);var d=l.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(l),h=!a(d,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(d&&h){var f=t(!0===d?l.children:d.children,!0,o);o.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else u.unshift.apply(u,l.children)}}return s},l=function(t
|
|
3798
|
+
function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,function(){var n=t.tabbable,r=t.tabbable={};e(r),r.noConflict=function(){return t.tabbable=n,r}}())}(this,(function(t){"use strict";var e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=e.join(","),r="undefined"==typeof Element,i=r?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=!r&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},a=function t(e,n){var r;void 0===n&&(n=!0);var i=null==e||null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"inert");return""===i||"true"===i||n&&e&&t(e.parentNode)},s=function(t,e,r){if(a(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(n));return e&&i.call(t,n)&&o.unshift(t),o=o.filter(r)},u=function t(e,r,o){for(var s=[],u=Array.from(e);u.length;){var l=u.shift();if(!a(l,!1))if("SLOT"===l.tagName){var c=l.assignedElements(),p=t(c.length?c:l.children,!0,o);o.flatten?s.push.apply(s,p):s.push({scopeParent:l,candidates:p})}else{i.call(l,n)&&o.filter(l)&&(r||!e.includes(l))&&s.push(l);var d=l.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(l),h=!a(d,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(d&&h){var f=t(!0===d?l.children:d.children,!0,o);o.flatten?s.push.apply(s,f):s.push({scopeParent:l,candidates:f})}else u.unshift.apply(u,l.children)}}return s},l=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},c=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},p=function(t){return"INPUT"===t.tagName},d=function(t){return function(t){return p(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||o(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)},h=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},f=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var a=i.call(t,"details>summary:first-of-type")?t.parentElement:t;if(i.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return h(t)}else{if("function"==typeof r){for(var s=t;t;){var u=t.parentElement,l=o(t);if(u&&!u.shadowRoot&&!0===r(u))return h(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=s}if(function(t){var e,n,r,i,a=t&&o(t),s=null===(e=a)||void 0===e?void 0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!u&&s;){var l,c,p;u=!(null===(c=s=null===(l=a=o(s))||void 0===l?void 0:l.host)||void 0===c||null===(p=c.ownerDocument)||void 0===p||!p.contains(s))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},v=function(t,e){return!(e.disabled||a(e)||function(t){return p(t)&&"hidden"===t.type}(e)||f(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!i.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},m=function(t,e){return!(d(e)||l(e)<0||!v(t,e))},g=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},y=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scopeParent,a=o?e.scopeParent:e,s=l(a,o),u=o?t(e.candidates):a;0===s?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:s,item:e,isScope:o,content:u})})),r.sort(c).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},b=e.concat("iframe").join(",");t.focusable=function(t,e){return(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:v.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):s(t,e.includeContainer,v.bind(null,e))},t.isFocusable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==i.call(t,b)&&v(e,t)},t.isTabbable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==i.call(t,n)&&m(e,t)},t.tabbable=function(t,e){var n;return n=(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:m.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:g}):s(t,e.includeContainer,m.bind(null,e)),y(n)},Object.defineProperty(t,"__esModule",{value:!0})})),
|
|
3799
3799
|
/*!
|
|
3800
3800
|
* @wavemaker/focus-trap 1.0.0
|
|
3801
3801
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|