@wavemaker/app-runtime-wm-build 11.4.3-next.30201 → 11.4.3-rc.125
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 +5 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +2 -2
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +43 -19
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +10 -10
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +5 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +2 -2
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +43 -19
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +10 -10
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("rxjs"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@wm/core",["exports","@angular/compiler","rxjs","@angular/core","@angular/common/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.core={}),e.ng.compiler,e.rxjs,e.ng.core,e.ng.common.http)}(this,(function(e,t,n,i,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r,s,l,c,p=a(i),d=a(o);e.FormWidgetType=void 0,(r=e.FormWidgetType||(e.FormWidgetType={})).AUTOCOMPLETE="autocomplete",r.CHECKBOX="checkbox",r.CHECKBOXSET="checkboxset",r.CHIPS="chips",r.COLORPICKER="colorpicker",r.CURRENCY="currency",r.DATE="date",r.DATETIME="datetime",r.NUMBER="number",r.PASSWORD="password",r.RADIOSET="radioset",r.RATING="rating",r.RICHTEXT="richtext",r.SELECT="select",r.TOGGLE="toggle",r.SLIDER="slider",r.SWITCH="switch",r.TEXT="text",r.TEXTAREA="textarea",r.TIME="time",r.TIMESTAMP="timestamp",r.TYPEAHEAD="typeahead",r.UPLOAD="upload",e.DataType=void 0,(s=e.DataType||(e.DataType={})).INTEGER="integer",s.BIG_INTEGER="big_integer",s.SHORT="short",s.FLOAT="float",s.BIG_DECIMAL="big_decimal",s.DOUBLE="double",s.LONG="long",s.BYTE="byte",s.STRING="string",s.CHARACTER="character",s.TEXT="text",s.DATE="date",s.TIME="time",s.TIMESTAMP="timestamp",s.DATETIME="datetime",s.LOCALDATETIME="localdatetime",s.BOOLEAN="boolean",s.LIST="list",s.CLOB="clob",s.BLOB="blob",e.MatchMode=void 0,(l=e.MatchMode||(e.MatchMode={})).BETWEEN="between",l.GREATER="greaterthanequal",l.LESSER="lessthanequal",l.NULL="null",l.EMPTY="empty",l.NULLOREMPTY="nullorempty",l.EQUALS="exact",e.DEFAULT_FORMATS=void 0,(c=e.DEFAULT_FORMATS||(e.DEFAULT_FORMATS={})).DATE="yyyy-MM-dd",c.TIME="HH:mm:ss",c.TIMESTAMP="timestamp",c.DATETIME="yyyy-MM-ddTHH:mm:ss",c.LOCALDATETIME="yyyy-MM-ddTHH:mm:ss",c.DATETIME_ORACLE="yyyy-MM-dd HH:mm:ss",c.DATE_TIME="yyyy-MM-dd HH:mm:ss";var u=function(e,t,n){var i="";return e.forEach((function(e,o){if(o&&o.endsWith(".event")){var a=o.split(".")[0];i=" "+i+" ("+a+')="'+(t?t+".":"")+"triggerUploadEvent($event, '"+a+"', '"+n+"', row)\" "}})),i},h=u,m=function(e,n,i){i=i.replace("bind:","");var o=e.attrs.find((function(e){return"datasetboundexpr"===e.name}));"dataset"!==n.name||o||e.attrs.push(new t.Attribute("datasetboundexpr",i,n.sourceSpan,n.keySpan,n.valueSpan,void 0,void 0))},f=m,g=function(e){var t=e.match(/(custom(\s*:))/g);return t&&t.length},v=function(e,t,n,i,o){void 0===i&&(i=""),void 0===o&&(o="item");var a,r,s,l=t.replace(/([^a-zA-Z0-9.])/g,"\\$1"),c=new RegExp("("+l+")(\\[0\\])?(.data\\[\\$i\\])?(.content\\[\\$i\\])?(\\[\\$i\\])?","g"),p={"wm-list":["itemclass","disableitem","dataset"]};n&&(a=new RegExp("(Widgets."+n+".currentItem)\\b","g"),r=new RegExp("(Widgets."+n+".currentItemWidgets)\\b","g"),s=new RegExp("(Widgets.(.*).(formWidgets|filterWidgets))\\b","g")),(_.isArray(e)?e:p[e.name]?[e]:e.children||[]).forEach((function(e){if(e.name){var l=e.name,d=new RegExp("bind:\\s*\\(*"+t+"\\)*\\.length\\)*");e.attrs.forEach((function(n){var u=n.value&&n.value.trim();_.startsWith(u,"bind:")&&((!p[l]||p[l]&&p[l].indexOf(n.name)>-1)&&_.includes(u,t)&&u!=="bind:"+t&&!d.test(u)&&(u=u.replace("bind:",""),m(e,n,u),u=u.replace(c,o),g(u="bind:"+u)&&a&&(u+=":"+a.exec(a.source)[0])),a&&a.test(u)&&((u.includes(".formWidgets")||u.includes(".filterWidgets"))&&(u=u.replace(s,"Widgets")),m(e,n,u),u=u.replace(a,o)),r&&r.test(u)&&(u=u.replace(r,i+"currentItemWidgets")),n.value=u)})),v(e.children,t,n,i,o)}}))},y=new Map([["display-name","caption"],["display-name.bind","caption.bind"],["title","hint"],["title.bind","hint.bind"],["show","show"],["show.bind","show.bind"],["disabled","disabled"],["disabled.bind","disabled.bind"],["hyperlink","hyperlink"],["hyperlink.bind","hyperlink.bind"],["target","target"],["conditionalclass.bind","conditionalclass.bind"],["conditionalstyle.bind","conditionalstyle.bind"]]),b=window.requestAnimationFrame,w=[],P=function(e){w.length||b((function(){w.forEach((function(e){return e()})),w.length=0})),w.push(e)},O=function(e,t,n){var i=function(t){return e.classList.remove(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},E=function(e,t,n){var i=function(t){return e.classList.add(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},R=function(e,t,n,i){var o=function(){return e.style[t]=n};i?o():P(o)},A=function(e,t,n,i){var o=function(){return e instanceof Element&&e.setAttribute(t,n)};i?o():P(o)};function T(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function S(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function I(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function D(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var x={};function N(){return window._WM_APP_PROPERTIES?window._WM_APP_PROPERTIES:x}var k,M,L,F=function(){function e(e){this.generator=function(e){var t;return S(this,(function(n){switch(n.label){case 0:t=1,n.label=1;case 1:return[4,""+e+t++];case 2:return n.sent(),[3,1];case 3:return[2]}}))}(e)}return e.prototype.nextUid=function(){return this.generator.next().value},e}(),j=function(e){return"string"==typeof e},B=function(e){return void 0!==e},G=function(e,t){return void 0===e?t:e},V=function(e,t){return void 0===e?t:void 0===t?e:e+t},W=function(e,t){return G(e,0)-G(t,0)},U=function(){},q=new Map,z=new Map,H=new Map,Y=function(e,t){return"object"!=typeof e&&"object"!=typeof t&&(e!=e&&t!=t||e===t)},K=function(e,t){var n=t.length,i=n>10;switch(n){case 10:if(i=!Y(e[9],t[9]))break;case 9:if(i=!Y(e[8],t[8]))break;case 8:if(i=!Y(e[7],t[7]))break;case 7:if(i=!Y(e[6],t[6]))break;case 6:if(i=!Y(e[5],t[5]))break;case 5:if(i=!Y(e[4],t[4]))break;case 4:if(i=!Y(e[3],t[3]))break;case 3:if(i=!Y(e[2],t[2]))break;case 2:if(i=!Y(e[1],t[1]))break;case 1:if(i=!Y(e[0],t[0]))break}return i},Q=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a,r=t.get(n);if(r){var s=K(r.args,i);if(!s)return r.result}return r={args:i,result:a=e.transform.apply(e,D([],I(i)))},t.set(n,r),a},Z=/[^ a-zA-Z0-9]/g,J=function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},X=function(){function e(e,t,n){this.ast=e,this.declarations=[],this.stmts=[],this.pipes=[],this.vIdx=0,this.exprType=t,this.pipeNameVsIsPureMap=n}return e.prototype.createVar=function(){var e="v"+this.vIdx++;return this.declarations.push(e),e},e.prototype.processImplicitReceiver=function(){return"ctx"},e.prototype.processLiteralPrimitive=function(){var e=this.cAst;return j(e.value)?'"'+e.value.replace(/"/g,'"').replace(Z,J)+'"':e.value},e.prototype.processLiteralArray=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.expressions),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"=["+a.join(",")+"]"),o},e.prototype.processLiteralMap=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.values),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"={"+n.keys.map((function(e,t){return"'"+e.key+"':"+a[t]}))+"}"),o},e.prototype.processPropertyRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.receiver,t),i=this.createVar();return t.push(i+"="+n+"&&"+n+"."+e.name),i},e.prototype.processKeyedRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.key,t),i=this.build(e.receiver,t),o=this.createVar();return t.push(o+"="+i+"&&"+i+"["+n+"]"),o},e.prototype.processPrefixNot=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.expression,t);return t.push(n+"=!"+n),n},e.prototype.handleBinaryPlus_Minus=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar(),a="+"===e.operation?"_plus":"_minus";return t.push(o+"="+a+"("+n+","+i+")"),o},e.prototype.handleBinaryAND_OR=function(){var e=this.cAst,t=this.cStmts,n=[],i=[],o=[],a=this.build(e.left,i),r=this.build(e.right,o),s=this.createVar();return"&&"===e.operation?n.push(i.join(";"),";"+s+"=false",";if("+a+"){",o.join(";"),";"+s+"="+r+";","}"):n.push(i.join(";"),";"+s+"="+a,";if(!"+a+"){",o.join(";"),";"+s+"="+r+";","}"),t.push(n.join("")),s},e.prototype.handleBinaryDefault=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar();return t.push(o+"="+n+e.operation+i),o},e.prototype.processBinary=function(){var e=this.cAst.operation;return"+"===e||"-"===e?this.handleBinaryPlus_Minus():"&&"===e||"||"===e?this.handleBinaryAND_OR():this.handleBinaryDefault()},e.prototype.processConditional=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.condition,t),i=this.createVar(),o=[],a=[],r=[],s=this.build(e.trueExp,a),l=this.build(e.falseExp,r);return o.push("if("+n+"){",a.join(";"),";"+i+"="+s+";","}else{",r.join(";"),";"+i+"="+l+";","}"),t.push(o.join(" ")),i},e.prototype.processMethodCall=function(){var e,n,i=this.cAst,o=this.cStmts,a=[];try{for(var r=C(i.args),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,o))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}var c=this.build(i.receiver,o),p=this.createVar(),d=i.receiver instanceof t.ImplicitReceiver;return o.push(p+"= "+c+"&&"+c+"."+i.name+"&&"+c+"."+i.name+(d?".bind(_ctx)":"")+"("+a.join(",")+")"),p},e.prototype.processChain=function(){var e=this;return this.cAst.expressions.map((function(t){return e.build(t)})).join(";")},e.prototype.processPropertyWrite=function(){var e,n,i=this.cAst,o=this.cStmts;n=i.receiver instanceof t.ImplicitReceiver?"_ctx."+i.name:(e=this.build(i.receiver,o))+(e.length?".":"")+i.name;var a=this.build(i.value,o);o.push(n+"="+a)},e.prototype.processPipe=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[],r=[],s=[],l=this.build(n.exp,i);try{for(var c=C(n.args),p=c.next();!p.done;p=c.next()){var d=p.value;a.push(this.build(d,s))}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}var u="_p"+this.pipes.length;return this.pipes.push([n.name,u]),a.unshift(l),r.push(s.length?s.join(";")+";":"",this.pipeNameVsIsPureMap.get(n.name)?o+"=getPPVal("+u+',_ppc,"'+u+'",'+a+")":o+"="+u+".transform("+a+")"),i.push(r.join("")),o},e.prototype.build=function(e,n){return this.cAst=e,this.cStmts=n||this.stmts,e instanceof t.ImplicitReceiver?this.processImplicitReceiver():e instanceof t.LiteralPrimitive?this.processLiteralPrimitive():e instanceof t.LiteralArray?this.processLiteralArray():e instanceof t.LiteralMap?this.processLiteralMap():e instanceof t.PropertyRead?this.processPropertyRead():e instanceof t.PropertyWrite?this.processPropertyWrite():e instanceof t.KeyedRead?this.processKeyedRead():e instanceof t.PrefixNot?this.processPrefixNot():e instanceof t.Binary?this.processBinary():e instanceof t.Conditional?this.processConditional():e instanceof t.MethodCall?this.processMethodCall():e instanceof t.Chain?this.processChain():e instanceof t.BindingPipe?this.processPipe():void 0},e.prototype.extendCtxWithLocals=function(){var e=this.createVar();this.stmts.push(e+"=Object.assign({}, locals)","Object.setPrototypeOf("+e+", _ctx)","ctx="+e)},e.prototype.fnBody=function(){return this.declarations.push("ctx"),'"use strict";\nvar '+this.declarations.join(",")+";\n"+this.stmts.join(";")},e.prototype.fnArgs=function(){var e,t,n=["_plus","_minus","_isDef"];if(this.exprType===L.Binding){n.push("getPPVal","_ppc");try{for(var i=C(this.pipes),o=i.next();!o.done;o=i.next()){var a=I(o.value,2)[1];n.push(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}return n.push("_ctx","locals"),n.join(",")},e.prototype.addReturnStmt=function(e){this.stmts.push("return "+e+";")},e.prototype.cleanup=function(){this.ast=this.cAst=this.stmts=this.cStmts=this.declarations=this.pipes=this.pipeNameVsIsPureMap=void 0},e.prototype.compile=function(e){if(this.extendCtxWithLocals(),this.addReturnStmt(this.build(this.ast)),e)return{fnBody:this.fnBody(),fnArgs:this.fnArgs(),pipes:this.pipes};var t,n=new Function(this.fnArgs(),this.fnBody());return this.exprType===L.Binding?(t=n.bind(void 0,V,W,B,Q)).usedPipes=this.pipes.slice(0):t=n.bind(void 0,V,W,B),this.cleanup(),t},e}(),ee=function(){return{transform:U}},te=function(){if(void 0!==k)return k;try{new Function,k=!1}catch(e){k=!0}return k};function ne(e,n){var i,o;if(!M)return console.log("set pipe provider"),U;if(!j(e))return U;if((e=e.trim()).endsWith(";")&&(e=e.slice(0,-1)),!e.length)return U;var a,r=q.get(e);if(r)return r;if(n||(a=le(e)),!a)if(te())a=function(t,n){var i=Object.assign({},n);return Object.setPrototypeOf(i,t),_.get(i,e)};else{var s=new t.Parser(new t.Lexer).parseBinding(e,"",0);if(s.errors.length)a=r=U;else{var l=M.getPipeNameVsIsPureMap();if(r=new X(s.ast,L.Binding,l).compile(n),n)return r;if(r.usedPipes.length){var c=[],p=!1;try{for(var d=C(r.usedPipes),u=d.next();!u.done;u=d.next()){var h=I(u.value,1)[0],m=M.meta(h),f=void 0;m?(m.pure&&(p=!0,f=H.get(h)),f||(f=M.getInstance(h)),m.pure&&H.set(h,f)):f=ee,c.push(f)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}c.unshift(p?new Map:void 0),a=r.bind.apply(r,D([void 0],I(c)))}else a=r.bind(void 0,void 0)}}return q.set(e,a),a}function ie(e,t,n){var i=Object.assign({},n);Object.setPrototypeOf(i,t);var o=e.split("("),a=o[0],r=_.get(t,a);if(r){var s=o[1].replace(")","");s=s.split(",");var l=[];return s.forEach((function(e){e=e&&e.trim(),l.push(_.get(i,e))})),r.bind(i).apply(void 0,D([],I(l)))}}function oe(e,n){if(!j(e))return U;if(!(e=e.trim()).length)return U;var i=z.get(e);if(i)return i;if(n||(i=ce(e)),!i)if(te())i=ie.bind(void 0,e);else{var o=new t.Parser(new t.Lexer).parseAction(e,"",0);if(o.errors.length)return U;i=new X(o.ast,L.Action).compile(n)}return z.set(e,i),i}!function(e){e[e.Binding=0]="Binding",e[e.Action=1]="Action"}(L||(L={}));var ae=new Map,re=function(e){return ae.get(e)},se=function(e,t){var n,i,o=re(e);if(o){var a=o.usedPipes||[];if(o=t===L.Binding?o.bind(void 0,V,W,B,Q):o.bind(void 0,V,W,B),a.length){var r=[],s=!1;try{for(var l=C(a),c=l.next();!c.done;c=l.next()){var p=I(c.value,1)[0],d=M.meta(p),u=void 0;d?(d.pure&&(s=!0,u=H.get(p)),u||(u=M.getInstance(p)),d.pure&&H.set(p,u)):u=ee,r.push(u)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}r.unshift(s?new Map:void 0),o=o.bind.apply(o,D([void 0],I(r)))}else t===L.Binding&&(o=o.bind(void 0,void 0));return o}},le=function(e){return se(e,L.Binding)},ce=function(e){return se(e,L.Action)},pe=new Map,de=new F("watch-id-"),ue={};Object.freeze(ue);var he,me,fe,ge=!1,ve=function(e,t){var n;return void 0===t&&(t=50),function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];window.__zone_symbol__clearTimeout(n),n=window.__zone_symbol__setTimeout((function(){return e.apply(void 0,D([],I(i)))}),t)}},ye=function(e,t,n,i){var o,a=n;_.isArray(a)&&(o=a.map((function(e){return $t(e,t)})),_.isArray(o[0])&&(o=_.flatten(o)),e(o,i))},be=function(e,t,n){var i="[$i]";if(!t)return{expr:e.replace(/\[\$i\]/g,"[0]"),listener:n};var o=e.lastIndexOf(i),a=e.substr(0,o).replace(i,"[0]"),r=e.substr(o+5),s=n;return r&&(s=ye.bind(void 0,n,r)),{expr:a,listener:s}},we=function(e,t,n,i,o,a,r,s){if(void 0===o&&(o=de.nextUid()),void 0===a&&(a=!1),void 0===r&&(r={}),-1!==e.indexOf("[$i]")){var l=be(e,r&&r.arrayType,i);e=l.expr,i=l.listener}var c=ne(e);return pe.set(o,{fn:c.bind(e,t,n),listener:i,expr:e,last:ue,doNotClone:a,isMuted:s}),function(){return Pe(o)}},Pe=function(e){return pe.delete(e)},_e=!1,Oe=window.requestAnimationFrame,Ee=function(e){if(!ge||e){var t,n=1;do{t=!1,pe.forEach((function(e){if(!e.isMuted||!e.isMuted()){var n,i=e.fn,o=e.listener,a=e.last;try{n=i()}catch(t){console.warn("error in executing expression: '"+e.expr+"'")}_.isEqual(n,a)||(t=!0,_e=!0,e.last=n,_.isObject(n)&&!e.doNotClone&&!1!==n.__cloneable__&&(e.last=_.clone(n)),o(n,a),Re())}})),n++}while(t&&n<5);t&&5===n&&console.warn("Number of watch cycles gone above set limit of: 5 ")}},Re=function(){return _e=!1};window.watchRegistry=pe;var Ae,Te,Se=ve((function(){fe=!0,me.run((function(){return Ee()}))}),100),Ce=(Ae=!1,function(e){if(he)if(e)me.run((function(){return he.tick()})),Ae=!1;else{if(Ae)return;Ae=!0,Oe((function(){me.run((function(){return he.tick()})),Ae=!1}))}});e.ComponentType=void 0,(Te=e.ComponentType||(e.ComponentType={}))[Te.PAGE=0]="PAGE",Te[Te.PREFAB=1]="PREFAB",Te[Te.PARTIAL=2]="PARTIAL";var Ie,De=function(){};!function(e){e.LIST_RECORDS="listRecords",e.UPDATE_RECORD="updateRecord",e.INSERT_RECORD="insertRecord",e.DELETE_RECORD="deleteRecord",e.INVOKE="invoke",e.UPDATE="update",e.NOTIFY="notify",e.IS_API_AWARE="isApiAware",e.SUPPORTS_CRUD="supportsCRUD",e.SUPPORTS_DISTINCT_API="supportsDistinctAPI",e.IS_PAGEABLE="isPageable",e.IS_SORTABLE="isSortable",e.GET_OPERATION_TYPE="getOperationType",e.GET_RELATED_PRIMARY_KEYS="getRelatedTablePrimaryKeys",e.GET_ENTITY_NAME="getEntityName",e.SET_INPUT="setinput",e.GET_RELATED_TABLE_DATA="getRelatedTableData",e.GET_DISTINCT_DATA_BY_FIELDS="getDistinctDataByFields",e.GET_AGGREGATED_DATA="getAggregatedData",e.GET_MATCH_MODE="getMatchMode",e.DOWNLOAD="download",e.GET_NAME="getName",e.GET_PROPERTIES_MAP="getPropertiesMap",e.GET_PRIMARY_KEY="getPrimaryKey",e.GET_BLOB_URL="getBlobURL",e.SUPPORTS_SERVER_FILTER="supportsServerFilter",e.GET_OPTIONS="getOptions",e.SEARCH_RECORDS="searchRecords",e.GET_REQUEST_PARAMS="getRequestParams",e.GET_PAGING_OPTIONS="getPagingOptions",e.FETCH_DISTINCT_VALUES="fetchDistinctValues",e.GET_UNIQUE_IDENTIFIER="getUniqueIdentifier",e.GET_CONTEXT_IDENTIFIER="getContextIdentifier",e.IS_UPDATE_REQUIRED="isUpdateRequired",e.ADD_ITEM="addItem",e.SET_ITEM="setItem",e.REMOVE_ITEM="removeItem",e.IS_BOUND_TO_LOCALE="isBoundToLocale",e.GET_DEFAULT_LOCALE="getDefaultLocale",e.CANCEL="cancel",e.SET_PAGINATION="setPagination"}(Ie||(Ie={}));var xe={Operation:Ie},Ne=function(){},ke=function(){},Me=function(){},Le=function(){},Fe=function(){},je=function(){},Be=function(){},Ge=function(){},$e=function(){},Ve=function(){},We=function(){},Ue=window.navigator.userAgent,qe={SNAKE_CASE:/[A-Z]/g,ANDROID:/Android/i,IPHONE:/iPhone/i,IPOD:/iPod/i,IPAD:/iPad/i,MAC:/Mac/i,ANDROID_TABLET:/android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i,MOBILE:/Mobile/i,WINDOWS:/Windows Phone/i,SUPPORTED_IMAGE_FORMAT:/\.(bmp|gif|jpe|jpg|jpeg|tif|tiff|pbm|png|ico)$/i,SUPPORTED_FILE_FORMAT:/\.(txt|js|css|html|script|properties|json|java|xml|smd|xmi|sql|log|wsdl|vm|ftl|jrxml|yml|yaml|md|less|jsp)$/i,SUPPORTED_AUDIO_FORMAT:/\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,SUPPORTED_VIDEO_FORMAT:/\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,PAGE_RESOURCE_PATH:/^\/pages\/.*\.(js|css|html|json)$/,MIN_PAGE_RESOURCE_PATH:/.*(page.min.html)$/,VALID_EMAIL:/^[a-zA-Z][\w.+]+@[a-zA-Z_]+?\.[a-zA-Z.]{1,4}[a-zA-Z]$/,VALID_WEB_URL:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_WEBSOCKET_URL:/^(ws[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_RELATIVE_URL:/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,REPLACE_PATTERN:/\$\{([^\}]+)\}/g,ZIP_FILE:/\.zip$/i,EXE_FILE:/\.exe$/i,NO_QUOTES_ALLOWED:/^[^'|"]*$/,NO_DOUBLE_QUOTES_ALLOWED:/^[^"]*$/,VALID_HTML:/<[a-z][\s\S]*>/i,VALID_PASSWORD:/^[0-9a-zA-Z-_.@&*!#$%]+$/,SPECIAL_CHARACTERS:/[^A-Z0-9a-z_]+/i,APP_SERVER_URL_FORMAT:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9\.\-]+([:]?[0-9]{2,5}|\.[a-zA-Z]{2,5}[\.]{0,1})\/+[^?#&=]+$/,JSON_DATE_FORMAT:/\d{4}-[0-1]\d-[0-3]\d(T[0-2]\d:[0-5]\d:[0-5]\d.\d{1,3}Z$)?/,DATA_URL:/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,ISO_DATE_FORMAT:/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/},ze=["int",e.DataType.INTEGER,e.DataType.FLOAT,e.DataType.DOUBLE,e.DataType.LONG,e.DataType.SHORT,e.DataType.BYTE,e.DataType.BIG_INTEGER,e.DataType.BIG_DECIMAL],He=new Date,Ye=function(e){return void 0!==e},Ke=function(e){return null!==e&&"object"==typeof e},Qe=function(e,t){return!(!e||"false"===e)||!!t&&e===t};var Ze=function(){return window.navigator.appVersion.indexOf("Trident/")>-1||window.navigator.userAgent.indexOf("MSIE")>-1},Je=function(){return qe.ANDROID.test(Ue)},Xe=function(){return qe.ANDROID_TABLET.test(Ue)&&!/Tablet PC 2.0/i.test(Ue)},et=function(){return qe.IPHONE.test(Ue)},tt=function(){return qe.IPOD.test(Ue)},nt=function(){return qe.IPAD.test(Ue)||window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2&&qe.MAC.test(window.navigator.platform)},it=function(){return et()||tt()||nt()},ot=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+n+") and (max-device-width : "+n+") and (min-device-height : "+i+") and (max-device-height : "+i+") and (min-width: "+n+") and (max-width: "+n+")").matches},at=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+i+") and (max-device-width : "+i+") and (min-device-height : "+n+") and (max-device-height : "+n+") and (min-width: "+i+") and (max-width: "+i+")").matches},rt=function(){return Je()||it()||Xe()||$("#wm-mobile-display:visible").length>0},st=function(){return"MOBILE"===N().platformType&&"APPLICATION"===N().type},lt=function(){var e=window.navigator.userAgent.toLowerCase().match(/android\s([0-9\.]*)/);return e?e[1]:""},ct=function(){return Je()&&4===parseInt(lt(),10)},pt=function(e){var t=e.indexOf("?");return t>-1?(e=encodeURI(e.substring(0,t))+e.substring(t),e=dt(e)):e=encodeURI(e),e},dt=function(e){var t,n,i="";return(n=e.indexOf("?"))>-1&&(n+=1,(t=e.substring(n))&&(t.split("&").forEach((function(e){var t,n=_.includes(e,"=")?e.indexOf("="):e&&e.length,o=e.substr(0,n),a=e.substr(n+1);if(a||_.includes(e,"=")){try{t=decodeURIComponent(a)}catch(e){t=a}i+=o+"="+encodeURIComponent(t)+"&"}else i+=o+"&"})),i=i.slice(0,-1),e=e.replace(t,i))),e},ut=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):""},ht=function(e){return e===e.toUpperCase()?e:e.replace(qe.SNAKE_CASE,(function(e,t){return(t?" ":"")+e}))},mt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},ft=function(e){var t;return-1!==(t=e.indexOf("."))&&(e=mt(e,t+1,e.charAt(t+1).toUpperCase()),e=mt(e,t," ")),e},gt=function(e){return e=_.camelCase(e),e=ut(e),e=ht(e),e=ft(e)},vt=function(e){return e.split("-").join(" ")},yt=function(e,t){void 0===t&&(t=",");var n,i=[];return _.isArray(e)||(i=_.split(e,t)),n=_.map(i,gt),_.isArray(e)?n:n.join(t)},bt=function(e){var t=document.createElement("a");return t.href=e,""!==t.protocol&&(!qe.DATA_URL.test(e)&&(!!wt(location.href,"https://")&&("https:"!==t.protocol&&"wss:"!==t.protocol)))},wt=function(e,t,n){return!!e&&new RegExp("^"+t,n?"i":"").test(e)},Pt=function(e,t){var n;return n=_.attempt((function(){var n=Object.keys(e).map((function(e){return"var "+e+" = data['"+e+"'];"})).join(" ");return new Function("data",n+" return "+t)(e)})),_.isError(n)&&(n=_.get(e,t)),n},_t=function(e){return qe.SUPPORTED_IMAGE_FORMAT.test(e)},Ot=function(e){return qe.SUPPORTED_AUDIO_FORMAT.test(e)},Et=function(e){return qe.SUPPORTED_VIDEO_FORMAT.test(e)},Rt=function(e){return qe.VALID_WEB_URL.test(e)},At=function(e){return Rt(e),e};function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=1,o=arguments.length,a=new Array(o-i);i<o;i++)a[i-1]=arguments[i];if(_.isFunction(e))return e.apply(null,a)}var St=function(e,t,n,i,o,a,r){if(t){if("timestamp"===n)return moment(t).valueOf();if("UTC"===n)return new Date(t).toISOString();if(i){var s=n.replaceAll("y","Y").replaceAll("d","D").replace("a","A");if(a)return moment(t).format(s);if("datetimestamp"===o)return t=un(i,t),moment(t).format(s)}return e.transform(t,n,i,r)}},Ct=function(e){if("string"==typeof e){var t=e.match(qe.ISO_DATE_FORMAT);return!(!t||!t[4])||void 0}},It=function(e,t,n){if(t&&t.pattern&&"timestamp"!==t.pattern){var i=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?"YYYY/MM/DD HH:mm:ss":Qt(t.pattern);e=moment(e,i).toDate()}if(_.isDate(e))return e;if(isNaN(e)||(e=parseInt(e,10)),moment(e).isValid()&&""!==e&&null!=e){var o=new Date(e);return _.isString(e)&&(o=n?un(n,e):new Date(moment(moment(e).format()).valueOf())),"CURRENT_DATE"===e||isNaN(o.getDay())?He:o}},Dt=function(e,t,n,i,o,a,r,s){void 0===s&&(s=!1);var l=e,c=function(e){if(!t||!t.contains(e.target)&&t!==e.target)if(n.contains(e.target)){if($(e.target).is("input")&&!o)return;l.removeEventListener(i,c,s)}else 0===r&&l.removeEventListener(i,c,s),a()};l.addEventListener(i,c,s);return function(){l.removeEventListener(i,c,s)}},xt=function(e){return _.cloneDeep(e)},Nt=function(e,t,n){var i=_.get(document.forms,[e,t,"files"]);return n?_.map(i,_.identity):i&&i[0]};function kt(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}var Mt,Lt,Ft=function(){return kt()+"-"+kt()+"-"+kt()},jt=function(e,t){var n;return!e||!t||(n=e&&e.split(",").map(Function.prototype.call,String.prototype.trim),_.intersection(n,t.userRoles).length)},Bt=function(e){if(e)try{var t=parseInt(e,10);return Ke(e)||!isNaN(t)?e:JSON.parse(e)}catch(e){return}},Gt=function(e){var t=new X2JS({emptyNodeForm:"content",attributePrefix:"",enableToStringFunc:!1}).xml2js(e);return t&&(t=_.get(t,Object.keys(t)[0])),t},$t=function(e,t,n){if(e&&t){if(!n)return _.get(e,t);var i,o=t.split("."),a=[];if(o.forEach((function(e){if(!o.length)return i=!0,!1;for(var t,n=e.match(/\w+/g);n.length;)t=n.shift(),a.push({key:t,value:n.length?[]:{}})})),!i)return a.forEach((function(t){var n=e[t.key];Ke(n)||(n=Bt(n))||(n=t.value),e[t.key]=n,e=n})),e}},Vt=function(t){var n;return t?n=(n=(n=t&&t.substring(t.lastIndexOf(".")+1))&&n.toLowerCase())===e.DataType.LOCALDATETIME?e.DataType.DATETIME:n:e.DataType.STRING},Wt=function(e){return-1!==ze.indexOf(Vt(e).toLowerCase())},Ut=function(e){return!(!Ke(e)||_.isArray(e))&&0===Object.keys(e).length},qt=function(e){var t=$(e),n=t.offset().top,i=t.closest('[wmsmoothscroll="true"]');if(st()&&i.length){var o=_.get(i[0],"iscroll"),a=-(n-o.y);a=o.maxScrollY>a?o.maxScrollY:a,o.scrollTo(0,a)}else window.scroll({top:n,left:0,behavior:"smooth"})},zt=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},Ht=function(e){var t=_.omit(e,"empty");return _.isEqual(_.keys({content:[],first:!0,last:!0,number:0,numberOfElements:10,size:20,sort:null,totalElements:10,totalPages:1}),_.keys(t).sort())},Yt=function(e,t,n){var i=qe.REPLACE_PATTERN;if(e)return n&&(i=/\{([^\}]+)\}/g),e.replace(i,(function(e,n){return _.get(t,n)}))},Kt=function(t){return _.includes(t,".")&&(t=_.toLower(Vt(t))),_.includes([e.DataType.DATE,e.DataType.TIME,e.DataType.TIMESTAMP,e.DataType.DATETIME,e.DataType.LOCALDATETIME],t)},Qt=function(e){return _.includes(e,"E")&&(e=_.replace(e,/E[,]?/g,"")),_.replace(e,/y*d*/g,(function(e){return e.toUpperCase()}))},Zt=Qt,Jt=function(e,t){var n=["AM","PM"],i=moment()._locale.meridiem();t&&t.meridians&&_.includes(n,i)&&_.forEach(t.meridians,(function(t,i){_.includes(e,t)&&(e=e.replace(t,n[i]))}));var o=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?_.get(t,"pattern")||"YYYY/MM/DD HH:mm:ss":Qt(_.get(t,"pattern"))||"";return t&&t.pattern&&"timestamp"!==t.pattern&&(isNaN(new Date(e).getTime())?e=moment(e,o):(it()&&(e=moment(e).format("YYYY/MM/DD HH:mm:ss")),e=moment(new Date(e),o)),e=e.toDate()),moment(e,o).isValid()?(it()&&(e=moment(moment(e).valueOf()).format("YYYY/MM/DD HH:mm:ss")),e):(isNaN(e)?new Date(e).getTime()||(e=moment(moment().format("YYYY-MM-DD")+" "+e,"YYYY-MM-DD HH:mm:ss A")):e=parseInt(e,10),new Date(moment(e).valueOf()))},Xt=function(e,t){return e=Jt(e,t),new Date(e)},en=function(e,t){if(e instanceof Blob)return e;var n=Bt(e);return e=n&&n instanceof Object?new Blob([JSON.stringify(n)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},tn=function(e,t,n){var i=_.isArray(n)?n:_.split(n,",");return i=_.map(i,_.trim),_.isEqualWith(e,t,(function(e,t){return _.every(i,(function(n){var i,o,a;return-1===_.indexOf(n,":")?i=o=_.trim(n):(a=_.split(n,":"),i=_.trim(a[0]),o=_.trim(a[1])),_.get(e,i)===_.get(t,o)}))}))},nn=function(e){return document.querySelector(e)},on=nn,an=function(e){return!!nn('link[href="'+e+'"]')},rn=an,sn=function(e){var t=nn('link[href="'+e+'"]');t&&t.remove()},ln=function(e,t){if(!an(e)){var n=document.createElement("link");return n.href=e,t&&t.name&&n.setAttribute(t.name,t.value),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),document.head.appendChild(n),n}},cn=function(e){void 0===e&&(e=[]),Array.isArray(e)||(e=[e]),e.forEach(ln)},pn=function(e){return!!nn('script[src="'+e+'"], script[data-src="'+e+'"]')},dn=pn,un=function(e,t){return t?new Date(new Date(moment(t).tz(e).format()).toLocaleString("en-US",{timeZone:e})):new Date(new Date(moment().tz(e).format()).toLocaleString("en-US",{timeZone:e}))},hn=function(e,t,n){return void 0===n&&(n=!1),T(void 0,void 0,void 0,(function(){var i;return S(this,(function(o){return!(i=e.trim()).length||pn(i)?[2,Promise.resolve()]:t?[2,new Promise((function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=i,n.async=!1,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,e(!0))}:n.onload=function(){e(!0)},n.onerror=function(e){return t(e)},document.getElementsByTagName("head")[0].appendChild(n)}))]:n?[2,$.ajax({dataType:"script",cache:!0,url:e}).done((function(e){return e})).fail((function(e){return e}))]:[2,$.getScript(e).done((function(e){return e})).fail((function(e){return e}))]}))}))},mn=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=!0),T(void 0,void 0,void 0,(function(){var n,i,o,a,r,s;return S(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,7]),n=C(e),i=n.next(),l.label=1;case 1:return i.done?[3,4]:(o=i.value,[4,hn(o,t)]);case 2:l.sent(),l.label=3;case 3:return i=n.next(),[3,1];case 4:return[3,7];case 5:return a=l.sent(),r={error:a},[3,7];case 6:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(r)throw r.error}return[7];case 7:return[2,Promise.resolve()]}}))}))},fn={},gn=function(e,t){var n=window.sessionStorage.getItem(fn.id);(n=n?JSON.parse(n):{})[e]=t,window.sessionStorage.setItem(fn.id,JSON.stringify(n))},vn=function(e){var t=window&&window.sessionStorage&&window.sessionStorage.getItem(fn.id);if(t)return(t=JSON.parse(t))[e]},yn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},bn=function(e){return _.isArray(e)},wn=function(e){return"string"==typeof e},Pn=function(e){return"number"==typeof e},_n=function(e){return"boolean"==typeof e},On=function(e){return new Promise((function(t,n){resolveLocalFileSystemURL(e,(function(i){i.file((function(i){var o=new FileReader;o.onloadend=function(){var n=new Blob([o.result],{type:i.type});t({blob:n,filepath:e})},o.onerror=n,o.readAsArrayBuffer(i)}))}),n)}))},En=function(){return!!window.cordova},Rn={INT_MAX_VALUE:2147483647},An=function(e,t){void 0===t&&(t="_self"),En()&&_.startsWith(e,"#")?location.hash=e:window.open(e,t)},Tn=function(e,t,n,i,o){return void 0===n&&(n=!1),$.ajax({type:"get",dataType:e,url:t,async:!n}).done((function(e){return i&&i(e)})).fail((function(e){return o&&o(e)}))},Sn=function(e){return e instanceof Promise?e:Promise.resolve(e)},Cn=function(e,t,n,i){void 0===i&&(i=function(){return Promise.resolve(!1)});var o=0,a=function(){if(o++,_.isFunction(e))return e()};return n=_.isNumber(n)&&n>0?n:0,t=_.isNumber(t)&&t>0?t:0,new Promise((function(e,r){var s=function(){var l=arguments;setTimeout((function(){Sn(i()).then((function(t){!1!==t&&(!n||o<=n)?Sn(a()).then(e,s):r(l)}),(function(){return r(l)}))}),t)};Sn(a()).then(e,s)}))},In=function(){var e={promise:null,reject:null,resolve:null,onAbort:function(){},isAborted:!1};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e.promise.abort=function(){Tt(e.onAbort),e.reject("aborted"),e.isAborted=!0},e},Dn=function(e,t){document.styleSheets[0].insertRule(e+" { "+t+" }")},xn=function(e){var t={},n=e.indexOf("?");-1!==n&&_.split(e.substring(n+1,e.length),"&").forEach((function(e){e=_.split(e,"="),t[e[0]]=e[1]}));return t},Nn=function(e){var t=(e=e.replace("#/","/")).indexOf("?");return-1!==t&&(e=e.substring(0,t)),e},kn=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Mn=function(){var e={promise:null,resolve:yn,reject:yn};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},Ln=function(e,t,n,i){if(n=n||Mn(),0===(i=i||0)&&(e=_.filter(e,(function(e){return!(_.isUndefined(e)||_.isNull(e))}))),e&&i<e.length)try{Sn(e[i].apply(void 0,t)).then((function(){return Ln(e,t,n,i+1)}),n.reject)}catch(e){n.reject(e)}else n.resolve();return n.promise},Fn=function(e,t){return e.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)===t.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)&&_.isEqual(e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER),t.execute(xe.Operation.GET_CONTEXT_IDENTIFIER))},jn=function(e,t){return e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER)===t},Bn=function(e,t,i){var o=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,a=new n.Subject,r=function(n,r){wt(n[r],"bind:")&&o(we(n[r].replace("bind:",""),e,{},i?i.invokeOnFiltertExpressionChange.bind(i,n,r):function(e,i){e===i&&_.isUndefined(e)||_.isUndefined(e)&&!_.isUndefined(i)||(_.includes(["blob","file"],n.type)||(e=xt(e)),"dataBinding"===n.target?(t.rules=[],_.forEach(e,(function(e,i){t.rules.push({target:i,value:e,matchMode:n.matchMode||"startignorecase",required:!1,type:""})}))):n[r]=e,a.next({filterExpressions:t,newVal:e}))},void 0,!1,{arrayType:_.includes(["in","notin"],n.matchMode)}))},s=function(e){e.rules&&_.forEach(e.rules,(function(e,t){e.rules?s(e):("between"===e.matchMode&&r(e,"secondvalue"),r(e,"value"))}))};return s(t),a},Gn=function(e,t){for(var n=Object.getPrototypeOf(e);Object.getPrototypeOf(n).constructor!==Object;)if(t===(n=Object.getPrototypeOf(n)))return;Object.setPrototypeOf(n,t)},$n=function(e){if(_.isString(e))return _.startsWith(e,"file:///")||/^data:image\/([a-z]{2,});base64,/.test(e)?e:e.replace(new RegExp("([^:]/)(/)+","g"),"$1")};$.cachedScript=(Mt=new Map,Lt=new Set,function(e){if(function(e){return Lt.has(e)}(e))return Promise.resolve();if(function(e){return Mt.has(e)}(e))return Mt.get(e);!function(e){var t,n,i=new Promise((function(e,i){t=e,n=i}));i.resolve=t,i.reject=n,Mt.set(e,i)}(e);var t={dataType:"script",cache:!0,url:e};return $.ajax(t).done((function(){return function(e){Lt.add(e),Mt.get(e).resolve(),Mt.delete(e)}(e)})),Mt.get(e)});var Vn={DATE:"yyyy-MM-dd",TIME:"hh:mm a",TIMESTAMP:"yyyy-MM-dd hh:mm:ss a",DATETIME:"yyyy-MM-dd hh:mm:ss a"},Wn=function(e){return Vn[_.toUpper(e)]},Un=function(e){var t=e.querySelectorAll("label.control-label"),n=e.querySelectorAll("[focus-target]");(n.length||(n=e.querySelectorAll("input, select, textarea")),t.length&&n.length)&&((o=$(n[0]).closest("[widget-id]").attr("widget-id"))&&(A(n[0],"id",o),A(t[0],"for",o)));var i=e.querySelectorAll("ul");if(t.length&&i.length&&("radiogroup"===i[0].getAttribute("role")||"group"===i[0].getAttribute("role"))){var o="wm-group-label-"+Ft();A(i[0],"aria-labelledby",o),A(t[0],"id",o)}},qn=function(e,t,n,i){(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);t.m41<0&&(t.m41=0,Hn(e,t))}))},zn=function(e,t,n,i){var o,a=i?_.parseInt(i.css("width")):_.parseInt(e.css("width")),r=$(window).width()+window.scrollX,s=t.getBoundingClientRect(),l=s.right+window.scrollX;(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);r-(l+s.width)<a&&((o=l-a)<0&&(o=0),t.m41=o,Hn(e,t))}))},Hn=function(e,t){var n="translate3d("+t.m41+"px, "+t.m42+"px, 0px)";e[0].style.webkitTransform=n,e[0].style.MozTransform=n,e[0].style.msTransform=n,e[0].style.OTransform=n,e[0].style.transform=n},Yn=function(e){return"undefined"==typeof WebKitCSSMatrix?new MSCSSMatrix(window.getComputedStyle(e[0]).transform):new WebKitCSSMatrix(window.getComputedStyle(e[0]).webkitTransform)},Kn=function(e){if(!e.closest(".app-popover").length){var t=document.querySelectorAll(".app-popover-wrapper");_.forEach(t,(function(e){e.widget.isOpen&&(e.widget.isOpen=!1)}))}},Qn=Ce,Zn=function(e,t){var n=t.link,i=t.action,o=t.target;if(i&&(e.itemActionFn||(e.itemActionFn=oe(i)),e.itemActionFn(e.userDefinedExecutionContext,Object.create(t))),n)if(!n.startsWith("#/")||o&&"_self"!==o)An(n,o);else{var a=xn(n);n=Nn(n),(_.get(e,"route")||_.get(e,"menuRef.route")).navigate([n],{queryParams:a})}},Jn=function(e,t){var n=_.startsWith(e,"Variables."),i=_.startsWith(e,"Widgets."),o=e.split(".");if(n)return _.get(t.viewParent.Variables,o[1]);if(i){var a,r=_.get(t.viewParent.Widgets,o[1]),s=r.$attrs.get("datasetboundexpr");return a=!r.datasource&&s?s:r.binddataset,Jn(a,r)}},Xn=function(e,t){if(/^Widgets\..*\.currentItem/g.test(e)){var n=e.split("."),i=_.get(t.viewParent.Widgets,n[1]),o=i.$attrs.get("datasetboundexpr");if(!i.datasource&&o)return e=e.replace(/^Widgets\..*\.currentItem/g,o+"[$i]"),Xn(e,t);e=e.replace(/^Widgets\..*\.currentItem/g,i.binddataset+"[$i]")}return e},ei=function(e){var t=e.closest(".app-prefab");return t.length||(t=e.closest(".app-partial")),t.length||(t=e.closest(".app-spa-page")),t.length||(t=e.closest(".app-page")),t.length&&t.parent()[0].tagName},ti={REQUIRED:"required",MAXCHARS:"maxchars",MINVALUE:"minvalue",MAXVALUE:"maxvalue",REGEXP:"regexp",MINDATE:"mindate",MAXDATE:"maxdate",MINTIME:"mintime",MAXTIME:"maxtime",EXCLUDEDATES:"excludedates",EXCLUDEDAYS:"excludedays"},ni=function(e){if(_.isString(e)&&En()&&e.startsWith("file://")){if(it())return e.replace("file://","/_app_file_");if(Je()&&location.href.startsWith("http")){if(e.startsWith(cordova.file.applicationDirectory))return e.replace(cordova.file.applicationDirectory+"www","");if(e.startsWith("file://"))return e.replace("file://","/_app_file_")}}return e},ii=function(e){var t=document.createElement("script");t.onload=function(){e(WM_CUSTOM_FORMATTERS)},t.onerror=function(e){console.warn("Error while loading the file "+t.src+"\n"+e)},t.type="text/javascript",t.src="./extensions/formatters.js",document.head.appendChild(t)},oi=function(e,t){return _WM_APP_PROPERTIES.extra_settings&&_.get(_WM_APP_PROPERTIES.extra_settings,e)||t},ai=function(e){var t="";e.itemsperrow?isNaN(parseInt(e.itemsperrow,10))?(_.split(e.itemsperrow," ").forEach((function(e){var n=_.split(e,"-");e=n[0]+"-"+12/parseInt(n[1],10),t+=" col-"+e})),e.itemsPerRowClass=t.trim()):e.itemsPerRowClass="col-xs-"+12/parseInt(e.itemsperrow,10):e.itemsPerRowClass="col-xs-12"},ri=Object.freeze({__proto__:null,isDefined:Ye,isObject:Ke,toBoolean:Qe,isIE:Ze,isAndroid:Je,isAndroidTablet:Xe,isIphone:et,isIpod:tt,isIpad:nt,isIos:it,isLargeTabletLandscape:ot,isLargeTabletPortrait:at,isMobile:rt,isTablet:function(){var e=document.querySelector(".app-page").widget;return e&&e.viewParent.Viewport.isTabletType},isMobileApp:st,getAndroidVersion:lt,isKitkatDevice:ct,encodeUrl:pt,encodeUrlParams:dt,initCaps:ut,spaceSeparate:ht,replaceAt:mt,periodSeparate:ft,prettifyLabel:gt,deHyphenate:vt,prettifyLabels:yt,isInsecureContentRequest:bt,stringStartsWith:wt,getEvaluatedExprValue:Pt,isImageFile:_t,isAudioFile:Ot,isVideoFile:Et,isValidWebURL:Rt,getResourceURL:At,triggerFn:Tt,getFormattedDate:St,hasOffsetStr:Ct,getDateObj:It,addEventListenerOnElement:Dt,getClonedObject:xt,getFiles:Nt,generateGUId:Ft,validateAccessRoles:jt,getValidJSON:Bt,xmlToJson:Gt,findValueOf:$t,extractType:Vt,isNumberType:Wt,isEmptyObject:Ut,scrollToElement:qt,isElementInViewport:zt,isPageable:Ht,replace:Yt,isDateTimeType:Kt,getValidDateObject:Jt,getNativeDateObject:Xt,getBlob:en,isEqualWithFields:tn,loadStyleSheet:ln,loadStyleSheets:cn,getMomentLocaleObject:un,loadScript:hn,loadScripts:mn,_WM_APP_PROJECT:fn,setSessionStorageItem:gn,getSessionStorageItem:vn,noop:yn,isArray:bn,isString:wn,isNumber:Pn,isBoolean:_n,convertToBlob:On,hasCordova:En,AppConstants:Rn,openLink:An,fetchContent:Tn,toPromise:Sn,retryIfFails:Cn,getAbortableDefer:In,createCSSRule:Dn,getUrlParams:xn,getRouteNameFromLink:Nn,isAppleProduct:kn,defer:Mn,executePromiseChain:Ln,isDataSourceEqual:Fn,validateDataSourceCtx:jn,processFilterExpBindNode:Bn,extendProto:Gn,removeExtraSlashes:$n,getDisplayDateTimeFormat:Wn,addForIdAttributes:Un,adjustContainerPosition:qn,adjustContainerRightEdges:zn,setTranslation3dPosition:Hn,getWebkitTraslationMatrix:Yn,closePopover:Kn,detectChanges:Qn,triggerItemAction:Zn,getDatasourceFromExpr:Jn,extractCurrentItemExpr:Xn,findRootContainer:ei,VALIDATOR:ti,transformFileURI:ni,appendScriptToHead:ii,getAppSetting:oi,setListClass:ai,"\u02750":Zt,"\u02751":on,"\u02752":rn,"\u02753":sn,"\u02754":dn}),si=function(){function e(e){void 0===e&&(e=!0),this._subject=new n.Subject,this._isInitialized=!1,this._eventsBeforeInit=[],e&&this.start()}return e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._isInitialized?this._subject.next({name:e,data:t}):this._eventsBeforeInit.push({name:e,data:t})},e.prototype.start=function(){var e=this;this._isInitialized||(this._isInitialized=!0,this._eventsBeforeInit.forEach((function(t){return e._subject.next(t)})))},e.prototype.subscribe=function(e,t){var n;return e&&t?(n=this._subject.subscribe((function(n){n&&Ke(n)&&n.name===e&&t.apply(void 0,n.data)})),function(){n.unsubscribe()}):yn},e.prototype.destroy=function(){this._subject.complete()},e}(),li=768,ci=1200,pi=function(){function e(){var e=this;this.orientation={isPortrait:!1,isLandscape:!1},this.isMobileType=!1,this.isTabletType=!1,this._eventNotifier=new si(!0),this.setScreenType(),window.addEventListener("resize",this.resizeFn.bind(this));var t=window.matchMedia("(orientation: portrait)");t.matches?this.orientation.isPortrait=!0:this.orientation.isLandscape=!0,t.addEventListener&&t.addEventListener("change",(function(t){return e.orientationChange(t,!t.matches)}))}return e.prototype.update=function(e){this.selectedViewPort=e,this.setScreenType()},e.prototype.orientationChange=function(e,t){t!==this.orientation.isLandscape&&(this.orientation.isPortrait=!t,this.orientation.isLandscape=t,this.notify("orientationchange",{$event:e,data:{isPortrait:!t,isLandscape:t}}))},e.prototype.resizeFn=function(e){this.setScreenType(),this.orientationChange(e,this.screenWidth>=this.screenHeight),this.notify("resize",{$event:e,data:{screenWidth:this.screenWidth,screenHeight:this.screenHeight}})},e.prototype.subscribe=function(e,t){return this._eventNotifier.subscribe(e,t)},e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._eventNotifier.notify.apply(this._eventNotifier,arguments)},e.prototype.setScreenType=function(){var e=document.querySelector(".wm-app");this.screenWidth=e.clientWidth,this.screenHeight=e.clientHeight;this.screenWidth<this.screenHeight?this.screenWidth:this.screenHeight,this.screenWidth>this.screenHeight?this.screenWidth:this.screenHeight;if(this.isTabletType=!1,this.isMobileType=!1,_.get(this.selectedViewPort,"deviceCategory")){var t=this.selectedViewPort.deviceCategory;"Tab"===t?this.isTabletType=!0:"Smartphone"===t&&(this.isMobileType=!0)}else parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-xs"))||480,li=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-sm"))||768,ci=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-lg"))||1200,this.screenWidth>=ci?(this.isTabletType=Je()||it()||Xe(),this.isMobileType=!1):this.screenWidth>=li?(this.type=1,this.isTabletType=!0):(this.type=0,this.isMobileType=!0)},e.prototype.ngOnDestroy=function(){this._eventNotifier.destroy(),window.removeEventListener("resize",this.resizeFn)},e}();pi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new pi},token:pi,providedIn:"root"}),pi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],pi.ctorParameters=function(){return[]};var di=function(){this.MATCH_MODES={STARTS_WITH_IGNORE_CASE:"startignorecase",STARTS_WITH:"start",ENDS_WITH_IGNORE_CASE:"endignorecase",ENDS_WITH:"end",CONTAINS:"anywhere",CONTAINS_IGNORE_CASE:"anywhereignorecase",IS_EQUAL_WITH_IGNORE_CASE:"exactignorecase",IS_EQUAL:"exact"},this.VALIDATOR=ti};di.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new di},token:di,providedIn:"root"}),di.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var ui=function(){_.assign(this,ri)};ui.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new ui},token:ui,providedIn:"root"}),ui.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],ui.ctorParameters=function(){return[]};var hi=function(){_.assign(this,{INTEGER:"integer",BIG_INTEGER:"big_integer",SHORT:"short",FLOAT:"float",BIG_DECIMAL:"big_decimal",DOUBLE:"double",LONG:"long",BYTE:"byte",STRING:"string",CHARACTER:"character",TEXT:"text",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",DATETIME:"datetime",BOOLEAN:"boolean",LIST:"list",CLOB:"clob",BLOB:"blob"})};hi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new hi},token:hi,providedIn:"root"}),hi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],hi.ctorParameters=function(){return[]};var mi=function(){_.assign(this,{TEXT:"text",NUMBER:"number",TEXTAREA:"textarea",PASSWORD:"password",CHECKBOX:"checkbox",SLIDER:"slider",RICHTEXT:"richtext",CURRENCY:"currency",SWITCH:"switch",SELECT:"select",CHECKBOXSET:"checkboxset",RADIOSET:"radioset",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",UPLOAD:"upload",RATING:"rating",DATETIME:"datetime",AUTOCOMPLETE:"autocomplete",CHIPS:"chips",COLORPICKER:"colorpicker"})};mi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new mi},token:mi,providedIn:"root"}),mi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],mi.ctorParameters=function(){return[]};var fi=[],gi=function(){function e(e){var t=this;this.http=e,this.scripts={},fi.forEach((function(e){t.scripts[e.name]={loaded:!1,src:e.src}}))}return e.prototype.load=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t&&t.length?Promise.resolve().then((function(){return e.pathMappings||e.loadPathMappings()})).then((function(){return Promise.all(t.map((function(t){return e.loadScript(t)})))})):Promise.resolve()},e.prototype.loadPathMappings=function(){var e=this,t=(fn.cdnUrl||fn.ngDest)+"path_mapping.json";return this.http.get(t).toPromise().then((function(t){e.pathMappings=t}),(function(){e.pathMappings={}}))},e.prototype.loadScript=function(e){var t=this;return new Promise((function(n,i){if(t.scripts[e]&&t.scripts[e].loaded)n({script:e,loaded:!0});else{t.scripts[e]||(t.scripts[e]={loaded:!1,src:e});var o=document.createElement("script");o.type="text/javascript",o.async=!1;var a=t.scripts[e].src;(a=t.pathMappings[a]||a).startsWith("http")?o.src=a:o.src=(fn.cdnUrl||fn.ngDest)+a,o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t.scripts[e].loaded=!0,n({script:e,loaded:!0}))}:o.onload=function(){t.scripts[e].loaded=!0,n({script:e,loaded:!0})},o.onerror=function(t){return n({script:e,loaded:!1,status:"Loaded"})},document.getElementsByTagName("head")[0].appendChild(o)}}))},e}();gi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new gi(p.\u0275\u0275inject(d.HttpClient))},token:gi,providedIn:"root"}),gi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],gi.ctorParameters=function(){return[{type:o.HttpClient}]};var vi=function(){function e(){this.customPipes=new Map}return e.prototype.setCustomPipe=function(e,t){this.customPipes.set(e,t)},e.prototype.getCustomPipe=function(e){return this.customPipes.get(e)},e.prototype.hasCustomPipe=function(e){return this.customPipes.has(e)},e}();vi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new vi},token:vi,providedIn:"root"}),vi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var yi=function(){function e(){this.HISTORY_HANDLER="replace",this.HISTORY_HANDLER_TYPES={push:"pushState",replace:"replaceState"},this.WIDGET_STATE_KEY="ws"}return e.prototype.setHistoryHandler=function(e){Object.keys(this.HISTORY_HANDLER_TYPES).indexOf(e)>-1&&(this.HISTORY_HANDLER=e)},e.prototype.getNestedPath=function(e,t,n){var i=n||t;return e&&(e.prefabName||e.partialName)?(i=(i=i.length>0?i+"."+(e.prefabName||e.partialName):e.prefabName||e.partialName)+"."+e.containerWidget.name,this.getNestedPath(e.containerWidget.viewParent,t,i)):i.split(".").reverse().join(".")},e.prototype.getStateInformation=function(e){var t;if("url"===e.toLowerCase()){if(t=decodeURIComponent(window.location.href).match(/(wm_state=).*?(&|$)/))return t=t[0].replace("wm_state=",""),this.uriToJson(t)}else"localstorage"===e.toLowerCase()?t=localStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"):"sessionstorage"===e.toLowerCase()&&(t=sessionStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"));if(t)return JSON.parse(t)},e.prototype.getWidgetState=function(e,t){if(t=t||this.computeMode(e.statehandler)){var n=this.getStateInformation(t);if(n&&e&&e.getAppInstance().activePageName&&("localstorage"===t.toLowerCase()||"sessionstorage"===t.toLowerCase())&&(n=n[e.getAppInstance().activePageName]),_.get(n,this.WIDGET_STATE_KEY)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);return n[this.WIDGET_STATE_KEY][i]}}},e.prototype.computeMode=function(e){return e?e&&"none"===e.toLowerCase()?void 0:e.toLowerCase():"url"},e.prototype.setWidgetState=function(e,t,n){var i=this.getNestedPath(e.viewParent,e.getWidget().name);(n=n||this.computeMode(e.statehandler))&&this.setStateParams(this.WIDGET_STATE_KEY,i,t,n,e)},e.prototype.removeWidgetState=function(e,t,n){if(n=n||this.computeMode(e.statehandler)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);this.removeStateParam(this.WIDGET_STATE_KEY,i,t,n,e)}},e.prototype.setStateVariable=function(e,t,n){(n=n||this.computeMode(n))&&this.setStateParams("",e,t,n)},e.prototype.getStateVariable=function(e,t){if(t=t||this.computeMode(t)){var n=this.getStateInformation(t);return n?n[e]:void 0}},e.prototype.removeStateVariable=function(e,t){(t=t||this.computeMode(t))&&this.removeStateParam("",e,null,t)},e.prototype.setStateParams=function(e,t,n,i,o){var a,r,s,l,c,p=this.getStateInformation(i);c=o&&p&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?p[o.getAppInstance().activePageName]:_.clone(p),e?(c&&!c[e]?c[e]={}:c||((a={})[e]={},c=a),_.isObject(n)&&!_.isArray(n)?(c[e][t]=c[e][t]||{},_.merge(c[e][t],n)):c[e][t]=n):(c&&!c[t]?c[t]={}:c||((r={})[t]={},c=r),_.isObject(n)&&!_.isArray(n)?(c[t]=c[t]||{},_.merge(c[t],n)):c[t]=n),o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(p?(p[o.getAppInstance().activePageName]=c,c=p):((s={})[o.getAppInstance().activePageName]=c,c=s));var d=decodeURIComponent(window.location.href);d.indexOf("?")<0?d+="?wm_state=":d.indexOf("wm_state")<0&&(d+="&wm_state="),l=d.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(c)+"$2"),"localstorage"!==i.toLowerCase()?"sessionstorage"!==i.toLowerCase()?decodeURIComponent(window.location.href)!==decodeURIComponent(l)&&("push"===this.HISTORY_HANDLER?window.history.pushState({path:l},"",l):"replace"===this.HISTORY_HANDLER&&window.history.replaceState({path:l},"",l)):sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c)):localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c))},e.prototype.removeStateParam=function(e,t,n,i,o){var a,r,s="",l=this.getStateInformation(i);if(r=o&&l&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?l[o.getAppInstance().activePageName]:_.clone(l),_.get(r,[e])||_.get(r,t))if(_.get(r,e+"."+t)?(n?delete r[e][t][n]:delete r[e][t],_.isEmpty(r[e][t])&&delete r[e][t],_.isEmpty(r[e])&&delete r[e]):!e&&_.get(r,t)&&delete r[t],o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(l?(l[o.getAppInstance().activePageName]=r,r=l):((a={})[o.getAppInstance().activePageName]=r,r=a)),"localstorage"!==i.toLowerCase())if("sessionstorage"!==i.toLowerCase()){var c=decodeURIComponent(window.location.href);_.isEmpty(r)?(s=c.replace(/(wm_state=).*?(&|$)/,"$2"),_.includes(["&","?"],s.charAt(s.length-1))&&(s=s.replace(s.charAt(s.length-1),""))):s=c.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(r)+"$2"),window.history.replaceState({path:s},"",s)}else sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r));else localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r))},e.prototype.jsonToUri=function(e){return encodeURIComponent(JSON.stringify(e).replace(/[()'~_!*]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})).replace(/\{/g,"(").replace(/\}/g,")").replace(/"/g,"'").replace(/\:/g,"~").replace(/,/g,"_").replace(/\[/g,"!").replace(/\]/g,"*"))},e.prototype.uriToJson=function(e){var t;try{t=JSON.parse(decodeURIComponent(e).replace(/\(/g,"{").replace(/\)/g,"}").replace(/'/g,'"').replace(/~/g,":").replace(/_/g,",").replace(/\!/g,"[").replace(/\*/g,"]"))}catch(e){console.warn(e)}return t},e}();yi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new yi},token:yi,providedIn:"root"}),yi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var bi=function(){function e(){}return e.prototype.updateFieldsOnPagination=function(e,t){var n,i="wm-table"===e.widgetType?e.gridData:e.fieldDefs;"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&-1!==e.gridOptions.deletedRowIndex&&(i.splice(e.gridOptions.deletedRowIndex,1),e.gridOptions.setDeletedRowIndex(-1)),"wm-table"!==e.widgetType||!e.gridOptions.isNavTypeScrollOrOndemand()||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.SEARCH_OR_SORT&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.FILTER_CRITERIA&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DATASET_UPDATE||(i=[],e.gridOptions.setCurrentPage(1)),n="wm-table"===e.widgetType&&e.gridOptions.showviewlessbutton&&"viewless"===e.gridOptions.mode?e.gridOptions.getCurrentPage():e.currentPage;var o=e.dataNavigator,a=e.pagesize;if(!Ye(i)||o.isFirstPage())i=[],n=1;else if(i.length/a<=o.pageCount){var r=void 0,s=[];if(i.length===n*a&&n+1===o.dn.currentPage)s=t,n++;else if(i.length<n*a){i.length===(n-1)*a&&n-1===o.dn.currentPage?t=[]:o.dataSize<n*a?r=o.dataSize-i.length:(r=n*a-i.length,n++);var l=t.length-r;s=t.slice(l)}else i.length===n*a&&n===o.dn.currentPage&&(s=[]);t=s}return[i="wm-table"!==e.widgetType||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DELETE&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.EDIT?D(D([],I(i)),I(t)):this.getUniqueRecordsInFieldDef(i,t),n]},e.prototype.getUniqueRecordsInFieldDef=function(e,t){var n=!1;return e.length?t.forEach((function(t){n=!1,e.forEach((function(e){_.isEqual(t,e)&&(n=!0)})),!1===n&&e.push(t)})):e=t,e},e.prototype.bindScrollEvt=function(e,t,n){var i,o,a=this,r=e.dataNavigator,s=e.$element.find(t),l=s.children().first(),c=this,p=0;l.length&&((o=(i=l.scrollParent(!1))[0]===document?document.body:i[0]).scrollHeight>o.clientHeight?(i.each((function(e,t){p=t===document?t.body.scrollTop||$(window).scrollTop():t.scrollTop})).off("scroll.scroll_evt").on("scroll.scroll_evt",(function(t){var i,o,a,s=t.target;s=s===document?s.scrollingElement||document.body:s,"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),i=s.clientHeight,o=s.scrollHeight,a=s===document.body?$(window).scrollTop():s.scrollTop,p<a&&.9*o<a+i&&($(this).off("scroll.scroll_evt"),c.debouncedFetchNextDatasetOnScroll(r,n,e)()),p=a})),s.off("wheel.scroll_evt")):s.on("wheel.scroll_evt",(function(t){"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),t.originalEvent.deltaY>0&&(s.off("wheel.scroll_evt"),a.debouncedFetchNextDatasetOnScroll(r,n,e)())})))},e.prototype.debouncedFetchNextDatasetOnScroll=function(e,t,n){var i=this;return _.debounce((function(){return i.fetchNextDatasetOnScroll(e,n)}),t)},e.prototype.fetchNextDatasetOnScroll=function(e,t){t.variableInflight||("wm-table"===t.widgetType&&(t.gridOptions.setIsNextPageData(!0),t.gridOptions.setIsDataUpdatedByUser(!1)),e.navigatePage("next"))},e.prototype.bindIScrollEvt=function(e,t){var n=this,i=e.$element,o=e.dataNavigator,a=e.app,r=i.closest('[wmsmoothscroll="true"]');if(_.get(r[0],"iscroll"))this.setIscrollHandlers(r[0],o,t);else{var s=a.subscribe("iscroll-update",(function(e){!_.isEmpty(e)&&e.isSameNode(r[0])&&(n.setIscrollHandlers(r[0],o,t),s())}));a.notify("no-iscroll",r[0])}},e.prototype.setIscrollHandlers=function(e,t,n){var i=this,o=0,a=_.get(e.iscroll,"wrapper"),r=e.iscroll;e.iscroll.on("scrollEnd",(function(){var s=a.clientHeight,l=a.scrollHeight,c=Math.abs(e.iscroll.y);o<c&&.9*l<c+s&&(i.debouncedFetchNextDatasetOnScroll(t,n,parent)(),r.indicatorRefresh&&r.indicatorRefresh()),o=c}))},e}();bi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new bi},token:bi,providedIn:"root"}),bi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var wi=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();wi.decorators=[{type:i.NgModule,args:[{declarations:[],imports:[o.HttpClientModule],providers:[],bootstrap:[]}]}];var Pi=function(){function e(e,t,n){var i=this;void 0===e&&(e=100),void 0===t&&(t=60),this.maxSize=e,this.maxAge=t,this.onEvict=n,this.cache=new Map,this.evictQueue=[""],this.evictQueue.shift(),this.maxAge>0&&(this.maxAge<=30&&console.warn("Cache age "+this.maxAge+"s is very less. Keep it atleast 30s."),this.maxAge=1e3*this.maxAge,setInterval((function(){var e=Date.now()-i.maxAge,t=i.evictQueue.filter((function(t){return i.cache.get(t).lastAccessedTime<=e}));i.evict(t.length)}),this.maxAge))}return e.prototype.addToEvictQueue=function(e){var t=this.evictQueue.findIndex((function(t){return t===e}));t>=0&&this.evictQueue.splice(t,1),this.evictQueue.push(e)},e.prototype.evict=function(e){void 0===e&&(e=1);for(var t=0;t<e;t++)this.delete(this.evictQueue[0])},e.prototype.keys=function(){return this.cache.keys()},e.prototype.set=function(e,t){if(!_.isNil(t)){var n={instance:t,lastAccessedTime:Date.now()};this.cache.set(e,n),this.addToEvictQueue(e),this.evict(this.evictQueue.length-this.maxSize)}},e.prototype.get=function(e){var t=this.cache.get(e);return t?(t.lastAccessedTime=Date.now(),this.addToEvictQueue(e),t.instance):null},e.prototype.delete=function(e){if(e&&this.cache.has(e)){var t=this.cache.get(e);this.cache.delete(e),this.onEvict&&this.onEvict(e,t.instance);var n=this.evictQueue.findIndex((function(t){return t===e}));n>=0&&this.evictQueue.splice(n,1)}},e.prototype.has=function(e){return this.cache.has(e)},e.prototype.size=function(){return this.evictQueue.length},e.prototype.clear=function(){this.evict(this.evictQueue.length)},e}();e.$appDigest=Ce,e.$invokeWatchers=function(e,t){if(e)Ee(t);else{if(fe)return void(fe=!1);Se()}},e.$parseEvent=oe,e.$parseExpr=ne,e.$unwatch=Pe,e.$watch=we,e.AbstractDialogService=ke,e.AbstractHttpService=Me,e.AbstractI18nService=Le,e.AbstractNavigationService=Ge,e.AbstractSpinnerService=je,e.AbstractToasterService=Fe,e.App=Ne,e.AppConstants=Rn,e.AppDefaults=$e,e.CURRENCY_INFO={USD:{symbol:"$",name:"US Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"USD",name_plural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"CAD",name_plural:"Canadian dollars"},EUR:{symbol:"\u20ac",name:"Euro",symbol_native:"\u20ac",decimal_digits:2,rounding:0,code:"EUR",name_plural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"\u062f.\u0625.\u200f",decimal_digits:2,rounding:0,code:"AED",name_plural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbol_native:"\u060b",decimal_digits:0,rounding:0,code:"AFN",name_plural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",decimal_digits:0,rounding:0,code:"ALL",name_plural:"Albanian lek\xeb"},AMD:{symbol:"AMD",name:"Armenian Dram",symbol_native:"\u0564\u0580.",decimal_digits:0,rounding:0,code:"AMD",name_plural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"ARS",name_plural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"AUD",name_plural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"\u043c\u0430\u043d.",decimal_digits:2,rounding:0,code:"AZN",name_plural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",decimal_digits:2,rounding:0,code:"BAM",name_plural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"\u09f3",decimal_digits:2,rounding:0,code:"BDT",name_plural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"\u043b\u0432.",decimal_digits:2,rounding:0,code:"BGN",name_plural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbol_native:"\u062f.\u0628.\u200f",decimal_digits:3,rounding:0,code:"BHD",name_plural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",decimal_digits:0,rounding:0,code:"BIF",name_plural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BND",name_plural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",decimal_digits:2,rounding:0,code:"BOB",name_plural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",decimal_digits:2,rounding:0,code:"BRL",name_plural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",decimal_digits:2,rounding:0,code:"BWP",name_plural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",decimal_digits:0,rounding:0,code:"BYR",name_plural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BZD",name_plural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",decimal_digits:2,rounding:0,code:"CDF",name_plural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",decimal_digits:2,rounding:.05,code:"CHF",name_plural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"CLP",name_plural:"Chilean pesos"},CNY:{symbol:"CN\xa5",name:"Chinese Yuan",symbol_native:"CN\xa5",decimal_digits:2,rounding:0,code:"CNY",name_plural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"COP",name_plural:"Colombian pesos"},CRC:{symbol:"\u20a1",name:"Costa Rican Col\xf3n",symbol_native:"\u20a1",decimal_digits:0,rounding:0,code:"CRC",name_plural:"Costa Rican col\xf3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",decimal_digits:2,rounding:0,code:"CVE",name_plural:"Cape Verdean escudos"},CZK:{symbol:"K\u010d",name:"Czech Republic Koruna",symbol_native:"K\u010d",decimal_digits:2,rounding:0,code:"CZK",name_plural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",decimal_digits:0,rounding:0,code:"DJF",name_plural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"DKK",name_plural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",decimal_digits:2,rounding:0,code:"DOP",name_plural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbol_native:"\u062f.\u062c.\u200f",decimal_digits:2,rounding:0,code:"DZD",name_plural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",decimal_digits:2,rounding:0,code:"EEK",name_plural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbol_native:"\u062c.\u0645.\u200f",decimal_digits:2,rounding:0,code:"EGP",name_plural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",decimal_digits:2,rounding:0,code:"ERN",name_plural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",decimal_digits:2,rounding:0,code:"ETB",name_plural:"Ethiopian birrs"},GBP:{symbol:"\xa3",name:"British Pound Sterling",symbol_native:"\xa3",decimal_digits:2,rounding:0,code:"GBP",name_plural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",decimal_digits:2,rounding:0,code:"GEL",name_plural:"Georgian laris"},GHS:{symbol:"GH\u20b5",name:"Ghanaian Cedi",symbol_native:"GH\u20b5",decimal_digits:2,rounding:0,code:"GHS",name_plural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",decimal_digits:0,rounding:0,code:"GNF",name_plural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",decimal_digits:2,rounding:0,code:"GTQ",name_plural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"HKD",name_plural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",decimal_digits:2,rounding:0,code:"HNL",name_plural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",decimal_digits:2,rounding:0,code:"HRK",name_plural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",decimal_digits:0,rounding:0,code:"HUF",name_plural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",decimal_digits:0,rounding:0,code:"IDR",name_plural:"Indonesian rupiahs"},ILS:{symbol:"\u20aa",name:"Israeli New Sheqel",symbol_native:"\u20aa",decimal_digits:2,rounding:0,code:"ILS",name_plural:"Israeli new sheqels"},INR:{symbol:"\u20b9",name:"Indian Rupee",symbol_native:"\u099f\u0995\u09be",decimal_digits:2,rounding:0,code:"INR",name_plural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"\u062f.\u0639.\u200f",decimal_digits:0,rounding:0,code:"IQD",name_plural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbol_native:"\ufdfc",decimal_digits:0,rounding:0,code:"IRR",name_plural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xf3na",symbol_native:"kr",decimal_digits:0,rounding:0,code:"ISK",name_plural:"Icelandic kr\xf3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"JMD",name_plural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbol_native:"\u062f.\u0623.\u200f",decimal_digits:3,rounding:0,code:"JOD",name_plural:"Jordanian dinars"},JPY:{symbol:"\xa5",name:"Japanese Yen",symbol_native:"\uffe5",decimal_digits:0,rounding:0,code:"JPY",name_plural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",decimal_digits:2,rounding:0,code:"KES",name_plural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbol_native:"\u17db",decimal_digits:2,rounding:0,code:"KHR",name_plural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",decimal_digits:0,rounding:0,code:"KMF",name_plural:"Comorian francs"},KRW:{symbol:"\u20a9",name:"South Korean Won",symbol_native:"\u20a9",decimal_digits:0,rounding:0,code:"KRW",name_plural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"\u062f.\u0643.\u200f",decimal_digits:3,rounding:0,code:"KWD",name_plural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"\u0442\u04a3\u0433.",decimal_digits:2,rounding:0,code:"KZT",name_plural:"Kazakhstani tenges"},LBP:{symbol:"LB\xa3",name:"Lebanese Pound",symbol_native:"\u0644.\u0644.\u200f",decimal_digits:0,rounding:0,code:"LBP",name_plural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",decimal_digits:2,rounding:0,code:"LKR",name_plural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",decimal_digits:2,rounding:0,code:"LTL",name_plural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",decimal_digits:2,rounding:0,code:"LVL",name_plural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbol_native:"\u062f.\u0644.\u200f",decimal_digits:3,rounding:0,code:"LYD",name_plural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"\u062f.\u0645.\u200f",decimal_digits:2,rounding:0,code:"MAD",name_plural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",decimal_digits:2,rounding:0,code:"MDL",name_plural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",decimal_digits:0,rounding:0,code:"MGA",name_plural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",decimal_digits:2,rounding:0,code:"MKD",name_plural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",decimal_digits:0,rounding:0,code:"MMK",name_plural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",decimal_digits:2,rounding:0,code:"MOP",name_plural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",decimal_digits:0,rounding:0,code:"MUR",name_plural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"MXN",name_plural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",decimal_digits:2,rounding:0,code:"MYR",name_plural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",decimal_digits:2,rounding:0,code:"MZN",name_plural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",decimal_digits:2,rounding:0,code:"NAD",name_plural:"Namibian dollars"},NGN:{symbol:"\u20a6",name:"Nigerian Naira",symbol_native:"\u20a6",decimal_digits:2,rounding:0,code:"NGN",name_plural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xf3rdoba",symbol_native:"C$",decimal_digits:2,rounding:0,code:"NIO",name_plural:"Nicaraguan c\xf3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"NOK",name_plural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"\u0928\u0947\u0930\u0942",decimal_digits:2,rounding:0,code:"NPR",name_plural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"NZD",name_plural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbol_native:"\u0631.\u0639.\u200f",decimal_digits:3,rounding:0,code:"OMR",name_plural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",decimal_digits:2,rounding:0,code:"PAB",name_plural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",decimal_digits:2,rounding:0,code:"PEN",name_plural:"Peruvian nuevos soles"},PHP:{symbol:"\u20b1",name:"Philippine Peso",symbol_native:"\u20b1",decimal_digits:2,rounding:0,code:"PHP",name_plural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"\u20a8",decimal_digits:0,rounding:0,code:"PKR",name_plural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbol_native:"z\u0142",decimal_digits:2,rounding:0,code:"PLN",name_plural:"Polish zlotys"},PYG:{symbol:"\u20b2",name:"Paraguayan Guarani",symbol_native:"\u20b2",decimal_digits:0,rounding:0,code:"PYG",name_plural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbol_native:"\u0631.\u0642.\u200f",decimal_digits:2,rounding:0,code:"QAR",name_plural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",decimal_digits:2,rounding:0,code:"RON",name_plural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbol_native:"\u0434\u0438\u043d.",decimal_digits:0,rounding:0,code:"RSD",name_plural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbol_native:"\u0440\u0443\u0431.",decimal_digits:2,rounding:0,code:"RUB",name_plural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",decimal_digits:0,rounding:0,code:"RWF",name_plural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbol_native:"\u0631.\u0633.\u200f",decimal_digits:2,rounding:0,code:"SAR",name_plural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",decimal_digits:2,rounding:0,code:"SDG",name_plural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbol_native:"kr",decimal_digits:2,rounding:0,code:"SEK",name_plural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"SGD",name_plural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",decimal_digits:0,rounding:0,code:"SOS",name_plural:"Somali shillings"},SYP:{symbol:"SY\xa3",name:"Syrian Pound",symbol_native:"\u0644.\u0633.\u200f",decimal_digits:0,rounding:0,code:"SYP",name_plural:"Syrian pounds"},THB:{symbol:"\u0e3f",name:"Thai Baht",symbol_native:"\u0e3f",decimal_digits:2,rounding:0,code:"THB",name_plural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbol_native:"\u062f.\u062a.\u200f",decimal_digits:3,rounding:0,code:"TND",name_plural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02bbanga",symbol_native:"T$",decimal_digits:2,rounding:0,code:"TOP",name_plural:"Tongan pa\u02bbanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",decimal_digits:2,rounding:0,code:"TRY",name_plural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"TTD",name_plural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",decimal_digits:2,rounding:0,code:"TWD",name_plural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",decimal_digits:0,rounding:0,code:"TZS",name_plural:"Tanzanian shillings"},UAH:{symbol:"\u20b4",name:"Ukrainian Hryvnia",symbol_native:"\u20b4",decimal_digits:2,rounding:0,code:"UAH",name_plural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",decimal_digits:0,rounding:0,code:"UGX",name_plural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"UYU",name_plural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",decimal_digits:0,rounding:0,code:"UZS",name_plural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xedvar",symbol_native:"Bs.F.",decimal_digits:2,rounding:0,code:"VEF",name_plural:"Venezuelan bol\xedvars"},VND:{symbol:"\u20ab",name:"Vietnamese Dong",symbol_native:"\u20ab",decimal_digits:0,rounding:0,code:"VND",name_plural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",decimal_digits:0,rounding:0,code:"XAF",name_plural:"CFA francs BEAC"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",decimal_digits:0,rounding:0,code:"XOF",name_plural:"CFA francs BCEAO"},YER:{symbol:"YR",name:"Yemeni Rial",symbol_native:"\u0631.\u064a.\u200f",decimal_digits:0,rounding:0,code:"YER",name_plural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbol_native:"R",decimal_digits:2,rounding:0,code:"ZAR",name_plural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",decimal_digits:0,rounding:0,code:"ZMK",name_plural:"Zambian kwachas"}},e.ConstantService=di,e.CoreModule=wi,e.CustomPipeManager=vi,e.DataSource=xe,e.DynamicComponentRefProvider=Ve,e.EventNotifier=si,e.FIRST_TIME_WATCH=ue,e.FieldTypeService=hi,e.FieldWidgetService=mi,e.IDGenerator=F,e.IDataSource=De,e.LRUCache=Pi,e.PaginationService=bi,e.PartialRefProvider=We,e.ScriptLoaderService=gi,e.ScriptStore=fi,e.StatePersistence=yi,e.UserDefinedExecutionContext=Be,e.UtilsService=ui,e.VALIDATOR=ti,e.Viewport=pi,e._WM_APP_PROJECT=fn,e.addClass=E,e.addEventListenerOnElement=Dt,e.addForIdAttributes=Un,e.adjustContainerPosition=qn,e.adjustContainerRightEdges=zn,e.appendNode=function(e,t,n){var i=function(){return t.appendChild(e)};n?i():P(i)},e.appendScriptToHead=ii,e.checkIsCustomPipeExpression=g,e.closePopover=Kn,e.convertToBlob=On,e.createCSSRule=Dn,e.createElement=function(e,t,n){var i=document.createElement(e);return t&&Object.keys(t).forEach((function(e){A(i,e,t[e],n)})),i},e.deHyphenate=vt,e.debounce=ve,e.defer=Mn,e.detectChanges=Qn,e.encodeUrl=pt,e.encodeUrlParams=dt,e.executePromiseChain=Ln,e.extendProto=Gn,e.extractCurrentItemExpr=Xn,e.extractType=Vt,e.fetchContent=Tn,e.findRootContainer=ei,e.findValueOf=$t,e.generateGUId=Ft,e.getAbortableDefer=In,e.getAndroidVersion=lt,e.getAppSetting=oi,e.getBlob=en,e.getClonedObject=xt,e.getDatasourceFromExpr=Jn,e.getDateObj=It,e.getDisplayDateTimeFormat=Wn,e.getEvaluatedExprValue=Pt,e.getFiles=Nt,e.getFnByExpr=re,e.getFnForBindExpr=le,e.getFnForEventExpr=ce,e.getFormWidgetTemplate=function(t,n,i,o){var a;void 0===o&&(o={});var r=i.get("updateon"),s=r?'updateon="'+r+'"':"";switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:a='<div wmSearch type="autocomplete" debouncetime="'+i.get("debouncetime")+'" '+n+"></div>";break;case e.FormWidgetType.CHECKBOX:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+"></div>";break;case e.FormWidgetType.CHECKBOXSET:a='<ul role="group" wmCheckboxset '+n+" "+("true"===i.get("required")?"required=true":"")+"></ul>";break;case e.FormWidgetType.CHIPS:a='<ul wmChips role="input" debouncetime="'+i.get("debouncetime")+'" '+n+"></ul>";break;case e.FormWidgetType.COLORPICKER:a="<div wmColorPicker "+("true"===i.get("required")?"required=true":"")+" "+n+"></div>";break;case e.FormWidgetType.CURRENCY:a="<div wmCurrency "+("true"===i.get("required")?"required=true":"")+" "+s+" "+n+"></div>";break;case e.FormWidgetType.DATE:a="<div wmDate "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.DATETIME:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.NUMBER:a="<div wmNumber "+n+" "+("true"===i.get("required")?"required=true":"")+' type="number" aria-label="Only numbers" '+s+"></div>";break;case e.FormWidgetType.PASSWORD:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="password" aria-label="Enter password" '+s+"></wm-input>";break;case e.FormWidgetType.RADIOSET:a='<ul role="radiogroup" wmRadioset '+n+"></ul>";break;case e.FormWidgetType.RATING:a="<div wmRating "+n+"></div>";break;case e.FormWidgetType.RICHTEXT:a='<div wmRichTextEditor role="textbox" '+n+"></div>";break;case e.FormWidgetType.SELECT:a="<wm-select "+("true"===i.get("required")?"required=true":"")+" "+n+"></wm-select>";break;case e.FormWidgetType.TOGGLE:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+' type="toggle" role="checkbox" aria-label="Toggle button"></div>';break;case e.FormWidgetType.SLIDER:a="<div wmSlider "+n+"></div>";break;case e.FormWidgetType.SWITCH:a="<div wmSwitch "+n+"></div>";break;case e.FormWidgetType.TEXT:var l=o.inputType||"inputtype";a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="'+(i.get(l)||"text")+'" '+s+"></wm-input>";break;case e.FormWidgetType.TEXTAREA:a="<wm-textarea "+n+" "+("true"===i.get("required")?"required=true":"")+' role="textbox" '+s+"></wm-textarea>";break;case e.FormWidgetType.TIME:a="<div wmTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.TIMESTAMP:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+' role="input"></div>';break;case e.FormWidgetType.UPLOAD:var c=o.counter,p=o.pCounter,d=o.uploadProps,h=u(i,c,d&&d.name);a=d?'<form name="'+d.formName+'" '+n+'>\n <input focus-target class="file-upload" type="file" name="'+d.name+'" '+h+"/>\n </form>":'<a class="form-control-static" href="{{'+c+'.href}}" target="_blank" *ngIf="'+c+".filetype === 'image' && "+c+'.href">\n <img style="height:2em" class="wi wi-file" [src]="'+c+'.href"/></a>\n <a class="form-control-static" target="_blank" href="{{'+c+'.href}}" *ngIf="'+c+".filetype !== 'image' && "+c+'.href">\n <i class="wi wi-file"></i></a>\n <input '+n+' class="app-blob-upload" [ngClass]="{\'file-readonly\': '+c+'.readonly}" '+h+'\n [required]="'+c+'.required" type="file" name="'+(i.get("key")||i.get("name"))+'_formWidget" [readonly]="'+c+'.readonly"\n [class.hidden]="!'+p+'.isUpdateMode" [accept]="'+c+'.permitted">';break;default:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="text" '+s+"></wm-input>"}return a},e.getFormattedDate=St,e.getMomentLocaleObject=un,e.getNativeDateObject=Xt,e.getNgModelAttr=function(e){return e.has("formControlName")||e.has("formControlName.bind")?"":"ngModel"},e.getRequiredFormWidget=function(t){switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:return"wm-search";case e.FormWidgetType.CHIPS:return"wm-chips";case e.FormWidgetType.COLORPICKER:return"wm-colorpicker";case e.FormWidgetType.CURRENCY:return"wm-currency";case e.FormWidgetType.DATE:return"wm-date";case e.FormWidgetType.DATETIME:return"wm-datetime";case e.FormWidgetType.TIME:case e.FormWidgetType.TIMESTAMP:return"wm-time";case e.FormWidgetType.RATING:return"wm-rating";case e.FormWidgetType.RICHTEXT:return"wm-richtexteditor";case e.FormWidgetType.SLIDER:return"wm-slider";default:return"wm-text"}},e.getResourceURL=At,e.getRouteNameFromLink=Nn,e.getRowActionAttrs=function(e){var t="";return e.forEach((function(e,n){var i=y.get(n);i&&(t+=i+'="'+e+'" ')})),t},e.getSessionStorageItem=vn,e.getUrlParams=xn,e.getValidDateObject=Jt,e.getValidJSON=Bt,e.getWebkitTraslationMatrix=Yn,e.getWmProjectProperties=N,e.hasCordova=En,e.hasOffsetStr=Ct,e.initCaps=ut,e.insertAfter=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t.nextSibling)};n?i():P(i)},e.insertBefore=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t)};n?i():P(i)},e.isAndroid=Je,e.isAndroidTablet=Xe,e.isAppleProduct=kn,e.isArray=bn,e.isAudioFile=Ot,e.isBoolean=_n,e.isChangeFromWatch=function(){return _e},e.isDataSourceEqual=Fn,e.isDateTimeType=Kt,e.isDefined=Ye,e.isElementInViewport=zt,e.isEmptyObject=Ut,e.isEqualWithFields=tn,e.isFirstTimeChange=function(e){return e===ue},e.isIE=Ze,e.isImageFile=_t,e.isInsecureContentRequest=bt,e.isIos=it,e.isIpad=nt,e.isIphone=et,e.isIpod=tt,e.isKitkatDevice=ct,e.isLargeTabletLandscape=ot,e.isLargeTabletPortrait=at,e.isMobile=rt,e.isMobileApp=st,e.isNumber=Pn,e.isNumberType=Wt,e.isObject=Ke,e.isPageable=Ht,e.isString=wn,e.isValidWebURL=Rt,e.isVideoFile=Et,e.loadScript=hn,e.loadScripts=mn,e.loadStyleSheet=ln,e.loadStyleSheets=cn,e.muteWatchers=function(){ge=!0},e.noop=yn,e.openLink=An,e.periodSeparate=ft,e.prettifyLabel=gt,e.prettifyLabels=yt,e.processFilterExpBindNode=Bn,e.registerFnByExpr=function(e,t,n){t.usedPipes=n||[],ae.set(e,t)},e.removeAttr=function(e,t,n){var i=function(){return e.removeAttribute(t)};n?i():P(i)},e.removeClass=O,e.removeExtraSlashes=$n,e.removeNode=function(e,t){var n=function(){return e.remove()};t?n():P(n)},e.replace=Yt,e.replaceAt=mt,e.resetChangeFromWatch=Re,e.retryIfFails=Cn,e.scrollToElement=qt,e.setAppRef=function(e){he=e},e.setAttr=A,e.setCSS=R,e.setCSSFromObj=function(e,t,n){Object.keys(t||{}).forEach((function(i){return R(e,i,t[i],n)}))},e.setHtml=function(e,t,n){var i=function(){return e.innerHTML=t};n?i():P(i)},e.setListClass=ai,e.setNgZone=function(e){return me=e},e.setPipeProvider=function(e){M=e},e.setProperty=function(e,t,n,i){var o=function(){return e[t]=n};i?o():P(o)},e.setSessionStorageItem=gn,e.setTranslation3dPosition=Hn,e.setWmProjectProperties=function(e){Object.setPrototypeOf(x,e)},e.spaceSeparate=ht,e.stringStartsWith=wt,e.switchClass=function(e,t,n,i){void 0===t&&(t=""),void 0===n&&(n=""),O(e,n,i),E(e,t,i)},e.toBoolean=Qe,e.toDimension=function(e){return e==+e?e+"px":e},e.toPromise=Sn,e.toggleClass=function(e,t,n,i){n?E(e,t,i):O(e,t,i)},e.transformFileURI=ni,e.triggerFn=Tt,e.triggerItemAction=Zn,e.unMuteWatchers=function(){ge=!1,Ee()},e.updateTemplateAttrs=v,e.validateAccessRoles=jt,e.validateDataSourceCtx=jn,e.xmlToJson=Gt,e["\u02750"]=h,e["\u02751"]=f,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@wm/swipey",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).swipey={})}(this,(function(e){"use strict";var t=function(){function e(){this._isGesturesEnabled=!0}return e.prototype.bindEvents=function(){return window.PointerEvent?["pointer"]:["touch"]},e.prototype.bounds=function(e,t){return{}},e.prototype.context=function(){return{}},e.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.HORIZONTAL},e.prototype.setGesturesEnabled=function(e){this._isGesturesEnabled=e},e.prototype.isGesturesEnabled=function(){return this._isGesturesEnabled},e.prototype.goToLower=function(e){this._$ele.swipeAnimation("gotoLower",e)},e.prototype.goToUpper=function(e){this._$ele.swipeAnimation("gotoUpper",e)},e.prototype.onAnimation=function(e,t){},e.prototype.onUpper=function(e){},e.prototype.onLower=function(e){},e.prototype.threshold=function(){return 30},e.prototype.init=function(e,t){this._$ele=e,e.swipeAnimation({animation:this.animation(),target:t,bounds:this.bounds.bind(this),bindEvents:this.bindEvents(),context:this.context.bind(this),direction:this.direction(),enableGestures:this.isGesturesEnabled.bind(this),onAnimation:this.onAnimation.bind(this),onLower:this.onLower.bind(this),onUpper:this.onUpper.bind(this),threshold:this.threshold(),disableMouse:!0})},e}();e.SwipeAnimation=t,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/transpiler",["exports","@angular/compiler","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.transpiler={}),e.ng.compiler,e.wm.core)}(this,(function(e,t,n){"use strict";
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("rxjs"),require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@wm/core",["exports","@angular/compiler","rxjs","@angular/core","@angular/common/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.core={}),e.ng.compiler,e.rxjs,e.ng.core,e.ng.common.http)}(this,(function(e,t,n,i,o){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r,s,l,c,p=a(i),d=a(o);e.FormWidgetType=void 0,(r=e.FormWidgetType||(e.FormWidgetType={})).AUTOCOMPLETE="autocomplete",r.CHECKBOX="checkbox",r.CHECKBOXSET="checkboxset",r.CHIPS="chips",r.COLORPICKER="colorpicker",r.CURRENCY="currency",r.DATE="date",r.DATETIME="datetime",r.NUMBER="number",r.PASSWORD="password",r.RADIOSET="radioset",r.RATING="rating",r.RICHTEXT="richtext",r.SELECT="select",r.TOGGLE="toggle",r.SLIDER="slider",r.SWITCH="switch",r.TEXT="text",r.TEXTAREA="textarea",r.TIME="time",r.TIMESTAMP="timestamp",r.TYPEAHEAD="typeahead",r.UPLOAD="upload",e.DataType=void 0,(s=e.DataType||(e.DataType={})).INTEGER="integer",s.BIG_INTEGER="big_integer",s.SHORT="short",s.FLOAT="float",s.BIG_DECIMAL="big_decimal",s.DOUBLE="double",s.LONG="long",s.BYTE="byte",s.STRING="string",s.CHARACTER="character",s.TEXT="text",s.DATE="date",s.TIME="time",s.TIMESTAMP="timestamp",s.DATETIME="datetime",s.LOCALDATETIME="localdatetime",s.BOOLEAN="boolean",s.LIST="list",s.CLOB="clob",s.BLOB="blob",e.MatchMode=void 0,(l=e.MatchMode||(e.MatchMode={})).BETWEEN="between",l.GREATER="greaterthanequal",l.LESSER="lessthanequal",l.NULL="null",l.EMPTY="empty",l.NULLOREMPTY="nullorempty",l.EQUALS="exact",e.DEFAULT_FORMATS=void 0,(c=e.DEFAULT_FORMATS||(e.DEFAULT_FORMATS={})).DATE="yyyy-MM-dd",c.TIME="HH:mm:ss",c.TIMESTAMP="timestamp",c.DATETIME="yyyy-MM-ddTHH:mm:ss",c.LOCALDATETIME="yyyy-MM-ddTHH:mm:ss",c.DATETIME_ORACLE="yyyy-MM-dd HH:mm:ss",c.DATE_TIME="yyyy-MM-dd HH:mm:ss";var u=function(e,t,n){var i="";return e.forEach((function(e,o){if(o&&o.endsWith(".event")){var a=o.split(".")[0];i=" "+i+" ("+a+')="'+(t?t+".":"")+"triggerUploadEvent($event, '"+a+"', '"+n+"', row)\" "}})),i},h=u,m=function(e,n,i){i=i.replace("bind:","");var o=e.attrs.find((function(e){return"datasetboundexpr"===e.name}));"dataset"!==n.name||o||e.attrs.push(new t.Attribute("datasetboundexpr",i,n.sourceSpan,n.keySpan,n.valueSpan,void 0,void 0))},f=m,g=function(e){var t=e.match(/(custom(\s*:))/g);return t&&t.length},v=function(e,t,n,i,o){void 0===i&&(i=""),void 0===o&&(o="item");var a,r,s,l=t.replace(/([^a-zA-Z0-9.])/g,"\\$1"),c=new RegExp("("+l+")(\\[0\\])?(.data\\[\\$i\\])?(.content\\[\\$i\\])?(\\[\\$i\\])?","g"),p={"wm-list":["itemclass","disableitem","dataset"]};n&&(a=new RegExp("(Widgets."+n+".currentItem)\\b","g"),r=new RegExp("(Widgets."+n+".currentItemWidgets)\\b","g"),s=new RegExp("(Widgets.(.*).(formWidgets|filterWidgets))\\b","g")),(_.isArray(e)?e:p[e.name]?[e]:e.children||[]).forEach((function(e){if(e.name){var l=e.name,d=new RegExp("bind:\\s*\\(*"+t+"\\)*\\.length\\)*");e.attrs.forEach((function(n){var u=n.value&&n.value.trim();_.startsWith(u,"bind:")&&((!p[l]||p[l]&&p[l].indexOf(n.name)>-1)&&_.includes(u,t)&&u!=="bind:"+t&&!d.test(u)&&(u=u.replace("bind:",""),m(e,n,u),u=u.replace(c,o),g(u="bind:"+u)&&a&&(u+=":"+a.exec(a.source)[0])),a&&a.test(u)&&((u.includes(".formWidgets")||u.includes(".filterWidgets"))&&(u=u.replace(s,"Widgets")),m(e,n,u),u=u.replace(a,o)),r&&r.test(u)&&(u=u.replace(r,i+"currentItemWidgets")),n.value=u)})),v(e.children,t,n,i,o)}}))},y=new Map([["display-name","caption"],["display-name.bind","caption.bind"],["title","hint"],["title.bind","hint.bind"],["show","show"],["show.bind","show.bind"],["disabled","disabled"],["disabled.bind","disabled.bind"],["hyperlink","hyperlink"],["hyperlink.bind","hyperlink.bind"],["target","target"],["conditionalclass.bind","conditionalclass.bind"],["conditionalstyle.bind","conditionalstyle.bind"]]),b=window.requestAnimationFrame,w=[],P=function(e){w.length||b((function(){w.forEach((function(e){return e()})),w.length=0})),w.push(e)},O=function(e,t,n){var i=function(t){return e.classList.remove(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},E=function(e,t,n){var i=function(t){return e.classList.add(t)};(t=t||"").split(" ").forEach((function(e){e.length&&(n?i(e):P((function(){return i(e)})))}))},R=function(e,t,n,i){var o=function(){return e.style[t]=n};i?o():P(o)},A=function(e,t,n,i){var o=function(){return e instanceof Element&&e.setAttribute(t,n)};i?o():P(o)};function T(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function S(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function C(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function I(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function D(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var x={};function N(){return window._WM_APP_PROPERTIES?window._WM_APP_PROPERTIES:x}var k,M,L,F=function(){function e(e){this.generator=function(e){var t;return S(this,(function(n){switch(n.label){case 0:t=1,n.label=1;case 1:return[4,""+e+t++];case 2:return n.sent(),[3,1];case 3:return[2]}}))}(e)}return e.prototype.nextUid=function(){return this.generator.next().value},e}(),j=function(e){return"string"==typeof e},B=function(e){return void 0!==e},G=function(e,t){return void 0===e?t:e},V=function(e,t){return void 0===e?t:void 0===t?e:e+t},W=function(e,t){return G(e,0)-G(t,0)},U=function(){},q=new Map,z=new Map,H=new Map,Y=function(e,t){return"object"!=typeof e&&"object"!=typeof t&&(e!=e&&t!=t||e===t)},K=function(e,t){var n=t.length,i=n>10;switch(n){case 10:if(i=!Y(e[9],t[9]))break;case 9:if(i=!Y(e[8],t[8]))break;case 8:if(i=!Y(e[7],t[7]))break;case 7:if(i=!Y(e[6],t[6]))break;case 6:if(i=!Y(e[5],t[5]))break;case 5:if(i=!Y(e[4],t[4]))break;case 4:if(i=!Y(e[3],t[3]))break;case 3:if(i=!Y(e[2],t[2]))break;case 2:if(i=!Y(e[1],t[1]))break;case 1:if(i=!Y(e[0],t[0]))break}return i},Q=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a,r=t.get(n);if(r){var s=K(r.args,i);if(!s)return r.result}return r={args:i,result:a=e.transform.apply(e,D([],I(i)))},t.set(n,r),a},Z=/[^ a-zA-Z0-9]/g,J=function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},X=function(){function e(e,t,n){this.ast=e,this.declarations=[],this.stmts=[],this.pipes=[],this.vIdx=0,this.exprType=t,this.pipeNameVsIsPureMap=n}return e.prototype.createVar=function(){var e="v"+this.vIdx++;return this.declarations.push(e),e},e.prototype.processImplicitReceiver=function(){return"ctx"},e.prototype.processLiteralPrimitive=function(){var e=this.cAst;return j(e.value)?'"'+e.value.replace(/"/g,'"').replace(Z,J)+'"':e.value},e.prototype.processLiteralArray=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.expressions),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"=["+a.join(",")+"]"),o},e.prototype.processLiteralMap=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[];try{for(var r=C(n.values),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,i))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return i.push(o+"={"+n.keys.map((function(e,t){return"'"+e.key+"':"+a[t]}))+"}"),o},e.prototype.processPropertyRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.receiver,t),i=this.createVar();return t.push(i+"="+n+"&&"+n+"."+e.name),i},e.prototype.processKeyedRead=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.key,t),i=this.build(e.receiver,t),o=this.createVar();return t.push(o+"="+i+"&&"+i+"["+n+"]"),o},e.prototype.processPrefixNot=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.expression,t);return t.push(n+"=!"+n),n},e.prototype.handleBinaryPlus_Minus=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar(),a="+"===e.operation?"_plus":"_minus";return t.push(o+"="+a+"("+n+","+i+")"),o},e.prototype.handleBinaryAND_OR=function(){var e=this.cAst,t=this.cStmts,n=[],i=[],o=[],a=this.build(e.left,i),r=this.build(e.right,o),s=this.createVar();return"&&"===e.operation?n.push(i.join(";"),";"+s+"=false",";if("+a+"){",o.join(";"),";"+s+"="+r+";","}"):n.push(i.join(";"),";"+s+"="+a,";if(!"+a+"){",o.join(";"),";"+s+"="+r+";","}"),t.push(n.join("")),s},e.prototype.handleBinaryDefault=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.left,t),i=this.build(e.right,t),o=this.createVar();return t.push(o+"="+n+e.operation+i),o},e.prototype.processBinary=function(){var e=this.cAst.operation;return"+"===e||"-"===e?this.handleBinaryPlus_Minus():"&&"===e||"||"===e?this.handleBinaryAND_OR():this.handleBinaryDefault()},e.prototype.processConditional=function(){var e=this.cAst,t=this.cStmts,n=this.build(e.condition,t),i=this.createVar(),o=[],a=[],r=[],s=this.build(e.trueExp,a),l=this.build(e.falseExp,r);return o.push("if("+n+"){",a.join(";"),";"+i+"="+s+";","}else{",r.join(";"),";"+i+"="+l+";","}"),t.push(o.join(" ")),i},e.prototype.processMethodCall=function(){var e,n,i=this.cAst,o=this.cStmts,a=[];try{for(var r=C(i.args),s=r.next();!s.done;s=r.next()){var l=s.value;a.push(this.build(l,o))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}var c=this.build(i.receiver,o),p=this.createVar(),d=i.receiver instanceof t.ImplicitReceiver;return o.push(p+"= "+c+"&&"+c+"."+i.name+"&&"+c+"."+i.name+(d?".bind(_ctx)":"")+"("+a.join(",")+")"),p},e.prototype.processChain=function(){var e=this;return this.cAst.expressions.map((function(t){return e.build(t)})).join(";")},e.prototype.processPropertyWrite=function(){var e,n,i=this.cAst,o=this.cStmts;n=i.receiver instanceof t.ImplicitReceiver?"_ctx."+i.name:(e=this.build(i.receiver,o))+(e.length?".":"")+i.name;var a=this.build(i.value,o);o.push(n+"="+a)},e.prototype.processPipe=function(){var e,t,n=this.cAst,i=this.cStmts,o=this.createVar(),a=[],r=[],s=[],l=this.build(n.exp,i);try{for(var c=C(n.args),p=c.next();!p.done;p=c.next()){var d=p.value;a.push(this.build(d,s))}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}var u="_p"+this.pipes.length;return this.pipes.push([n.name,u]),a.unshift(l),r.push(s.length?s.join(";")+";":"",this.pipeNameVsIsPureMap.get(n.name)?o+"=getPPVal("+u+',_ppc,"'+u+'",'+a+")":o+"="+u+".transform("+a+")"),i.push(r.join("")),o},e.prototype.build=function(e,n){return this.cAst=e,this.cStmts=n||this.stmts,e instanceof t.ImplicitReceiver?this.processImplicitReceiver():e instanceof t.LiteralPrimitive?this.processLiteralPrimitive():e instanceof t.LiteralArray?this.processLiteralArray():e instanceof t.LiteralMap?this.processLiteralMap():e instanceof t.PropertyRead?this.processPropertyRead():e instanceof t.PropertyWrite?this.processPropertyWrite():e instanceof t.KeyedRead?this.processKeyedRead():e instanceof t.PrefixNot?this.processPrefixNot():e instanceof t.Binary?this.processBinary():e instanceof t.Conditional?this.processConditional():e instanceof t.MethodCall?this.processMethodCall():e instanceof t.Chain?this.processChain():e instanceof t.BindingPipe?this.processPipe():void 0},e.prototype.extendCtxWithLocals=function(){var e=this.createVar();this.stmts.push(e+"=Object.assign({}, locals)","Object.setPrototypeOf("+e+", _ctx)","ctx="+e)},e.prototype.fnBody=function(){return this.declarations.push("ctx"),'"use strict";\nvar '+this.declarations.join(",")+";\n"+this.stmts.join(";")},e.prototype.fnArgs=function(){var e,t,n=["_plus","_minus","_isDef"];if(this.exprType===L.Binding){n.push("getPPVal","_ppc");try{for(var i=C(this.pipes),o=i.next();!o.done;o=i.next()){var a=I(o.value,2)[1];n.push(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}}return n.push("_ctx","locals"),n.join(",")},e.prototype.addReturnStmt=function(e){this.stmts.push("return "+e+";")},e.prototype.cleanup=function(){this.ast=this.cAst=this.stmts=this.cStmts=this.declarations=this.pipes=this.pipeNameVsIsPureMap=void 0},e.prototype.compile=function(e){if(this.extendCtxWithLocals(),this.addReturnStmt(this.build(this.ast)),e)return{fnBody:this.fnBody(),fnArgs:this.fnArgs(),pipes:this.pipes};var t,n=new Function(this.fnArgs(),this.fnBody());return this.exprType===L.Binding?(t=n.bind(void 0,V,W,B,Q)).usedPipes=this.pipes.slice(0):t=n.bind(void 0,V,W,B),this.cleanup(),t},e}(),ee=function(){return{transform:U}},te=function(){if(void 0!==k)return k;try{new Function,k=!1}catch(e){k=!0}return k};function ne(e,n){var i,o;if(!M)return console.log("set pipe provider"),U;if(!j(e))return U;if((e=e.trim()).endsWith(";")&&(e=e.slice(0,-1)),!e.length)return U;var a,r=q.get(e);if(r)return r;if(n||(a=le(e)),!a)if(te())a=function(t,n){var i=Object.assign({},n);return Object.setPrototypeOf(i,t),_.get(i,e)};else{var s=new t.Parser(new t.Lexer).parseBinding(e,"",0);if(s.errors.length)a=r=U;else{var l=M.getPipeNameVsIsPureMap();if(r=new X(s.ast,L.Binding,l).compile(n),n)return r;if(r.usedPipes.length){var c=[],p=!1;try{for(var d=C(r.usedPipes),u=d.next();!u.done;u=d.next()){var h=I(u.value,1)[0],m=M.meta(h),f=void 0;m?(m.pure&&(p=!0,f=H.get(h)),f||(f=M.getInstance(h)),m.pure&&H.set(h,f)):f=ee,c.push(f)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}c.unshift(p?new Map:void 0),a=r.bind.apply(r,D([void 0],I(c)))}else a=r.bind(void 0,void 0)}}return q.set(e,a),a}function ie(e,t,n){var i=Object.assign({},n);Object.setPrototypeOf(i,t);var o=e.split("("),a=o[0],r=_.get(t,a);if(r){var s=o[1].replace(")","");s=s.split(",");var l=[];return s.forEach((function(e){e=e&&e.trim(),l.push(_.get(i,e))})),r.bind(i).apply(void 0,D([],I(l)))}}function oe(e,n){if(!j(e))return U;if(!(e=e.trim()).length)return U;var i=z.get(e);if(i)return i;if(n||(i=ce(e)),!i)if(te())i=ie.bind(void 0,e);else{var o=new t.Parser(new t.Lexer).parseAction(e,"",0);if(o.errors.length)return U;i=new X(o.ast,L.Action).compile(n)}return z.set(e,i),i}!function(e){e[e.Binding=0]="Binding",e[e.Action=1]="Action"}(L||(L={}));var ae=new Map,re=function(e){return ae.get(e)},se=function(e,t){var n,i,o=re(e);if(o){var a=o.usedPipes||[];if(o=t===L.Binding?o.bind(void 0,V,W,B,Q):o.bind(void 0,V,W,B),a.length){var r=[],s=!1;try{for(var l=C(a),c=l.next();!c.done;c=l.next()){var p=I(c.value,1)[0],d=M.meta(p),u=void 0;d?(d.pure&&(s=!0,u=H.get(p)),u||(u=M.getInstance(p)),d.pure&&H.set(p,u)):u=ee,r.push(u)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}r.unshift(s?new Map:void 0),o=o.bind.apply(o,D([void 0],I(r)))}else t===L.Binding&&(o=o.bind(void 0,void 0));return o}},le=function(e){return se(e,L.Binding)},ce=function(e){return se(e,L.Action)},pe=new Map,de=new F("watch-id-"),ue={};Object.freeze(ue);var he,me,fe,ge=!1,ve=function(e,t){var n;return void 0===t&&(t=50),function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];window.__zone_symbol__clearTimeout(n),n=window.__zone_symbol__setTimeout((function(){return e.apply(void 0,D([],I(i)))}),t)}},ye=function(e,t,n,i){var o,a=n;_.isArray(a)&&(o=a.map((function(e){return $t(e,t)})),_.isArray(o[0])&&(o=_.flatten(o)),e(o,i))},be=function(e,t,n){var i="[$i]";if(!t)return{expr:e.replace(/\[\$i\]/g,"[0]"),listener:n};var o=e.lastIndexOf(i),a=e.substr(0,o).replace(i,"[0]"),r=e.substr(o+5),s=n;return r&&(s=ye.bind(void 0,n,r)),{expr:a,listener:s}},we=function(e,t,n,i,o,a,r,s){if(void 0===o&&(o=de.nextUid()),void 0===a&&(a=!1),void 0===r&&(r={}),-1!==e.indexOf("[$i]")){var l=be(e,r&&r.arrayType,i);e=l.expr,i=l.listener}var c=ne(e);return pe.set(o,{fn:c.bind(e,t,n),listener:i,expr:e,last:ue,doNotClone:a,isMuted:s}),function(){return Pe(o)}},Pe=function(e){return pe.delete(e)},_e=!1,Oe=window.requestAnimationFrame,Ee=function(e){if(!ge||e){var t,n=1;do{t=!1,pe.forEach((function(e){if(!e.isMuted||!e.isMuted()){var n,i=e.fn,o=e.listener,a=e.last;try{n=i()}catch(t){console.warn("error in executing expression: '"+e.expr+"'")}_.isEqual(n,a)||(t=!0,_e=!0,e.last=n,_.isObject(n)&&!e.doNotClone&&!1!==n.__cloneable__&&(e.last=_.clone(n)),o(n,a),Re())}})),n++}while(t&&n<5);t&&5===n&&console.warn("Number of watch cycles gone above set limit of: 5 ")}},Re=function(){return _e=!1};window.watchRegistry=pe;var Ae,Te,Se=ve((function(){fe=!0,me.run((function(){return Ee()}))}),100),Ce=(Ae=!1,function(e){if(he)if(e)me.run((function(){return he.tick()})),Ae=!1;else{if(Ae)return;Ae=!0,Oe((function(){me.run((function(){return he.tick()})),Ae=!1}))}});e.ComponentType=void 0,(Te=e.ComponentType||(e.ComponentType={}))[Te.PAGE=0]="PAGE",Te[Te.PREFAB=1]="PREFAB",Te[Te.PARTIAL=2]="PARTIAL";var Ie,De=function(){};!function(e){e.LIST_RECORDS="listRecords",e.UPDATE_RECORD="updateRecord",e.INSERT_RECORD="insertRecord",e.DELETE_RECORD="deleteRecord",e.INVOKE="invoke",e.UPDATE="update",e.NOTIFY="notify",e.IS_API_AWARE="isApiAware",e.SUPPORTS_CRUD="supportsCRUD",e.SUPPORTS_DISTINCT_API="supportsDistinctAPI",e.IS_PAGEABLE="isPageable",e.IS_SORTABLE="isSortable",e.GET_OPERATION_TYPE="getOperationType",e.GET_RELATED_PRIMARY_KEYS="getRelatedTablePrimaryKeys",e.GET_ENTITY_NAME="getEntityName",e.SET_INPUT="setinput",e.GET_RELATED_TABLE_DATA="getRelatedTableData",e.GET_DISTINCT_DATA_BY_FIELDS="getDistinctDataByFields",e.GET_AGGREGATED_DATA="getAggregatedData",e.GET_MATCH_MODE="getMatchMode",e.DOWNLOAD="download",e.GET_NAME="getName",e.GET_PROPERTIES_MAP="getPropertiesMap",e.GET_PRIMARY_KEY="getPrimaryKey",e.GET_BLOB_URL="getBlobURL",e.SUPPORTS_SERVER_FILTER="supportsServerFilter",e.GET_OPTIONS="getOptions",e.SEARCH_RECORDS="searchRecords",e.GET_REQUEST_PARAMS="getRequestParams",e.GET_PAGING_OPTIONS="getPagingOptions",e.FETCH_DISTINCT_VALUES="fetchDistinctValues",e.GET_UNIQUE_IDENTIFIER="getUniqueIdentifier",e.GET_CONTEXT_IDENTIFIER="getContextIdentifier",e.IS_UPDATE_REQUIRED="isUpdateRequired",e.ADD_ITEM="addItem",e.SET_ITEM="setItem",e.REMOVE_ITEM="removeItem",e.IS_BOUND_TO_LOCALE="isBoundToLocale",e.GET_DEFAULT_LOCALE="getDefaultLocale",e.CANCEL="cancel",e.SET_PAGINATION="setPagination"}(Ie||(Ie={}));var xe={Operation:Ie},Ne=function(){},ke=function(){},Me=function(){},Le=function(){},Fe=function(){},je=function(){},Be=function(){},Ge=function(){},$e=function(){},Ve=function(){},We=function(){},Ue=window.navigator.userAgent,qe={SNAKE_CASE:/[A-Z]/g,ANDROID:/Android/i,IPHONE:/iPhone/i,IPOD:/iPod/i,IPAD:/iPad/i,MAC:/Mac/i,ANDROID_TABLET:/android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i,MOBILE:/Mobile/i,WINDOWS:/Windows Phone/i,SUPPORTED_IMAGE_FORMAT:/\.(bmp|gif|jpe|jpg|jpeg|tif|tiff|pbm|png|ico)$/i,SUPPORTED_FILE_FORMAT:/\.(txt|js|css|html|script|properties|json|java|xml|smd|xmi|sql|log|wsdl|vm|ftl|jrxml|yml|yaml|md|less|jsp)$/i,SUPPORTED_AUDIO_FORMAT:/\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,SUPPORTED_VIDEO_FORMAT:/\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,PAGE_RESOURCE_PATH:/^\/pages\/.*\.(js|css|html|json)$/,MIN_PAGE_RESOURCE_PATH:/.*(page.min.html)$/,VALID_EMAIL:/^[a-zA-Z][\w.+]+@[a-zA-Z_]+?\.[a-zA-Z.]{1,4}[a-zA-Z]$/,VALID_WEB_URL:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_WEBSOCKET_URL:/^(ws[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,VALID_RELATIVE_URL:/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,REPLACE_PATTERN:/\$\{([^\}]+)\}/g,ZIP_FILE:/\.zip$/i,EXE_FILE:/\.exe$/i,NO_QUOTES_ALLOWED:/^[^'|"]*$/,NO_DOUBLE_QUOTES_ALLOWED:/^[^"]*$/,VALID_HTML:/<[a-z][\s\S]*>/i,VALID_PASSWORD:/^[0-9a-zA-Z-_.@&*!#$%]+$/,SPECIAL_CHARACTERS:/[^A-Z0-9a-z_]+/i,APP_SERVER_URL_FORMAT:/^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9\.\-]+([:]?[0-9]{2,5}|\.[a-zA-Z]{2,5}[\.]{0,1})\/+[^?#&=]+$/,JSON_DATE_FORMAT:/\d{4}-[0-1]\d-[0-3]\d(T[0-2]\d:[0-5]\d:[0-5]\d.\d{1,3}Z$)?/,DATA_URL:/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,ISO_DATE_FORMAT:/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/},ze=["int",e.DataType.INTEGER,e.DataType.FLOAT,e.DataType.DOUBLE,e.DataType.LONG,e.DataType.SHORT,e.DataType.BYTE,e.DataType.BIG_INTEGER,e.DataType.BIG_DECIMAL],He=new Date,Ye=function(e){return void 0!==e},Ke=function(e){return null!==e&&"object"==typeof e},Qe=function(e,t){return!(!e||"false"===e)||!!t&&e===t};var Ze=function(){return window.navigator.appVersion.indexOf("Trident/")>-1||window.navigator.userAgent.indexOf("MSIE")>-1},Je=function(){return qe.ANDROID.test(Ue)},Xe=function(){return qe.ANDROID_TABLET.test(Ue)&&!/Tablet PC 2.0/i.test(Ue)},et=function(){return qe.IPHONE.test(Ue)},tt=function(){return qe.IPOD.test(Ue)},nt=function(){return qe.IPAD.test(Ue)||window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2&&qe.MAC.test(window.navigator.platform)},it=function(){return et()||tt()||nt()},ot=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+n+") and (max-device-width : "+n+") and (min-device-height : "+i+") and (max-device-height : "+i+") and (min-width: "+n+") and (max-width: "+n+")").matches},at=function(e,t){var n=e||"1366px",i=t||"1024px";return window.matchMedia("only screen and (min-device-width : "+i+") and (max-device-width : "+i+") and (min-device-height : "+n+") and (max-device-height : "+n+") and (min-width: "+i+") and (max-width: "+i+")").matches},rt=function(){return Je()||it()||Xe()||$("#wm-mobile-display:visible").length>0},st=function(){return"MOBILE"===N().platformType&&"APPLICATION"===N().type},lt=function(){var e=window.navigator.userAgent.toLowerCase().match(/android\s([0-9\.]*)/);return e?e[1]:""},ct=function(){return Je()&&4===parseInt(lt(),10)},pt=function(e){var t=e.indexOf("?");return t>-1?(e=encodeURI(e.substring(0,t))+e.substring(t),e=dt(e)):e=encodeURI(e),e},dt=function(e){var t,n,i="";return(n=e.indexOf("?"))>-1&&(n+=1,(t=e.substring(n))&&(t.split("&").forEach((function(e){var t,n=_.includes(e,"=")?e.indexOf("="):e&&e.length,o=e.substr(0,n),a=e.substr(n+1);if(a||_.includes(e,"=")){try{t=decodeURIComponent(a)}catch(e){t=a}i+=o+"="+encodeURIComponent(t)+"&"}else i+=o+"&"})),i=i.slice(0,-1),e=e.replace(t,i))),e},ut=function(e){return e?e.charAt(0).toUpperCase()+e.substring(1):""},ht=function(e){return e===e.toUpperCase()?e:e.replace(qe.SNAKE_CASE,(function(e,t){return(t?" ":"")+e}))},mt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},ft=function(e){var t;return-1!==(t=e.indexOf("."))&&(e=mt(e,t+1,e.charAt(t+1).toUpperCase()),e=mt(e,t," ")),e},gt=function(e){return e=_.camelCase(e),e=ut(e),e=ht(e),e=ft(e)},vt=function(e){return e.split("-").join(" ")},yt=function(e,t){void 0===t&&(t=",");var n,i=[];return _.isArray(e)||(i=_.split(e,t)),n=_.map(i,gt),_.isArray(e)?n:n.join(t)},bt=function(e){var t=document.createElement("a");return t.href=e,""!==t.protocol&&(!qe.DATA_URL.test(e)&&(!!wt(location.href,"https://")&&("https:"!==t.protocol&&"wss:"!==t.protocol)))},wt=function(e,t,n){return!!e&&new RegExp("^"+t,n?"i":"").test(e)},Pt=function(e,t){var n;return n=_.attempt((function(){var n=Object.keys(e).map((function(e){return"var "+e+" = data['"+e+"'];"})).join(" ");return new Function("data",n+" return "+t)(e)})),_.isError(n)&&(n=_.get(e,t)),n},_t=function(e){return qe.SUPPORTED_IMAGE_FORMAT.test(e)},Ot=function(e){return qe.SUPPORTED_AUDIO_FORMAT.test(e)},Et=function(e){return qe.SUPPORTED_VIDEO_FORMAT.test(e)},Rt=function(e){return qe.VALID_WEB_URL.test(e)},At=function(e){return Rt(e),e};function Tt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=1,o=arguments.length,a=new Array(o-i);i<o;i++)a[i-1]=arguments[i];if(_.isFunction(e))return e.apply(null,a)}var St=function(e,t,n,i,o,a,r){if(t){if("timestamp"===n)return moment(t).valueOf();if("UTC"===n)return new Date(t).toISOString();if(i){var s=n.replaceAll("y","Y").replaceAll("d","D").replace("a","A");if(a)return moment(t).format(s);if("datetimestamp"===o)return t=un(i,t),moment(t).format(s)}return e.transform(t,n,i,r)}},Ct=function(e){if("string"==typeof e){var t=e.match(qe.ISO_DATE_FORMAT);return!(!t||!t[4])||void 0}},It=function(e,t,n){if(t&&t.pattern&&"timestamp"!==t.pattern){var i=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?"YYYY/MM/DD HH:mm:ss":Qt(t.pattern);e=moment(e,i).toDate()}if(_.isDate(e))return e;if(isNaN(e)||(e=parseInt(e,10)),moment(e).isValid()&&""!==e&&null!=e){var o=new Date(e);return _.isString(e)&&(o=n?un(n,e):new Date(moment(moment(e).format()).valueOf())),"CURRENT_DATE"===e||isNaN(o.getDay())?He:o}},Dt=function(e,t,n,i,o,a,r,s){void 0===s&&(s=!1);var l=e,c=function(e){if(!t||!t.contains(e.target)&&t!==e.target)if(n.contains(e.target)){if($(e.target).is("input")&&!o)return;l.removeEventListener(i,c,s)}else 0===r&&l.removeEventListener(i,c,s),a()};l.addEventListener(i,c,s);return function(){l.removeEventListener(i,c,s)}},xt=function(e){return _.cloneDeep(e)},Nt=function(e,t,n){var i=_.get(document.forms,[e,t,"files"]);return n?_.map(i,_.identity):i&&i[0]};function kt(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}var Mt,Lt,Ft=function(){return kt()+"-"+kt()+"-"+kt()},jt=function(e,t){var n;return!e||!t||(n=e&&e.split(",").map(Function.prototype.call,String.prototype.trim),_.intersection(n,t.userRoles).length)},Bt=function(e){if(e)try{var t=parseInt(e,10);return Ke(e)||!isNaN(t)?e:JSON.parse(e)}catch(e){return}},Gt=function(e){var t=new X2JS({emptyNodeForm:"content",attributePrefix:"",enableToStringFunc:!1}).xml2js(e);return t&&(t=_.get(t,Object.keys(t)[0])),t},$t=function(e,t,n){if(e&&t){if(!n)return _.get(e,t);var i,o=t.split("."),a=[];if(o.forEach((function(e){if(!o.length)return i=!0,!1;for(var t,n=e.match(/\w+/g);n.length;)t=n.shift(),a.push({key:t,value:n.length?[]:{}})})),!i)return a.forEach((function(t){var n=e[t.key];Ke(n)||(n=Bt(n))||(n=t.value),e[t.key]=n,e=n})),e}},Vt=function(t){var n;return t?n=(n=(n=t&&t.substring(t.lastIndexOf(".")+1))&&n.toLowerCase())===e.DataType.LOCALDATETIME?e.DataType.DATETIME:n:e.DataType.STRING},Wt=function(e){return-1!==ze.indexOf(Vt(e).toLowerCase())},Ut=function(e){return!(!Ke(e)||_.isArray(e))&&0===Object.keys(e).length},qt=function(e){var t=$(e),n=t.offset().top,i=t.closest('[wmsmoothscroll="true"]');if(st()&&i.length){var o=_.get(i[0],"iscroll"),a=-(n-o.y);a=o.maxScrollY>a?o.maxScrollY:a,o.scrollTo(0,a)}else window.scroll({top:n,left:0,behavior:"smooth"})},zt=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},Ht=function(e){var t=_.omit(e,"empty");return _.isEqual(_.keys({content:[],first:!0,last:!0,number:0,numberOfElements:10,size:20,sort:null,totalElements:10,totalPages:1}),_.keys(t).sort())},Yt=function(e,t,n){var i=qe.REPLACE_PATTERN;if(e)return n&&(i=/\{([^\}]+)\}/g),e.replace(i,(function(e,n){return _.get(t,n)}))},Kt=function(t){return _.includes(t,".")&&(t=_.toLower(Vt(t))),_.includes([e.DataType.DATE,e.DataType.TIME,e.DataType.TIMESTAMP,e.DataType.DATETIME,e.DataType.LOCALDATETIME],t)},Qt=function(e){return _.includes(e,"E")&&(e=_.replace(e,/E[,]?/g,"")),_.replace(e,/y*d*/g,(function(e){return e.toUpperCase()}))},Zt=Qt,Jt=function(e,t){var n=["AM","PM"],i=moment()._locale.meridiem();t&&t.meridians&&_.includes(n,i)&&_.forEach(t.meridians,(function(t,i){_.includes(e,t)&&(e=e.replace(t,n[i]))}));var o=(t&&t.hasOwnProperty("isNativePicker")?_.get(t,"isNativePicker"):rt())?_.get(t,"pattern")||"YYYY/MM/DD HH:mm:ss":Qt(_.get(t,"pattern"))||"";return t&&t.pattern&&"timestamp"!==t.pattern&&(isNaN(new Date(e).getTime())?e=moment(e,o):(it()&&(e=moment(e).format("YYYY/MM/DD HH:mm:ss")),e=moment(new Date(e),o)),e=e.toDate()),moment(e,o).isValid()?(it()&&(e=moment(moment(e).valueOf()).format("YYYY/MM/DD HH:mm:ss")),e):(isNaN(e)?new Date(e).getTime()||(e=moment(moment().format("YYYY-MM-DD")+" "+e,"YYYY-MM-DD HH:mm:ss A")):e=parseInt(e,10),new Date(moment(e).valueOf()))},Xt=function(e,t){return e=Jt(e,t),new Date(e)},en=function(e,t){if(e instanceof Blob)return e;var n=Bt(e);return e=n&&n instanceof Object?new Blob([JSON.stringify(n)],{type:t||"application/json"}):new Blob([e],{type:t||"text/plain"})},tn=function(e,t,n){var i=_.isArray(n)?n:_.split(n,",");return i=_.map(i,_.trim),_.isEqualWith(e,t,(function(e,t){return _.every(i,(function(n){var i,o,a;return-1===_.indexOf(n,":")?i=o=_.trim(n):(a=_.split(n,":"),i=_.trim(a[0]),o=_.trim(a[1])),_.get(e,i)===_.get(t,o)}))}))},nn=function(e){return document.querySelector(e)},on=nn,an=function(e){return!!nn('link[href="'+e+'"]')},rn=an,sn=function(e){var t=nn('link[href="'+e+'"]');t&&t.remove()},ln=function(e,t){if(!an(e)){var n=document.createElement("link");return n.href=e,t&&t.name&&n.setAttribute(t.name,t.value),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),document.head.appendChild(n),n}},cn=function(e){void 0===e&&(e=[]),Array.isArray(e)||(e=[e]),e.forEach(ln)},pn=function(e){return!!nn('script[src="'+e+'"], script[data-src="'+e+'"]')},dn=pn,un=function(e,t){return t?new Date(new Date(moment(t).tz(e).format()).toLocaleString("en-US",{timeZone:e})):new Date(new Date(moment().tz(e).format()).toLocaleString("en-US",{timeZone:e}))},hn=function(e,t,n){return void 0===n&&(n=!1),T(void 0,void 0,void 0,(function(){var i;return S(this,(function(o){return!(i=e.trim()).length||pn(i)?[2,Promise.resolve()]:t?[2,new Promise((function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=i,n.async=!1,n.readyState?n.onreadystatechange=function(){"loaded"!==n.readyState&&"complete"!==n.readyState||(n.onreadystatechange=null,e(!0))}:n.onload=function(){e(!0)},n.onerror=function(e){return t(e)},document.getElementsByTagName("head")[0].appendChild(n)}))]:n?[2,$.ajax({dataType:"script",cache:!0,url:e}).done((function(e){return e})).fail((function(e){return e}))]:[2,$.getScript(e).done((function(e){return e})).fail((function(e){return e}))]}))}))},mn=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=!0),T(void 0,void 0,void 0,(function(){var n,i,o,a,r,s;return S(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,7]),n=C(e),i=n.next(),l.label=1;case 1:return i.done?[3,4]:(o=i.value,[4,hn(o,t)]);case 2:l.sent(),l.label=3;case 3:return i=n.next(),[3,1];case 4:return[3,7];case 5:return a=l.sent(),r={error:a},[3,7];case 6:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(r)throw r.error}return[7];case 7:return[2,Promise.resolve()]}}))}))},fn={},gn=function(e,t){var n=window.sessionStorage.getItem(fn.id);(n=n?JSON.parse(n):{})[e]=t,window.sessionStorage.setItem(fn.id,JSON.stringify(n))},vn=function(e){var t=window&&window.sessionStorage&&window.sessionStorage.getItem(fn.id);if(t)return(t=JSON.parse(t))[e]},yn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},bn=function(e){return _.isArray(e)},wn=function(e){return"string"==typeof e},Pn=function(e){return"number"==typeof e},_n=function(e){return"boolean"==typeof e},On=function(e){return new Promise((function(t,n){resolveLocalFileSystemURL(e,(function(i){i.file((function(i){var o=new FileReader;o.onloadend=function(){var n=new Blob([o.result],{type:i.type});t({blob:n,filepath:e})},o.onerror=n,o.readAsArrayBuffer(i)}))}),n)}))},En=function(){return!!window.cordova},Rn={INT_MAX_VALUE:2147483647},An=function(e,t){void 0===t&&(t="_self"),En()&&_.startsWith(e,"#")?location.hash=e:window.open(e,t)},Tn=function(e,t,n,i,o){return void 0===n&&(n=!1),$.ajax({type:"get",dataType:e,url:t,async:!n}).done((function(e){return i&&i(e)})).fail((function(e){return o&&o(e)}))},Sn=function(e){return e instanceof Promise?e:Promise.resolve(e)},Cn=function(e,t,n,i){void 0===i&&(i=function(){return Promise.resolve(!1)});var o=0,a=function(){if(o++,_.isFunction(e))return e()};return n=_.isNumber(n)&&n>0?n:0,t=_.isNumber(t)&&t>0?t:0,new Promise((function(e,r){var s=function(){var l=arguments;setTimeout((function(){Sn(i()).then((function(t){!1!==t&&(!n||o<=n)?Sn(a()).then(e,s):r(l)}),(function(){return r(l)}))}),t)};Sn(a()).then(e,s)}))},In=function(){var e={promise:null,reject:null,resolve:null,onAbort:function(){},isAborted:!1};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e.promise.abort=function(){Tt(e.onAbort),e.reject("aborted"),e.isAborted=!0},e},Dn=function(e,t){document.styleSheets[0].insertRule(e+" { "+t+" }")},xn=function(e){var t={},n=e.indexOf("?");-1!==n&&_.split(e.substring(n+1,e.length),"&").forEach((function(e){e=_.split(e,"="),t[e[0]]=e[1]}));return t},Nn=function(e){var t=(e=e.replace("#/","/")).indexOf("?");return-1!==t&&(e=e.substring(0,t)),e},kn=/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Mn=function(){var e={promise:null,resolve:yn,reject:yn};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},Ln=function(e,t,n,i){if(n=n||Mn(),0===(i=i||0)&&(e=_.filter(e,(function(e){return!(_.isUndefined(e)||_.isNull(e))}))),e&&i<e.length)try{Sn(e[i].apply(void 0,t)).then((function(){return Ln(e,t,n,i+1)}),n.reject)}catch(e){n.reject(e)}else n.resolve();return n.promise},Fn=function(e,t){return e.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)===t.execute(xe.Operation.GET_UNIQUE_IDENTIFIER)&&_.isEqual(e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER),t.execute(xe.Operation.GET_CONTEXT_IDENTIFIER))},jn=function(e,t){return e.execute(xe.Operation.GET_CONTEXT_IDENTIFIER)===t},Bn=function(e,t,i){var o=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,a=new n.Subject,r=function(n,r){wt(n[r],"bind:")&&o(we(n[r].replace("bind:",""),e,{},i?i.invokeOnFiltertExpressionChange.bind(i,n,r):function(e,i){e===i&&_.isUndefined(e)||_.isUndefined(e)&&!_.isUndefined(i)||(_.includes(["blob","file"],n.type)||(e=xt(e)),"dataBinding"===n.target?(t.rules=[],_.forEach(e,(function(e,i){t.rules.push({target:i,value:e,matchMode:n.matchMode||"startignorecase",required:!1,type:""})}))):n[r]=e,a.next({filterExpressions:t,newVal:e}))},void 0,!1,{arrayType:_.includes(["in","notin"],n.matchMode)}))},s=function(e){e.rules&&_.forEach(e.rules,(function(e,t){e.rules?s(e):("between"===e.matchMode&&r(e,"secondvalue"),r(e,"value"))}))};return s(t),a},Gn=function(e,t){for(var n=Object.getPrototypeOf(e);Object.getPrototypeOf(n).constructor!==Object;)if(t===(n=Object.getPrototypeOf(n)))return;Object.setPrototypeOf(n,t)},$n=function(e){if(_.isString(e))return _.startsWith(e,"file:///")||/^data:image\/([a-z]{2,});base64,/.test(e)?e:e.replace(new RegExp("([^:]/)(/)+","g"),"$1")};$.cachedScript=(Mt=new Map,Lt=new Set,function(e){if(function(e){return Lt.has(e)}(e))return Promise.resolve();if(function(e){return Mt.has(e)}(e))return Mt.get(e);!function(e){var t,n,i=new Promise((function(e,i){t=e,n=i}));i.resolve=t,i.reject=n,Mt.set(e,i)}(e);var t={dataType:"script",cache:!0,url:e};return $.ajax(t).done((function(){return function(e){Lt.add(e),Mt.get(e).resolve(),Mt.delete(e)}(e)})),Mt.get(e)});var Vn={DATE:"yyyy-MM-dd",TIME:"hh:mm a",TIMESTAMP:"yyyy-MM-dd hh:mm:ss a",DATETIME:"yyyy-MM-dd hh:mm:ss a"},Wn=function(e){return Vn[_.toUpper(e)]},Un=function(e){var t=e.querySelectorAll("label.control-label"),n=e.querySelectorAll("[focus-target]");(n.length||(n=e.querySelectorAll("input, select, textarea")),t.length&&n.length)&&((o=$(n[0]).closest("[widget-id]").attr("widget-id"))&&(A(n[0],"id",o),A(t[0],"for",o)));var i=e.querySelectorAll("ul");if(t.length&&i.length&&("radiogroup"===i[0].getAttribute("role")||"group"===i[0].getAttribute("role"))){var o="wm-group-label-"+Ft();A(i[0],"aria-labelledby",o),A(t[0],"id",o)}},qn=function(e,t,n,i){(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);t.m41<0&&(t.m41=0,Hn(e,t))}))},zn=function(e,t,n,i){var o,a=i?_.parseInt(i.css("width")):_.parseInt(e.css("width")),r=$(window).width()+window.scrollX,s=t.getBoundingClientRect(),l=s.right+window.scrollX;(n._ngZone||n.ngZone).onStable.subscribe((function(){var t=Yn(e);r-(l+s.width)<a&&((o=l-a)<0&&(o=0),t.m41=o,Hn(e,t))}))},Hn=function(e,t){var n="translate3d("+t.m41+"px, "+t.m42+"px, 0px)";e[0].style.webkitTransform=n,e[0].style.MozTransform=n,e[0].style.msTransform=n,e[0].style.OTransform=n,e[0].style.transform=n},Yn=function(e){return"undefined"==typeof WebKitCSSMatrix?new MSCSSMatrix(window.getComputedStyle(e[0]).transform):new WebKitCSSMatrix(window.getComputedStyle(e[0]).webkitTransform)},Kn=function(e){if(!e.closest(".app-popover").length){var t=document.querySelectorAll(".app-popover-wrapper");_.forEach(t,(function(e){e.widget.isOpen&&(e.widget.isOpen=!1)}))}},Qn=Ce,Zn=function(e,t){var n=t.link,i=t.action,o=t.target;if(i&&(e.itemActionFn||(e.itemActionFn=oe(i)),e.itemActionFn(e.userDefinedExecutionContext,Object.create(t))),n)if(!n.startsWith("#/")||o&&"_self"!==o)An(n,o);else{var a=xn(n);n=Nn(n),(_.get(e,"route")||_.get(e,"menuRef.route")).navigate([n],{queryParams:a})}},Jn=function(e,t){var n=_.startsWith(e,"Variables."),i=_.startsWith(e,"Widgets."),o=e.split(".");if(n)return _.get(t.viewParent.Variables,o[1]);if(i){var a,r=_.get(t.viewParent.Widgets,o[1]),s=r.$attrs.get("datasetboundexpr");return a=!r.datasource&&s?s:r.binddataset,Jn(a,r)}},Xn=function(e,t){if(/^Widgets\..*\.currentItem/g.test(e)){var n=e.split("."),i=_.get(t.viewParent.Widgets,n[1]),o=i.$attrs.get("datasetboundexpr");if(!i.datasource&&o)return e=e.replace(/^Widgets\..*\.currentItem/g,o+"[$i]"),Xn(e,t);e=e.replace(/^Widgets\..*\.currentItem/g,i.binddataset+"[$i]")}return e},ei=function(e){var t=e.closest(".app-prefab");return t.length||(t=e.closest(".app-partial")),t.length||(t=e.closest(".app-spa-page")),t.length||(t=e.closest(".app-page")),t.length&&t.parent()[0].tagName},ti={REQUIRED:"required",MAXCHARS:"maxchars",MINVALUE:"minvalue",MAXVALUE:"maxvalue",REGEXP:"regexp",MINDATE:"mindate",MAXDATE:"maxdate",MINTIME:"mintime",MAXTIME:"maxtime",EXCLUDEDATES:"excludedates",EXCLUDEDAYS:"excludedays"},ni=function(e){if(_.isString(e)&&En()&&e.startsWith("file://")){if(it())return e.replace("file://","/_app_file_");if(Je()&&location.href.startsWith("http")){if(e.startsWith(cordova.file.applicationDirectory))return e.replace(cordova.file.applicationDirectory+"www","");if(e.startsWith("file://"))return e.replace("file://","/_app_file_")}}return e},ii=function(e){var t=document.createElement("script");t.onload=function(){e(WM_CUSTOM_FORMATTERS)},t.onerror=function(e){console.warn("Error while loading the file "+t.src+"\n"+e)},t.type="text/javascript",t.src="./extensions/formatters.js",document.head.appendChild(t)},oi=function(e,t){return _WM_APP_PROPERTIES.extra_settings&&_.get(_WM_APP_PROPERTIES.extra_settings,e)||t},ai=function(e){var t="";e.itemsperrow?isNaN(parseInt(e.itemsperrow,10))?(_.split(e.itemsperrow," ").forEach((function(e){var n=_.split(e,"-");e=n[0]+"-"+12/parseInt(n[1],10),t+=" col-"+e})),e.itemsPerRowClass=t.trim()):e.itemsPerRowClass="col-xs-"+12/parseInt(e.itemsperrow,10):e.itemsPerRowClass="col-xs-12"},ri=Object.freeze({__proto__:null,isDefined:Ye,isObject:Ke,toBoolean:Qe,isIE:Ze,isAndroid:Je,isAndroidTablet:Xe,isIphone:et,isIpod:tt,isIpad:nt,isIos:it,isLargeTabletLandscape:ot,isLargeTabletPortrait:at,isMobile:rt,isTablet:function(){var e=document.querySelector(".app-page").widget;return e&&e.viewParent.Viewport.isTabletType},isMobileApp:st,getAndroidVersion:lt,isKitkatDevice:ct,encodeUrl:pt,encodeUrlParams:dt,initCaps:ut,spaceSeparate:ht,replaceAt:mt,periodSeparate:ft,prettifyLabel:gt,deHyphenate:vt,prettifyLabels:yt,isInsecureContentRequest:bt,stringStartsWith:wt,getEvaluatedExprValue:Pt,isImageFile:_t,isAudioFile:Ot,isVideoFile:Et,isValidWebURL:Rt,getResourceURL:At,triggerFn:Tt,getFormattedDate:St,hasOffsetStr:Ct,getDateObj:It,addEventListenerOnElement:Dt,getClonedObject:xt,getFiles:Nt,generateGUId:Ft,validateAccessRoles:jt,getValidJSON:Bt,xmlToJson:Gt,findValueOf:$t,extractType:Vt,isNumberType:Wt,isEmptyObject:Ut,scrollToElement:qt,isElementInViewport:zt,isPageable:Ht,replace:Yt,isDateTimeType:Kt,getValidDateObject:Jt,getNativeDateObject:Xt,getBlob:en,isEqualWithFields:tn,loadStyleSheet:ln,loadStyleSheets:cn,getMomentLocaleObject:un,loadScript:hn,loadScripts:mn,_WM_APP_PROJECT:fn,setSessionStorageItem:gn,getSessionStorageItem:vn,noop:yn,isArray:bn,isString:wn,isNumber:Pn,isBoolean:_n,convertToBlob:On,hasCordova:En,AppConstants:Rn,openLink:An,fetchContent:Tn,toPromise:Sn,retryIfFails:Cn,getAbortableDefer:In,createCSSRule:Dn,getUrlParams:xn,getRouteNameFromLink:Nn,isAppleProduct:kn,defer:Mn,executePromiseChain:Ln,isDataSourceEqual:Fn,validateDataSourceCtx:jn,processFilterExpBindNode:Bn,extendProto:Gn,removeExtraSlashes:$n,getDisplayDateTimeFormat:Wn,addForIdAttributes:Un,adjustContainerPosition:qn,adjustContainerRightEdges:zn,setTranslation3dPosition:Hn,getWebkitTraslationMatrix:Yn,closePopover:Kn,detectChanges:Qn,triggerItemAction:Zn,getDatasourceFromExpr:Jn,extractCurrentItemExpr:Xn,findRootContainer:ei,VALIDATOR:ti,transformFileURI:ni,appendScriptToHead:ii,getAppSetting:oi,setListClass:ai,"\u02750":Zt,"\u02751":on,"\u02752":rn,"\u02753":sn,"\u02754":dn}),si=function(){function e(e){void 0===e&&(e=!0),this._subject=new n.Subject,this._isInitialized=!1,this._eventsBeforeInit=[],e&&this.start()}return e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._isInitialized?this._subject.next({name:e,data:t}):this._eventsBeforeInit.push({name:e,data:t})},e.prototype.start=function(){var e=this;this._isInitialized||(this._isInitialized=!0,this._eventsBeforeInit.forEach((function(t){return e._subject.next(t)})))},e.prototype.subscribe=function(e,t){var n;return e&&t?(n=this._subject.subscribe((function(n){n&&Ke(n)&&n.name===e&&t.apply(void 0,n.data)})),function(){n.unsubscribe()}):yn},e.prototype.destroy=function(){this._subject.complete()},e}(),li=768,ci=1200,pi=function(){function e(){var e=this;this.orientation={isPortrait:!1,isLandscape:!1},this.isMobileType=!1,this.isTabletType=!1,this._eventNotifier=new si(!0),this.setScreenType(),window.addEventListener("resize",this.resizeFn.bind(this));var t=window.matchMedia("(orientation: portrait)");t.matches?this.orientation.isPortrait=!0:this.orientation.isLandscape=!0,t.addEventListener&&t.addEventListener("change",(function(t){return e.orientationChange(t,!t.matches)}))}return e.prototype.update=function(e){this.selectedViewPort=e,this.setScreenType()},e.prototype.orientationChange=function(e,t){t!==this.orientation.isLandscape&&(this.orientation.isPortrait=!t,this.orientation.isLandscape=t,this.notify("orientationchange",{$event:e,data:{isPortrait:!t,isLandscape:t}}))},e.prototype.resizeFn=function(e){this.setScreenType(),this.orientationChange(e,this.screenWidth>=this.screenHeight),this.notify("resize",{$event:e,data:{screenWidth:this.screenWidth,screenHeight:this.screenHeight}})},e.prototype.subscribe=function(e,t){return this._eventNotifier.subscribe(e,t)},e.prototype.notify=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._eventNotifier.notify.apply(this._eventNotifier,arguments)},e.prototype.setScreenType=function(){var e=document.querySelector(".wm-app");this.screenWidth=e.clientWidth,this.screenHeight=e.clientHeight;this.screenWidth<this.screenHeight?this.screenWidth:this.screenHeight,this.screenWidth>this.screenHeight?this.screenWidth:this.screenHeight;if(this.isTabletType=!1,this.isMobileType=!1,_.get(this.selectedViewPort,"deviceCategory")){var t=this.selectedViewPort.deviceCategory;"Tab"===t?this.isTabletType=!0:"Smartphone"===t&&(this.isMobileType=!0)}else parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-xs"))||480,li=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-sm"))||768,ci=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-lg"))||1200,this.screenWidth>=ci?(this.isTabletType=Je()||it()||Xe(),this.isMobileType=!1):this.screenWidth>=li?(this.type=1,this.isTabletType=!0):(this.type=0,this.isMobileType=!0)},e.prototype.ngOnDestroy=function(){this._eventNotifier.destroy(),window.removeEventListener("resize",this.resizeFn)},e}();pi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new pi},token:pi,providedIn:"root"}),pi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],pi.ctorParameters=function(){return[]};var di=function(){this.MATCH_MODES={STARTS_WITH_IGNORE_CASE:"startignorecase",STARTS_WITH:"start",ENDS_WITH_IGNORE_CASE:"endignorecase",ENDS_WITH:"end",CONTAINS:"anywhere",CONTAINS_IGNORE_CASE:"anywhereignorecase",IS_EQUAL_WITH_IGNORE_CASE:"exactignorecase",IS_EQUAL:"exact"},this.VALIDATOR=ti};di.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new di},token:di,providedIn:"root"}),di.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var ui=function(){_.assign(this,ri)};ui.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new ui},token:ui,providedIn:"root"}),ui.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],ui.ctorParameters=function(){return[]};var hi=function(){_.assign(this,{INTEGER:"integer",BIG_INTEGER:"big_integer",SHORT:"short",FLOAT:"float",BIG_DECIMAL:"big_decimal",DOUBLE:"double",LONG:"long",BYTE:"byte",STRING:"string",CHARACTER:"character",TEXT:"text",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",DATETIME:"datetime",BOOLEAN:"boolean",LIST:"list",CLOB:"clob",BLOB:"blob"})};hi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new hi},token:hi,providedIn:"root"}),hi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],hi.ctorParameters=function(){return[]};var mi=function(){_.assign(this,{TEXT:"text",NUMBER:"number",TEXTAREA:"textarea",PASSWORD:"password",CHECKBOX:"checkbox",SLIDER:"slider",RICHTEXT:"richtext",CURRENCY:"currency",SWITCH:"switch",SELECT:"select",CHECKBOXSET:"checkboxset",RADIOSET:"radioset",DATE:"date",TIME:"time",TIMESTAMP:"timestamp",UPLOAD:"upload",RATING:"rating",DATETIME:"datetime",AUTOCOMPLETE:"autocomplete",CHIPS:"chips",COLORPICKER:"colorpicker"})};mi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new mi},token:mi,providedIn:"root"}),mi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],mi.ctorParameters=function(){return[]};var fi=[],gi=function(){function e(e){var t=this;this.http=e,this.scripts={},fi.forEach((function(e){t.scripts[e.name]={loaded:!1,src:e.src}}))}return e.prototype.load=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t&&t.length?Promise.resolve().then((function(){return e.pathMappings||e.loadPathMappings()})).then((function(){return Promise.all(t.map((function(t){return e.loadScript(t)})))})):Promise.resolve()},e.prototype.loadPathMappings=function(){var e=this,t=(fn.cdnUrl||fn.ngDest)+"path_mapping.json";return this.http.get(t).toPromise().then((function(t){e.pathMappings=t}),(function(){e.pathMappings={}}))},e.prototype.loadScript=function(e){var t=this;return new Promise((function(n,i){if(t.scripts[e]&&t.scripts[e].loaded)n({script:e,loaded:!0});else{t.scripts[e]||(t.scripts[e]={loaded:!1,src:e});var o=document.createElement("script");o.type="text/javascript",o.async=!1;var a=t.scripts[e].src;(a=t.pathMappings[a]||a).startsWith("http")?o.src=a:o.src=(fn.cdnUrl||fn.ngDest)+a,o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t.scripts[e].loaded=!0,n({script:e,loaded:!0}))}:o.onload=function(){t.scripts[e].loaded=!0,n({script:e,loaded:!0})},o.onerror=function(t){return n({script:e,loaded:!1,status:"Loaded"})},document.getElementsByTagName("head")[0].appendChild(o)}}))},e}();gi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new gi(p.\u0275\u0275inject(d.HttpClient))},token:gi,providedIn:"root"}),gi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}],gi.ctorParameters=function(){return[{type:o.HttpClient}]};var vi=function(){function e(){this.customPipes=new Map}return e.prototype.setCustomPipe=function(e,t){this.customPipes.set(e,t)},e.prototype.getCustomPipe=function(e){return this.customPipes.get(e)},e.prototype.hasCustomPipe=function(e){return this.customPipes.has(e)},e}();vi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new vi},token:vi,providedIn:"root"}),vi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var yi=function(){function e(){this.HISTORY_HANDLER="replace",this.HISTORY_HANDLER_TYPES={push:"pushState",replace:"replaceState"},this.WIDGET_STATE_KEY="ws"}return e.prototype.setHistoryHandler=function(e){Object.keys(this.HISTORY_HANDLER_TYPES).indexOf(e)>-1&&(this.HISTORY_HANDLER=e)},e.prototype.getNestedPath=function(e,t,n){var i=n||t;return e&&(e.prefabName||e.partialName)?(i=(i=i.length>0?i+"."+(e.prefabName||e.partialName):e.prefabName||e.partialName)+"."+e.containerWidget.name,this.getNestedPath(e.containerWidget.viewParent,t,i)):i.split(".").reverse().join(".")},e.prototype.getStateInformation=function(e){var t;if("url"===e.toLowerCase()){if(t=decodeURIComponent(window.location.href).match(/(wm_state=).*?(&|$)/))return t=t[0].replace("wm_state=",""),this.uriToJson(t)}else"localstorage"===e.toLowerCase()?t=localStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"):"sessionstorage"===e.toLowerCase()&&(t=sessionStorage.getItem(window.location.pathname.replace(/\//g,"")+"_wm_state"));if(t)return JSON.parse(t)},e.prototype.getWidgetState=function(e,t){if(t=t||this.computeMode(e.statehandler)){var n=this.getStateInformation(t);if(n&&e&&e.getAppInstance().activePageName&&("localstorage"===t.toLowerCase()||"sessionstorage"===t.toLowerCase())&&(n=n[e.getAppInstance().activePageName]),_.get(n,this.WIDGET_STATE_KEY)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);return n[this.WIDGET_STATE_KEY][i]}}},e.prototype.computeMode=function(e){return e?e&&"none"===e.toLowerCase()?void 0:e.toLowerCase():"url"},e.prototype.setWidgetState=function(e,t,n){var i=this.getNestedPath(e.viewParent,e.getWidget().name);(n=n||this.computeMode(e.statehandler))&&this.setStateParams(this.WIDGET_STATE_KEY,i,t,n,e)},e.prototype.removeWidgetState=function(e,t,n){if(n=n||this.computeMode(e.statehandler)){var i=this.getNestedPath(e.viewParent,e.getWidget().name);this.removeStateParam(this.WIDGET_STATE_KEY,i,t,n,e)}},e.prototype.setStateVariable=function(e,t,n){(n=n||this.computeMode(n))&&this.setStateParams("",e,t,n)},e.prototype.getStateVariable=function(e,t){if(t=t||this.computeMode(t)){var n=this.getStateInformation(t);return n?n[e]:void 0}},e.prototype.removeStateVariable=function(e,t){(t=t||this.computeMode(t))&&this.removeStateParam("",e,null,t)},e.prototype.setStateParams=function(e,t,n,i,o){var a,r,s,l,c,p=this.getStateInformation(i);c=o&&p&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?p[o.getAppInstance().activePageName]:_.clone(p),e?(c&&!c[e]?c[e]={}:c||((a={})[e]={},c=a),_.isObject(n)&&!_.isArray(n)?(c[e][t]=c[e][t]||{},_.merge(c[e][t],n)):c[e][t]=n):(c&&!c[t]?c[t]={}:c||((r={})[t]={},c=r),_.isObject(n)&&!_.isArray(n)?(c[t]=c[t]||{},_.merge(c[t],n)):c[t]=n),o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(p?(p[o.getAppInstance().activePageName]=c,c=p):((s={})[o.getAppInstance().activePageName]=c,c=s));var d=decodeURIComponent(window.location.href);d.indexOf("?")<0?d+="?wm_state=":d.indexOf("wm_state")<0&&(d+="&wm_state="),l=d.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(c)+"$2"),"localstorage"!==i.toLowerCase()?"sessionstorage"!==i.toLowerCase()?decodeURIComponent(window.location.href)!==decodeURIComponent(l)&&("push"===this.HISTORY_HANDLER?window.history.pushState({path:l},"",l):"replace"===this.HISTORY_HANDLER&&window.history.replaceState({path:l},"",l)):sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c)):localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(c))},e.prototype.removeStateParam=function(e,t,n,i,o){var a,r,s="",l=this.getStateInformation(i);if(r=o&&l&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())?l[o.getAppInstance().activePageName]:_.clone(l),_.get(r,[e])||_.get(r,t))if(_.get(r,e+"."+t)||r&&r[e]&&r[e][t]?(n?delete r[e][t][n]:delete r[e][t],_.isEmpty(r[e][t])&&delete r[e][t],_.isEmpty(r[e])&&delete r[e]):!e&&_.get(r,t)&&delete r[t],o&&o.getAppInstance().activePageName&&("localstorage"===i.toLowerCase()||"sessionstorage"===i.toLowerCase())&&(l?(l[o.getAppInstance().activePageName]=r,r=l):((a={})[o.getAppInstance().activePageName]=r,r=a)),"localstorage"!==i.toLowerCase())if("sessionstorage"!==i.toLowerCase()){var c=decodeURIComponent(window.location.href);_.isEmpty(r)?(s=c.replace(/(wm_state=).*?(&|$)/,"$2"),_.includes(["&","?"],s.charAt(s.length-1))&&(s=s.replace(s.charAt(s.length-1),""))):s=c.replace(/(wm_state=).*?(&|$)/,"$1"+this.jsonToUri(r)+"$2"),window.history.replaceState({path:s},"",s)}else sessionStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r));else localStorage.setItem(window.location.pathname.replace(/\//g,"")+"_wm_state",JSON.stringify(r))},e.prototype.jsonToUri=function(e){return encodeURIComponent(JSON.stringify(e).replace(/[()'~_!*]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})).replace(/\{/g,"(").replace(/\}/g,")").replace(/"/g,"'").replace(/\:/g,"~").replace(/,/g,"_").replace(/\[/g,"!").replace(/\]/g,"*"))},e.prototype.uriToJson=function(e){var t;try{t=JSON.parse(decodeURIComponent(e).replace(/\(/g,"{").replace(/\)/g,"}").replace(/'/g,'"').replace(/~/g,":").replace(/_/g,",").replace(/\!/g,"[").replace(/\*/g,"]"))}catch(e){console.warn(e)}return t},e}();yi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new yi},token:yi,providedIn:"root"}),yi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var bi=function(){function e(){}return e.prototype.updateFieldsOnPagination=function(e,t){var n,i="wm-table"===e.widgetType?e.gridData:e.fieldDefs;"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&-1!==e.gridOptions.deletedRowIndex&&(i.splice(e.gridOptions.deletedRowIndex,1),e.gridOptions.setDeletedRowIndex(-1)),"wm-table"!==e.widgetType||!e.gridOptions.isNavTypeScrollOrOndemand()||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.SEARCH_OR_SORT&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.FILTER_CRITERIA&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DATASET_UPDATE||(i=[],e.gridOptions.setCurrentPage(1)),n="wm-table"===e.widgetType&&e.gridOptions.showviewlessbutton&&"viewless"===e.gridOptions.mode?e.gridOptions.getCurrentPage():e.currentPage;var o=e.dataNavigator,a=e.pagesize;if(!Ye(i)||o.isFirstPage())i=[],n=1;else if(i.length/a<=o.pageCount){var r=void 0,s=[];if(i.length===n*a&&n+1===o.dn.currentPage)s=t,n++;else if(i.length<n*a){i.length===(n-1)*a&&n-1===o.dn.currentPage?t=[]:o.dataSize<n*a?r=o.dataSize-i.length:(r=n*a-i.length,n++);var l=t.length-r;s=t.slice(l)}else i.length===n*a&&n===o.dn.currentPage&&(s=[]);t=s}return[i="wm-table"!==e.widgetType||e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.DELETE&&e.gridOptions.lastActionPerformed!==e.gridOptions.ACTIONS.EDIT?D(D([],I(i)),I(t)):this.getUniqueRecordsInFieldDef(i,t),n]},e.prototype.getUniqueRecordsInFieldDef=function(e,t){var n=!1;return e.length?t.forEach((function(t){n=!1,e.forEach((function(e){_.isEqual(t,e)&&(n=!0)})),!1===n&&e.push(t)})):e=t,e},e.prototype.bindScrollEvt=function(e,t,n){var i,o,a=this,r=e.dataNavigator,s=e.$element.find(t),l=s.children().first(),c=this,p=0;l.length&&((o=(i=l.scrollParent(!1))[0]===document?document.body:i[0]).scrollHeight>o.clientHeight?(i.each((function(e,t){p=t===document?t.body.scrollTop||$(window).scrollTop():t.scrollTop})).off("scroll.scroll_evt").on("scroll.scroll_evt",(function(t){var i,o,a,s=t.target;s=s===document?s.scrollingElement||document.body:s,"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),i=s.clientHeight,o=s.scrollHeight,a=s===document.body?$(window).scrollTop():s.scrollTop,p<a&&.9*o<a+i&&($(this).off("scroll.scroll_evt"),c.debouncedFetchNextDatasetOnScroll(r,n,e)()),p=a})),s.off("wheel.scroll_evt")):s.on("wheel.scroll_evt",(function(t){"wm-table"===e.widgetType&&e.gridOptions.isNavTypeScrollOrOndemand()&&t.stopPropagation(),t.originalEvent.deltaY>0&&(s.off("wheel.scroll_evt"),a.debouncedFetchNextDatasetOnScroll(r,n,e)())})))},e.prototype.debouncedFetchNextDatasetOnScroll=function(e,t,n){var i=this;return _.debounce((function(){return i.fetchNextDatasetOnScroll(e,n)}),t)},e.prototype.fetchNextDatasetOnScroll=function(e,t){t.variableInflight||("wm-table"===t.widgetType&&(t.gridOptions.setIsNextPageData(!0),t.gridOptions.setIsDataUpdatedByUser(!1)),e.navigatePage("next"))},e.prototype.bindIScrollEvt=function(e,t){var n=this,i=e.$element,o=e.dataNavigator,a=e.app,r=i.closest('[wmsmoothscroll="true"]');if(_.get(r[0],"iscroll"))this.setIscrollHandlers(r[0],o,t);else{var s=a.subscribe("iscroll-update",(function(e){!_.isEmpty(e)&&e.isSameNode(r[0])&&(n.setIscrollHandlers(r[0],o,t),s())}));a.notify("no-iscroll",r[0])}},e.prototype.setIscrollHandlers=function(e,t,n){var i=this,o=0,a=_.get(e.iscroll,"wrapper"),r=e.iscroll;e.iscroll.on("scrollEnd",(function(){var s=a.clientHeight,l=a.scrollHeight,c=Math.abs(e.iscroll.y);o<c&&.9*l<c+s&&(i.debouncedFetchNextDatasetOnScroll(t,n,parent)(),r.indicatorRefresh&&r.indicatorRefresh()),o=c}))},e}();bi.\u0275prov=p.\u0275\u0275defineInjectable({factory:function(){return new bi},token:bi,providedIn:"root"}),bi.decorators=[{type:i.Injectable,args:[{providedIn:"root"}]}];var wi=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();wi.decorators=[{type:i.NgModule,args:[{declarations:[],imports:[o.HttpClientModule],providers:[],bootstrap:[]}]}];var Pi=function(){function e(e,t,n){var i=this;void 0===e&&(e=100),void 0===t&&(t=60),this.maxSize=e,this.maxAge=t,this.onEvict=n,this.cache=new Map,this.evictQueue=[""],this.evictQueue.shift(),this.maxAge>0&&(this.maxAge<=30&&console.warn("Cache age "+this.maxAge+"s is very less. Keep it atleast 30s."),this.maxAge=1e3*this.maxAge,setInterval((function(){var e=Date.now()-i.maxAge,t=i.evictQueue.filter((function(t){return i.cache.get(t).lastAccessedTime<=e}));i.evict(t.length)}),this.maxAge))}return e.prototype.addToEvictQueue=function(e){var t=this.evictQueue.findIndex((function(t){return t===e}));t>=0&&this.evictQueue.splice(t,1),this.evictQueue.push(e)},e.prototype.evict=function(e){void 0===e&&(e=1);for(var t=0;t<e;t++)this.delete(this.evictQueue[0])},e.prototype.keys=function(){return this.cache.keys()},e.prototype.set=function(e,t){if(!_.isNil(t)){var n={instance:t,lastAccessedTime:Date.now()};this.cache.set(e,n),this.addToEvictQueue(e),this.evict(this.evictQueue.length-this.maxSize)}},e.prototype.get=function(e){var t=this.cache.get(e);return t?(t.lastAccessedTime=Date.now(),this.addToEvictQueue(e),t.instance):null},e.prototype.delete=function(e){if(e&&this.cache.has(e)){var t=this.cache.get(e);this.cache.delete(e),this.onEvict&&this.onEvict(e,t.instance);var n=this.evictQueue.findIndex((function(t){return t===e}));n>=0&&this.evictQueue.splice(n,1)}},e.prototype.has=function(e){return this.cache.has(e)},e.prototype.size=function(){return this.evictQueue.length},e.prototype.clear=function(){this.evict(this.evictQueue.length)},e}();e.$appDigest=Ce,e.$invokeWatchers=function(e,t){if(e)Ee(t);else{if(fe)return void(fe=!1);Se()}},e.$parseEvent=oe,e.$parseExpr=ne,e.$unwatch=Pe,e.$watch=we,e.AbstractDialogService=ke,e.AbstractHttpService=Me,e.AbstractI18nService=Le,e.AbstractNavigationService=Ge,e.AbstractSpinnerService=je,e.AbstractToasterService=Fe,e.App=Ne,e.AppConstants=Rn,e.AppDefaults=$e,e.CURRENCY_INFO={USD:{symbol:"$",name:"US Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"USD",name_plural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"CAD",name_plural:"Canadian dollars"},EUR:{symbol:"\u20ac",name:"Euro",symbol_native:"\u20ac",decimal_digits:2,rounding:0,code:"EUR",name_plural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbol_native:"\u062f.\u0625.\u200f",decimal_digits:2,rounding:0,code:"AED",name_plural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbol_native:"\u060b",decimal_digits:0,rounding:0,code:"AFN",name_plural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbol_native:"Lek",decimal_digits:0,rounding:0,code:"ALL",name_plural:"Albanian lek\xeb"},AMD:{symbol:"AMD",name:"Armenian Dram",symbol_native:"\u0564\u0580.",decimal_digits:0,rounding:0,code:"AMD",name_plural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"ARS",name_plural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"AUD",name_plural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbol_native:"\u043c\u0430\u043d.",decimal_digits:2,rounding:0,code:"AZN",name_plural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbol_native:"KM",decimal_digits:2,rounding:0,code:"BAM",name_plural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbol_native:"\u09f3",decimal_digits:2,rounding:0,code:"BDT",name_plural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbol_native:"\u043b\u0432.",decimal_digits:2,rounding:0,code:"BGN",name_plural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbol_native:"\u062f.\u0628.\u200f",decimal_digits:3,rounding:0,code:"BHD",name_plural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbol_native:"FBu",decimal_digits:0,rounding:0,code:"BIF",name_plural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BND",name_plural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbol_native:"Bs",decimal_digits:2,rounding:0,code:"BOB",name_plural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbol_native:"R$",decimal_digits:2,rounding:0,code:"BRL",name_plural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbol_native:"P",decimal_digits:2,rounding:0,code:"BWP",name_plural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbol_native:"BYR",decimal_digits:0,rounding:0,code:"BYR",name_plural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"BZD",name_plural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbol_native:"FrCD",decimal_digits:2,rounding:0,code:"CDF",name_plural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbol_native:"CHF",decimal_digits:2,rounding:.05,code:"CHF",name_plural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"CLP",name_plural:"Chilean pesos"},CNY:{symbol:"CN\xa5",name:"Chinese Yuan",symbol_native:"CN\xa5",decimal_digits:2,rounding:0,code:"CNY",name_plural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbol_native:"$",decimal_digits:0,rounding:0,code:"COP",name_plural:"Colombian pesos"},CRC:{symbol:"\u20a1",name:"Costa Rican Col\xf3n",symbol_native:"\u20a1",decimal_digits:0,rounding:0,code:"CRC",name_plural:"Costa Rican col\xf3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbol_native:"CV$",decimal_digits:2,rounding:0,code:"CVE",name_plural:"Cape Verdean escudos"},CZK:{symbol:"K\u010d",name:"Czech Republic Koruna",symbol_native:"K\u010d",decimal_digits:2,rounding:0,code:"CZK",name_plural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbol_native:"Fdj",decimal_digits:0,rounding:0,code:"DJF",name_plural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"DKK",name_plural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbol_native:"RD$",decimal_digits:2,rounding:0,code:"DOP",name_plural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbol_native:"\u062f.\u062c.\u200f",decimal_digits:2,rounding:0,code:"DZD",name_plural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbol_native:"kr",decimal_digits:2,rounding:0,code:"EEK",name_plural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbol_native:"\u062c.\u0645.\u200f",decimal_digits:2,rounding:0,code:"EGP",name_plural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbol_native:"Nfk",decimal_digits:2,rounding:0,code:"ERN",name_plural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbol_native:"Br",decimal_digits:2,rounding:0,code:"ETB",name_plural:"Ethiopian birrs"},GBP:{symbol:"\xa3",name:"British Pound Sterling",symbol_native:"\xa3",decimal_digits:2,rounding:0,code:"GBP",name_plural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbol_native:"GEL",decimal_digits:2,rounding:0,code:"GEL",name_plural:"Georgian laris"},GHS:{symbol:"GH\u20b5",name:"Ghanaian Cedi",symbol_native:"GH\u20b5",decimal_digits:2,rounding:0,code:"GHS",name_plural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbol_native:"FG",decimal_digits:0,rounding:0,code:"GNF",name_plural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbol_native:"Q",decimal_digits:2,rounding:0,code:"GTQ",name_plural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"HKD",name_plural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbol_native:"L",decimal_digits:2,rounding:0,code:"HNL",name_plural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbol_native:"kn",decimal_digits:2,rounding:0,code:"HRK",name_plural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbol_native:"Ft",decimal_digits:0,rounding:0,code:"HUF",name_plural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbol_native:"Rp",decimal_digits:0,rounding:0,code:"IDR",name_plural:"Indonesian rupiahs"},ILS:{symbol:"\u20aa",name:"Israeli New Sheqel",symbol_native:"\u20aa",decimal_digits:2,rounding:0,code:"ILS",name_plural:"Israeli new sheqels"},INR:{symbol:"\u20b9",name:"Indian Rupee",symbol_native:"\u099f\u0995\u09be",decimal_digits:2,rounding:0,code:"INR",name_plural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbol_native:"\u062f.\u0639.\u200f",decimal_digits:0,rounding:0,code:"IQD",name_plural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbol_native:"\ufdfc",decimal_digits:0,rounding:0,code:"IRR",name_plural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xf3na",symbol_native:"kr",decimal_digits:0,rounding:0,code:"ISK",name_plural:"Icelandic kr\xf3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"JMD",name_plural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbol_native:"\u062f.\u0623.\u200f",decimal_digits:3,rounding:0,code:"JOD",name_plural:"Jordanian dinars"},JPY:{symbol:"\xa5",name:"Japanese Yen",symbol_native:"\uffe5",decimal_digits:0,rounding:0,code:"JPY",name_plural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbol_native:"Ksh",decimal_digits:2,rounding:0,code:"KES",name_plural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbol_native:"\u17db",decimal_digits:2,rounding:0,code:"KHR",name_plural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbol_native:"FC",decimal_digits:0,rounding:0,code:"KMF",name_plural:"Comorian francs"},KRW:{symbol:"\u20a9",name:"South Korean Won",symbol_native:"\u20a9",decimal_digits:0,rounding:0,code:"KRW",name_plural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbol_native:"\u062f.\u0643.\u200f",decimal_digits:3,rounding:0,code:"KWD",name_plural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbol_native:"\u0442\u04a3\u0433.",decimal_digits:2,rounding:0,code:"KZT",name_plural:"Kazakhstani tenges"},LBP:{symbol:"LB\xa3",name:"Lebanese Pound",symbol_native:"\u0644.\u0644.\u200f",decimal_digits:0,rounding:0,code:"LBP",name_plural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbol_native:"SL Re",decimal_digits:2,rounding:0,code:"LKR",name_plural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbol_native:"Lt",decimal_digits:2,rounding:0,code:"LTL",name_plural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbol_native:"Ls",decimal_digits:2,rounding:0,code:"LVL",name_plural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbol_native:"\u062f.\u0644.\u200f",decimal_digits:3,rounding:0,code:"LYD",name_plural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbol_native:"\u062f.\u0645.\u200f",decimal_digits:2,rounding:0,code:"MAD",name_plural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbol_native:"MDL",decimal_digits:2,rounding:0,code:"MDL",name_plural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbol_native:"MGA",decimal_digits:0,rounding:0,code:"MGA",name_plural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbol_native:"MKD",decimal_digits:2,rounding:0,code:"MKD",name_plural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbol_native:"K",decimal_digits:0,rounding:0,code:"MMK",name_plural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbol_native:"MOP$",decimal_digits:2,rounding:0,code:"MOP",name_plural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbol_native:"MURs",decimal_digits:0,rounding:0,code:"MUR",name_plural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"MXN",name_plural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbol_native:"RM",decimal_digits:2,rounding:0,code:"MYR",name_plural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbol_native:"MTn",decimal_digits:2,rounding:0,code:"MZN",name_plural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbol_native:"N$",decimal_digits:2,rounding:0,code:"NAD",name_plural:"Namibian dollars"},NGN:{symbol:"\u20a6",name:"Nigerian Naira",symbol_native:"\u20a6",decimal_digits:2,rounding:0,code:"NGN",name_plural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xf3rdoba",symbol_native:"C$",decimal_digits:2,rounding:0,code:"NIO",name_plural:"Nicaraguan c\xf3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbol_native:"kr",decimal_digits:2,rounding:0,code:"NOK",name_plural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbol_native:"\u0928\u0947\u0930\u0942",decimal_digits:2,rounding:0,code:"NPR",name_plural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"NZD",name_plural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbol_native:"\u0631.\u0639.\u200f",decimal_digits:3,rounding:0,code:"OMR",name_plural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbol_native:"B/.",decimal_digits:2,rounding:0,code:"PAB",name_plural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbol_native:"S/.",decimal_digits:2,rounding:0,code:"PEN",name_plural:"Peruvian nuevos soles"},PHP:{symbol:"\u20b1",name:"Philippine Peso",symbol_native:"\u20b1",decimal_digits:2,rounding:0,code:"PHP",name_plural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbol_native:"\u20a8",decimal_digits:0,rounding:0,code:"PKR",name_plural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbol_native:"z\u0142",decimal_digits:2,rounding:0,code:"PLN",name_plural:"Polish zlotys"},PYG:{symbol:"\u20b2",name:"Paraguayan Guarani",symbol_native:"\u20b2",decimal_digits:0,rounding:0,code:"PYG",name_plural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbol_native:"\u0631.\u0642.\u200f",decimal_digits:2,rounding:0,code:"QAR",name_plural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbol_native:"RON",decimal_digits:2,rounding:0,code:"RON",name_plural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbol_native:"\u0434\u0438\u043d.",decimal_digits:0,rounding:0,code:"RSD",name_plural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbol_native:"\u0440\u0443\u0431.",decimal_digits:2,rounding:0,code:"RUB",name_plural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbol_native:"FR",decimal_digits:0,rounding:0,code:"RWF",name_plural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbol_native:"\u0631.\u0633.\u200f",decimal_digits:2,rounding:0,code:"SAR",name_plural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbol_native:"SDG",decimal_digits:2,rounding:0,code:"SDG",name_plural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbol_native:"kr",decimal_digits:2,rounding:0,code:"SEK",name_plural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"SGD",name_plural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbol_native:"Ssh",decimal_digits:0,rounding:0,code:"SOS",name_plural:"Somali shillings"},SYP:{symbol:"SY\xa3",name:"Syrian Pound",symbol_native:"\u0644.\u0633.\u200f",decimal_digits:0,rounding:0,code:"SYP",name_plural:"Syrian pounds"},THB:{symbol:"\u0e3f",name:"Thai Baht",symbol_native:"\u0e3f",decimal_digits:2,rounding:0,code:"THB",name_plural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbol_native:"\u062f.\u062a.\u200f",decimal_digits:3,rounding:0,code:"TND",name_plural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02bbanga",symbol_native:"T$",decimal_digits:2,rounding:0,code:"TOP",name_plural:"Tongan pa\u02bbanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbol_native:"TL",decimal_digits:2,rounding:0,code:"TRY",name_plural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbol_native:"$",decimal_digits:2,rounding:0,code:"TTD",name_plural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbol_native:"NT$",decimal_digits:2,rounding:0,code:"TWD",name_plural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbol_native:"TSh",decimal_digits:0,rounding:0,code:"TZS",name_plural:"Tanzanian shillings"},UAH:{symbol:"\u20b4",name:"Ukrainian Hryvnia",symbol_native:"\u20b4",decimal_digits:2,rounding:0,code:"UAH",name_plural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbol_native:"USh",decimal_digits:0,rounding:0,code:"UGX",name_plural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbol_native:"$",decimal_digits:2,rounding:0,code:"UYU",name_plural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbol_native:"UZS",decimal_digits:0,rounding:0,code:"UZS",name_plural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xedvar",symbol_native:"Bs.F.",decimal_digits:2,rounding:0,code:"VEF",name_plural:"Venezuelan bol\xedvars"},VND:{symbol:"\u20ab",name:"Vietnamese Dong",symbol_native:"\u20ab",decimal_digits:0,rounding:0,code:"VND",name_plural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbol_native:"FCFA",decimal_digits:0,rounding:0,code:"XAF",name_plural:"CFA francs BEAC"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbol_native:"CFA",decimal_digits:0,rounding:0,code:"XOF",name_plural:"CFA francs BCEAO"},YER:{symbol:"YR",name:"Yemeni Rial",symbol_native:"\u0631.\u064a.\u200f",decimal_digits:0,rounding:0,code:"YER",name_plural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbol_native:"R",decimal_digits:2,rounding:0,code:"ZAR",name_plural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbol_native:"ZK",decimal_digits:0,rounding:0,code:"ZMK",name_plural:"Zambian kwachas"}},e.ConstantService=di,e.CoreModule=wi,e.CustomPipeManager=vi,e.DataSource=xe,e.DynamicComponentRefProvider=Ve,e.EventNotifier=si,e.FIRST_TIME_WATCH=ue,e.FieldTypeService=hi,e.FieldWidgetService=mi,e.IDGenerator=F,e.IDataSource=De,e.LRUCache=Pi,e.PaginationService=bi,e.PartialRefProvider=We,e.ScriptLoaderService=gi,e.ScriptStore=fi,e.StatePersistence=yi,e.UserDefinedExecutionContext=Be,e.UtilsService=ui,e.VALIDATOR=ti,e.Viewport=pi,e._WM_APP_PROJECT=fn,e.addClass=E,e.addEventListenerOnElement=Dt,e.addForIdAttributes=Un,e.adjustContainerPosition=qn,e.adjustContainerRightEdges=zn,e.appendNode=function(e,t,n){var i=function(){return t.appendChild(e)};n?i():P(i)},e.appendScriptToHead=ii,e.checkIsCustomPipeExpression=g,e.closePopover=Kn,e.convertToBlob=On,e.createCSSRule=Dn,e.createElement=function(e,t,n){var i=document.createElement(e);return t&&Object.keys(t).forEach((function(e){A(i,e,t[e],n)})),i},e.deHyphenate=vt,e.debounce=ve,e.defer=Mn,e.detectChanges=Qn,e.encodeUrl=pt,e.encodeUrlParams=dt,e.executePromiseChain=Ln,e.extendProto=Gn,e.extractCurrentItemExpr=Xn,e.extractType=Vt,e.fetchContent=Tn,e.findRootContainer=ei,e.findValueOf=$t,e.generateGUId=Ft,e.getAbortableDefer=In,e.getAndroidVersion=lt,e.getAppSetting=oi,e.getBlob=en,e.getClonedObject=xt,e.getDatasourceFromExpr=Jn,e.getDateObj=It,e.getDisplayDateTimeFormat=Wn,e.getEvaluatedExprValue=Pt,e.getFiles=Nt,e.getFnByExpr=re,e.getFnForBindExpr=le,e.getFnForEventExpr=ce,e.getFormWidgetTemplate=function(t,n,i,o){var a;void 0===o&&(o={});var r=i.get("updateon"),s=r?'updateon="'+r+'"':"";switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:a='<div wmSearch type="autocomplete" debouncetime="'+i.get("debouncetime")+'" '+n+"></div>";break;case e.FormWidgetType.CHECKBOX:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+"></div>";break;case e.FormWidgetType.CHECKBOXSET:a='<ul role="group" wmCheckboxset '+n+" "+("true"===i.get("required")?"required=true":"")+"></ul>";break;case e.FormWidgetType.CHIPS:a='<ul wmChips role="input" debouncetime="'+i.get("debouncetime")+'" '+n+"></ul>";break;case e.FormWidgetType.COLORPICKER:a="<div wmColorPicker "+("true"===i.get("required")?"required=true":"")+" "+n+"></div>";break;case e.FormWidgetType.CURRENCY:a="<div wmCurrency "+("true"===i.get("required")?"required=true":"")+" "+s+" "+n+"></div>";break;case e.FormWidgetType.DATE:a="<div wmDate "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.DATETIME:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.NUMBER:a="<div wmNumber "+n+" "+("true"===i.get("required")?"required=true":"")+' type="number" aria-label="Only numbers" '+s+"></div>";break;case e.FormWidgetType.PASSWORD:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="password" aria-label="Enter password" '+s+"></wm-input>";break;case e.FormWidgetType.RADIOSET:a='<ul role="radiogroup" wmRadioset '+n+"></ul>";break;case e.FormWidgetType.RATING:a="<div wmRating "+n+"></div>";break;case e.FormWidgetType.RICHTEXT:a='<div wmRichTextEditor role="textbox" '+n+"></div>";break;case e.FormWidgetType.SELECT:a="<wm-select "+("true"===i.get("required")?"required=true":"")+" "+n+"></wm-select>";break;case e.FormWidgetType.TOGGLE:a="<div wmCheckbox "+n+" "+("true"===i.get("required")?"required=true":"")+' type="toggle" role="checkbox" aria-label="Toggle button"></div>';break;case e.FormWidgetType.SLIDER:a="<div wmSlider "+n+"></div>";break;case e.FormWidgetType.SWITCH:a="<div wmSwitch "+n+"></div>";break;case e.FormWidgetType.TEXT:var l=o.inputType||"inputtype";a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="'+(i.get(l)||"text")+'" '+s+"></wm-input>";break;case e.FormWidgetType.TEXTAREA:a="<wm-textarea "+n+" "+("true"===i.get("required")?"required=true":"")+' role="textbox" '+s+"></wm-textarea>";break;case e.FormWidgetType.TIME:a="<div wmTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+"></div>";break;case e.FormWidgetType.TIMESTAMP:a="<div wmDateTime "+("true"===i.get("required")?"required=true":"")+' dataentrymode="'+i.get("dataentrymode")+'" '+n+' role="input"></div>';break;case e.FormWidgetType.UPLOAD:var c=o.counter,p=o.pCounter,d=o.uploadProps,h=u(i,c,d&&d.name);a=d?'<form name="'+d.formName+'" '+n+'>\n <input focus-target class="file-upload" type="file" name="'+d.name+'" '+h+"/>\n </form>":'<a class="form-control-static" href="{{'+c+'.href}}" target="_blank" *ngIf="'+c+".filetype === 'image' && "+c+'.href">\n <img style="height:2em" class="wi wi-file" [src]="'+c+'.href"/></a>\n <a class="form-control-static" target="_blank" href="{{'+c+'.href}}" *ngIf="'+c+".filetype !== 'image' && "+c+'.href">\n <i class="wi wi-file"></i></a>\n <input '+n+' class="app-blob-upload" [ngClass]="{\'file-readonly\': '+c+'.readonly}" '+h+'\n [required]="'+c+'.required" type="file" name="'+(i.get("key")||i.get("name"))+'_formWidget" [readonly]="'+c+'.readonly"\n [class.hidden]="!'+p+'.isUpdateMode" [accept]="'+c+'.permitted">';break;default:a="<wm-input "+n+" "+("true"===i.get("required")?"required=true":"")+' type="text" '+s+"></wm-input>"}return a},e.getFormattedDate=St,e.getMomentLocaleObject=un,e.getNativeDateObject=Xt,e.getNgModelAttr=function(e){return e.has("formControlName")||e.has("formControlName.bind")?"":"ngModel"},e.getRequiredFormWidget=function(t){switch(t){case e.FormWidgetType.AUTOCOMPLETE:case e.FormWidgetType.TYPEAHEAD:return"wm-search";case e.FormWidgetType.CHIPS:return"wm-chips";case e.FormWidgetType.COLORPICKER:return"wm-colorpicker";case e.FormWidgetType.CURRENCY:return"wm-currency";case e.FormWidgetType.DATE:return"wm-date";case e.FormWidgetType.DATETIME:return"wm-datetime";case e.FormWidgetType.TIME:case e.FormWidgetType.TIMESTAMP:return"wm-time";case e.FormWidgetType.RATING:return"wm-rating";case e.FormWidgetType.RICHTEXT:return"wm-richtexteditor";case e.FormWidgetType.SLIDER:return"wm-slider";default:return"wm-text"}},e.getResourceURL=At,e.getRouteNameFromLink=Nn,e.getRowActionAttrs=function(e){var t="";return e.forEach((function(e,n){var i=y.get(n);i&&(t+=i+'="'+e+'" ')})),t},e.getSessionStorageItem=vn,e.getUrlParams=xn,e.getValidDateObject=Jt,e.getValidJSON=Bt,e.getWebkitTraslationMatrix=Yn,e.getWmProjectProperties=N,e.hasCordova=En,e.hasOffsetStr=Ct,e.initCaps=ut,e.insertAfter=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t.nextSibling)};n?i():P(i)},e.insertBefore=function(e,t,n){var i=function(){return t.parentNode.insertBefore(e,t)};n?i():P(i)},e.isAndroid=Je,e.isAndroidTablet=Xe,e.isAppleProduct=kn,e.isArray=bn,e.isAudioFile=Ot,e.isBoolean=_n,e.isChangeFromWatch=function(){return _e},e.isDataSourceEqual=Fn,e.isDateTimeType=Kt,e.isDefined=Ye,e.isElementInViewport=zt,e.isEmptyObject=Ut,e.isEqualWithFields=tn,e.isFirstTimeChange=function(e){return e===ue},e.isIE=Ze,e.isImageFile=_t,e.isInsecureContentRequest=bt,e.isIos=it,e.isIpad=nt,e.isIphone=et,e.isIpod=tt,e.isKitkatDevice=ct,e.isLargeTabletLandscape=ot,e.isLargeTabletPortrait=at,e.isMobile=rt,e.isMobileApp=st,e.isNumber=Pn,e.isNumberType=Wt,e.isObject=Ke,e.isPageable=Ht,e.isString=wn,e.isValidWebURL=Rt,e.isVideoFile=Et,e.loadScript=hn,e.loadScripts=mn,e.loadStyleSheet=ln,e.loadStyleSheets=cn,e.muteWatchers=function(){ge=!0},e.noop=yn,e.openLink=An,e.periodSeparate=ft,e.prettifyLabel=gt,e.prettifyLabels=yt,e.processFilterExpBindNode=Bn,e.registerFnByExpr=function(e,t,n){t.usedPipes=n||[],ae.set(e,t)},e.removeAttr=function(e,t,n){var i=function(){return e.removeAttribute(t)};n?i():P(i)},e.removeClass=O,e.removeExtraSlashes=$n,e.removeNode=function(e,t){var n=function(){return e.remove()};t?n():P(n)},e.replace=Yt,e.replaceAt=mt,e.resetChangeFromWatch=Re,e.retryIfFails=Cn,e.scrollToElement=qt,e.setAppRef=function(e){he=e},e.setAttr=A,e.setCSS=R,e.setCSSFromObj=function(e,t,n){Object.keys(t||{}).forEach((function(i){return R(e,i,t[i],n)}))},e.setHtml=function(e,t,n){var i=function(){return e.innerHTML=t};n?i():P(i)},e.setListClass=ai,e.setNgZone=function(e){return me=e},e.setPipeProvider=function(e){M=e},e.setProperty=function(e,t,n,i){var o=function(){return e[t]=n};i?o():P(o)},e.setSessionStorageItem=gn,e.setTranslation3dPosition=Hn,e.setWmProjectProperties=function(e){Object.setPrototypeOf(x,e)},e.spaceSeparate=ht,e.stringStartsWith=wt,e.switchClass=function(e,t,n,i){void 0===t&&(t=""),void 0===n&&(n=""),O(e,n,i),E(e,t,i)},e.toBoolean=Qe,e.toDimension=function(e){return e==+e?e+"px":e},e.toPromise=Sn,e.toggleClass=function(e,t,n,i){n?E(e,t,i):O(e,t,i)},e.transformFileURI=ni,e.triggerFn=Tt,e.triggerItemAction=Zn,e.unMuteWatchers=function(){ge=!1,Ee()},e.updateTemplateAttrs=v,e.validateAccessRoles=jt,e.validateDataSourceCtx=jn,e.xmlToJson=Gt,e["\u02750"]=h,e["\u02751"]=f,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("@wm/swipey",["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).swipey={})}(this,(function(e){"use strict";var t=function(){function e(){this._isGesturesEnabled=!0}return e.prototype.bindEvents=function(){return window.PointerEvent?["pointer"]:["touch"]},e.prototype.bounds=function(e,t){return{}},e.prototype.context=function(){return{}},e.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.HORIZONTAL},e.prototype.setGesturesEnabled=function(e){this._isGesturesEnabled=e},e.prototype.isGesturesEnabled=function(){return this._isGesturesEnabled},e.prototype.goToLower=function(e){this._$ele.swipeAnimation("gotoLower",e)},e.prototype.goToUpper=function(e){this._$ele.swipeAnimation("gotoUpper",e)},e.prototype.onAnimation=function(e,t){},e.prototype.onUpper=function(e){},e.prototype.onLower=function(e){},e.prototype.threshold=function(){return 30},e.prototype.init=function(e,t){this._$ele=e,e.swipeAnimation({animation:this.animation(),target:t,bounds:this.bounds.bind(this),bindEvents:this.bindEvents(),context:this.context.bind(this),direction:this.direction(),enableGestures:this.isGesturesEnabled.bind(this),onAnimation:this.onAnimation.bind(this),onLower:this.onLower.bind(this),onUpper:this.onUpper.bind(this),threshold:this.threshold(),disableMouse:!0})},e}();e.SwipeAnimation=t,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/compiler"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/transpiler",["exports","@angular/compiler","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.transpiler={}),e.ng.compiler,e.wm.core)}(this,(function(e,t,n){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
27
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
28
|
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}var p;Object.create;!function(e){e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User"}(p||(p={}));var d=function(e){function t(t){var n=e.call(this)||this;return n.httpClient=t,n.nonBodyTypeMethods=["GET","DELETE","HEAD","OPTIONS","JSONP"],n.sessionTimeoutObservable=new a.Subject,n.sessionTimeoutQueue=[],n}return l(t,e),t.prototype.handleSessionTimeout=function(e,t){this.sessionTimeoutQueue.push({requestInfo:e,sub401:t}),this.on401()},t.prototype.generateRequest=function(e){var t,n,a=new i.HttpHeaders,r=new i.HttpParams,s=e.headers,l=e.params,p=e.responseType,d=e.withCredentials;e.isDirectCall||(a=a.append("X-Requested-With","XMLHttpRequest")),s&&Object.entries(s).forEach((function(e){var t=c(e,2),n=t[0],i=t[1];(o.isNumber(i)||o.isBoolean(i))&&(i=i.toString()),a=a.append(n,i)})),l&&Object.entries(l).forEach((function(e){var t=c(e,2),n=t[0],i=t[1];return r=r.append(n,i)}));var u={headers:a,params:r,responseType:p,withCredentials:d};return _.includes(this.nonBodyTypeMethods,e.method&&e.method.toUpperCase())&&void 0===e.data?(t=u,n=null):(t=e.data,n=u),new i.HttpRequest(e.method,e.url,t,n)},t.prototype.sendCallAsObservable=function(e){var t=this.generateRequest(e);return this.httpClient.request(t)},t.prototype.sendCall=function(e,t){var n=this;return new Promise((function(i,o){t._observable=n.sendCallAsObservable(e).subscribe((function(e){e&&e.type&&i(e)}),(function(e){o(e)}))}))},t.prototype.send=function(e){var t=this,n=this.generateRequest(e);return new Promise((function(e,i){t.httpClient.request(n).toPromise().then((function(t){e(t)}),(function(n){if(t.isPlatformSessionTimeout(n))n._401Subscriber.asObservable().subscribe((function(t){e(t)}),(function(e){i(e)}));else{var o=r.getErrMessage(n,t.getLocale());i({error:o,details:n})}}))}))},t.prototype.cancel=function(e,t){e._observable&&e._observable.unsubscribe(),t&&t._uploadProgress&&t._uploadProgress.unsubscribe()},t.prototype.setLocale=function(e){this.localeObject=e},t.prototype.getLocale=function(){return this.localeObject},t.prototype.getHeader=function(e,t){return e.headers.get(t)},t.prototype.isPlatformSessionTimeout=function(e){return 401===e.status&&"Session Not Found"===this.getHeader(e,"x-wm-login-errormessage")},t.prototype.get=function(e,t){return(t=t||{}).url=e,t.method="get",this.send(t).then((function(e){return e.body}))},t.prototype.post=function(e,t,n){return(n=n||{}).url=e,n.method="post",n.data=t,this.send(n)},t.prototype.put=function(e,t,n){return(n=n||{}).url=e,n.method="put",n.data=t,this.send(n)},t.prototype.patch=function(e,t,n){return(n=n||{}).url=e,n.method="patch",n.data=t,this.send(n)},t.prototype.delete=function(e,t){return(t=t||{}).url=e,t.method="delete",this.send(t)},t.prototype.head=function(e,t){return(t=t||{}).url=e,t.method="head",this.send(t)},t.prototype.jsonp=function(e,t){return(t=t||{}).url=e,t.method="jsonp",this.send(t)},t.prototype.upload=function(e,t,n){var o=new i.HttpRequest("POST",e,t,{reportProgress:!0});return this.httpClient.request(o)},t.prototype.uploadFile=function(e,t,n,i){var o=this;return new Promise((function(a,r){n.request=o.upload(e,t,i).subscribe((function(e){if(e.type===p.UploadProgress){var t=Math.round(100*e.loaded/e.total);i.notify(t)}e.type===p.Response&&a(e.body)}),(function(e){r(e)}))}))},t.prototype.registerOnSessionTimeout=function(e){this.sessionTimeoutObservable.asObservable().subscribe(e)},t.prototype.on401=function(){this.sessionTimeoutObservable.next()},t.prototype.pushToSessionFailureQueue=function(e){this.sessionTimeoutQueue.push({callback:e})},t.prototype.executeSessionFailureRequests=function(){var e=this.sessionTimeoutQueue,t=this;t.sessionTimeoutQueue=[],e.forEach((function(e){_.isFunction(e.callback)?e.callback():(e.requestInfo.headers.headers.delete("x-wm-xsrf-token"),t.httpClient.request(e.requestInfo).subscribe((function(t){t&&t.type&&e.sub401&&e.sub401.next(t)}),(function(t){e.sub401.error(t)})))}))},t}(o.AbstractHttpService);d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:i.HttpClient}]};var u=function(){function e(){this.headers=[]}return e.prototype.wmToAngularRequest=function(e){var t;return(t=(t=new i.HttpRequest(e.method,e.url)).clone()).body=e.body,t.method=e.method,t.responseType=e.responseType,t.reportProgress=e.reportProgress,t.urlWithParams=e.url,t.withCredentials=e.withCredentials,e.headers.forEach((function(e,n){t.headers=t.headers.append(n,e)})),t},e.prototype.angularToWmRequest=function(t){var n=new e,i=new Map;return n.body=t.body,n.method=t.method,n.responseType=t.responseType,n.reportProgress=t.reportProgress,n.url=t.urlWithParams,n.withCredentials=t.withCredentials,t.headers.keys().forEach((function(e){i.set(e,t.headers.headers.get(e.toLowerCase())[0])})),n.headers=i,n},e}(),h=function(e){function t(){return e.call(this)||this}return l(t,e),t.prototype.wmToAngularResponse=function(e){var t;return(t=(t=new i.HttpResponse).clone()).body=e.body,t.error=e.error,t.message=e.message,t.url=e.url,t.ok=e.ok,t.status=e.status,t.statusText=e.statusText,e.headers.forEach((function(e,n){t.headers=t.headers.append(n,e)})),t},t.prototype.angularToWmResponse=function(e){var n,i=new Map;return(n=new t).body=e.body,n.error=e.error,n.message=e.message,n.url=e.url,n.ok=e.ok,n.status=e.status,n.statusText=e.statusText,e.headers.keys().forEach((function(t){i.set(t,e.headers.headers.get(t.toLowerCase())[0])})),n.headers=i,n},t}(u),m=function(){function e(){}return e.forRoot=function(){return{ngModule:n.CommonModule,providers:[{provide:o.AbstractHttpService,useClass:d}]}},e}();m.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.HttpClientModule],declarations:[]}]}],e.HttpServiceImpl=d,e.HttpServiceModule=m,e.WmHttpRequest=u,e.WmHttpResponse=h,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/oAuth",["exports","@angular/core","rxjs","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.oAuth={}),e.ng.core,e.rxjs,e.wm.core)}(this,(function(e,t,n,i){"use strict";var o,a,r=".access_token",s="pkce",l="implicit",c=function(e){var t,n,i,o=e.urlParams;if(i={url:"services/oauth2/:providerId/authorizationUrl",method:"GET"},e.config)for(var a in i.url=(e.config.url||"")+i.url,i.method=e.config.method||i.method,i.headers=i.headers||{},e.config.headers)t=e.config.headers[a],i.headers[a]=t;if(o)for(n in o)o.hasOwnProperty(n)&&(t=o[n],_.isUndefined(t)||null===t||(i.url=i.url.replace(new RegExp(":"+n,"g"),t)));return e.params&&(i.params=e.params),_.isUndefined(e.data)||(i.data=e.data),e.dataParams&&(i.data.params=e.dataParams),e.headers&&(i.headers=e.headers),i.byPassResult=e.byPassResult,i.isDirectCall=e.isDirectCall,i.isExtURL=e.isExtURL,i.preventMultiple=e.preventMultiple,i.responseType=e.responseType,i},p={},d="WM_RUN_",u="width=400,height=600",h=function(e){var t=m(e);localStorage.removeItem(t)};function m(e){return d+i._WM_APP_PROJECT.id+"_"+e+r}function f(e,t){var n=m(e);localStorage.setItem(n,t)}function g(e,t,n,i,l,c){var p=e+r,d=localStorage.getItem(p);if((!i||i.origin===window.location.origin)&&d)if(P(c,s)){var u="client_id="+c.clientId+"&code="+d+"&grant_type=authorization_code&code_verifier="+o+"&redirect_uri="+a;l.send({method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:c.accessTokenUrl,data:u}).then((function(i){v(e,t,n,p,i.body.access_token)}))}else v(e,t,n,p,d)}function v(e,t,n,i,o){n(e),localStorage.removeItem(i),f(e,o),window.removeEventListener("message",p[e]),setTimeout((function(){delete p[e],t&&t(o)}))}function y(e,t,n,i,o,a){var s;s="dummy_key",localStorage.setItem(s,s),localStorage.removeItem(s);var l=moment.duration(moment().format("HH:mm"),"HH:mm").subtract(i),c=T(e,!0);c?(o.accesstoken_retrieved=!0,f(e,c),localStorage.removeItem(e+r),a(e),t&&t()):l.minutes()>1&&t&&!o.accesstoken_retrieved?t("error"):setTimeout((function(){y(e,t,n,i,o,a)}),3e3)}function b(e,t,n,i){e&&p[t]&&(e.closed?P(i,s)||(window.removeEventListener("message",p[t]),delete p[t],n&&n("error")):setTimeout(b.bind(void 0,e,t,n,i),3e3))}function w(e,t,n,i,o,a,r,s,c){P(a,l)&&(e=R(t,a,r,null,s,c)),window.open(e,"_blank",u),y(t,n,i,moment.duration(moment().format("HH:mm"),"HH:mm"),{accesstoken_retrieved:!1},o)}function P(e,t){var n=_.get(e,"oauth2Flow");return n=n?n.toLowerCase():n,t===s&&!0===_.get(e,"oAuth2Pkce.enabled")&&(n=s),n===t}function O(e,t,n,i,a,r,c,p,d){if(P(a,l))E(e=R(t,a,r,null,c,p),t,n,i,a,r,c,p,d);else if(P(a,s)){v=new Uint32Array(28),window.crypto.getRandomValues(v),o=Array.from(v,(function(e){return("0"+e.toString(16)).substr(-2)})).join("");if("plain"===_.get(a,"oAuth2Pkce.challengeMethod"))E(e=R(t,a,r,o,c,p),t,n,i,a,r,c,p,d);else{var u=(m=o,f=(new TextEncoder).encode(m),(g=new jsSHA("SHA-256","UINT8ARRAY",{encoding:"UTF8"})).update(f),g.getHash("ARRAYBUFFER"));h=u,E(e=R(t,a,r,btoa(String.fromCharCode.apply(null,new Uint8Array(h))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),c,p),t,n,i,a,r,c,p,d)}}else E(e,t,n,i,a,r,c,p,d);var h,m,f,g,v}function E(e,t,n,o,a,s,l,c,d){var h;i.hasCordova()?(window.open(e,"_system"),window.OAuthInMobile(t).then((function(e){var i=t+r;e?(localStorage.setItem(i,e),g(t,n,o,null,d,a)):n("error")}))):(h=window.open(e,"_blank",u),function(e,t,n,i,o){p[e]=g.bind(void 0,e,t,n,null,i,o),window.addEventListener("message",p[e],!1)}(t,n,o,d,a),b(h,t,n,a))}function R(e,t,n,o,c,p){a=window.location.href.split("/#/")[0]+"/oAuthCallback.html";var d,u=t.clientId,h=t.scopes.map((function(e){return e.name})).join(" ");!0===i.getWmProjectProperties().isTestRuntime&&(a=location.protocol+"//"+window.location.host+"/studio/oAuthCallback.html"),"MOBILE"===n&&(a=p+"oAuthCallback.html");var m=P(t,l)?l:s;d={providerId:e,suffix:r,requestSourceType:n,flow:m,scheme:c};var f,g=t.authorizationUrl.split("?");f=1===g.length?"?":g.length>1&&""!==g[1]?"&":"";var v,y=t.authorizationUrl+f+"client_id="+u+"&redirect_uri="+a+"&state="+encodeURIComponent(JSON.stringify(d))+"&scope="+encodeURIComponent(h);m===l?v=y+"&response_type="+(t.responseType?t.responseType:"token"):v=y+"&response_type=code&code_challenge="+o+"&code_challenge_method="+_.get(t,"oAuth2Pkce.challengeMethod");return v}function A(e,t,n,o,a,r,c,p,d,u,h){var m=P(p,l)||P(p,s)?e:e.body;r({name:t,url:m,invoke:function(){i.isIE()?w(e,t,n,o,c,p,d,u,h):O(m,t,n,c,p,d,u,h,a)}})}var T=function(e,t){var n=m(e);return t?localStorage.getItem(e+r):localStorage.getItem(n)},S=function(e,t,n,o,a,r,p,d,u,h){var m="WEB";if(e)i.isIE()?w(e,t,n,o,p):O(e,t,n,p,d,m,a);else{if(i.hasCordova()&&(m="MOBILE"),!P(d,l)&&!P(d,s))return function(e,t){var n=c({target:"oauthConfiguration",action:"getAuthorizationUrl",urlParams:{projectId:i._WM_APP_PROJECT.id,providerId:e.providerId},params:{requestSourceType:e.requestSourceType}});return t.send(n)}({providerId:t,requestSourceType:m},a).then((function(e){A(e,t,n,o,a,r,p,d,m,u,h)}));A(e,t,n,o,a,r,p,d,m,u,h)}},C=function(){function e(e){this.httpService=e,this.providers=new n.Subject,this.providersConfig=[]}return e.prototype.getOAuthProvidersAsObservable=function(){return this.providers.asObservable()},e.prototype.addProviderConfig=function(e){_.find(this.providersConfig,{name:e.name})||this.providersConfig.push(e),this.providers.next(this.providersConfig)},e.prototype.removeProviderConfig=function(e){_.remove(this.providersConfig,(function(t){return t.name===e})),this.providers.next(this.providersConfig)},e.prototype.perfromOAuthorization=function(e,t,n,i,o,a,r){S(e,t,n,i,this.httpService,this.addProviderConfig.bind(this),this.removeProviderConfig.bind(this),o,a,r)},e.prototype.getAccessToken=function(e,t){return T(e,t)},e.prototype.removeAccessToken=function(e){h(e)},e}();C.decorators=[{type:t.Injectable}],C.ctorParameters=function(){return[{type:i.AbstractHttpService}]};var I=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[C]}},e}();I.decorators=[{type:t.NgModule,args:[{}]}],e.OAuthModule=I,e.OAuthService=C,e.getAccessToken=T,e.parseConfig=c,e.performAuthorization=S,e.removeAccessToken=h,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/security",["exports","@angular/core","@angular/common","@angular/router","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.security={}),e.ng.core,e.ng.common,e.ng.router,e.wm.core)}(this,(function(e,t,n,i,o){"use strict";var a="wm_xsrf_token",r=function(){function e(e,t,n,i,o){this.injector=e,this.$http=t,this.routerService=n,this.activatedRoute=i,this._location=o,this.requestQueue={}}return e.prototype.isLoaded=function(){return this.config},e.prototype.get=function(){return this.config},e.prototype.load=function(e){var t=this;return this.loadPromise?this.loadPromise:!e&&this.config?Promise.resolve(this.config):(this.loadPromise=new Promise((function(e,n){t.$http.send({url:"./services/security/info",method:"GET"}).then((function(n){t.config=n.body,t.lastLoggedInUser=o.getClonedObject(t.loggedInUser),t.loggedInUser=t.config.userInfo,e(n.body)})).catch((function(e){n(e)})).finally((function(){t.loadPromise=null}))})),this.loadPromise)},e.prototype.getWebConfig=function(e,t){this.get()?o.triggerFn(e,this.get()):this.load().then((function(t){o.triggerFn(e,t)}),t)},e.prototype.getConfig=function(e,t){function n(e,t,n){_.forEach(this.requestQueue[e],(function(e){return o.triggerFn(e[t],n)})),this.requestQueue[e]=null}this.get()?o.triggerFn(e,this.get()):(this.requestQueue.config=this.requestQueue.config||[],this.requestQueue.config.push({success:e,error:t}),this.requestQueue.config.length>1||o.hasCordova()||this.getWebConfig(function(e){e.homePage=o.getWmProjectProperties().homePage,e.userInfo,this.config=e,this.lastLoggedInUser=o.getClonedObject(this.loggedInUser),this.loggedInUser=e.userInfo,n.call(this,"config","success",this.get())}.bind(this),function(e){n.call(this,"config","error",e)}.bind(this)))},e.prototype.getLastLoggedInUsername=function(){return this.lastLoggedInUser&&this.lastLoggedInUser.userName},e.prototype.getCurrentRoutePage=function(){var e=this._location.path(),t=e.indexOf("?");return t=-1===t?e.length:t-1,e.substr(1,t)},e.prototype.getCurrentRouteQueryParam=function(e){var t;return this.activatedRoute.queryParams.subscribe((function(n){t=n[e]})),t},e.prototype.isNoPageLoaded=function(){return!_.isEmpty(this.getCurrentRoutePage())},e.prototype.getPageByLoggedInUser=function(){var e=this;return new Promise((function(t){var n;e.getConfig((function(i){i.securityEnabled&&i.authenticated?(n=i.userInfo.landingPage||o.getWmProjectProperties().homePage,e.isXsrfEnabled()):n=o.getWmProjectProperties().homePage,t(n)}),(function(){t(o.getWmProjectProperties().homePage)}))}))},e.prototype.loadPageByUserRole=function(e){var t=this;return this.getPageByLoggedInUser().then((function(n){(t.isNoPageLoaded()||e)&&(t.getCurrentRoutePage()===n?window.location.reload():t.routerService.navigate(["/"+n]))}))},e.prototype.navigateOnLogin=function(){this.loadPageByUserRole(!0)},e.prototype.getRedirectPage=function(e,t){var n,i=o.getWmProjectProperties().homePage,a=_.get(e,"loginConfig.pageName"),r=t||this.getCurrentRoutePage();return r!==i&&r!==a||(n=this.getCurrentRouteQueryParam("redirectTo"),r=_.isEmpty(n)?void 0:n),r},e.prototype.getRedirectedRouteQueryParams=function(){var e={};return this.activatedRoute.queryParams.subscribe((function(t){_.forEach(t,(function(t,n){e[n]=t}))})),e},e.prototype.getQueryString=function(e){var t=[];return _.forEach(e,(function(e,n){t.push(n+"="+e)})),_.join(t,"&")},e.prototype.appLogin=function(e,t,n){var i=this,r="";return _.each(e,(function(e,t){r+=(r?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)})),this.$http.send({method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:"j_spring_security_check",data:r}).then((function(e){var n=e.body?e.body.wm_xsrf_token:"";n&&o.hasCordova()&&localStorage.setItem(a,n||""),i.injector.get(o.App).notify("userLoggedIn",{}),o.triggerFn(t,e)}),n)},e.prototype.isAuthenticated=function(e,t){this.getConfig((function(t){o.triggerFn(e,t.authenticated)}),t)},e.prototype.appLogout=function(e,t){var n=this;return this.$http.send({target:"Security",url:"j_spring_security_logout",method:"POST",responseType:"text",byPassResult:!0}).then((function(t){_.set(n.get(),"authenticated",!1),_.set(n.get(),"userInfo",null),n.injector.get(o.App).notify("userLoggedOut",{}),o.triggerFn(e,t)}),t)},e.prototype.getCookieByName=function(e){return"cookie"},e.prototype.isXsrfEnabled=function(){return o.hasCordova()?localStorage.getItem(a):this.getCookieByName(a)},e.prototype.onUserLogin=function(){var e=this;return new Promise((function(t,n){e.getConfig((function(n){if(n.securityEnabled)if(n.authenticated)t();else var i=e.injector.get(o.App).subscribe("userLoggedIn",(function(){t(),i()}));else t()}),n)}))},e.prototype.getLoggedInUser=function(){var e=this;return new Promise((function(t,n){e.getConfig((function(e){e&&e.userInfo?t(e.userInfo):n()}),n)}))},e.prototype.authInBrowser=function(){return Promise.reject("This authInBrowser should not be called")},e}();r.decorators=[{type:t.Injectable}],r.ctorParameters=function(){return[{type:t.Injector},{type:o.AbstractHttpService},{type:i.Router},{type:i.ActivatedRoute},{type:n.Location}]};var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[r]}},e}();s.decorators=[{type:t.NgModule,args:[{}]}],e.SecurityModule=s,e.SecurityService=r,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/core"),require("@wm/security"),require("@wavemaker/focus-trap/dist/focus-trap"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("@angular/forms"),require("@swipey")):"function"==typeof define&&define.amd?define("@wm/components/base",["exports","@angular/core","@angular/common","@wm/core","@wm/security","@wavemaker/focus-trap/dist/focus-trap","@angular/platform-browser","rxjs","rxjs/operators","@angular/forms","@swipey"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.base={}),e.ng.core,e.ng.common,e.wm.core,e.wm.security,e.focusTrap,e.ng.platformBrowser,e.rxjs,e.rxjs.operators,e.ng.forms,e.swipey)}(this,(function(e,t,n,i,o,a,r,s,l,c,p){"use strict";
|
|
29
|
+
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}var p;Object.create;!function(e){e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User"}(p||(p={}));var d=function(e){function t(t){var n=e.call(this)||this;return n.httpClient=t,n.nonBodyTypeMethods=["GET","DELETE","HEAD","OPTIONS","JSONP"],n.sessionTimeoutObservable=new a.Subject,n.sessionTimeoutQueue=[],n}return l(t,e),t.prototype.handleSessionTimeout=function(e,t){this.sessionTimeoutQueue.push({requestInfo:e,sub401:t}),this.on401()},t.prototype.generateRequest=function(e){var t,n,a=new i.HttpHeaders,r=new i.HttpParams,s=e.headers,l=e.params,p=e.responseType,d=e.withCredentials;e.isDirectCall||(a=a.append("X-Requested-With","XMLHttpRequest")),s&&Object.entries(s).forEach((function(e){var t=c(e,2),n=t[0],i=t[1];(o.isNumber(i)||o.isBoolean(i))&&(i=i.toString()),a=a.append(n,i)})),l&&Object.entries(l).forEach((function(e){var t=c(e,2),n=t[0],i=t[1];return r=r.append(n,i)}));var u={headers:a,params:r,responseType:p,withCredentials:d};return _.includes(this.nonBodyTypeMethods,e.method&&e.method.toUpperCase())&&void 0===e.data?(t=u,n=null):(t=e.data,n=u),new i.HttpRequest(e.method,e.url,t,n)},t.prototype.sendCallAsObservable=function(e,t){var n=this.generateRequest(e);return this.httpClient.request(n)},t.prototype.sendCall=function(e,t,n){var i=this;return new Promise((function(o,a){t._observable=i.sendCallAsObservable(e,n).subscribe((function(e){e&&e.type&&o(e)}),(function(e){a(e)}))}))},t.prototype.send=function(e){var t=this,n=this.generateRequest(e);return new Promise((function(e,i){t.httpClient.request(n).toPromise().then((function(t){e(t)}),(function(n){if(t.isPlatformSessionTimeout(n))n._401Subscriber.asObservable().subscribe((function(t){e(t)}),(function(e){i(e)}));else{var o=r.getErrMessage(n,t.getLocale());i({error:o,details:n})}}))}))},t.prototype.cancel=function(e,t){e._observable&&e._observable.unsubscribe(),t&&t._uploadProgress&&t._uploadProgress.unsubscribe()},t.prototype.setLocale=function(e){this.localeObject=e},t.prototype.getLocale=function(){return this.localeObject},t.prototype.getHeader=function(e,t){return e.headers.get(t)},t.prototype.isPlatformSessionTimeout=function(e){return 401===e.status&&"Session Not Found"===this.getHeader(e,"x-wm-login-errormessage")},t.prototype.get=function(e,t){return(t=t||{}).url=e,t.method="get",this.send(t).then((function(e){return e.body}))},t.prototype.post=function(e,t,n){return(n=n||{}).url=e,n.method="post",n.data=t,this.send(n)},t.prototype.put=function(e,t,n){return(n=n||{}).url=e,n.method="put",n.data=t,this.send(n)},t.prototype.patch=function(e,t,n){return(n=n||{}).url=e,n.method="patch",n.data=t,this.send(n)},t.prototype.delete=function(e,t){return(t=t||{}).url=e,t.method="delete",this.send(t)},t.prototype.head=function(e,t){return(t=t||{}).url=e,t.method="head",this.send(t)},t.prototype.jsonp=function(e,t){return(t=t||{}).url=e,t.method="jsonp",this.send(t)},t.prototype.upload=function(e,t,n){var o=new i.HttpRequest("POST",e,t,{reportProgress:!0});return this.httpClient.request(o)},t.prototype.uploadFile=function(e,t,n,i){var o=this;return new Promise((function(a,r){n.request=o.upload(e,t,i).subscribe((function(e){if(e.type===p.UploadProgress){var t=Math.round(100*e.loaded/e.total);i.notify(t)}e.type===p.Response&&a(e.body)}),(function(e){r(e)}))}))},t.prototype.registerOnSessionTimeout=function(e){this.sessionTimeoutObservable.asObservable().subscribe(e)},t.prototype.on401=function(){this.sessionTimeoutObservable.next()},t.prototype.pushToSessionFailureQueue=function(e){this.sessionTimeoutQueue.push({callback:e})},t.prototype.executeSessionFailureRequests=function(){var e=this.sessionTimeoutQueue,t=this;t.sessionTimeoutQueue=[],e.forEach((function(e){_.isFunction(e.callback)?e.callback():(e.requestInfo.headers.headers.delete("x-wm-xsrf-token"),t.httpClient.request(e.requestInfo).subscribe((function(t){t&&t.type&&e.sub401&&e.sub401.next(t)}),(function(t){e.sub401.error(t)})))}))},t}(o.AbstractHttpService);d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:i.HttpClient}]};var u=function(){function e(){this.headers=[]}return e.prototype.wmToAngularRequest=function(e){var t;return(t=(t=new i.HttpRequest(e.method,e.url)).clone()).body=e.body,t.method=e.method,t.responseType=e.responseType,t.reportProgress=e.reportProgress,t.urlWithParams=e.url,t.withCredentials=e.withCredentials,e.headers.forEach((function(e,n){t.headers=t.headers.append(n,e)})),t},e.prototype.angularToWmRequest=function(t){var n=new e,i=new Map;return n.body=t.body,n.method=t.method,n.responseType=t.responseType,n.reportProgress=t.reportProgress,n.url=t.urlWithParams,n.withCredentials=t.withCredentials,t.headers.keys().forEach((function(e){i.set(e,t.headers.headers.get(e.toLowerCase())[0])})),n.headers=i,n},e}(),h=function(e){function t(){return e.call(this)||this}return l(t,e),t.prototype.wmToAngularResponse=function(e){var t;return(t=(t=new i.HttpResponse).clone()).body=e.body,t.error=e.error,t.message=e.message,t.url=e.url,t.ok=e.ok,t.status=e.status,t.statusText=e.statusText,e.headers.forEach((function(e,n){t.headers=t.headers.append(n,e)})),t},t.prototype.angularToWmResponse=function(e){var n,i=new Map;return(n=new t).body=e.body,n.error=e.error,n.message=e.message,n.url=e.url,n.ok=e.ok,n.status=e.status,n.statusText=e.statusText,e.headers.keys().forEach((function(t){i.set(t,e.headers.headers.get(t.toLowerCase())[0])})),n.headers=i,n},t}(u),m=function(){function e(){}return e.forRoot=function(){return{ngModule:n.CommonModule,providers:[{provide:o.AbstractHttpService,useClass:d}]}},e}();m.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.HttpClientModule],declarations:[]}]}],e.HttpServiceImpl=d,e.HttpServiceModule=m,e.WmHttpRequest=u,e.WmHttpResponse=h,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/oAuth",["exports","@angular/core","rxjs","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.oAuth={}),e.ng.core,e.rxjs,e.wm.core)}(this,(function(e,t,n,i){"use strict";var o,a,r=".access_token",s="pkce",l="implicit",c=function(e){var t,n,i,o=e.urlParams;if(i={url:"services/oauth2/:providerId/authorizationUrl",method:"GET"},e.config)for(var a in i.url=(e.config.url||"")+i.url,i.method=e.config.method||i.method,i.headers=i.headers||{},e.config.headers)t=e.config.headers[a],i.headers[a]=t;if(o)for(n in o)o.hasOwnProperty(n)&&(t=o[n],_.isUndefined(t)||null===t||(i.url=i.url.replace(new RegExp(":"+n,"g"),t)));return e.params&&(i.params=e.params),_.isUndefined(e.data)||(i.data=e.data),e.dataParams&&(i.data.params=e.dataParams),e.headers&&(i.headers=e.headers),i.byPassResult=e.byPassResult,i.isDirectCall=e.isDirectCall,i.isExtURL=e.isExtURL,i.preventMultiple=e.preventMultiple,i.responseType=e.responseType,i},p={},d="WM_RUN_",u="width=400,height=600",h=function(e){var t=m(e);localStorage.removeItem(t)};function m(e){return d+i._WM_APP_PROJECT.id+"_"+e+r}function f(e,t){var n=m(e);localStorage.setItem(n,t)}function g(e,t,n,i,l,c){var p=e+r,d=localStorage.getItem(p);if((!i||i.origin===window.location.origin)&&d)if(P(c,s)){var u="client_id="+c.clientId+"&code="+d+"&grant_type=authorization_code&code_verifier="+o+"&redirect_uri="+a;l.send({method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:c.accessTokenUrl,data:u}).then((function(i){v(e,t,n,p,i.body.access_token)}))}else v(e,t,n,p,d)}function v(e,t,n,i,o){n(e),localStorage.removeItem(i),f(e,o),window.removeEventListener("message",p[e]),setTimeout((function(){delete p[e],t&&t(o)}))}function y(e,t,n,i,o,a){var s;s="dummy_key",localStorage.setItem(s,s),localStorage.removeItem(s);var l=moment.duration(moment().format("HH:mm"),"HH:mm").subtract(i),c=T(e,!0);c?(o.accesstoken_retrieved=!0,f(e,c),localStorage.removeItem(e+r),a(e),t&&t()):l.minutes()>1&&t&&!o.accesstoken_retrieved?t("error"):setTimeout((function(){y(e,t,n,i,o,a)}),3e3)}function b(e,t,n,i){e&&p[t]&&(e.closed?P(i,s)||(window.removeEventListener("message",p[t]),delete p[t],n&&n("error")):setTimeout(b.bind(void 0,e,t,n,i),3e3))}function w(e,t,n,i,o,a,r,s,c){P(a,l)&&(e=R(t,a,r,null,s,c)),window.open(e,"_blank",u),y(t,n,i,moment.duration(moment().format("HH:mm"),"HH:mm"),{accesstoken_retrieved:!1},o)}function P(e,t){var n=_.get(e,"oauth2Flow");return n=n?n.toLowerCase():n,t===s&&!0===_.get(e,"oAuth2Pkce.enabled")&&(n=s),n===t}function O(e,t,n,i,a,r,c,p,d){if(P(a,l))E(e=R(t,a,r,null,c,p),t,n,i,a,r,c,p,d);else if(P(a,s)){v=new Uint32Array(28),window.crypto.getRandomValues(v),o=Array.from(v,(function(e){return("0"+e.toString(16)).substr(-2)})).join("");if("plain"===_.get(a,"oAuth2Pkce.challengeMethod"))E(e=R(t,a,r,o,c,p),t,n,i,a,r,c,p,d);else{var u=(m=o,f=(new TextEncoder).encode(m),(g=new jsSHA("SHA-256","UINT8ARRAY",{encoding:"UTF8"})).update(f),g.getHash("ARRAYBUFFER"));h=u,E(e=R(t,a,r,btoa(String.fromCharCode.apply(null,new Uint8Array(h))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),c,p),t,n,i,a,r,c,p,d)}}else E(e,t,n,i,a,r,c,p,d);var h,m,f,g,v}function E(e,t,n,o,a,s,l,c,d){var h;i.hasCordova()?(window.open(e,"_system"),window.OAuthInMobile(t).then((function(e){var i=t+r;e?(localStorage.setItem(i,e),g(t,n,o,null,d,a)):n("error")}))):(h=window.open(e,"_blank",u),function(e,t,n,i,o){p[e]=g.bind(void 0,e,t,n,null,i,o),window.addEventListener("message",p[e],!1)}(t,n,o,d,a),b(h,t,n,a))}function R(e,t,n,o,c,p){a=window.location.href.split("/#/")[0]+"/oAuthCallback.html";var d,u=t.clientId,h=t.scopes.map((function(e){return e.name})).join(" ");!0===i.getWmProjectProperties().isTestRuntime&&(a=location.protocol+"//"+window.location.host+"/studio/oAuthCallback.html"),"MOBILE"===n&&(a=p+"oAuthCallback.html");var m=P(t,l)?l:s;d={providerId:e,suffix:r,requestSourceType:n,flow:m,scheme:c};var f,g=t.authorizationUrl.split("?");f=1===g.length?"?":g.length>1&&""!==g[1]?"&":"";var v,y=t.authorizationUrl+f+"client_id="+u+"&redirect_uri="+a+"&state="+encodeURIComponent(JSON.stringify(d))+"&scope="+encodeURIComponent(h);m===l?v=y+"&response_type="+(t.responseType?t.responseType:"token"):v=y+"&response_type=code&code_challenge="+o+"&code_challenge_method="+_.get(t,"oAuth2Pkce.challengeMethod");return v}function A(e,t,n,o,a,r,c,p,d,u,h){var m=P(p,l)||P(p,s)?e:e.body;r({name:t,url:m,invoke:function(){i.isIE()?w(e,t,n,o,c,p,d,u,h):O(m,t,n,c,p,d,u,h,a)}})}var T=function(e,t){var n=m(e);return t?localStorage.getItem(e+r):localStorage.getItem(n)},S=function(e,t,n,o,a,r,p,d,u,h){var m="WEB";if(e)i.isIE()?w(e,t,n,o,p):O(e,t,n,p,d,m,a);else{if(i.hasCordova()&&(m="MOBILE"),!P(d,l)&&!P(d,s))return function(e,t){var n=c({target:"oauthConfiguration",action:"getAuthorizationUrl",urlParams:{projectId:i._WM_APP_PROJECT.id,providerId:e.providerId},params:{requestSourceType:e.requestSourceType}});return t.send(n)}({providerId:t,requestSourceType:m},a).then((function(e){A(e,t,n,o,a,r,p,d,m,u,h)}));A(e,t,n,o,a,r,p,d,m,u,h)}},C=function(){function e(e){this.httpService=e,this.providers=new n.Subject,this.providersConfig=[]}return e.prototype.getOAuthProvidersAsObservable=function(){return this.providers.asObservable()},e.prototype.addProviderConfig=function(e){_.find(this.providersConfig,{name:e.name})||this.providersConfig.push(e),this.providers.next(this.providersConfig)},e.prototype.removeProviderConfig=function(e){_.remove(this.providersConfig,(function(t){return t.name===e})),this.providers.next(this.providersConfig)},e.prototype.perfromOAuthorization=function(e,t,n,i,o,a,r){S(e,t,n,i,this.httpService,this.addProviderConfig.bind(this),this.removeProviderConfig.bind(this),o,a,r)},e.prototype.getAccessToken=function(e,t){return T(e,t)},e.prototype.removeAccessToken=function(e){h(e)},e}();C.decorators=[{type:t.Injectable}],C.ctorParameters=function(){return[{type:i.AbstractHttpService}]};var I=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[C]}},e}();I.decorators=[{type:t.NgModule,args:[{}]}],e.OAuthModule=I,e.OAuthService=C,e.getAccessToken=T,e.parseConfig=c,e.performAuthorization=S,e.removeAccessToken=h,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/security",["exports","@angular/core","@angular/common","@angular/router","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.security={}),e.ng.core,e.ng.common,e.ng.router,e.wm.core)}(this,(function(e,t,n,i,o){"use strict";var a="wm_xsrf_token",r=function(){function e(e,t,n,i,o){this.injector=e,this.$http=t,this.routerService=n,this.activatedRoute=i,this._location=o,this.requestQueue={}}return e.prototype.isLoaded=function(){return this.config},e.prototype.get=function(){return this.config},e.prototype.load=function(e){var t=this;return this.loadPromise?this.loadPromise:!e&&this.config?Promise.resolve(this.config):(this.loadPromise=new Promise((function(e,n){t.$http.send({url:"./services/security/info",method:"GET"}).then((function(n){t.config=n.body,t.lastLoggedInUser=o.getClonedObject(t.loggedInUser),t.loggedInUser=t.config.userInfo,e(n.body)})).catch((function(e){n(e)})).finally((function(){t.loadPromise=null}))})),this.loadPromise)},e.prototype.getWebConfig=function(e,t){this.get()?o.triggerFn(e,this.get()):this.load().then((function(t){o.triggerFn(e,t)}),t)},e.prototype.getConfig=function(e,t){function n(e,t,n){_.forEach(this.requestQueue[e],(function(e){return o.triggerFn(e[t],n)})),this.requestQueue[e]=null}this.get()?o.triggerFn(e,this.get()):(this.requestQueue.config=this.requestQueue.config||[],this.requestQueue.config.push({success:e,error:t}),this.requestQueue.config.length>1||o.hasCordova()||this.getWebConfig(function(e){e.homePage=o.getWmProjectProperties().homePage,e.userInfo,this.config=e,this.lastLoggedInUser=o.getClonedObject(this.loggedInUser),this.loggedInUser=e.userInfo,n.call(this,"config","success",this.get())}.bind(this),function(e){n.call(this,"config","error",e)}.bind(this)))},e.prototype.getLastLoggedInUsername=function(){return this.lastLoggedInUser&&this.lastLoggedInUser.userName},e.prototype.getCurrentRoutePage=function(){var e=this._location.path(),t=e.indexOf("?");return t=-1===t?e.length:t-1,e.substr(1,t)},e.prototype.getCurrentRouteQueryParam=function(e){var t;return this.activatedRoute.queryParams.subscribe((function(n){t=n[e]})),t},e.prototype.isNoPageLoaded=function(){return!_.isEmpty(this.getCurrentRoutePage())},e.prototype.getPageByLoggedInUser=function(){var e=this;return new Promise((function(t){var n;e.getConfig((function(i){i.securityEnabled&&i.authenticated?(n=i.userInfo.landingPage||o.getWmProjectProperties().homePage,e.isXsrfEnabled()):n=o.getWmProjectProperties().homePage,t(n)}),(function(){t(o.getWmProjectProperties().homePage)}))}))},e.prototype.loadPageByUserRole=function(e){var t=this;return this.getPageByLoggedInUser().then((function(n){(t.isNoPageLoaded()||e)&&(t.getCurrentRoutePage()===n?window.location.reload():t.routerService.navigate(["/"+n]))}))},e.prototype.navigateOnLogin=function(){this.loadPageByUserRole(!0)},e.prototype.getRedirectPage=function(e,t){var n,i=o.getWmProjectProperties().homePage,a=_.get(e,"loginConfig.pageName"),r=t||this.getCurrentRoutePage();return r!==i&&r!==a||(n=this.getCurrentRouteQueryParam("redirectTo"),r=_.isEmpty(n)?void 0:n),r},e.prototype.getRedirectedRouteQueryParams=function(){var e={};return this.activatedRoute.queryParams.subscribe((function(t){_.forEach(t,(function(t,n){e[n]=t}))})),e},e.prototype.getQueryString=function(e){var t=[];return _.forEach(e,(function(e,n){t.push(n+"="+e)})),_.join(t,"&")},e.prototype.appLogin=function(e,t,n){var i=this,r="";return _.each(e,(function(e,t){r+=(r?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(e)})),this.$http.send({method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},url:"j_spring_security_check",data:r}).then((function(e){var n=e.body?e.body.wm_xsrf_token:"";n&&o.hasCordova()&&localStorage.setItem(a,n||""),i.injector.get(o.App).notify("userLoggedIn",{}),o.triggerFn(t,e)}),n)},e.prototype.isAuthenticated=function(e,t){this.getConfig((function(t){o.triggerFn(e,t.authenticated)}),t)},e.prototype.appLogout=function(e,t){var n=this;return this.$http.send({target:"Security",url:"j_spring_security_logout",method:"POST",responseType:"text",byPassResult:!0}).then((function(t){_.set(n.get(),"authenticated",!1),_.set(n.get(),"userInfo",null),n.injector.get(o.App).notify("userLoggedOut",{}),o.triggerFn(e,t)}),t)},e.prototype.getCookieByName=function(e){return"cookie"},e.prototype.isXsrfEnabled=function(){return o.hasCordova()?localStorage.getItem(a):this.getCookieByName(a)},e.prototype.onUserLogin=function(){var e=this;return new Promise((function(t,n){e.getConfig((function(n){if(n.securityEnabled)if(n.authenticated)t();else var i=e.injector.get(o.App).subscribe("userLoggedIn",(function(){t(),i()}));else t()}),n)}))},e.prototype.getLoggedInUser=function(){var e=this;return new Promise((function(t,n){e.getConfig((function(e){e&&e.userInfo?t(e.userInfo):n()}),n)}))},e.prototype.authInBrowser=function(){return Promise.reject("This authInBrowser should not be called")},e}();r.decorators=[{type:t.Injectable}],r.ctorParameters=function(){return[{type:t.Injector},{type:o.AbstractHttpService},{type:i.Router},{type:i.ActivatedRoute},{type:n.Location}]};var s=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[r]}},e}();s.decorators=[{type:t.NgModule,args:[{}]}],e.SecurityModule=s,e.SecurityService=r,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/core"),require("@wm/security"),require("@wavemaker/focus-trap/dist/focus-trap"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("@angular/forms"),require("@swipey")):"function"==typeof define&&define.amd?define("@wm/components/base",["exports","@angular/core","@angular/common","@wm/core","@wm/security","@wavemaker/focus-trap/dist/focus-trap","@angular/platform-browser","rxjs","rxjs/operators","@angular/forms","@swipey"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.base={}),e.ng.core,e.ng.common,e.wm.core,e.wm.security,e.focusTrap,e.ng.platformBrowser,e.rxjs,e.rxjs.operators,e.ng.forms,e.swipey)}(this,(function(e,t,n,i,o,a,r,s,l,c,p){"use strict";
|
|
30
30
|
/*! *****************************************************************************
|
|
31
31
|
Copyright (c) Microsoft Corporation.
|
|
32
32
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
41
41
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
42
42
|
PERFORMANCE OF THIS SOFTWARE.
|
|
43
|
-
***************************************************************************** */var d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function h(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function m(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function v(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var y=function(){},b=function(){},w=new t.InjectionToken("Context Provider Reference"),P=new Set([i.FormWidgetType.SELECT,i.FormWidgetType.CHECKBOXSET,i.FormWidgetType.RADIOSET,i.FormWidgetType.SWITCH,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.CHIPS,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.RATING]),O=function(e){var t,n,i,o,a,r,s,l,c,p="";for(e=e.replace(/\$\[data\[\$i\]/g,"$[__1"),i=0;i<e.length;i++)if(t=e[i],n=e[i+1],"$"===t&&"["===n){for(r=1,c=!1,s=!1,o=i+2;o<e.length;o++)if(" "!==(a=e[o])&&(c||(s='"'===e[o]||"'"===e[o],c=!0),"["===a?r++:"]"===a&&r--,!r)){l=e.substring(i+2,o),p+=s?"__1["+l+"]":l;break}i=o}else p+=t;return p},E=function(e,t){var n;return t?(t.replace(/\[(\w+)\]/g,".$1").split(".").forEach((function(t){n=n&&n[t]||(_.isNull(e)?e:e[t])})),n):e},R=function(e,t,n){var o,a=t.field,r=t.expression,s=t.bindExpression;return s?(o=s.replace("bind:",""),i.checkIsCustomPipeExpression(o)&&(o+=": __1"),o=O(o)):o=r||a,s||r?i.$parseExpr(o)(n,Object.assign({},e,{__1:e})):_.get(e,a)},A=function(e,t){return!(!e||!t)&&(t=-1===t.indexOf("?")?t:t.substring(0,t.indexOf("?")),e=-1===e.indexOf("?")?e:e.substring(0,e.indexOf("?")),new RegExp("^(#/|#)"+t+"$").test(e))},T=function(e,t){return e.some((function(e){return!!A(e.link,t)||(e.children?T(e.children,t):void 0)}))},S=function(e){return P.has(e)},C=function(e,t,n){return i.isValidWebURL(e)||(e||(e=n||"resources/images/imagelists/default-image.png"),e=t?i.encodeUrl(e):e,i.stringStartsWith(e,"services/prefabs")),e},I=function(e){return""===e||"none"===e?e:"url("+C(e)+")"};function D(e,n,i){return{provide:n,useExisting:t.forwardRef((function(){return e})),multi:i}}function x(e){return D(e,y)}var N,k=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join("_")},M={number:["number","integer","big_integer","short","float","big_decimal","double","long","byte"],string:["string","text"],character:["character"],date:["date","time","timestamp","datetime"]},L={number:["exact","notequals","lessthan","lessthanequal","greaterthan","greaterthanequal","null","isnotnull"],string:["anywhereignorecase","anywhere","startignorecase","start","endignorecase","end","exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],character:["exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],date:["exact","lessthan","lessthanequal","greaterthan","greaterthanequal","null","notequals","isnotnull"]},F={boolean:["exact","null","isnotnull"],clob:[],blob:[]},j=function(e){var t=[];return _.isArray(e)?(e.forEach((function(e){t=t.concat(j(e))})),t):_.isObject(e)?(_.forEach(e,(function(e,n){e&&(t=t.concat(n.split(" ")))})),t):void 0},B=function(e,t){var n,i,o=e.toAdd||e,a=e.toRemove||t;return _.isObject(e)?(n=_.isArray(o)?o:j(o||[]),i=a?_.isArray(a)?a:j(a):[]):(n=o?[o]:[],i=a?[a]:[]),{toAdd:n,toRemove:i}},G=function(e,t,n,o){var a,r,s,l,c,p;o||(o={}),_.forEach(e,(function(e,d){_.includes(d,".")&&(l=_.split(d,"."),r=l[0],s=l[1],p=!0),o.noModifyTitle?a=d:_.isString(d)?(a=i.prettifyLabel(d),a=i.deHyphenate(a),a=n?i.initCaps(n)+" "+a:a):a=d,d=n?n+"."+d:d,c=p?(c=_.split(a," ")).length>1?c[c.length-2]+" "+c[c.length-1]:c[0]:a;var u=o.setBindingField?{displayName:c,field:d,relatedTable:r,relatedField:s||a}:{displayName:c,relatedTable:r,relatedField:s||a};if(!_.isObject(e)||_.isArray(e)&&!e[0]){if(o.upperBound&&o.columnCount===o.upperBound)return;t.terminals.push(u),o.columnCount+=1}else o.columnCount!==o.upperBound&&t.objects.push(u),_.isArray(e)&&e[0]?G(e[0],t,d+"[0]",o):G(e,t,d,o)}))},V=function(e){var t;return _.isArray(e)?_.isObject(e[0])?(t=i.getClonedObject(e[0]),_.forEach(e,(function(e,n){if(n+1>=10)return!1;_.assignWith(t,e,(function(e,t){return null==e?t:e}))}))):t=e[0]:t=e,t};e.APPLY_STYLES_TYPE=void 0,(N=e.APPLY_STYLES_TYPE||(e.APPLY_STYLES_TYPE={}))[N.CONTAINER=0]="CONTAINER",N[N.SCROLLABLE_CONTAINER=1]="SCROLLABLE_CONTAINER",N[N.INNER_SHELL=2]="INNER_SHELL",N[N.SHELL=3]="SHELL";var W={backgroundattachment:"backgroundAttachment",backgroundcolor:"backgroundColor",backgroundgradient:"backgroundGradient",backgroundimage:"backgroundImage",backgroundposition:"backgroundPosition",backgroundrepeat:"backgroundRepeat",backgroundsize:"backgroundSize",bordercolor:"borderColor",borderradius:"borderRadius",borderstyle:"borderStyle",borderwidth:"borderWidth",borderbottomwidth:"borderBottomWidth",borderleftwidth:"borderLeftWidth",borderrightwidth:"borderRightWidth",bordertopwidth:"borderTopWidth",color:"color",cursor:"cursor",display:"display",fontsize:"fontSize",fontfamily:"fontFamily",fontstyle:"fontStyle",fontunit:"fontunit",fontvariant:"fontVariant",fontweight:"fontWeight",height:"height",horizontalalign:"textAlign",lineheight:"lineHeight",margin:"margin",marginbottom:"marginBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",opacity:"opacity",overflow:"overflow",padding:"padding",paddingbottom:"paddingBottom",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",picturesource:"backgroundImage",textalign:"textAlign",textdecoration:"textDecoration",verticalalign:"verticalAlign",visibility:"visibility",whitespace:"whiteSpace",width:"width",wordbreak:"wordbreak",zindex:"zIndex"},U=function(e){return!!W[e]},q={height:!0,overflow:!0,padding:!0,paddingbottom:!0,paddingleft:!0,paddingright:!0,paddingtop:!0},z={textalign:!0},H={textalign:!0,width:!0};function Y(t,n,o,a){var r=Object.create(null);a&&a.forEach((function(e){return r[e]=!0})),n.registerStyleChangeListener((function(a,s){if(!(r[a]||o===e.APPLY_STYLES_TYPE.SHELL&&q[a])){if(o===e.APPLY_STYLES_TYPE.INNER_SHELL){if(!q[a])return;"height"===a&&i.setCSS(t,"overflow",s?"auto":"")}if(o!==e.APPLY_STYLES_TYPE.CONTAINER||!z[a]){if(o===e.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER){if(H[a])return;"height"===a&&i.setCSS(t,"overflow",s?"auto":"")}"fontsize"===a||"fontunit"===a?i.setCSS(t,"fontSize",""===n.fontsize?"":n.fontsize+(n.fontunit||"px")):"backgroundimage"===a?i.setCSS(t,"backgroundImage",n.picturesource||I(s)):W[a]&&i.setCSS(t,W[a],s)}}}))}var K,Q="wm-form-field-",Z=function(){var e=new Map;for(var t in i.FormWidgetType)e.set(Q+i.FormWidgetType[t],new Map);return e}(),J=function(e){return Z.get(e)},X=function(e,t){Z.set(e,t),window.WM_LOADED_COMPONENTS=v(v([],g(window.WM_LOADED_COMPONENTS||[])),[e])};e.PROP_TYPE=void 0,(K=e.PROP_TYPE||(e.PROP_TYPE={}))[K.BOOLEAN=1]="BOOLEAN",K[K.NUMBER=2]="NUMBER",K[K.STRING=3]="STRING";var ee={type:e.PROP_TYPE.STRING},te={type:e.PROP_TYPE.NUMBER},ne={type:e.PROP_TYPE.BOOLEAN},ie={arrayType:!0},oe=function(){X("wm-container",new Map([["animation",ee],["class",ee],["conditionalclass",ie],["conditionalstyle",ie],["content",ee],["name",ee],["show",Object.assign({value:!0},ne)]]))},ae=new Map,re=new i.IDGenerator("widget-id"),se=new Map([["tap","click"]]),le={BLOCK:"block",INLINE_BLOCK:"inline-block",INLINE:"inline"},ce=new Set(["readonly","autofocus","disabled","startchecked","multiple","selected","required","controls","autoplay","loop","muted","show"]),pe=function(e){return ce.has(e)},de=new Set(["width","height","iconheight","iconwidth","popoverwidth","popoverheight","imagewidth","imageheight"]),ue=function(e){return de.has(e)},he=function(t,n,o){return o===e.PROP_TYPE.BOOLEAN?i.toBoolean(n,pe(t)&&t):o===e.PROP_TYPE.NUMBER?+n:n},me=function(e,t,n){var o=e.widgetId,a=e[t];i.isChangeFromWatch()||i.$unwatch(k(o,t)),i.resetChangeFromWatch();var r=J(e.getWidgetSubType()).get(t);if(r){var s=r.type;s&&(n=he(t,n,s))}if(n!==a||i.isObject(n)||i.isObject(a)){if(ue(t))n=i.toDimension(n);else if(_.startsWith(n,"resources/")){var l=e;void 0===l._parentPrefab_&&(l._parentPrefab_=e.$element.parent().closest('[prefabname][prefabname!="__self__"]').attr("prefabname")||""),l._parentPrefab_?n="./app/prefabs/"+l._parentPrefab_+"/"+n:r&&n!=r.value&&(n="./"+n)}e[t]=n,U(t)?e.notifyStyleChange(t,n,a):("conditionalclass"===t&&(n=B(n,a)),r&&e.notifyPropertyChange(t,n,a)),i.$appDigest()}},fe={set:function(e,t,n){return me(e,t,n),!0},get:function(e,t){var n=e[t];return _.isFunction(n)?n.bind(e):n}},ge=window.requestAnimationFrame,ve=[],ye=function(e){ve.length||ge((function(){ve.forEach((function(e){return e()})),ve.length=0})),ve.push(e)},be=function(){function e(){}return e.create=function(e,t,n){if(window.Proxy)return new Proxy(e,fe);var i=Object.create(e);return ye((function(){for(var t in e)_.isFunction(e[t])&&"constructor"!==t&&"super"!==t&&!_.startsWith(t,"ng")&&(e[t]=e[t].bind(e))})),Object.keys(W).forEach((function(t){Object.defineProperty(i,t,{get:function(){return e[t]},set:function(n){return me(e,t,n)}})})),n&&n.forEach((function(t,n){Object.defineProperty(i,n,{get:function(){return e[n]},set:function(t){return me(e,n,t)}})})),i},e}(),we=function(e,t,n){t&&t.length&&i.removeClass(n,_.join(t," ")),e&&e.length&&i.addClass(n,_.join(e," "))},Pe=function(e,t,n){t&&_.isObject(t)&&Object.keys(t||{}).forEach((function(e){i.setCSS(n,e,"")}));e&&_.isObject(e)&&i.setCSSFromObj(n,e)},_e=function(){function e(e,n,o){var a=this;this.inj=e,this.isAttached=!1,this.styleChange=new s.ReplaySubject,this.propertyChange=new s.Subject,this.readyState=new s.Subject,this.destroy=new s.Subject,this.eventHandlers=new Map,this.toBeSetupEventsQueue=[],this.__cloneable__=!1,this.$attrs=new Map,this.isMuted=!1;var l=e.get(t.ElementRef);this.nativeElement=l.nativeElement,this.widgetType=n.widgetType,this.widgetSubType=n.widgetSubType||n.widgetType,this.viewParent=e.view.component,this.displayType=n.displayType||le.BLOCK,this.context=e.view.context,this.widget=this.createProxy(),this.eventManager=e.get(r.EventManager),this.nativeElement.widget=this.widget,this.appLocale=e.get(i.App).appLocale||{},this.initContext(),n.hostClass&&i.addClass(this.nativeElement,n.hostClass),this.widgetId=this.generateWidgetId(),i.setAttr(this.nativeElement,"widget-id",this.widgetId,!0),this.registerStyleChangeListener(this.onStyleChange,this),this.registerPropertyChangeListener(this.onPropertyChange,this),o?(this.delayedInit=!0,o.then((function(){a.initWidget(),a.setInitProps()}))):this.initWidget()}return Object.defineProperty(e.prototype,"$element",{get:function(){return $(this.nativeElement)},enumerable:!1,configurable:!0}),e.prototype.getNativeElement=function(){return this.nativeElement},e.prototype.getWidgetType=function(){return this.widgetType},e.prototype.getWidgetSubType=function(){return this.widgetSubType},e.prototype.getWidget=function(){return this.widget},e.prototype.setProperty=function(e,t){this.widget[e]=t},e.prototype.getViewParent=function(){return this.viewParent},e.prototype.notifyStyleChange=function(e,t,n){this.styleChange.next({key:e,nv:t,ov:n})},e.prototype.notifyPropertyChange=function(e,t,n){this.propertyChange.next({key:e,nv:t,ov:n})},e.prototype.registerStyleChangeListener=function(e,t){t&&(e=e.bind(t)),this.styleChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerReadyStateListener=function(e,t){t&&(e=e.bind(t)),this.readyState.isStopped?e():this.readyState.subscribe((function(){return e()}))},e.prototype.registerPropertyChangeListener=function(e,t){t&&(e=e.bind(t)),this.propertyChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerDestroyListener=function(e,t){t&&(e=e.bind(t)),this.destroy.subscribe((function(){}),(function(){}),(function(){return e()}))},e.prototype.getDisplayType=function(){return this.displayType},e.prototype.createProxy=function(){return be.create(this,this.widgetSubType,J(this.widgetSubType))},e.prototype.initContext=function(){var e=this.inj.view.context,t=this.inj.get(w,{});if(this.viewParent!==e?this.context=e:this.context={},t){var n={};_.isArray(t)?_.forEach(t,(function(e){Object.assign(n,e)})):n=t,this.context=Object.assign({},n,this.context)}},e.prototype.setWidgetProperty=function(e,t){this.widget[e]=t},e.prototype.getAttr=function(e){return this.$attrs.get(e)},e.prototype.getAppInstance=function(){return this.inj.get(i.App)},e.prototype.generateWidgetId=function(){return re.nextUid()},e.prototype.onPropertyChange=function(e,t,n){if("show"===e)this.nativeElement.hidden=!t;else if("hint"===e)i.isMobileApp()||i.setAttr(this.nativeElement,"title",t);else if("class"===e){i.switchClass(this.nativeElement,t,n);var o=t.match(/(\W|^)(h([0-6]))(?=\s|$)/);o&&(i.setAttr(this.nativeElement,"role","heading"),i.setAttr(this.nativeElement,"aria-level",o[3]))}else if("name"===e||"tabindex"===e)i.setAttr(this.nativeElement,e,t),"name"===e&&t&&function(e,t,n,o){i.isDefined(e.Widgets)&&(o&&(e.Widgets[o]=void 0),n&&(e.Widgets[n]=t))}(this.viewParent,this.widget,t,n);else if("conditionalclass"===e)we(t.toAdd,t.toRemove,this.nativeElement);else if("autoplay"===e){var a="wm-audio"===this.widgetType?"audio":"video";this.nativeElement.querySelector(a).load()}else"conditionalstyle"===e?Pe(t,n,this.nativeElement):"animation"===e?i.addClass(this.nativeElement,"animated "+t):"disabled"===e&&(!0===t?i.setAttr(this.nativeElement,"disabled","true",!0):i.removeAttr(this.nativeElement,"disabled",!0))},e.prototype.onStyleChange=function(e,t,n){},e.prototype.registerWidget=function(e){var t,n,o,a,r;this.registerDestroyListener((t=this.widget,n=this.viewParent,o=this.widgetId,a=e,r=!1,ae.set(o,t),a&&i.isDefined(n.Widgets)&&(r=!0,n.Widgets[a]=t),function(){ae.delete(o),r&&(n.Widgets[a]=void 0)}))},e.prototype.getMappedEventName=function(e){return se.get(e)||e},e.prototype.handleEvent=function(e,t,n,i,o){this.eventManager.addEventListener(e,t,(function(e){if(i.$event=e,"delayed"!==o)return n();setTimeout((function(){return n()}),150)}))},e.prototype.processEventAttr=function(e,t,n){var o=this,a=i.$parseEvent(t),r=this.context;r.widget=this.widget;var s=a.bind(void 0,this.viewParent,r),l=function(){var t;i.$invokeWatchers(!0);try{if(r.$event=r.$event||new window.CustomEvent(e),!((t=s())instanceof Promise))return t;t.then((function(e){return e}),(function(e){return e}))}catch(e){console.error(e)}};this.eventHandlers.set(this.getMappedEventName(e),{callback:l,locals:r}),this[_.camelCase("on-"+e)]=l,this.toBeSetupEventsQueue.push((function(){o.handleEvent(o.nativeElement,o.getMappedEventName(e),l,r,n)}))},e.prototype.processBindAttr=function(e,t){var n=this;this.initState.delete(e),this.registerDestroyListener(i.$watch(t,this.viewParent,this.context,(function(t){return n.widget[e]=t}),k(this.widgetId,e),"datasource"===e,this.widgetProps.get(e),(function(){return n.isMuted})))},e.prototype.removePropertyBinding=function(e){i.$unwatch(k(this.widgetId,e))},e.prototype.invokeEventCallback=function(e,t){var n=this.eventHandlers.get(e);if(n){var i=n.callback,o=n.locals||{};if(i)return i(Object.assign(o,t))}},e.prototype.processAttr=function(e,t){var n=e.split("."),o=n[0],a=n[1],r=n[2],s=n.length;"bind"===a?("show"===o&&(this.nativeElement.hidden=!0),this.processBindAttr(o,t)):"event"===a?this.processEventAttr(o,t,r):1===s&&("class"===e?i.removeClass(this.nativeElement,t):"tabindex"!==e&&"name"!==e||i.removeAttr(this.nativeElement,e),this.initState.set(o,t))},e.prototype.processAttrs=function(){var e,t,n=this.inj.elDef;try{for(var i=f(n.element.attrs),o=i.next();!o.done;o=i.next()){var a=g(o.value,3),r=a[1],s=a[2];this.$attrs.set(r,s),this.processAttr(r,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.initWidget=function(){var e=this;this.initState=new Map;var t=J(this.widgetSubType);t.forEach((function(t,n){i.isDefined(t.value)&&e.initState.set(n,t.value)})),this.widgetProps=t,this.processAttrs(),this.registerWidget(this.initState.get("name"))},e.prototype.setInitProps=function(){var e=this;this.initState.get("name")&&(this.widget.name=this.initState.get("name")),this.initState.forEach((function(t,n){(e.widgetProps.get(n)||U(n))&&"name"!==n&&(e.widget[n]=t)})),this.initState.clear(),this.initState=void 0,this.readyState.next(),this.readyState.complete()},e.prototype.hasEventCallback=function(e){return this.eventHandlers.has(e)},e.prototype.focus=function(){var e=this.$element[0].querySelector("[focus-target]");e||(e=this.$element[0]),e.focus()},e.prototype.execute=function(e,t){},e.prototype.mute=function(){this.isMuted=!0},e.prototype.unmute=function(){this.isMuted=!1},e.prototype.ngOnAttach=function(){this.isAttached=!0},e.prototype.ngOnDetach=function(){this.isAttached=!1},e.prototype.ngOnInit=function(){this.delayedInit||this.setInitProps()},e.prototype.ngAfterViewInit=function(){var e,t;if(this.toBeSetupEventsQueue.length)try{for(var n=f(this.toBeSetupEventsQueue),i=n.next();!i.done;i=n.next()){(0,i.value)()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.toBeSetupEventsQueue.length=0,this.isAttached=!0},e.prototype.ngAfterContentInit=function(){},e.prototype.ngOnDestroy=function(){this.isDestroyed=!0,this.widget=Object.create(null),this.styleChange.complete(),this.propertyChange.complete(),this.destroy.complete(),this.isAttached=!1},e}();_e.decorators=[{type:t.Injectable}],_e.ctorParameters=function(){return[{type:t.Injector},{type:void 0},{type:Promise}]};var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(_e);Oe.decorators=[{type:t.Injectable}];var Ee=function(e){this.redraw=function(){var t=e.$element.closest("[wmtabpane]"),n=e.$element.closest("[wmaccordionpane]").find(".panel-heading");if(!(t.length&&!t.hasClass("active")||n.length&&!n.hasClass("active")))return e.redraw&&e.redraw()}};Ee.decorators=[{type:t.Directive,args:[{selector:"[redrawable]"}]}],Ee.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.updateRedrawableComponents=function(e){var t=this;_.pickBy(e,(function(e){e&&e.nativeElement&&e.nativeElement.hasAttribute("redrawable")&&!_.includes(t.reDrawableComponents._results,e)&&t.reDrawableComponents._results.push(e),e&&e.Widgets&&t.updateRedrawableComponents(e.Widgets)}))},t.prototype.redrawChildren=function(){var e=this;this.content&&this.Widgets&&this.updateRedrawableComponents(this.Widgets),setTimeout((function(){e.reDrawableComponents&&e.reDrawableComponents.forEach((function(e){return e.redraw()}))}),100)},t.prototype.onPropertyChange=function(t,n,i){e.prototype.onPropertyChange.call(this,t,n,i),"show"===t&&n&&this.redrawChildren()},t}(Oe);Re.decorators=[{type:t.Directive}],Re.propDecorators={reDrawableComponents:[{type:t.ContentChildren,args:[Ee,{descendants:!0}]}]};var Ae="app-container",Te={widgetType:"wm-container",hostClass:Ae},Se=function(t){function n(n){var o=t.call(this,n,Te)||this;return i.addClass(o.nativeElement,Ae),Y(o.nativeElement,o,e.APPLY_STYLES_TYPE.CONTAINER),o}return u(n,t),n}(Re);Se.initializeProps=oe(),Se.decorators=[{type:t.Directive,args:[{selector:"[wmContainer]",providers:[x(Se)]}]}],Se.ctorParameters=function(){return[{type:t.Injector}]};var Ce=function(){function e(){}return e.prototype.transform=function(e,t,n){return i.transformFileURI(C(e,t,n))},e}();Ce.decorators=[{type:t.Pipe,args:[{name:"image"}]}];var Ie=function(){X("wm-item-template",new Map([["content",ee]]))},De={widgetType:"wm-item-template"},xe=function(e){function t(t,n,i){var o=e.call(this,t,De)||this;return o.app=i,o.nativeElement=n.nativeElement,o.context=t.view.context,o}return u(t,e),Object.defineProperty(t.prototype,"$index",{get:function(){return this.context.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wmItemTemplate",{set:function(e){this.widget.content=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.partialParams.item=this.userComponentParams.dataObject},t}(Oe);xe.initializeProps=Ie(),xe.decorators=[{type:t.Directive,args:[{selector:"[wmItemTemplate]",exportAs:"itemTemplateRef",providers:[x(xe)]}]}],xe.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},xe.propDecorators={userComponentParams:[{type:t.Input}],wmItemTemplate:[{type:t.Input}]};var Ne=function(){X("wm-repeat-template",new Map([["show",ne]]))},ke={widgetType:"wm-repeat-template",hostClass:"app-repeat-item"},Me=function(e){function t(t){var n=e.call(this,t,ke)||this;return Y(n.nativeElement,n),n}return u(t,e),t}(Oe);Me.initializeProps=Ne(),Me.decorators=[{type:t.Directive,args:[{selector:"[wmRepeatTemplate]"}]}],Me.ctorParameters=function(){return[{type:t.Injector}]};var Le=function(){function e(e,t,n){this.templateRef=t,this.viewContainer=n,this.viewParent=e.view.component,this.context=e.view.context}return Object.defineProperty(e.prototype,"lazyLoad",{set:function(e){var t=this;this.unSubscribeFn=i.$watch(e,this.viewParent,this.context,(function(e){!t.embeddedView&&e&&(t.embeddedView=t.viewContainer.createEmbeddedView(t.templateRef,t.context),t.unSubscribeFn())}))},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.unSubscribeFn()},e}();Le.decorators=[{type:t.Directive,args:[{selector:"[lazyLoad]"}]}],Le.ctorParameters=function(){return[{type:t.Injector},{type:t.TemplateRef},{type:t.ViewContainerRef}]},Le.propDecorators={lazyLoad:[{type:t.Input}]};var Fe=function(){X("wm-message",new Map([["animation",ee],["caption",Object.assign({value:"Message"},ee)],["class",ee],["hideclose",Object.assign({value:!1},ne)],["name",ee],["show",Object.assign({value:!0},ne)],["type",Object.assign({value:"success"},ee)]]))},je={widgetType:"wm-message",hostClass:"alert app-message"},Be=function(e){function t(t){var n=e.call(this,t,je)||this;return n.messageClass="",n.messageIconClass="",n.type="",Y(n.nativeElement,n),n}return u(t,e),t.prototype.showMessage=function(e,t){e&&(this.caption=e),t&&this.setWidgetProperty("type",t),this.setWidgetProperty("show",!0)},t.prototype.hideMessage=function(){this.setWidgetProperty("show",!1)},t.prototype.dismiss=function(e){this.hideMessage(),this.invokeEventCallback("close",{$event:e})},t.prototype.onMessageTypeChange=function(e){var t,n;switch(e){case"success":t="alert-success",n="wm-sl-l sl-check";break;case"error":t="alert-danger",n="wi wi-cancel";break;case"warn":case"warning":t="alert-warning",n="wm-sl-l sl-alarm-bell";break;case"info":t="alert-info",n="wi wi-info";break;case"loading":t="alert-info alert-loading",n="fa fa-spinner fa-spin"}i.switchClass(this.nativeElement,t,this.messageClass),this.messageClass=t,this.messageIconClass=n},t.prototype.onPropertyChange=function(t,n,i){"type"===t?this.onMessageTypeChange(n):e.prototype.onPropertyChange.call(this,t,n,i)},t}(Oe);Be.initializeProps=Fe(),Be.decorators=[{type:t.Component,args:[{selector:"[wmMessage]",template:'<i aria-hidden="true" [title]="type + \'Alert\'" class="icon {{type}} {{messageIconClass}}"></i>\n<span [innerHtml]="caption"></span>\n<button title="Close" type="button" class="btn-transparent close" [hidden]="hideclose" (click)="dismiss($event)" aria-label="Close">\n <span aria-hidden="true">×</span>\n</button>\n',providers:[x(Be)],exportAs:"wmMessage"}]}],Be.ctorParameters=function(){return[{type:t.Injector}]};var Ge=function(){X("wm-partial",new Map([["name",ee]]))},$e={widgetType:"wm-partial",hostClass:"app-partial clearfix"},Ve=function(e){function t(t,n){var i=e.call(this,t,$e)||this;return i.viewport=n,i.registerDestroyListener(i.viewport.subscribe("resize",(function(e){return i.callback("resize",e)}))),i.registerDestroyListener(i.viewport.subscribe("orientationchange",(function(e){return i.callback("orientationchange",e)}))),i}return u(t,e),t.prototype.callback=function(e,t){t=_.assign({widget:this},t),this.invokeEventCallback(e,t)},t.prototype.ngOnAttach=function(){this.callback("attach")},t.prototype.ngOnDetach=function(){this.callback("detach")},t.prototype.ngOnDestroy=function(){this.callback("destroy")},t}(Oe);Ve.initializeProps=Ge(),Ve.decorators=[{type:t.Directive,args:[{selector:"[wmPartial]",providers:[x(Ve)]}]}],Ve.ctorParameters=function(){return[{type:t.Injector},{type:i.Viewport}]};var We=function(){function e(e){this.widgetRef=e,this.widgetRef.partialParams={},this.widgetRef.pageParams=this.widgetRef.partialParams,this.widgetRef.params$=new s.Subject}return e.prototype.registerParams=function(e,t,n,o){var a=this;this.widgetRef.partialParams[e]=t,!t&&n?this.widgetRef.registerDestroyListener(i.$watch(n,this.widgetRef.getViewParent(),_.get(this.widgetRef,"context"),(function(t){a.widgetRef.partialParams[e]=t,a.widgetRef.params$.next()}))):this.widgetRef.params$.next()},e}();We.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],We.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var Ue=function(){function e(e,t,n){this.bindValue=e,this.type=t,this.partialParamsProvider=n}return e.prototype.ngOnInit=function(){this.partialParamsProvider.registerParams(this.name,this.value,this.bindValue,this.type)},e}();Ue.decorators=[{type:t.Directive,args:[{selector:"[wmParam]"}]}],Ue.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Attribute,args:["value.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["type"]}]},{type:We}]},Ue.propDecorators={name:[{type:t.Input}],value:[{type:t.Input}]};var qe=function(){function e(e,t,n,o,a,r,s,c){var p=this;this.componentInstance=e,this.vcRef=t,this.elRef=n,this.inj=o,this.app=a,this.resolver=s,this.partialRefProvider=c,this.contentInitialized=!1,this.renderPartial=_.debounce(this._renderPartial,200),e.registerPropertyChangeListener((function(t,n,o){"content"===t&&(e.$lazyLoad?e.$lazyLoad=function(){p.renderPartial(n),e.$lazyLoad=i.noop}:p.renderPartial(n))}));var d=e.params$.pipe(l.filter((function(){return p.contentInitialized})),l.debounceTime(200)).subscribe((function(){return p.renderPartial(e.content)}));e.registerDestroyListener((function(){return d.unsubscribe()}))}return Object.defineProperty(e.prototype,"name",{get:function(){return this.componentInstance.name},enumerable:!1,configurable:!0}),e.prototype._renderPartial=function(e){return h(this,void 0,void 0,(function(){var t,n,o,a,r=this;return m(this,(function(s){switch(s.label){case 0:return this.vcRef.clear(),i.$invokeWatchers(!0),(t=$(this.elRef.nativeElement).closest(".app-prefab")).length?n=t.attr("prefabname"):this.componentInstance.viewParent&&(n=this.componentInstance.viewParent.prefabName),[4,this.partialRefProvider.getComponentFactoryRef(e,i.ComponentType.PARTIAL,{prefab:n})];case 1:return(o=s.sent())&&((a=this.vcRef.createComponent(o,0,this.inj))&&a._component&&n&&(a._component.prefabName=n),this.$target||(this.$target=this.elRef.nativeElement.querySelector("[partial-container-target]")||this.elRef.nativeElement),this.$target.innerHTML="",this.$target.appendChild(a.location.nativeElement),this.contentInitialized=!0,setTimeout((function(){return r.onLoadSuccess()}),200)),[2]}}))}))},e.prototype.onLoadSuccess=function(){this.componentInstance.invokeEventCallback("load"),this.app.notify("partialLoaded")},e}();qe.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],qe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.ElementRef},{type:t.Injector},{type:i.App},{type:String,decorators:[{type:t.Attribute,args:["content"]}]},{type:t.ComponentFactoryResolver},{type:i.PartialRefProvider}]};var ze=function(){function e(e,t,n,i,o){this.elRef=e,this.widget=t,this.viewContainerRef=n,this.templateRef=o,this.context=i.view.context,window.addEventListener("resize",this.onResize.bind(this))}return Object.defineProperty(e.prototype,"showInDevice",{set:function(e){this.devices=e.split(","),this.onResize()},enumerable:!1,configurable:!0}),e.prototype.onResize=function(e){var t=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg")||"1200px",n=getComputedStyle(document.documentElement).getPropertyValue("--screen-md")||"992px",o=getComputedStyle(document.documentElement).getPropertyValue("--screen-sm")||"768px",a=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg-tab-landscape")||"1366px",r=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg-tab-portrait")||"1024px",s=parseFloat(t)-1+"px",l=parseFloat(n)-1+"px",c=parseFloat(o)-1+"px";this.devices.indexOf("lg")>-1&&window.matchMedia("(min-width: "+t+")").matches&&!i.isLargeTabletLandscape(a,r)||this.devices.indexOf("md")>-1&&(i.isLargeTabletLandscape(a,r)||window.matchMedia("(min-width: "+n+") and (max-width: "+s+")").matches&&!i.isLargeTabletPortrait(a,r))||this.devices.indexOf("sm")>-1&&(window.matchMedia("(min-width: "+o+") and (max-width: "+l+")").matches||i.isLargeTabletPortrait(a,r))||this.devices.indexOf("xs")>-1&&window.matchMedia("(max-width: "+c+")").matches||this.devices.indexOf("all")>-1?this.embeddedView||(this.embeddedView=this.viewContainerRef.createEmbeddedView(this.templateRef,this.context)):(this.viewContainerRef.clear(),this.embeddedView="")},e.prototype.ngOnDestroy=function(){window.removeEventListener("resize",this.onResize)},e}();ze.decorators=[{type:t.Directive,args:[{selector:"[showInDevice]"}]}],ze.ctorParameters=function(){return[{type:t.ElementRef},{type:_e,decorators:[{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.Injector},{type:t.TemplateRef}]},ze.propDecorators={showInDevice:[{type:t.Input}]};var He=function(){function e(e,t,n){this._isEnabled=!1,this._lastScrollY=-1,this._waitRefreshTill=-1,this.pendingIscrolls=[],this._$el=$(t.nativeElement),this.app=n}return e.prototype.ngOnInit=function(){var e=this;this.cancelSubscription=this.app.subscribe("no-iscroll",(function(t){e.pendingIscrolls.push(t)}))},e.prototype.ngDoCheck=function(){this._isEnabled?this._smoothScrollInstance?this.refreshIScroll():this._smoothScrollInstance=this.applySmoothScroll():this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy()},e.prototype.ngOnDestroy=function(){this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy(),this.cancelSubscription&&this.cancelSubscription()},Object.defineProperty(e.prototype,"wmSmoothscroll",{set:function(e){this._isEnabled=!0===e||"true"===e,this._isEnabled?this._smoothScrollInstance||(this._smoothScrollInstance=this.applySmoothScroll()):this.ngOnDestroy()},enumerable:!1,configurable:!0}),e.prototype.applySmoothScroll=function(e,t){var n=this;if(!i.isMobileApp()||i.isKitkatDevice())return null;var o={scrollbars:!0,preventDefault:!1,momentum:!0,bounce:!1,mouseWheel:!0,disablePointer:!0,disableTouch:!1,disableMouse:!1},a=this._$el[0];if(!a.children.length)return null;this._$el.addClass("smoothscroll-wrapper"),a.onscroll=function(e){e.target.iscroll&&e.target.scrollTop&&(e.target.iscroll.scrollTo(e.target.iscroll.x,e.target.iscroll.y-e.target.scrollTop),e.target.scrollTop=0)},t&&"INPUT"===t.tagName&&t.focus(),e&&(o.fadeScrollbars=!0);var r=new IScroll(a,o);if(e){_.forEach(e,(function(e,t){_.forEach(e,(function(e){r.on(t,e)}))}));var s=this;r.on("scrollStart",(function(){this._scrolling=!0,i.isMobileApp()&&s.app.notify("iscroll-start",{})})),r.on("scrollEnd",(function(){this._scrolling=!1})),r.refresh()}return this.app.notify("iscroll-start",{}),r.indicatorRefresh=function(){var e,t=n._$el[0].iscroll.indicators;if(t.length)for(e=0;e<t.length;e++)t[e].refresh()},this._$el[0].iscroll=r,_.forEach(this.pendingIscrolls,(function(e,t){if(e.isSameNode(n._$el[0]))return n.app.notify("iscroll-update",{el:e}),void n.pendingIscrolls.splice(t,1)})),this.app.notify("iscroll-update",{}),{iScroll:r,destroy:function(){r.destroy(),$(r.scroller).css({"transition-timing-function":"","transition-duration":"",transform:""}),r=null,delete a.iscroll}}},e.prototype.refreshIScroll=function(){var e=this._smoothScrollInstance.iScroll;if(!(e._scrolling||this._waitRefreshTill>Date.now())){if(e.wrapper&&!_.includes(e.wrapper.children[0].classList,"smoothscroll-container")&&e.wrapper.scrollHeight>e.wrapper.clientHeight){var t=e._events,n=document.activeElement;$(e.wrapper.children).wrapAll('<div class="smoothscroll-container"></div>'),this._smoothScrollInstance.destroy(),this._smoothScrollInstance=this.applySmoothScroll(t,n)}this._lastScrollY!==this._$el[0].iscroll.maxScrollY?(Ye(this._smoothScrollInstance.iScroll),this._lastScrollY=this._$el[0].iscroll.maxScrollY):this._smoothScrollInstance.iScroll.refresh(),this._waitRefreshTill=Date.now()+500}},e}();He.decorators=[{type:t.Directive,args:[{selector:"[wmSmoothscroll]"}]}],He.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},He.propDecorators={wmSmoothscroll:[{type:t.Input}]};var Ye=function(e){var t=!e&&$(".smoothscroll-container");e&&e.wrapper&&e.wrapper.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&$(document.activeElement).offset().top+document.activeElement.clientHeight>.9*window.innerHeight&&document.activeElement.scrollIntoView({behavior:"auto",block:"end",inline:"end"}),e?(e.indicatorRefresh&&e.indicatorRefresh(),e.refresh&&e.refresh()):t.length&&t.parent().each((function(e,t){t.iscroll.indicatorRefresh(),t.iscroll.refresh()}))},Ke=Ye;window.addEventListener("resize",i.debounce(Ye,200));var Qe=function(){function e(e){this.elRef=e}return Object.defineProperty(e.prototype,"textContent",{set:function(e){var t=e;null==e&&(t=""),this.elRef.nativeElement.textContent=t},enumerable:!1,configurable:!0}),e}();Qe.decorators=[{type:t.Directive,args:[{selector:"[textContent]"}]}],Qe.ctorParameters=function(){return[{type:t.ElementRef}]},Qe.propDecorators={textContent:[{type:t.Input}]};var Ze=function(e){return _.isDate(e)||isNaN(e)||(e=parseInt(e,10)),moment(e).valueOf()||moment((new Date).toDateString()+" "+e).valueOf()},Je=function(){function e(e){this.decimalPipe=e}return e.prototype.transform=function(e,t,n,i,o,a,r,s){n=o&&!r?"1."+a.length+"-16":n;var l=s?s.number:void 0;return this.decimalPipe.transform(e,n,i||l||t)},e}();Je.decorators=[{type:t.Pipe,args:[{name:"trailingZeroDecimalPipe"}]}],Je.ctorParameters=function(){return[{type:n.DecimalPipe}]};var Xe=function(){function e(e,t){this.datePipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n,o){var a;if("null"===e||""===e)return"";if(!i.isDefined(e))return"";if(a=Ze(e)){if("timestamp"===t)return a;if("UTC"===t)return new Date(a).toISOString();var r=this.i18nService?this.i18nService.getTimezone(o):n;return r&&(e===a||i.hasOffsetStr(e))?moment(a).tz(r).format(t.replaceAll("y","Y").replaceAll("d","D").replace("a","A")):this.datePipe.transform(a,t)}return""},e}();Xe.decorators=[{type:t.Pipe,args:[{name:"toDate"}]}],Xe.ctorParameters=function(){return[{type:n.DatePipe},{type:i.AbstractI18nService}]};var et=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t){if(t&&!String(t).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)&&(t="1."+t+"-"+t),!_.isNaN(+e)){var n=this.i18nService&&this.i18nService.getwidgetLocale()?this.i18nService.getwidgetLocale():void 0,i=n?n.number:null;return this.decimalPipe.transform(e,t,i)}},e}();et.decorators=[{type:t.Pipe,args:[{name:"toNumber"}]}],et.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var tt=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n){var o=(i.CURRENCY_INFO[t]||{}).symbol||t||"",a=new et(this.decimalPipe,this.i18nService).transform(e,n),r=_.startsWith(a,"-");return r&&(a=a.replace("-","")),a?r?"-"+o+a:o+a:""},e}();tt.decorators=[{type:t.Pipe,args:[{name:"toCurrency"}]}],tt.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var nt=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:(t||"")+e},e}();nt.decorators=[{type:t.Pipe,args:[{name:"prefix"}]}];var it=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:e+(t||"")},e}();it.decorators=[{type:t.Pipe,args:[{name:"suffix"}]}];var ot=function(){function e(e){this.custmeUserPipe=e}return e.prototype.transform=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n.push(arguments[i]);var o=this.custmeUserPipe.getCustomPipe(t);if(!o||!_.isFunction(o.formatter))return console.warn("formatter is not defined, please check the custom pipes documentation"),e;try{return o.formatter.apply(o,v([e],g(n)))}catch(n){return console.error("Pipe name: "+t,n),e}},e}();ot.decorators=[{type:t.Pipe,args:[{name:"custom"}]}],ot.ctorParameters=function(){return[{type:i.CustomPipeManager}]};var at=function(){function e(){}return e.prototype.transform=function(e){var t;if(i.isDefined(e))return(t=Ze(e))?moment(t).fromNow():void 0},e}();at.decorators=[{type:t.Pipe,args:[{name:"timeFromNow"}]}];var rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(et);rt.decorators=[{type:t.Pipe,args:[{name:"numberToString"}]}];var st=function(){function e(){}return e.prototype.transform=function(e){return Number(e)||void 0},e}();st.decorators=[{type:t.Pipe,args:[{name:"stringToNumber"}]}];var lt=function(){function e(){}return e.prototype.transform=function(e,t,n){return e?_.isObject(t)?_.filter(e,t):_.filter(e,(function(e){return _.includes(e[t],n)})):[]},e}();lt.decorators=[{type:t.Pipe,args:[{name:"filter"}]}];var ct=function(){function e(){}return e.prototype.transform=function(e,t){for(var n=0;e>=1024;)e/=1024,n++;return e.toFixed(+t)+" "+["bytes","KB","MB","GB","TB","PB"][n]},e}();ct.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var pt=function(){function e(){}return e.prototype.transform=function(e){return"fa "+({zip:"fa-file-zip-o",pdf:"fa-file-pdf-o",rar:"fa-file-archive-o",txt:"fa-file-text-o",ppt:"fa-file-powerpoint-o",pot:"fa-file-powerpoint-o",pps:"fa-file-powerpoint-o",pptx:"fa-file-powerpoint-o",potx:"fa-file-powerpoint-o",ppsx:"fa-file-powerpoint-o",mpg:"fa-file-movie-o",mp4:"fa-file-movie-o",mov:"fa-file-movie-o",avi:"fa-file-movie-o",mp3:"fa-file-audio-o",docx:"fa-file-word-o",js:"fa-file-code-o",md:"fa-file-code-o",html:"fa-file-code-o",css:"fa-file-code-o",xlsx:"fa-file-excel-o",png:"fa-file-image-o",jpg:"fa-file-image-o",jpeg:"fa-file-image-o",file:"fa-file-o",default:"fa-file-o"}[e]||"fa-file-o")},e}();pt.decorators=[{type:t.Pipe,args:[{name:"fileIconClass"}]}];var dt=function(){function e(){}return e.prototype.transform=function(e){return{success:"wi wi-done text-success",error:"wi wi-error text-danger"}[e.toLowerCase()]},e}();dt.decorators=[{type:t.Pipe,args:[{name:"stateClass"}]}];var ut=function(){function e(){}return e.prototype.transform=function(e){return{"audio/aac":".aac","application/x-abiword":".abw","application/vnd.android.package-archive":".apk","video/x-msvideo":".avi","application/vnd.amazon.ebook":".azw","application/octet-stream":".bin","image/bmp":".bmp","application/x-bzip":".bz","application/x-bzip2":".bz2","application/x-csh":".csh","text/css":".css","text/csv":".csv","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.ms-fontobject":".eot","application/epub+zip":".epub","application/ecmascript":".es","image/gif":".gif","text/html":".html","image/x-icon":".ico","text/calendar":".ics","application/java-archive":".jar","image/jpeg":[".jpeg",".jpg"],"application/javascript":".js","application/json":".json","audio/midi":".mid","audio/x-midi":".midi","video/mpeg":".mpeg","application/vnd.apple.installer+xml":"mpkg","application/vnd.oasis.opendocument.presentation":".odp","application/vnd.oasis.opendocument.spreadsheet":".ods","application/vnd.oasis.opendocument.text":".odt","audio/ogg":".oga","video/ogg":".ogv","application/ogg":".ogx","font/otf":".otf","image/png":".png","application/pdf":".pdf","application/vnd.ms-powerpoint":".ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx","application/x-rar-compressed":".rar","application/rtf":".rtf","application/x-sh":".sh","image/svg+xml":".svg","application/x-shockwave-flash":".swf","application/x-tar":".tar","image/tiff":".tiff","application/typescript":".ts","font/ttf":".ttf","text/plain":".txt","application/vnd.visio":".vsd","audio/wav":".wav","audio/webm":".weba","video/webm":".webm","image/webp":".webp","font/woff":".woff","font/woff2":".woff2","application/xhtml+xml":".xhtml","application/vnd.ms-excel":".xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":".xlsx","application/xml":".xml","application/vnd.mozilla.xul+xml":".xul","application/zip":".zip","video/3gpp":".3gp","audio/3gpp":".3gp","video/3gpp2":".3g2","audio/3gpp2":".3g2","application/x-7z-compressed":".7z"}[e]},e}();ut.decorators=[{type:t.Pipe,args:[{name:"fileExtensionFromMime"}]}];var ht=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.bypassSecurityTrustHtml(e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.bypassSecurityTrustStyle(e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.bypassSecurityTrustScript(e);case"url":case t.SecurityContext.URL:return this.domSanitizer.bypassSecurityTrustUrl(e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.bypassSecurityTrustResourceUrl(e)}},e}();ht.decorators=[{type:t.Pipe,args:[{name:"trustAs"}]}],ht.ctorParameters=function(){return[{type:r.DomSanitizer}]};var mt=[],ft=[],gt=function(){function e(){this.dialogRefsCollection=new Map,this.appConfirmDialog="_app-confirm-dialog"}return e.prototype.register=function(e,t,n){e&&(this.dialogRefsCollection.get(e)?this.dialogRefsCollection.get(e).set(n,t):this.dialogRefsCollection.set(e,new Map([[n,t]])))},e.prototype.getDialogRefsCollection=function(){return this.dialogRefsCollection},e.prototype.deRegister=function(e,t){e&&this.dialogRefsCollection.get(e)&&this.dialogRefsCollection.get(e).delete(t)},e.prototype.getDialogRef=function(e,t){var n,i=this.dialogRefsCollection.get(e);return t?(n=i.get(t))||(t.pageName||t.partialName||t.prefabName?console.error('No dialog with the name "'+e+'" found in the given scope.'):i.forEach((function(t,i){i&&"Common"===i.partialName?n=t:console.error('No dialog with the name "'+e+'" found in the App scope.')}))):1===i.size?n=i.entries().next().value[1]:console.error("There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists."),n},e.prototype.open=function(e,t,n){var i=this.getDialogRef(e,t);i&&i.open(n)},e.prototype.close=function(e,t,n){var i=this.getDialogRef(e,t);i&&(i.closeCallBackFn=n,i.close())},e.prototype.closeAllDialogs=function(){_.forEach(mt.reverse(),(function(e){e.close()}))},e.prototype.showAppConfirmDialog=function(e){this.open(this.getAppConfirmDialog(),void 0,e)},e.prototype.closeAppConfirmDialog=function(){this.close(this.getAppConfirmDialog())},e.prototype.getAppConfirmDialog=function(){return this.appConfirmDialog},e.prototype.setAppConfirmDialog=function(e){this.appConfirmDialog=e},e.prototype.addToOpenedDialogs=function(e){mt.push(e)},e.prototype.getLastOpenedDialog=function(){return mt[mt.length-1]},e.prototype.removeFromOpenedDialogs=function(e){(-1!==mt.indexOf(e)&&mt.splice(mt.indexOf(e),1),0===mt.length&&(i.isMobile()||i.isMobileApp()))&&$("body > app-root")[0].removeAttribute("aria-hidden")},e.prototype.getOpenedDialogs=function(){return mt},e.prototype.addToClosedDialogs=function(e){ft.push(e)},e.prototype.removeFromClosedDialogs=function(e){-1!==ft.indexOf(e)&&ft.splice(ft.indexOf(e),1)},e.prototype.getDialogRefFromClosedDialogs=function(){return ft[ft.length-1]},e}();gt.decorators=[{type:t.Injectable}],gt.ctorParameters=function(){return[]};var vt=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.sanitize(t.SecurityContext.HTML,e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.sanitize(t.SecurityContext.STYLE,e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.sanitize(t.SecurityContext.SCRIPT,e);case"url":case t.SecurityContext.URL:return this.domSanitizer.sanitize(t.SecurityContext.URL,e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.sanitize(t.SecurityContext.RESOURCE_URL,e);case"none":case t.SecurityContext.NONE:return this.domSanitizer.sanitize(t.SecurityContext.NONE,e)}},e}();vt.decorators=[{type:t.Pipe,args:[{name:"sanitize"}]}],vt.ctorParameters=function(){return[{type:r.DomSanitizer}]};var yt=[Se,xe,Me,Le,Be,Ve,We,Ue,qe,Ee,ze,He,Qe],bt=[Xe,pt,ut,lt,ct,et,tt,nt,it,at,rt,dt,st,Je,ht,Ce,ot,vt],wt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Xe,lt,Je,ht,Ce,ot,vt,n.Location,{provide:i.AbstractDialogService,useClass:gt}]}},e}();wt.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.SecurityModule],declarations:v(v([],g(yt)),g(bt)),exports:v(v([],g(yt)),g(bt))}]}];var Pt,_t=function(){};e.Live_Operations=void 0,(Pt=e.Live_Operations||(e.Live_Operations={})).INSERT="insert",Pt.UPDATE="update",Pt.DELETE="delete",Pt.READ="read";var Ot="All Fields",Et={EMPTY_KEY:"EMPTY_NULL_FILTER",EMPTY_VALUE:"No Value",LABEL_KEY:"key",LABEL_VALUE:"value",NULL_EMPTY:["null","empty"],NULL:"null",EMPTY:"empty"};function Rt(e){return _.includes([i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.CHIPS],e)}var At=function(e,t,n){var o=i.debounce((function(){_.isFunction(n)&&n(t)}),300);o();var a=t?_.isObject(t)?t:JSON.parse(t):{},r=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,s=i.processFilterExpBindNode(e,a).subscribe((function(e){t=JSON.stringify(e.filterExpressions),o()}));r((function(){return s.unsubscribe()}))},Tt=function(e,t){var n,o={};return t["is-related"]?(o.tableName=t["lookup-type"],n=t["lookup-field"],o.distinctField=n,o.aliasColumn=n.replace(".","$"),o.filterExpr=t.filterexpressions?_.isObject(t.filterexpressions)?t.filterexpressions:JSON.parse(t.filterexpressions):{}):(o.tableName=e.execute(i.DataSource.Operation.GET_ENTITY_NAME),n=t.field||t.key,o.distinctField=n,o.aliasColumn=n),o};function St(e,t,n){var o;return new Promise((function(a,r){!S(t[n])||t.isDataSetBound&&"filterwidget"!==n||(o=Tt(e,t),e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:o.distinctField,entityName:o.tableName,pagesize:t.limit,filterExpr:t.filterexpressions?JSON.parse(t.filterexpressions):{}}).then((function(e){a({field:t,data:e.data,aliasColumn:o.aliasColumn})}),r))}))}function Ct(e,t){if(Rt(e[t.widget]))return e.datafield=t.aliasColumn||Et.LABEL_KEY,e.searchkey=t.distinctField||Et.LABEL_KEY,void(e.displaylabel=e.displayfield=t.aliasColumn||Et.LABEL_VALUE);e.datafield=Et.LABEL_KEY,e.displayfield=Et.LABEL_VALUE}function It(e,t,n){var o=[i.FormWidgetType.SELECT,i.FormWidgetType.RADIOSET],a={},r=[];n.isEnableEmptyFilter&&_.includes(o,e[n.widget])&&!e["is-range"]&&!e.multiple&&(a[Et.LABEL_KEY]=Et.EMPTY_KEY,a[Et.LABEL_VALUE]=n.EMPTY_VALUE||Et.EMPTY_VALUE,r.push(a)),_.each(t,(function(e){var t=e[n.aliasColumn],i={};null!==t&&""!==t&&(i[Et.LABEL_KEY]=t,i[Et.LABEL_VALUE]=t,r.push(i))})),Ct(e,n),e.dataset=r}function Dt(e,t,n){if(e&&t&&!t.isDataSetBound)if(Rt(t[n.widget])){var i=Tt(e,t);t.dataoptions=i,Ct(t,Object.assign(n||{},i)),t.datasource=e}else At(t.viewParent,t.filterexpressions,(function(i){t.filterexpressions=i,St(e,t,n.widget).then((function(e){It(e.field,e.data,{aliasColumn:e.aliasColumn,widget:n.widget,isEnableEmptyFilter:Mt(n.enableemptyfilter),EMPTY_VALUE:n.EMPTY_VALUE})}))}))}function xt(e){return i.isDefined(e)&&""!==e&&null!==e}function Nt(e,t){var n;return xt(e)&&xt(t)?n=[e,t]:xt(e)?n=e:xt(t)&&(n=t),n}function kt(e,t){var n;return xt(e)&&xt(t)?n=i.MatchMode.BETWEEN:xt(e)?n=i.MatchMode.GREATER:xt(t)&&(n=i.MatchMode.LESSER),n}function Mt(e){return e&&_.intersection(e.split(","),Et.NULL_EMPTY).length>0}function Lt(e){var t,n=_.split(e,",");return 2===_.intersection(n,Et.NULL_EMPTY).length?t=i.MatchMode.NULLOREMPTY:_.includes(n,Et.NULL)?t=i.MatchMode.NULL:_.includes(n,Et.EMPTY)&&(t=i.MatchMode.EMPTY),t}var Ft=function(e){return _.isUndefined(e)||_.isNull(e)?[]:(_.isString(e)&&(e=e.split(",").map(Function.prototype.call,String.prototype.trim)),_.isArray(e)||(e=[e]),e)};var jt,Bt=moment.localeData(),Gt=i.getClonedObject(Bt._calendar),$t=Bt._calendarDay||{lastDay:"[Yesterday]",lastWeek:"[Last] dddd",nextDay:"[Tomorrow]",nextWeek:"dddd",sameDay:"[Today]",sameElse:"L"},Vt="alphabet",Wt="Others",Ut={HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",YEAR:"year"},qt="yyyy-MM-dd",zt="w 'Week', yyyy",Ht="MMM, yyyy",Yt="YYYY",Kt="hh:mm a",Qt=function(e,t,n){if(!t)return _.cloneDeep(e);var i=t.split(","),o=[],a=[];return i.forEach((function(e){var t=e.split(":");o.push(n?n+"."+t[0]:t[0]),a.push(t[1])})),_.orderBy(e,o,a)},Zt=function(e){return _.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),e},Jt=function(e){return"wm-search"===e},Xt=function(e,t,n,o){if(e&&Jt(e.widgetType))if(e.groupby)if(_.includes(e.groupby,"(")){var a=i.$parseEvent(e.groupby);n.groupby=a(t,{row:n.dataObject||n})}else n.groupby=an(e.groupby,e.match,o,e.dateformat,e.datePipe,e.appDefaults,n);else n.groupby=""},en=function(e,t,n){var i=[];return _.forEach(_.keys(e),(function(o,a){var r=Qt(e[o],n,"dataObject");i.push({key:o,data:_.sortBy(r,(function(e){return e._groupIndex=a+1,_.get(e,t)||_.get(e.dataObject,t)}))})})),i},tn=function(e,t,n,i,o,a,r,s){n===Ut.DAY&&(Bt._calendar=$t),e=_.orderBy(e,(function(e){var n=_.get(r?e[r]:e,t);if(n)return _.toLower(n)}));var l=_.groupBy(e,an.bind(void 0,t,n,r,o,a,s));return Bt._calendar=Gt,l},nn=function(e,t,n,o){return"timestamp"===t?e:i.getFormattedDate(o,e,t||n)},on=function(e,t,n,i,o){var a,r=moment(e),s=n,l=moment(),c=function(){return"["+nn(this.valueOf(),s,qt,i)+"]"};switch(t){case Ut.HOUR:s=s||o.timeFormat,r.isValid()||(r=moment((new Date).toDateString()+" "+e)).isValid()&&(Bt._calendar.sameDay=function(){return"["+nn(this.valueOf(),s,Kt,i)+"]"}),r=r.startOf("hour"),Bt._calendar.sameElse=c,a=r.calendar(l);break;case Ut.WEEK:a=nn(r.valueOf(),s,zt,i);break;case Ut.MONTH:a=nn(r.valueOf(),s,Ht,i);break;case Ut.YEAR:a=r.format(Yt);break;case Ut.DAY:s=s||o.dateFormat,r=r.startOf("day"),Bt._calendar.sameElse=c,a=r.calendar(l)}return"Invalid date"===a?Wt:a},an=function(e,t,n,i,o,a,r){var s=_.get(n?r[n]:r,e);return _.isUndefined(s)||_.isNull(s)||""===s.toString().trim()?Wt:(t===Vt&&(s=s.substr(0,1)),_.includes(_.values(Ut),t)&&(s=on(s,t,i,o,a)),s)},rn=function(){},sn="default",ln="label",cn=function(e,t,n,i){_.forEach(e,(function(e){_.get(e,"isGroup")&&(e.field===n?e.columns[i]=t:cn(e.columns,t,n,i))}))},pn=function(e){return"true"===e||"false"!==e&&(/^\d+$/.test(e)?+e:e)},dn={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},un=function(e){if(e)return/^(\/|#\/|#)(?!\W).*/.test(e)?"#/"+(e=_.first(e.match(/[\w]+.*/g))||""):_.startsWith(e,"www.")?"//"+e:e},hn=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.nodes=[],i.nodes$=new s.Subject,i._resetNodes=_.debounce(i.resetNodes,50),i.securityService=i.inj.get(o.SecurityService),i.binditemlabel=i.nativeElement.getAttribute("itemlabel.bind"),i.binditemicon=i.nativeElement.getAttribute("itemicon.bind"),i.binditemaction=i.nativeElement.getAttribute("itemaction.bind"),i.binditembadge=i.nativeElement.getAttribute("itembadge.bind"),i.binditemchildren=i.nativeElement.getAttribute("itemchildren.bind"),i.binditemid=i.nativeElement.getAttribute("itemid.bind"),i.binditemlink=i.nativeElement.getAttribute("itemlink.bind"),i.binditemtarget=i.nativeElement.getAttribute("itemtarget.bind"),i.binduserrole=i.nativeElement.getAttribute("userrole.bind"),i.bindisactive=i.nativeElement.getAttribute("isactive.bind"),i}return u(t,e),t.prototype.getNode=function(e,t){var n=this.viewParent.pageScope||this.viewParent,o=R(t,{field:this.itemchildren,bindExpression:this.binditemchildren},n)||_.get(t,e.childrenField),a={action:R(t,{field:this.itemaction,bindExpression:this.binditemaction},n)||_.get(t,e.actionField),badge:R(t,{field:this.itembadge,bindExpression:this.binditembadge},n)||_.get(t,e.badgeField),children:Array.isArray(o)?this.getNodes(o):[],class:_.get(t,e.classField),disabled:t.disabled,icon:R(t,{field:this.itemicon,bindExpression:this.binditemicon},n)||_.get(t,e.iconField),id:R(t,{field:this.itemid,bindExpression:this.binditemid},n)||_.get(t,e.idField),label:R(t,{field:this.itemlabel,bindExpression:this.binditemlabel},n)||_.get(t,e.labelField),link:un(R(t,{field:this.itemlink,bindExpression:this.binditemlink},n)||_.get(t,e.linkField)),target:un(R(t,{field:this.itemtarget,bindExpression:this.binditemtarget},n)||_.get(t,e.targetField)),role:R(t,{field:this.userrole,bindExpression:this.binduserrole},n),isactive:R(t,{field:this.isactive,bindExpression:this.bindisactive},n),value:this.datafield?"All Fields"===this.datafield?t:i.findValueOf(t,this.datafield):t};return _.omitBy(a,_.isUndefined)},t.prototype.resetItemFieldMap=function(){this._itemFieldMap=null},t.prototype.getItemFieldsMap=function(){return this._itemFieldMap||(this._itemFieldMap={idField:this.itemid||"itemid",iconField:this.itemicon||"icon",labelField:this.itemlabel||"label",linkField:this.itemlink||"link",targetField:this.itemtarget||"target",badgeField:this.itembadge||"badge",childrenField:this.itemchildren||"children",classField:this.itemclass||"class",actionField:this.itemaction||"action",isactiveField:this.isactive||"isactive"}),this._itemFieldMap},t.prototype.prepareNodeDataSet=function(e){return(e=Ft(e)).map((function(e){return i.isObject(e)?e:{label:e,value:e}}))},t.prototype.getNodes=function(e){var t=this;void 0===e&&(e=this.dataset||{});var n=Qt(this.prepareNodeDataSet(e),this.orderby)||[];if(n.length){var o=this.userrole,a=this.getItemFieldsMap();n=n.reduce((function(e,n){return i.validateAccessRoles(n[o],t.securityService.loggedInUser)&&e.push(t.getNode(a,n)),e}),[])}return n},t.prototype.resetNodes=function(){this.resetItemFieldMap(),this.nodes=this.getNodes(),i.$appDigest(),this.nodes$.next()},t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":case"itemicon":case"itemlabel":case"itemlink":case"itemtarget":case"itemclass":case"itemchildren":case"isactive":case"orderby":this._resetNodes()}e.prototype.onPropertyChange.call(this,t,n,i)},t}(Oe),mn={pattern:"regexp",max:"maxvalue",min:"minvalue",required:"required",maxlength:"maxchars",mindate:"mindate",maxdate:"maxdate",excludedates:"excludedates",excludedays:"excludedays",invalidNumber:"invalidNumber"},fn=function(){function e(e,t,n,i,o,a){this.instance=e,this.formwidget=t,this.widgettype=n,this.widgetControl=i,this.widgetContext=o,this.defaultValidatorMessages=[],a&&(this.tableFieldType=a)}return e.prototype.getDefaultValidators=function(){var e=[];return this.instance.required&&!1!==this.instance.show&&(this.widgettype===i.FormWidgetType.CHECKBOX||this.widgettype===i.FormWidgetType.TOGGLE?e.push(c.Validators.requiredTrue):e.push(c.Validators.required)),this.instance.maxchars&&e.push(c.Validators.maxLength(this.instance.maxchars)),this.instance.minvalue&&e.push(c.Validators.min(this.instance.minvalue)),this.instance.maxvalue&&this.widgettype!==i.FormWidgetType.RATING&&e.push(c.Validators.max(this.instance.maxvalue)),this.instance.regexp&&e.push(c.Validators.pattern(this.instance.regexp)),this.formwidget&&_.isFunction(this.formwidget.validate)&&e.push(this.formwidget.validate.bind(this.formwidget)),e},e.prototype.setUpValidators=function(e){if(!this.hasValidators&&(this.instance._validators=this.getDefaultValidators(),e&&this.instance._validators.push(e),this.widgetContext.ngform)){this.widgetControl.setValidators(this.instance._validators);var t={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(t.emitEvent=!1),this.widgetControl.updateValueAndValidity(t)}},e.prototype.getPromiseList=function(e){var t=this,n=[];return _.forEach(e,(function(e,i){var o=e;e instanceof Function&&e.bind&&(o=e(t.widgetControl,t.widgetContext)),o instanceof Promise&&n.push(o)})),n},e.prototype.setAsyncValidators=function(e){var t=this;this._asyncValidatorFn=function(){return function(){return Promise.all(t.getPromiseList(e)).then((function(){return t.instance.validationmessage="",null}),(function(e){if(e.hasOwnProperty("errorMessage"))t.instance.validationmessage=_.get(e,"errorMessage");else{var n=_.keys(e);t.instance.validationmessage=e[n[0]].toString()}return e})).then((function(e){var n=function(){setTimeout((function(){"PENDING"===t.widgetControl.status?n():t.instance.onStatusChange(t.widgetControl.status,t.tableFieldType)}),100)};return n(),e}))}},this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetContext.ngform.touched&&this.widgetControl.updateValueAndValidity()},e.prototype.isDefaultValidator=function(e){return _.get(i.VALIDATOR,_.toUpper(e))},e.prototype.setDefaultValidator=function(e,t){t&&t instanceof Function?this.watchDefaultValidatorExpr(t.bind(void 0,this.widgetControl,this.widgetContext),e):(this.instance.widget[e]=t,this.instance[e]=t)},e.prototype.setValidators=function(e){var t=this,n=_.cloneDeep(e);this.hasValidators=!0,this._syncValidators=[],_.forEach(n,(function(e,i){if(e&&e instanceof Function)n[i]=e.bind(void 0,t.widgetControl,t.widgetContext),t._syncValidators.push(n[i]);else{var o=_.get(e,"type");if(t.defaultValidatorMessages[o]=_.get(e,"errorMessage"),t.isDefaultValidator(o)){var a=_.get(e,"validator");t.setDefaultValidator(o,a),n[i]=""}}})),this._syncValidators=_.filter(n,(function(e){if(e)return e})),this.applyDefaultValidators()},e.prototype.observeOn=function(e,t){var n=this;_.forEach(e,(function(e){var i=_.find(n.widgetContext[t],{key:e});i&&(i.notifyForFields||(i.notifyForFields=[]),i.notifyForFields.push(n.instance))}))},e.prototype.validate=function(){this.applyDefaultValidators(),this._asyncValidatorFn&&(this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetControl.updateValueAndValidity()),this.widgetContext.ngform.touched&&this.widgetControl.markAsTouched()},e.prototype.watchDefaultValidatorExpr=function(e,t){var n=this,o=this.instance.widgetId+"_"+t+"_formField";i.$unwatch(o),this.instance.registerDestroyListener(i.$watch("boundFn(fn)",_.extend(this.instance,this.instance.viewParent),{fn:e},(function(e,i){n.instance.widget[t]=e,n.applyDefaultValidators()}),o))},e.prototype.applyDefaultValidators=function(){var e=this.getDefaultValidators();this.widgetControl.setValidators(_.concat(this._syncValidators||[],e)),this.widgetControl.updateValueAndValidity(),this.setCustomValidationMessage()},e.prototype.setCustomValidationMessage=function(){var e=this.widgetControl&&this.widgetControl.errors;if(e)if(e.hasOwnProperty("errorMessage"))this.instance.validationmessage=_.get(e,"errorMessage");else{var t=_.keys(e)[0],n=_.get(mn,t)||this.formwidget.validateType;if(n){var i=_.get(this.defaultValidatorMessages,n)||this.instance.validationmessage;this.instance.validationmessage=i&&i instanceof Function?i(this.widgetControl,this.widgetContext):i}else this.instance.validationmessage=""}},e}(),gn=function(e){function t(t,n,o){var a=e.call(this)||this;a.$el=t,a.app=n,a.onPullToRefresh=o,a.count=0;return a.$el.prepend('<div class="refresh-container"></div>'),a.infoContainer=a.$el.find(".refresh-container"),i.isIos()&&a.infoContainer.addClass("ios-refresh-container"),a.init(a.$el),a}return u(t,e),t.prototype.threshold=function(){return 10},t.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.VERTICAL},t.prototype.subscribe=function(){var e=this;this.cancelSubscription=this.app.subscribe("toggle-variable-state",(function(t){t.active&&e.animationInProgress?(e.count++,e.wait()):e.count>0&&e.count--,!e.count&&e.animationInProgress&&e.stopAnimation()}))},t.prototype.bounds=function(e,t){var n=this.$el[0].iscroll;return t<0||n&&!isNaN(n.y)&&0!==n.y?{lower:void 0,upper:void 0}:(this.spinner||(this.spinner=i.isIos()?new yn(this.infoContainer):new vn(this.infoContainer),this.subscribe()),{lower:0,center:0,upper:i.isIos()?0:150,strict:!i.isIos()})},t.prototype.context=function(){var e=this;return this.infoContainer.show(),i.isIos()&&this.infoContainer.addClass("entry"),{spin:function(t){e.spinner.setRotation(2*t)}}},t.prototype.animation=function(){return i.isIos()?{css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}"}}:{target:this.infoContainer,css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}",opacity:"${{min(($D + $d) / 100, 1)}}"}}},t.prototype.onAnimation=function(){var e=this;this.animationInProgress=!0,this.spinner.start(),this.onPullToRefresh&&this.onPullToRefresh(),setTimeout((function(){e.runAnimation||e.stopAnimation()}))},t.prototype.stopAnimation=function(){var e=this;setTimeout((function(){e.runAnimation=!1,e.animationInProgress=!1,e.spinner.stop(),e.infoContainer.hide(),i.setCSS(e.infoContainer[0],"transform","none"),i.isIos()||i.setCSS(e.infoContainer[0],"opacity",0),e.infoContainer.removeClass("entry")}),800)},t.prototype.wait=function(){this.runAnimation=!0},t}(p.SwipeAnimation),vn=function(){function e(e,t){this.$el=e,this.options=t||{}}return e.prototype.polarToCartesian=function(e,t,n,i){var o=(i-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}},e.prototype.describeArc=function(e,t,n,i,o){var a=this.polarToCartesian(e,t,n,o),r=this.polarToCartesian(e,t,n,i),s=o-i<=180?"0":"1";return["M",a.x,a.y,"A",n,n,0,s,0,r.x,r.y,"L",r.x,r.y].join(" ")},e.prototype.init=function(){if(!this.initialized){var e=$('<svg><path id="arc1"/></svg>'),t=$('<div class="android-spinner"></div>');t.append(e),this.$el.append(t),this.cx=t.outerWidth()/2,this.cy=t.outerHeight()/2,this.r=.6*this.cx,this.path=t.find("path"),this.initialized=!0,this.container=t}},e.prototype.setRotation=function(e){this.init(),this.path.attr("d",this.describeArc(this.cx,this.cy,this.r,0,e))},e.prototype.start=function(){var e=this;this.init();var t=this,n=this.options.time||1800,i=0;this.container.addClass("spin"),this.intervalId=setInterval((function(){var n;n=(i+=10)>720?i=0:i>360?720-i:i,t.path.attr("d",e.describeArc(t.cx,t.cy,t.r,0,n))}),10*n/360)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0),this.container.removeClass("spin")},e}(),yn=function(){function e(e){this.$el=e}return e.prototype.init=function(){if(!this.svg){var e=$('<div class="ios-spinner"><svg></svg></div>'),t=e.find("svg");this.$el.append(e);for(var n=e.width(),i=0;i<12;i++)t[0].innerHTML+='<line y1="'+.15*n+'" y2="'+.3*n+'"\n transform="translate('+.5*n+", "+.5*n+") rotate("+30*i+')">\n </line>';e.append(t),this.svg=t}},e.prototype.setRotation=function(e){this.init(),this.svg.css("transform","rotateZ( "+30*Math.round(e/30)+"deg)")},e.prototype.start=function(){var e=this;this.init();var t=0;this.intervalId=setInterval((function(){t+=10,e.setRotation(t)}),20)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0)},e}(),bn=this;!function(e){e.LEFT_PANEL="page-left-panel",e.RIGHT_PANEL="page-right-panel",e.SWIPE_ELEM="page-left-panel-icon",e.CONTENT="app-content-column",e.HEADER="page-header",e.SEARCH="app-search"}(jt||(jt={}));var wn=function(e){return"[data-role='"+e+"']"},Pn=(wn("pageContainer"),function(e,t){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.removeEventListener("click",t),e.addEventListener("click",t))}),_n=function(e,t){if(i.isMobile()){if(e)try{e.widget.collapse()}catch(e){}t&&i.setCSS(t,"display","none")}},On=function(e,t,n,i){void 0===i&&(i=!1),i||Pn(t,_n.bind(bn,e,n))},En=function(e,t){Pn(wn(jt.SWIPE_ELEM),(function(){e&&(e.widget.toggle(),e.classList.contains("visible")&&t&&i.setCSS(t,"display","none"))}))},Rn=function(e){Pn(e,_n)},An=function(e,t){"none"===$(e).css("display")?(_n(t),i.setCSS(e,"display","inline-table")):_n(t,e)},Tn=function(e,t){$(e).each((function(e,n){var i=$('<a class="app-header-action"><i class="wi wi-search"></i></a>');$(n).before(i),Pn(i,(function(){return An(n,t)}))}))};e.ALLFIELDS=Ot,e.AUTOCLOSE_TYPE={OUTSIDECLICK:"outsideClick",ALWAYS:"always",DISABLED:"disabled"},e.BaseComponent=_e,e.BaseContainerComponent=Re,e.BaseFieldValidations=fn,e.ContainerDirective=Se,e.Context=w,e.CustomPipe=ot,e.DEBOUNCE_TIMES={PAGINATION_DEBOUNCE_TIME:250},e.DISPLAY_TYPE=le,e.DataSetItem=rn,e.DatasetAwareNavComponent=hn,e.DialogRef=b,e.DialogServiceImpl=gt,e.EDIT_MODE={QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog"},e.EVENTS_MAP=se,e.FileExtensionFromMimePipe=ut,e.FileIconClassPipe=pt,e.FileSizePipe=ct,e.FilterPipe=lt,e.INPUTMODE={FINANCIAL:"financial",NATURAL:"natural"},e.ImagePipe=Ce,e.ItemTemplateDirective=xe,e.LIVE_CONSTANTS=Et,e.LazyLoadDirective=Le,e.MessageComponent=Be,e.NAVIGATION_TYPE={ADVANCED:"Advanced",BASIC:"Basic",CLASSIC:"Classic",INLINE:"Inline",NONE:"None",ONDEMAND:"On-Demand",PAGER:"Pager",SCROLL:"Scroll"},e.NumberToStringPipe=rt,e.PROP_ANY=ie,e.PROP_BOOLEAN=ne,e.PROP_NUMBER=te,e.PROP_STRING=ee,e.PartialContainerDirective=qe,e.PartialDirective=Ve,e.PartialParamDirective=Ue,e.PartialParamHandlerDirective=We,e.PrefixPipe=nt,e.PullToRefresh=gn,e.RedrawableDirective=Ee,e.RepeatTemplateDirective=Me,e.SanitizePipe=vt,e.ShowInDeviceDirective=ze,e.SmoothScrollDirective=He,e.StateClassPipe=dt,e.StringToNumberPipe=st,e.StylableComponent=Oe,e.SuffixPipe=it,e.TextContentDirective=Qe,e.TimeFromNowPipe=at,e.ToCurrencyPipe=tt,e.ToDatePipe=Xe,e.ToNumberPipe=et,e.TrailingZeroDecimalPipe=Je,e.TrustAsPipe=ht,e.WidgetRef=y,e.WmComponentsModule=wt,e.applyFilterOnField=function(e,t,n,o,a){void 0===a&&(a={});var r=t.field||t.key,s=_.filter(n,{"filter-on":r});o=t["is-range"]?Nt(t.minValue,t.maxValue):i.isDefined(o)?o:t.value,!e||a.isFirst&&(_.isUndefined(o)||""===o)||_.forEach(s,(function(n){var r,s,l,c=n.field||n.key,p=t["lookup-field"]||t._primaryKey,d=n["edit-widget-type"]||n.widgettype,u={},h=n["filter-on"];S(d)&&!n.isDataSetBound&&h!==c&&(t&&t["is-related"]&&(h+="."+p),i.isDefined(o)?(l=t["is-range"]?kt(t.minValue,t.maxValue):Mt(a.enableemptyfilter)&&o===Et.EMPTY_KEY?Lt(a.enableemptyfilter):i.MatchMode.EQUALS,r=_.isObject(o)&&!_.isArray(o)?o[p]:o,u[h]={value:r,matchMode:l}):u={},s=c,Rt(d)&&n.dataoptions?n.dataoptions.filterFields=u:e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:s,filterFields:u,pagesize:n.limit}).then((function(e){It(n,e.data,{aliasColumn:s,widget:a.widget||"widgettype",isEnableEmptyFilter:Mt(a.enableemptyfilter),EMPTY_VALUE:a.EMPTY_VALUE})}),_t))}))},e.configureDnD=function(e,t,n,i,o){var a=Object.assign({containment:e,delay:100,opacity:.8,helper:"clone",zIndex:1050,tolerance:"pointer",start:n,update:i,sort:o},t);e.sortable(a)},e.convertDataToObject=Zt,e.createArrayFrom=Ft,e.extractDataAsArray=function(e){return _.isUndefined(e)||_.isNull(e)||""===_.trim(e)?[]:(_.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),_.isArray(e)||(e=[e]),e)},e.extractDataSourceName=function(e){if(e){var t,n=e.split(".");return n.length>1&&"Variables"===n[0]&&(t=n[1]),t}},e.fetchDistinctValues=function(e,t,n){_.isEmpty(t)||t.forEach((function(t){Dt(e,t,n)}))},e.fetchRelatedFieldData=function(e,t,n){var o,a,r=n.relatedField,s=n.datafield;e&&(o=e.execute(i.DataSource.Operation.GET_RELATED_PRIMARY_KEYS,r),t.datafield=s,t._primaryKey=_.isEmpty(o)?void 0:o[0],t.compareby=o&&o.join(","),a=s===Ot?void 0:s,t.displayfield=a=t.displayfield||a||t._primaryKey,Rt(t[n.widget])?(t.dataoptions={relatedField:r,filterExpr:t.filterexpressions?t.filterexpressions:{}},t.datasource=e,t.searchkey=t.searchkey||a,t.displaylabel=t.displayfield=t.displaylabel||a,t.showPendingSpinner&&(t.showPendingSpinner=!1)):At(t.viewParent,t.filterexpressions,(function(n){t.filterexpressions=n,e.execute(i.DataSource.Operation.GET_RELATED_TABLE_DATA,{relatedField:r,pagesize:t.limit,orderBy:t.orderby?_.replace(t.orderby,/:/g," "):"",filterFields:{},filterExpr:t.filterexpressions?t.filterexpressions:{}}).then((function(e){t.dataset=e.data,t.displayfield=t.displayfield||_.head(_.keys(_.get(e,"[0]"))),t.showPendingSpinner&&(t.showPendingSpinner=!1)}),_t)})))},e.filterDate=nn,e.getBackGroundImageUrl=I,e.getConditionalClasses=B,e.getContainerTargetClass=function(e){return".wm-app"},e.getDataTableFilterWidget=function(e){var t=dn[e]&&dn[e][0];return e===i.DataType.BOOLEAN&&(t=i.FormWidgetType.SELECT),_.includes([i.FormWidgetType.TEXT,i.FormWidgetType.NUMBER,i.FormWidgetType.SELECT,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.DATE,i.FormWidgetType.TIME,i.FormWidgetType.DATETIME],t)?t:i.FormWidgetType.TEXT},e.getDefaultValue=function(e,t,n){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?pn(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?pn(e):e},e.getDefaultViewModeWidget=function(e){return _.includes(["checkbox","toggle","rating"],e)?sn:ln},e.getDistinctFieldProperties=Tt,e.getDistinctValues=St,e.getDistinctValuesForField=Dt,e.getEditModeWidget=function(e){return e["related-entity-name"]&&e["primary-key"]?i.FormWidgetType.SELECT:dn[e.type]&&dn[e.type][0]||i.FormWidgetType.TEXT},e.getEmptyMatchMode=Lt,e.getEnableEmptyFilter=Mt,e.getEvaluatedData=R,e.getFieldLayoutConfig=function(e,t,n){var o="",a="";return"top"===(t=t||"top")||"floating"===t?n&&"android"===n||!i.isMobileApp()||i.isAndroid()?o=a="col-xs-12":i.isMobileApp()&&(o="col-xs-4",a="col-xs-8"):e&&_.forEach(_.split(e," "),(function(e){var t,n,i=_.split(e,"-"),r=i[0];t=parseInt(i[1],10),o+=" col-"+r+"-"+t,a+=" col-"+r+"-"+(n=(n=12-t)<=0?12:n)})),{captionCls:o,widgetCls:a}},e.getFieldTypeWidgetTypesMap=function(){return dn},e.getImageUrl=C,e.getKeyboardFocusableElements=function(e){var t=e.querySelectorAll("a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]");return Array.from(t).filter((function(e){return!e.hasAttribute("disabled")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("tabindex")||e.hasAttribute("tabindex")&&!e.getAttribute("tabindex").startsWith("-"))}))},e.getMatchModeMsgs=function(e){return{start:e.LABEL_STARTS_WITH,startignorecase:e.LABEL_STARTS_WITH_IGNORECASE,end:e.LABEL_ENDS_WITH,endignorecase:e.LABEL_ENDS_WITH_IGNORECASE,anywhere:e.LABEL_CONTAINS,anywhereignorecase:e.LABEL_CONTAINS_IGNORECASE,exact:e.LABEL_IS_EQUAL_TO,exactignorecase:e.LABEL_IS_EQUAL_TO_IGNORECASE,notequals:e.LABEL_IS_NOT_EQUAL_TO,notequalsignorecase:e.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,lessthan:e.LABEL_LESS_THAN,lessthanequal:e.LABEL_LESS_THAN_OR_EQUALS_TO,greaterthan:e.LABEL_GREATER_THAN,greaterthanequal:e.LABEL_GREATER_THAN_OR_EQUALS_TO,null:e.LABEL_IS_NULL,isnotnull:e.LABEL_IS_NOT_NULL,empty:e.LABEL_IS_EMPTY,isnotempty:e.LABEL_IS_NOT_EMPTY,nullorempty:e.LABEL_IS_NULL_OR_EMPTY,in:e.LABEL_IN,notin:e.LABEL_NOT_IN,between:e.LABEL_BETWEEN}},e.getMatchModeTypesMap=function(e){return e&&(L.number.push("in","notin","between"),L.date.push("between"),L.string.push("in","notin"),L.character.push("in","notin")),_.forEach(M,(function(e,t){_.forEach(e,(function(e){F[e]=L[t]}))})),F.default=_.union(L.number,L.string,L.character,L.date,L.date),F},e.getObjValueByKey=E,e.getOrderByExpr=function(e){e=e||[];var t=[];return _.forEach(e,(function(e){e.direction&&t.push(e.property+" "+e.direction.toLowerCase())})),_.join(t,",")},e.getOrderedDataset=Qt,e.getRangeFieldValue=Nt,e.getRangeMatchMode=kt,e.getRowOperationsColumn=function(){return{field:"rowOperations",type:"custom",displayName:"Actions",width:"120px",readonly:!0,sortable:!1,searchable:!1,resizable:!1,selectable:!1,show:!0,operations:[],opConfig:{},pcDisplay:!0,mobileDisplay:!0,tabletDisplay:!0,include:!0,isRowOperation:!0}},e.getUniqObjsByDataField=function(e,t,n,i){var o,a=t===Ot;return o=a?_.uniqWith(e,_.isEqual):_.uniqBy(e,"key"),!n||i?o:_.filter(o,(function(e){return(a||_.trim(e.key))&&_.trim(e.label)}))},e.getWatchIdentifier=k,e.getWidgetPropsByType=J,e.groupData=function(e,t,n,o,a,r,s,l,c){var p={};if(_.includes(n,"(")){var d=i.$parseEvent(n);p=_.groupBy(t,(function(t){return d(e.viewParent,{row:t.dataObject||t})}))}else p=tn(t,n,o,a,r,s,l,c);return en(p,n,a)},e.handleHeaderClick=function(e){var t=$(e.target).closest(".item-group"),n=t.find("li.list-group-header .app-icon");n.hasClass("wi-chevron-down")?n.removeClass("wi-chevron-down").addClass("wi-chevron-up"):n.removeClass("wi-chevron-up").addClass("wi-chevron-down"),t.find(".group-list-item").toggle()},e.hasLinkToCurrentPage=T,e.interpolateBindExpressions=At,e.isActiveNavItem=A,e.isBooleanAttr=pe,e.isDataSetWidget=S,e.isDimensionProp=ue,e.isStyle=U,e.parseValueByType=function(e,t,n,o){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:o?e:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?pn(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?pn(e):e},e.performDataOperation=function(t,n,o){return new Promise((function(a,r){if(t.execute(i.DataSource.Operation.SUPPORTS_CRUD)){var s=void 0;switch(o.operationType){case e.Live_Operations.UPDATE:s=i.DataSource.Operation.UPDATE_RECORD;break;case e.Live_Operations.INSERT:s=i.DataSource.Operation.INSERT_RECORD;break;case e.Live_Operations.DELETE:s=i.DataSource.Operation.DELETE_RECORD}t.execute(s,n).then((function(e){return function(e,t,n){e.error?n(e):t(e)}(e,a,r)}),r)}else if(t.execute(i.DataSource.Operation.IS_API_AWARE))if("wm.CrudVariable"===t.category){var l="insert"===o.operationType?"create":"delete"===o.operationType?"delete":"update";t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0,operation:l,inputFields:n}).then(a,r)}else t.execute(i.DataSource.Operation.SET_INPUT,n),t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0}).then(a,r);else a(n)}))},e.prepareFieldDefs=function(e,t){var n,i={objects:[],terminals:[]};if(e||(e=[]),t||(t={}),t.setBindingField=!0,t.columnCount=0,n=V(e),G(n,i,"",t),!t||t&&!t.filter)return i.terminals;switch(t.filter){case"all":return i;case"objects":return i.objects;case"terminals":return i.terminals}return i},e.propNameCSSKeyMap=W,e.provideAs=D,e.provideAsDialogRef=function(e){return D(e,b)},e.provideAsWidgetRef=x,e.refreshDataSource=function(e,t){return new Promise((function(n,o){e?e.execute(i.DataSource.Operation.LIST_RECORDS,{filterFields:t.filterFields||{},orderBy:t.orderBy,page:t.page||1,logicalOp:t.condition||""}).then(n,o):o()}))},e.register=X,e.registerFormWidget=function(e,t){var n=Q+e,i=Z.get(n);i&&t.forEach((function(e,t){return i.set(t,e)}))},e.setFocusTrap=function(e,t,n){return a.createFocusTrap(e,{onActivate:function(){return e.classList.add("is-active")},onDeactivate:function(){return e.classList.remove("is-active")},allowOutsideClick:t,setReturnFocus:n})},e.setHeaderConfig=cn,e.setHeaderConfigForTable=function(e,t,n,i){n?cn(e,t,n,i):e[i]=t},e.setItemByCompare=function(e,t,n){_.forEach(e,(function(e){if(i.isEqualWithFields(e.value,t,n))return e.selected=!0,!1}))},e.styler=Y,e.toggleAllHeaders=function(e){var t=$(e.nativeElement).find(".item-group");t.find(".group-list-item").toggle();var n=t.find("li.list-group-header .app-icon");n&&_.forEach(n,(function(e){(e=$(e)).hasClass("wi-chevron-down")?e.removeClass("wi-chevron-down").addClass("wi-chevron-up"):e.removeClass("wi-chevron-up").addClass("wi-chevron-down")}))},e.transformData=function(e,t){var n,i,o,a,r,s,l;return e=e||[],_.isArray(e)?_.isString(e[0])&&(i=[],_.forEach(e,(function(e){(n={})[t.split(".").join("-")]=e,i.push(n)})),e=i):(_.isString(e)&&(o=t.substring(t.indexOf(".")+1,t.length).split("."),a=[],r=o.length,l=s={},o.forEach((function(t,n){a.forEach((function(e){l=s[e]})),l[t]=n===r-1?e:{},a.push(t)})),e=s),e=[e]),e},e.transformDataWithKeys=function(e){var t=[];if(_.isObject(e[0])||_.isObject(e)&&!(e instanceof Array)){var n=Object.keys(e[0]||e);_.forEach(n,(function(e,n){t.push({key:e,label:e,value:e,index:n+1})}))}return t},e.transformFormData=function(e,t,n,o,a,r){var s=[];if(t){if(t=Zt(t),_.isUndefined(a)&&(a=1),_.isString(t))(t=t.split(",").map((function(e){return e.trim()}))).forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:a+n};Xt(r,e,o,"value"),s.push(o)}));else if(_.isArray(t)&&!_.isObject(t[0]))t.forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:a+n};Xt(r,e,o,"value"),s.push(o)}));else if(t instanceof Array||!_.isObject(t))n||(n=Ot),t.forEach((function(t,l){var c=n===Ot?a+l:E(t,n);if(!_.isUndefined(c)&&!_.isNull(c)){var p=R(t,{field:o.displayField,expression:o.displayExpr,bindExpression:o.bindDisplayExpr},e),d={key:c,label:i.isDefined(p)&&null!==p?p.toString():"",value:n===Ot?t:c,dataObject:t,index:a+l};(o.displayImgSrc||o.bindDisplayImgSrc)&&(d.imgSrc=R(t,{expression:o.displayImgSrc,bindExpression:o.bindDisplayImgSrc},e)),Xt(r,e,d,"dataObject"),s.push(d)}}));else{_.forEach(t,(function(n,o){var l={key:_.trim(o),value:o,label:i.isDefined(n)&&null!==n?n.toString():"",index:a,dataObject:t};Xt(r,e,l,"value"),s.push(l)}))}return s}},e.unsupportedStatePersistenceTypes=["On-Demand","Scroll"],e.updateDeviceView=function(e,t){void 0===t&&(t=!1);var n=e.querySelector(wn(jt.LEFT_PANEL)),i=e.querySelector(wn(jt.RIGHT_PANEL)),o=e.querySelector(wn(jt.HEADER)),a=o&&o.querySelector("."+jt.SEARCH),r=e.querySelector("."+jt.CONTENT);On(n,r,a,t),n?En(n,a):$(o).find(wn(jt.SWIPE_ELEM)).remove(),i&&Rn(i),a&&Tn(a,n)},e["\u02750"]=Ke,e["\u0275a"]=oe,e["\u0275b"]=Ie,e["\u0275c"]=Ne,e["\u0275d"]=Fe,e["\u0275e"]=Ge,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/transpiler"),require("@wm/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@wm/buildTask",["exports","@wm/transpiler","@wm/core","@angular/compiler"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.buildTask={}),e.wm.transpiler,e.wm.core,e.ng.compiler)}(this,(function(e,t,n,i){"use strict";var o=new n.IDGenerator("wm_carousel_ref_"),a=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},r=a;t.register("wm-carousel",(function(){return{pre:function(e,n){var i=o.nextUid();return n.set("carousel_ref",i),'<div class="app-carousel carousel"><carousel wmCarousel #'+i+'="wmCarousel" '+t.getAttrMarkup(e)+' interval="0" [ngClass]="'+i+'.navigationClass">'},post:function(){return"</carousel></div>"},template:function(e){if(a(e)){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(!i)return;var r=t.getBoundToExpr(i.value);if(!r)return;n.updateTemplateAttrs(e,r,o.value)}},provide:function(e,t){var n=new Map;return n.set("carousel_ref",t.get("carousel_ref")),n}}}));var s=Object.freeze({__proto__:null,default:function(){},"\u02750":r}),l=1;t.register("wm-carousel-content",(function(){return{pre:function(e){return"<slide wmCarouselTemplate "+t.getAttrMarkup(e)+">"},post:function(){return"</slide>"}}})),t.register("wm-carousel-template",(function(){return{requires:["wm-carousel"],pre:function(e,n,i){var o=i.get("carousel_ref");return'<div *ngIf="!'+o+'.fieldDefs">{{'+o+".nodatamessage}}</div>\n <"+"slide wmCarouselTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+o+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="carouselTempRef'+l+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </'+"slide>\n <ng-template #carouselTempRef"+l+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var c=Object.freeze({__proto__:null,default:function(){}});t.register("wm-login",(function(){return{pre:function(e){return"<div wmLogin "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction">'},post:function(){return"</div>"},provide:function(){var e=new Map;return e.set("isLogin",!0),e}}}));var p=Object.freeze({__proto__:null,default:function(){}});t.register("wm-marquee",(function(){return{pre:function(e){return'<marquee onmouseover="this.stop();" onmouseout="this.start();" wmMarquee role="marquee" aria-live="off" '+t.getAttrMarkup(e)+">"},post:function(){return"</marquee>"}}}));var d=Object.freeze({__proto__:null,default:function(){}}),u=new n.IDGenerator("wm_anchor");t.register("wm-anchor",(function(){return{pre:function(e){var n=u.nextUid();return"<a wmAnchor #"+n+'="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</a>"}}}));var h=Object.freeze({__proto__:null,default:function(){}});t.register("wm-audio",(function(){return{pre:function(e){return"<div wmAudio "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var m=Object.freeze({__proto__:null,default:function(){}}),f=new n.IDGenerator("wm_html");t.register("wm-html",(function(){return{pre:function(e){var n=f.nextUid();return"<div wmHtml #"+n+'="wmHtml" [attr.aria-label]="'+n+".hint || 'HTML content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var g=Object.freeze({__proto__:null,default:function(){}});t.register("wm-icon",(function(){return{pre:function(e){return'<span wmIcon aria-hidden="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</span>"}}}));var v=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframe",(function(){return{pre:function(e){return"<div wmIframe "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var y=Object.freeze({__proto__:null,default:function(){}}),b=new n.IDGenerator("wm_label");t.register("wm-label",(function(){return{pre:function(e){var n=b.nextUid();return"<label wmLabel #"+n+'="wmLabel" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</label>"}}}));var w=Object.freeze({__proto__:null,default:function(){}}),P=new n.IDGenerator("wm_picture");t.register("wm-picture",(function(){return{pre:function(e){var n=P.nextUid();return"<img wmPicture #"+n+'="wmPicture" alt="image" wmImageCache="'+(e.get("offline")||"true")+'" [attr.aria-label]="'+n+".hint || 'Image'\" "+t.getAttrMarkup(e)+">"}}}));var O=Object.freeze({__proto__:null,default:function(){}}),E=new n.IDGenerator("wm_spinner");t.register("wm-spinner",(function(){return{pre:function(e){var n=E.nextUid();return"<div wmSpinner #"+n+'="wmSpinner" role="alert" [attr.aria-label]="'+n+'.hint || \'Loading...\'" aria-live="assertive" aria-busy="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var R=Object.freeze({__proto__:null,default:function(){}}),A=function(e,t){return e.attrs.find((function(e){return e.name===t}))},T=A,S=function(e,t){var n=A(e,t);if(n)return n.value},C=S,I=function(e){return new RegExp("bind:("+e+"|"+e+"\\[\\$i])\\.","g")},D=I;t.register("wm-progress-bar",(function(){return{template:function(e){var n=S(e,"dataset"),i=t.getBoundToExpr(n);if(i){var o=S(e,"type"),a=S(e,"datavalue"),r=I(i);o&&o.includes(i)&&(o=o.replace(r,""),A(e,"type").value=o),a&&a.includes(i)&&(a=a.replace(r,""),A(e,"datavalue").value=a)}},pre:function(e){return"<div wmProgressBar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var x=Object.freeze({__proto__:null,default:function(){},"\u02750":T,"\u02751":C,"\u02752":D});t.register("wm-progress-circle",(function(){return{pre:function(e){return"<div wmProgressCircle "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var N=Object.freeze({__proto__:null,default:function(){}}),k=new n.IDGenerator("wm_richtexteditor");t.register("wm-richtexteditor",(function(){return{pre:function(e){var n=k.nextUid();return"<div wmRichTextEditor #"+n+'="wmRichTextEditor" role="textbox" [attr.aria-label]="'+n+".hint || 'Richtext editor'\" "+t.getFormMarkupAttr(e)+">"},post:function(){return"</div>"}}}));var M=Object.freeze({__proto__:null,default:function(){}});t.register("wm-search",(function(){return{pre:function(e){return"<div wmSearch "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var L=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tree",(function(){return{pre:function(e){return'<ul wmTree class="ztree" '+t.getAttrMarkup(e)+">"},post:function(){return"</ul>"}}}));var F=Object.freeze({__proto__:null});t.register("wm-card",(function(){return{pre:function(e){return"<div wmCard "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var j=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-content",(function(){return{pre:function(e){return"<div wmCardContent partialContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var B=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-actions",(function(){return{pre:function(e){return"<div wmCardActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var G=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-footer",(function(){return{pre:function(e){return"<div wmCardFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var $=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chart",(function(){return{pre:function(e){return'<div wmChart redrawable aria-label="'+e.get("type")+' Chart" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var V=Object.freeze({__proto__:null,default:function(){}}),W=new n.IDGenerator("wm_accordion_ref_"),U=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},q=U;t.register("wm-accordion",(function(){return{pre:function(e,n){var i=W.nextUid();return n.set("accordion_ref",i),"<div wmAccordion #"+i+'="wmAccordion" role="tablist" aria-multiselectable="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(U(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),a=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var r=t.getBoundToExpr(o.value);if(!r)return;n.updateTemplateAttrs(e,r,a.value)}},provide:function(e,t){var n=new Map;return n.set("accordion_ref",t.get("accordion_ref")),n}}}));var z=Object.freeze({__proto__:null,default:function(){},"\u02750":q}),H=new n.IDGenerator("wm_accordionpane");t.register("wm-accordionpane",(function(){return{pre:function(e){var n=H.nextUid();return"<div #"+n+'="wmAccordionPane" [attr.aria-expanded]="'+n+'.isActive" wmAccordionPane partialContainer wm-navigable-element="true" role="tab" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Y=Object.freeze({__proto__:null,default:function(){}});t.register("wm-container",(function(){return{pre:function(e){return'<div wmContainer partialContainer wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var K=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridcolumn",(function(){return{pre:function(e){return"<div wmLayoutGridColumn "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Q=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridrow",(function(){return{pre:function(e){return"<div wmLayoutGridRow "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Z=Object.freeze({__proto__:null,default:function(){}});t.register("wm-layoutgrid",(function(){return{pre:function(e){return"<div wmLayoutGrid "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var J=Object.freeze({__proto__:null,default:function(){}}),X=new n.IDGenerator("wm_panel");t.register("wm-panel",(function(){return{pre:function(e){return"<div wmPanel #"+X.nextUid()+'="wmPanel" partialContainer wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}})),t.register("wm-panel-footer",(function(){return{pre:function(e){return"<div wmPanelFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ee=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segmented-control",(function(){return{pre:function(e){return"<div wmSegmentedControl "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var te=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segment-content",(function(){return{pre:function(e){return"<li wmSegmentContent partialContainer wmSmoothscroll="+(e.get("smoothscroll")||"false")+' wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var ne=Object.freeze({__proto__:null,default:function(){}}),ie=1;t.register("wm-repeat-template",(function(){return{requires:["wm-accordion","wm-tabs"],pre:function(e,n,i,o){var a=i&&i.get("accordion_ref")||o&&o.get("tabs_ref");if(a)return'<div *ngIf="'+a+".fieldDefs && !"+a+'.fieldDefs.length">{{'+a+".nodatamessage}}</div>\n <div wmRepeatTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+a+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="widgetRef'+ie+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </div>\n <ng-template #widgetRef'+ie+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var oe=Object.freeze({__proto__:null,default:function(){}}),ae=new n.IDGenerator("wm_tabs_ref_"),re=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},se=re;t.register("wm-tabs",(function(){return{pre:function(e,n){var i=ae.nextUid();return n.set("tabs_ref",i),"<div wmTabs #"+i+'="wmTabs" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(re(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),a=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var r=t.getBoundToExpr(o.value);if(!r)return;n.updateTemplateAttrs(e,r,a.value)}},provide:function(e,t){var n=new Map;return n.set("tabs_ref",t.get("tabs_ref")),n}}}));var le=Object.freeze({__proto__:null,default:function(){},"\u02750":se});t.register("wm-tabpane",(function(){return{pre:function(e){return"<div wmTabPane partialContainer "+t.getAttrMarkup(e)+' wm-navigable-element="true" role="tabpanel">'},post:function(){return"</div>"}}}));var ce=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tile",(function(){return{pre:function(e){return'<div wmTile aria-describedby="Tile" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-wizard",(function(){return{pre:function(e){return'<div wmWizard role="tablist" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var de=Object.freeze({__proto__:null,default:function(){}}),ue=new n.IDGenerator("wizard_step_id_");t.register("wm-wizardstep",(function(){return{pre:function(e){var n=ue.nextUid();return"<form wmWizardStep #"+n+'="wmWizardStep" '+t.getAttrMarkup(e)+'>\n <ng-template [ngIf]="'+n+'.isInitialized">'},post:function(){return"</ng-template></form>"}}}));var he=Object.freeze({__proto__:null,default:function(){}}),me=new n.IDGenerator("wm_barcodescanner");t.register("wm-barcodescanner",(function(){return{pre:function(e){var n=me.nextUid();return"<button wmBarcodescanner #"+n+'="wmBarcodescanner" [attr.aria-label]="'+n+".hint || 'Barcode scanner'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var fe=Object.freeze({__proto__:null,default:function(){}}),ge=new n.IDGenerator("wm_camera");t.register("wm-camera",(function(){return{pre:function(e){var n=ge.nextUid();return"<button type='button' wmCamera #"+n+'="wmCamera" [attr.aria-label]="'+n+".hint || 'Camera'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var ve=Object.freeze({__proto__:null,default:function(){}});t.register("wm-alertdialog",(function(){return{pre:function(e){return'<div wmAlertDialog role="alertdialog" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ye=Object.freeze({__proto__:null,default:function(){}});t.register("wm-confirmdialog",(function(){return{pre:function(e){return'<div wmConfirmDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var be=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialogactions",(function(){return{pre:function(e){return'<ng-template #dialogFooter><div wmDialogFooter data-identfier="actions" '+t.getAttrMarkup(e)+">"},post:function(){return"</div></ng-template>"}}}));var we=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialog",(function(){return{pre:function(e){return"<div wmDialog "+t.getAttrMarkup(e)+' aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}})),t.register("wm-view",(function(){return{pre:function(e){return""},post:function(){return""}}}));var Pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframedialog",(function(){return{pre:function(e){return'<div wmIframeDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _e=Object.freeze({__proto__:null,default:function(){}});t.register("wm-logindialog",(function(){return{pre:function(e){return"<div wmDialog wmLoginDialog "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}}));var Oe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagedialog",(function(){return{pre:function(e,n){var i=e.get("content");e.delete("content");var o=e.get("content.bind");e.delete("content.bind");var a=e.get("load.event");e.delete("load.event");var r="",s="";a&&(r='load.event="'+a+'"'),o?s='content.bind="'+o+'"':i&&(s='content="'+i+'"');var l="";return s&&(n.set("hasPartialContent",!0),l+="<ng-template><div wmContainer #partial partialContainer "+s+' width="100%" height="100%" '+r+">"),"<div wmPartialDialog "+t.getAttrMarkup(e)+">"+l},post:function(e,t){var n="";return t.get("hasPartialContent")&&(n="</div></ng-template>"),n+"</div>"}}}));var Ee=Object.freeze({__proto__:null,default:function(){}}),Re="quickedit",Ae="form",Te="dialog",Se={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},Ce=new Set([n.FormWidgetType.SELECT,n.FormWidgetType.CHECKBOXSET,n.FormWidgetType.RADIOSET,n.FormWidgetType.SWITCH,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.CHIPS,n.FormWidgetType.TYPEAHEAD,n.FormWidgetType.RATING]),Ie=function(e){var t=Se[e]&&Se[e][0];return e===n.DataType.BOOLEAN&&(t=n.FormWidgetType.SELECT),[n.FormWidgetType.TEXT,n.FormWidgetType.NUMBER,n.FormWidgetType.SELECT,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.DATE,n.FormWidgetType.TIME,n.FormWidgetType.DATETIME].includes(t)?t:n.FormWidgetType.TEXT},De=new n.IDGenerator("formfield_"),xe=function(e){var n=new Map;return e.has("focus.event")||e.set("focus.event",""),e.has("blur.event")||e.set("blur.event",""),e.forEach((function(t,i){i.endsWith(".event")&&("focus.event"===i?t="_onFocusField($event);"+t:"blur.event"===i&&(t="_onBlurField($event);"+t),n.set(i,t),e.delete(i))})),t.getFormMarkupAttr(n)},Ne=xe,ke=new Map([[n.FormWidgetType.SELECT,["Select Min value","Select Max value","Select value"]],[n.FormWidgetType.DATETIME,["Select Min date time","Select Max date time","Select date time"]],[n.FormWidgetType.TIME,["Select Min time","Select Max time","Select time"]],[n.FormWidgetType.DATE,["Select Min date","Select Max date","Select date"]],[n.FormWidgetType.TEXTAREA,["","","Enter value"]],[n.FormWidgetType.RICHTEXT,["","","Enter value"]],[n.FormWidgetType.COLORPICKER,["Select Color","Select Color","Select Color"]],[n.FormWidgetType.CHIPS,["","","Type here..."]],[n.FormWidgetType.PASSWORD,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.NUMBER,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.TEXT,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.CURRENCY,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.AUTOCOMPLETE,["","","Search"]]]),Me=function(e,t,n){var i=1===n?"maxplaceholder":"placeholder",o=e.get(i);o||""===o||(o=ke.get(t)&&ke.get(t)[n])&&e.set(i,o)},Le=Me,Fe=function(e,t){var i=e.get("name"),o=(e.get("key")||i||"").trim(),a=t.isMaxWidget?'formControlName="'+o+'_max"':t.isInList?'[formControlName]="'+t.counter+'._fieldName"':'formControlName="'+o+'"',r=t.isMaxWidget?"#formWidgetMax":"#formWidget",s=i?t.isMaxWidget?'name="'+i+'_formWidgetMax"':'name="'+i+'_formWidget"':"",l='[ngClass]="'+e.get("ngclass")+'"',c='[class.hidden]="!'+t.pCounter+".isUpdateMode && "+t.counter+".viewmodewidget !== 'default'\" "+a+" "+t.eventsTmpl+" "+l+" "+r+" "+s;return n.getFormWidgetTemplate(t.widgetType,c,e,{counter:t.counter,pCounter:t.pCounter})},je=Fe,Be=function(e,t,i,o,a,r){if(!("true"===e.get("is-range")))return Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:a,isInList:r});var s=n.isMobileApp()?"col-xs-6":"col-sm-6";return'<div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:a})+'</div>\n <div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:a,isMaxWidget:!0})+"</div>"},Ge=Be,$e=function(e,t,i){if("true"===e.get("is-related"))return i+".getDisplayExpr()";if(t===n.FormWidgetType.PASSWORD)return"'********'";var o,a=i+".value";return t===n.FormWidgetType.DATETIME||t===n.FormWidgetType.TIMESTAMP?a+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MM-dd hh:mm:ss a'":t===n.FormWidgetType.TIME?a+=" | toDate:"+i+".formWidget.timepattern || 'hh:mm a'":t===n.FormWidgetType.DATE?a+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MMM-dd'":t===n.FormWidgetType.RATING||t===n.FormWidgetType.UPLOAD?"":(o=t,Ce.has(o)&&"All Fields"===e.get("datafield")?i+".getDisplayExpr()":i+".getCaption()")},Ve=$e,We=function(e){return{requires:["wm-form","wm-liveform","wm-livefilter","wm-list"],pre:function(i,o,a,r,s,l){var c=De.nextUid(),p=a||r||s,d=p&&p.get("form_reference")||"form",u=i.get("widget")||n.FormWidgetType.TEXT,h=e?"form-field":"filter-field",m="wmform-field-error-"+n.generateGUId(),f=e?'<p *ngIf="'+c+"._control?.invalid && "+c+"._control?.touched && "+d+'.isUpdateMode"\n class="help-block text-danger" aria-hidden="false" role="alert"\n aria-live="assertive" [attr.aria-label]="'+c+'.validationmessage" id="'+m+'"><span aria-hidden="true" [textContent]="'+c+'.validationmessage"></span></p>':"",g=u===n.FormWidgetType.UPLOAD?"":xe(i),v=n.isMobileApp()?"col-xs-12":"col-sm-12",y=d===(l&&l.get("parent_form_reference"));return i.set("__validationId",m),i.set("__widgetType",u),i.delete("widget"),o.set("counter",c),"true"===i.get("is-range")?(Me(i,u,0),Me(i,u,1)):Me(i,u,2),'<div data-role="'+h+'" [formGroup]="'+d+'.ngform" wmFormField captionPosition #'+c+'="wmFormField" widgettype="'+u+'" '+t.getFormMarkupAttr(i)+'>\n <div class="live-field form-group app-composite-widget clearfix caption-{{'+d+'.captionposition}}" widget="'+u+'">\n <label [hidden]="!'+c+'.displayname" class="app-label control-label formfield-label {{'+d+'._captionClass}}"\n [ngStyle]="{width: '+d+".captionsize}\" [ngClass]=\"{'text-danger': "+c+"._control?.invalid && "+c+"._control?.touched && "+d+".isUpdateMode,\n required: "+d+".isUpdateMode && "+c+'.required}" [textContent]="'+c+'.displayname"> </label>\n <div [ngClass]="'+c+".displayname ? "+d+"._widgetClass : '"+v+'\'">\n <label class="form-control-static app-label"\n [hidden]="'+d+".isUpdateMode || "+c+".viewmodewidget === 'default' || "+c+".widgettype === 'upload'\" [innerHTML]=\""+$e(i,u,c)+'"></label>\n '+Be(i,u,g,c,d,y)+'\n <span aria-hidden="true" *ngIf="'+c+'.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <p *ngIf="!('+c+"._control?.invalid && "+c+"._control?.touched) && "+d+'.isUpdateMode"\n class="help-block" aria-hidden="true" role="alert" aria-live="polite" [textContent]="'+c+'.hint"></p>\n '+f+"\n </div>\n </div>"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n},imports:function(e){var t=n.getRequiredFormWidget(e.get("__widgetType")||e.get("type"));return e.delete("__widgetType"),[t,"wm-form"]}}},Ue=We;t.register("wm-form-field",We.bind(this,!0)),t.register("wm-filter-field",We.bind(this,!1));var qe=Object.freeze({__proto__:null,default:function(){},"\u02750":Ne,"\u02751":Le,"\u02752":je,"\u02753":Ge,"\u02754":Ve,"\u02755":Ue}),ze=function(e){return{pre:function(n){return'<div wmFormAction name="'+(n.get("name")||n.get("key"))+'" '+t.getAttrMarkup(n)+" "+e+">"},post:function(){return"</div>"}}},He=ze;t.register("wm-form-action",ze.bind(this,"")),t.register("wm-filter-action",ze.bind(this,' update-mode="true" '));var Ye,Ke=Object.freeze({__proto__:null,default:function(){},"\u02750":He}),Qe=new n.IDGenerator("form_"),Ze=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-richtexteditor","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-upload","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker","wm-table"]),Je=function(e){void 0===e&&(e=[]),e.forEach((function(e){if("wm-form-field"===e.name&&Ye++,Ze.has(e.name)){var t=e.attrs.find((function(e){return"key"===e.name||"name"===e.name}));if(!(t=t&&t.value)){var n=e.attrs.find((function(e){return"datavalue"===e.name}));if(n&&n.value){(n=n.value.match(/\((.*)\)/))&&n.length>1&&(t=n[1].replace(/["']/g,""))}}e.attrs.push(new i.Attribute("formControlName",t,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("wmFormWidget","",1,1,1,void 0,void 0))}Je(e.children)}))},Xe=Je,et=function(e){if(e.get("formdata.bind")){var n=t.getDataSource(e.get("formdata.bind"));n&&e.set("formdatasource.bind",n)}},tt=et,nt=function(e){return void 0===e&&(e=""),{requires:["wm-livetable","wm-login"],template:function(e){Ye=0,Je(e.children)},pre:function(n,i,o,a){var r,s,l=a&&a.get("isLogin")?"app-login":"",c=Qe.nextUid(),p=n.get("dependson")?'dependson="'+n.get("dependson")+'"':"",d="page"===n.get("formlayout")?"app-device-liveform panel liveform-inline":"";n.delete("dependson");var u='<form wmForm data-role="'+l+'" '+e+" #"+c+' ngNativeValidate [formGroup]="'+c+'.ngform" [noValidate]="'+c+".validationtype !== 'html'\"\n class=\""+d+'" [class]="'+c+'.captionAlignClass" [autocomplete]="'+c+".autocomplete ? 'on' : 'off'\" captionposition="+n.get("captionposition");if(n.set("numberOfFields",""+Ye),i.set("counter",c),et(n),"dialog"===n.get("formlayout")){s=o?o.get("liveform_dialog_id"):"liveform_dialog_id_"+c,n.set("dialogId",s);var h=new Map;return["title","title.bind","iconclass","iconclass.bind","width"].forEach((function(e){n.get(e)&&h.set(e,n.get(e))})),n.set("width","100%"),r=t.getAttrMarkup(n),'<div data-identifier="liveform" init-widget class="app-liveform liveform-dialog" '+p+' dialogid="'+s+'">\n <div wmDialog class="app-liveform-dialog" name="'+s+'" role="form" '+t.getAttrMarkup(h)+' modal="true">\n <ng-template #dialogBody>\n '+u+" "+r+">"}var m="",f="";if("page"===n.get("formlayout")){var g="device_liveform_header_"+c,v=new Map;v.set("title",n.get("title")),v.set("backbtnclick.event",n.get("backbtnclick.event")),f='<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" class="navbar-btn btn-primary btn-transparent" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="'+c+'.invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="btn.disabled"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !'+c+".isUpdateMode : "+c+'.isUpdateMode"></button>\n </ng-template>',m='<header wmMobileNavbar name="'+g+'" '+t.getAttrMarkup(v)+'>\n <ng-container *ngFor="let btn of '+c+'.buttonArray" [ngTemplateOutlet]="buttonRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n </header>\n <div class="form-elements panel-body" >'}return u+" "+(r=t.getAttrMarkup(n))+" "+p+">\n "+f+" "+m},post:function(e){return"dialog"===e.get("formlayout")?"</form></ng-template></div></div>":"page"===e.get("formlayout")?"</div></form>":"</form>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n}}},it=nt;t.register("wm-form",nt),t.register("wm-liveform",(function(){return nt("wmLiveForm")})),t.register("wm-livefilter",(function(){return nt("wmLiveFilter")}));var ot=Object.freeze({__proto__:null,default:function(){},"\u02750":Xe,"\u02751":tt,"\u02752":it});t.register("wm-calendar",(function(){return{pre:function(e){return'<div wmCalendar redrawable style="width:100%" aria-label="'+(e.get("view")?e.get("view")+" view":"month view")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var at=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chips",(function(){return{pre:function(e){return'<ul wmChips role="listbox" '+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var rt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-colorpicker",(function(){return{pre:function(e){return"<div wmColorPicker "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var st=Object.freeze({__proto__:null,default:function(){}});t.register("wm-currency",(function(){return{pre:function(e){return"<div wmCurrency "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-buttongroup",(function(){return{pre:function(e){return'<div wmButtonGroup role="group" aria-labelledby="button group" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ct=Object.freeze({__proto__:null,default:function(){}}),pt=new n.IDGenerator("wm_button");t.register("wm-button",(function(){return{pre:function(e){var n=pt.nextUid();return"<button wmButton #"+n+'="wmButton" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var dt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkbox",(function(){return{pre:function(e){return"<div wmCheckbox "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var ut=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkboxset",(function(){return{pre:function(e){return'<ul role="group" wmCheckboxset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var ht=Object.freeze({__proto__:null,default:function(){}});t.register("wm-composite",(function(){return{pre:function(e){return"<div wmComposite captionPosition "+t.setChildAttrs(e)+" "+t.getAttrMarkup(e)+">"},post:function(){return"</div"+t.clearChildAttrs()+">"}}}));var mt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-number",(function(){return{pre:function(e){return"<div wmNumber "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-radioset",(function(){return{pre:function(e){return'<ul role="radiogroup" wmRadioset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-select",(function(){return{pre:function(e){return"<wm-select "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-select>"}}}));var vt=Object.freeze({__proto__:null,default:function(){}}),yt=new n.IDGenerator("wm_switch");t.register("wm-switch",(function(){return{pre:function(e){var i=yt.nextUid();return"<div wmSwitch #"+i+'="wmSwitch" [attr.aria-label]="'+i+".hint || 'Switch button'\" "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-text",(function(){return{pre:function(e){return"<wm-input "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-input>"}}}));var wt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-textarea",(function(){return{pre:function(e){return"<wm-textarea "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-textarea>"}}}));var Pt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-datetime",(function(){return{pre:function(e){return"<div wmDateTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var _t=Object.freeze({__proto__:null,default:function(){}});t.register("wm-date",(function(){return{pre:function(e){return"<div wmDate "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Ot=Object.freeze({__proto__:null,default:function(){}});t.register("wm-time",(function(){return{pre:function(e){return"<div wmTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Et=Object.freeze({__proto__:null,default:function(){}});t.register("wm-fileupload",(function(){return{pre:function(e){if(e.get("select.event")){var n=t.getDataSource(e.get("select.event"));e.set("datasource.bind",n)}return"<div wmFileUpload "+t.getAttrMarkup(e)+' role="input">'},post:function(){return"</div>"}}}));var Rt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-rating",(function(){return{pre:function(e){return"<div wmRating "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var At=Object.freeze({__proto__:null,default:function(){}});t.register("wm-slider",(function(){return{pre:function(e){return"<div wmSlider "+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Tt=Object.freeze({__proto__:null,default:function(){}});function St(e,t,n,o){var a=e.attrs.find((function(e){return e.name===t}));a&&n.attrs.push(new i.Attribute(o,a.value,a.sourceSpan,a.keySpan,a.valueSpan,void 0,void 0))}t.register("wm-media-list",(function(){return{template:function(e){var t,n=e.attrs.find((function(e){return"dataset"===e.name})),o=function(e){void 0===e&&(e=[]),e.forEach((function(e){e.name&&"wm-list"!==e.name&&(e.attrs.forEach((function(e){e.value.startsWith("bind:"+t+".data[$i]")?e.value=e.value.replace(t+".data[$i]","item"):e.value.startsWith("bind:"+t)&&(e.value=e.value.replace(t,"item"))})),o(e.children))}))};n&&n.value.startsWith("bind:")&&(t=n.value.replace("bind:","")),t&&o(e.children);var a=e.children.find((function(e){return e instanceof i.Element&&"wm-media-template"===e.name}));null!=a&&(St(a,"width",e,"thumbnailwidth"),St(a,"height",e,"thumbnailheight"))},pre:function(e){return"<div wmMediaList "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Ct=Object.freeze({__proto__:null,default:function(){}});t.register("wm-media-template",(function(){return{pre:function(){return'<ng-template #mediaListTemplate let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var It=Object.freeze({__proto__:null,default:function(){}});t.register("wm-list",(function(){return{requires:["wm-form","wm-liveform"],template:function(e){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(i){var a=t.getBoundToExpr(i.value);a&&n.updateTemplateAttrs(e,a,o.value,"itemRef.")}},pre:function(e,n,i,o){var a=i||o;return n.set("form_reference",a&&a.get("form_reference")),"<div wmList wmLiveActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("parent_form_reference",t.get("form_reference")),n}}})),t.register("wm-listtemplate",(function(){return{pre:function(){return'<ng-template #listTemplate let-item="item" let-$index="$index" let-itemRef="itemRef" let-$first="$first" let-$last="$last" let-currentItemWidgets="currentItemWidgets" >'},post:function(){return"</ng-template>"}}})),t.register("wm-list-action-template",(function(){return{template:function(e){e.attrs.find((function(e){return"position"===e.name})).value;e.children.filter((function(e){return e instanceof i.Element&&"wm-button"===e.name})).forEach((function(t){var n,o,a,r;n="position",o=t,a="swipe-position",(r=e.attrs.find((function(e){return e.name===n})))&&o.attrs.push(new i.Attribute(a,r.value,r.sourceSpan,r.keySpan,r.valueSpan,void 0,void 0))}))},pre:function(e,n){return"left"===e.get("position")?'<ng-template #listLeftActionTemplate>\n <li class="app-list-item-action-panel app-list-item-left-action-panel actionMenu" '+t.getAttrMarkup(e)+">":"right"===e.get("position")?'<ng-template #listRightActionTemplate>\n <li class="app-list-item-action-panel app-list-item-right-action-panel actionMenu" '+t.getAttrMarkup(e)+">":void 0},post:function(){return"</li></ng-template>"}}}));var Dt=Object.freeze({__proto__:null,default:function(){}}),xt=new n.IDGenerator("liveform_dialog_id_");t.register("wm-livetable",(function(){return{pre:function(e,n){var i=xt.nextUid();return n.set("counter",i),"<div wmLiveTable "+t.getAttrMarkup(e)+' dialogid="'+i+'">'},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("liveform_dialog_id",t.get("counter")),n}}}));var Nt=Object.freeze({__proto__:null,default:function(){}}),kt=new n.IDGenerator("wm_message");t.register("wm-message",(function(){return{pre:function(e){return'<p wmMessage tabindex="0" #'+kt.nextUid()+'="wmMessage" '+t.getAttrMarkup(e)+">"},post:function(){return"</p>"}}}));var Mt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-breadcrumb",(function(){return{pre:function(e){return"<ol wmBreadcrumb "+t.getAttrMarkup(e)+">"},post:function(){return"</ol>"}}}));var Lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-menu",(function(){return{pre:function(e){return"<div wmMenu dropdown "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav-item",(function(){return{pre:function(e){return'<li wmNavItem role="listitem" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var jt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav",(function(){return{pre:function(e){return'<ul wmNav data-element-type="wmNav" data-role="page-header" role="list" '+t.getAttrMarkup(e)+">"},post:function(){return"</ul>"}}}));var Bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-navbar",(function(){return{pre:function(e){return'<nav wmNavbar data-element-type="wmNavbar" role="navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var Gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-popover",(function(){return{requires:["wm-table"],pre:function(e,n,i){var o;if("inline"!==e.get("contentsource")){var a=e.get("content"),r=e.get("content.bind"),s="";a?s='content="'+a+'"':r&&(s='content.bind="'+r+'"'),o="<div wmContainer #partial partialContainer "+s+">",n.set("hasPopoverContent",!0)}var l="<wm-popover wmPopover "+t.getAttrMarkup(e)+">";return l+="<ng-template "+(i?'let-row="row"':"")+'><div tabindex="0" class="popover-start sr-only" aria-label="">popover content start</div>',o&&(l+=""+(o||"")),l},post:function(e,t){var n="";return t.get("hasPopoverContent")&&(n+="</div>"),n+'<div tabindex="0" class="popover-end sr-only" aria-label="">popover content ended</div></ng-template></'+"wm-popover>"}}}));var $t=Object.freeze({__proto__:null,default:function(){}}),Vt=function(e,t){return e&&e.children.find((function(e){return e instanceof i.Element&&e.name===t}))},Wt=Vt,Ut=function(e){return new i.Element(e,[],[],Qt,Qt,Qt)},qt=Ut,zt=function(e,t,n){var o=new i.Attribute(t,n,Qt,Qt,Qt,void 0,void 0);e.attrs.push(o)},Ht=zt,Yt=function(e,t){var n;if(t)return _.forEach(t.children,(function(t){return t instanceof i.Element&&(t.name===e?n=t:t.children&&(n=Yt(e,t))),!n})),n},Kt=Yt,Qt={},Zt=new n.IDGenerator("wm_page");t.register("wm-page",(function(){return{template:function(e){var t=Vt(Vt(e,"wm-content"),"wm-page-content");if(t||(t=Yt("wm-page-content",Yt("wm-content",e))),t){var o=Ut("ng-container");if(zt(o,"*ngIf","compilePageContent"),o.children=o.children.concat(t.children),o.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),t.children=[o],n.isMobileApp()){var a=Ut("div");zt(a,"wmPageContentLoader",""),zt(a,"*ngIf","!showPageContent"),t.children.push(a)}}},pre:function(e){var n=Zt.nextUid();return"<div wmPage #"+n+'="wmPage" data-role="pageContainer" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Jt=Object.freeze({__proto__:null,default:function(){},"\u02750":Wt,"\u02751":qt,"\u02752":Ht,"\u02753":Kt}),Xt=new n.IDGenerator("wm_layout");t.register("wm-layout",(function(){return{pre:function(e){var n=Xt.nextUid();return"<div wmLayout #"+n+'="wmLayout" data-role="pageContainer" [attr.aria-label]="'+n+".hint || 'Main page content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var en=Object.freeze({__proto__:null,default:function(){}}),tn="router-outlet";t.register("wm-router-outlet",(function(){return{pre:function(e){return'<div wmRouterOutlet name="wmRouterOutlet" '+t.getAttrMarkup(e)+"><"+tn+' (activate)="onActivate($event)">'},post:function(){return"</router-outlet></div>"}}}));var nn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagination",(function(){return{pre:function(e){return'<nav wmPagination data-identifier="pagination" aria-label="Page navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var on=Object.freeze({__proto__:null,default:function(){}});t.register("wm-content",(function(){return{pre:function(e){return'<main wmContent data-role="page-content" role="main" '+t.getAttrMarkup(e)+">"},post:function(){return"</main>"}}}));var an=Object.freeze({__proto__:null,default:function(){}}),rn=new n.IDGenerator("wm_footer");t.register("wm-footer",(function(){return{pre:function(e){var n=rn.nextUid();return"<footer wmFooter #"+n+'="wmFooter" partialContainer data-role="page-footer" role="contentinfo" [attr.aria-label]="'+n+".hint || 'Page footer'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</footer>"}}}));var sn=Object.freeze({__proto__:null,default:function(){}}),ln=new n.IDGenerator("wm_header");t.register("wm-header",(function(){return{pre:function(e){var n=ln.nextUid();return"<header wmHeader #"+n+'="wmHeader" partialContainer data-role="page-header" role="banner" [attr.aria-label]="'+n+".hint || 'Page header'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var cn=Object.freeze({__proto__:null,default:function(){}}),pn=new n.IDGenerator("wm_left_panel");t.register("wm-left-panel",(function(){return{pre:function(e){var n=pn.nextUid();return"<aside wmLeftPanel #"+n+'="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="'+n+".hint || 'Left navigation panel'\" wmSmoothscroll=\""+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var dn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-mobile-navbar",(function(){return{pre:function(e){return"<header wmMobileNavbar "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var un=Object.freeze({__proto__:null,default:function(){}}),hn=new n.IDGenerator("wm_right_panel");t.register("wm-right-panel",(function(){return{pre:function(e){var n=hn.nextUid();return"<aside wmRightPanel #"+n+'="wmRightPanel" partialContainer data-role="page-right-panel" role="complementary" [attr.aria-label]="'+n+".hint || 'Right navigation panel'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var mn=Object.freeze({__proto__:null,default:function(){}});Object.create;function fn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var gn=function(e){return new i.Element(e,[],[],wn,wn,wn)},vn=gn,yn=function(e,t,n){var o=new i.Attribute(t,n,wn,wn,wn,void 0,void 0);e.attrs.push(o)},bn=yn,wn={};t.register("wm-page-content",(function(){return{template:function(e){var t,n;try{for(var o=fn(e.attrs),a=o.next();!a.done;a=o.next()){var r=a.value;if("spa"===r.name&&"true"===r.value){var s=gn("ng-container");yn(s,"*ngIf","compilePageContent"),s.children=s.children.concat(e.children),s.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),e.children=[s];break}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},pre:function(e){return"<div wmPageContent "+(e.get("spa")?"wmSpaPage":"")+' wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Pn=Object.freeze({__proto__:null,default:function(){},"\u02750":vn,"\u02751":bn});t.register("wm-mobile-tabbar",(function(){return{pre:function(e){return"<div wmMobileTabbar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _n=Object.freeze({__proto__:null,default:function(){}}),On=new n.IDGenerator("wm_top_nav");t.register("wm-top-nav",(function(){return{pre:function(e){var n=On.nextUid();return"<section wmTopNav #"+n+'="wmTopNav" partialContainer data-role="page-topnav" role="navigation" [attr.aria-label]="'+n+".hint || 'Second level navigation'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var En=Object.freeze({__proto__:null,default:function(){}}),Rn={},An=function(e){return new i.Element(e,[],[],Rn,Rn,Rn)},Tn=An,Sn=function(e,t,n){var o=new i.Attribute(t,n,Rn,Rn,Rn,void 0,void 0);e.attrs.push(o)},Cn=Sn;t.register("wm-partial",(function(){return{template:function(e){var t=An("ng-container");Sn(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return'<section wmPartial data-role="partial" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var In=Object.freeze({__proto__:null,default:function(){},"\u02750":Tn,"\u02751":Cn});t.register("wm-param",(function(){return{pre:function(e){return"<div wmParam hidden "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Dn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-prefab",(function(){return{pre:function(e){return'<section wmPrefab redrawable data-role="perfab" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var xn=Object.freeze({__proto__:null,default:function(){}}),Nn={},kn=function(e){return new i.Element(e,[],[],Nn,Nn,Nn)},Mn=kn,Ln=function(e,t,n){var o=new i.Attribute(t,n,Nn,Nn,Nn,void 0,void 0);e.attrs.push(o)},Fn=Ln;t.register("wm-prefab-container",(function(){return{template:function(e){var t=kn("ng-container");Ln(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return"<div wmPrefabContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var jn=Object.freeze({__proto__:null,default:function(){},"\u02750":Mn,"\u02751":Fn});t.register("wm-table-action",(function(){return{pre:function(e){return'<div name="'+(e.get("name")||e.get("key"))+'" wmTableAction '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Bn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-table-column-group",(function(){return{pre:function(e){return"<div wmTableColumnGroup "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Gn=Object.freeze({__proto__:null,default:function(){}}),$n=new n.IDGenerator("data_table_form_"),Vn=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker"]),Wn=function(e){void 0===e&&(e=[]);e.forEach((function(e){if(Vn.has(e.name)){if("wm-checkbox"===e.name&&e.attrs.filter((function(e){return"formControlName"===e.name})).length)return;e.attrs.push(new i.Attribute("[ngModelOptions]","{standalone: true}",1,1,1,void 0,void 0))}Wn(e.children)}))},Un=Wn,qn=function(e,i){var o,a,r=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING),s=e.get("binding"),l=e.get("type")||"string",c=e.get("filterdataset.bind");if("autocomplete"===e.get("filterwidget")){if(c)o='dataset.bind="'+c+'" datasource.bind="'+t.getDataSource(c)+'"';a="submit.event=\"changeFn('"+s+"')\""}var p='#filterWidget formControlName="'+s+'_filter" '+o+" "+a+" change.event=\"changeFn('"+s+"')\"\n disabled.bind=\"isDisabled('"+s+"')\"";return'<ng-template #filterTmpl let-changeFn="changeFn" let-isDisabled="isDisabled">\n <div class="input-group '+r+'" data-col-identifier="'+s+'">\n '+(""+n.getFormWidgetTemplate(r,p,e,{inputType:"filterinputtype"}))+'\n <span class="input-group-addon filter-clear-icon" *ngIf="'+i+".showClearIcon('"+s+'\')">\n <button class="btn-transparent btn app-button" aria-label="Clear button" type="button" (click)="'+i+".clearRowFilter('"+s+'\')">\n <i class="app-icon wi wi-clear" aria-hidden="true"></i>\n </button>\n </span>\n <span class="input-group-addon" dropdown container="body" (onShown)="'+i+".adjustContainer('"+s+'\');">\n <button class="btn-transparent btn app-button" type="button" dropdownToggle><i class="app-icon wi wi-filter-list"></i></button>\n <ul class="matchmode-dropdown dropdown-menu" *dropdownMenu>\n <li *ngFor="let matchMode of '+i+".matchModeTypesMap['"+l+'\']"\n [ngClass]="{active: matchMode === ('+i+".rowFilter['"+s+"'].matchMode || "+i+".matchModeTypesMap['"+l+'\'][0])}">\n <a href="javascript:void(0);" (click)="'+i+".onFilterConditionSelect('"+s+'\', matchMode)" [innerText]="'+i+'.matchModeMsgs[matchMode]"></a>\n </li>\n </ul>\n </span>\n </div></ng-template>'},zn=qn,Hn=function(e){var t="";return e.forEach((function(e,n){n.endsWith(".event")&&(t+=n+'="'+e+'" ')})),t},Yn=Hn,Kn=function(e){var n=new Map;return["disabled","disabled.bind"].forEach((function(t){e.get(t)&&(n.set(t,e.get(t)),e.delete(t))})),t.getAttrMarkup(n)},Qn=Kn,Zn=function(e,t,i,o){var a,r={},s=e.get("binding"),l=e.get("edit-widget-type")||((a={type:e.get("type"),"related-entity-name":e.get("related-entity-name"),"primary-key":e.get("primary-key")})["related-entity-name"]&&a["primary-key"]?n.FormWidgetType.SELECT:Se[a.type]&&Se[a.type][0]||n.FormWidgetType.TEXT),c="",p="",d="";l===n.FormWidgetType.UPLOAD?(r.uploadProps={formName:$n.nextUid(),name:s},r.counter=o):(c=t?"#inlineWidgetNew":"#inlineWidget",p=t?'formControlName="'+s+'_new"':'formControlName="'+s+'"',d="wmFormWidget"),r.inputType="editinputtype";var u=t?"#inlineWidgetTmplNew":"#inlineWidgetTmpl",h=c+" "+d+' key="'+s+'" data-field-name="'+s+'" '+p+" "+(l===n.FormWidgetType.UPLOAD?"":Hn(e))+" "+Kn(e),m=t?"getPendingSpinnerStatusNew":"getPendingSpinnerStatus";return"<ng-template "+u+' let-row="row" let-getControl="getControl" let-getValidationMessage="getValidationMessage" let-'+m+'="'+m+'">\n <div data-col-identifier="'+s+'" >\n '+n.getFormWidgetTemplate(l,h,e,r)+"\n "+Xn(i)+'\n <div class="overlay" *ngIf="'+m+'()"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>\n <span class="sr-only" *ngIf="getValidationMessage()">{{getValidationMessage()}}</span>\n </div>\n </ng-template>'},Jn=Zn,Xn=function(e){var t="";switch(e){case"bottom":t='<span class="help-block text-danger" *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">{{getValidationMessage()}}</span>';break;case"hover":default:t='<span placement="top" container="body" tooltip="{{getValidationMessage()}}" class="text-danger wi wi-error"\n *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">\n </span>'}return t},ei=Xn,ti=function(e){var t="row.getProperty('"+e.get("binding")+"')",i=e.get("custompipeformat")||e.get("formatpattern"),o="";switch(!n.isDateTimeType(e.get("type"))||i&&"None"!==i||(e.set("formatpattern","toDate"),e.delete("datepattern"),i="toDate"),i){case"toDate":o="{{"+t+" | toDate: colDef.datepattern}}";break;case"toCurrency":e.get("currencypattern")&&(o="{{"+t+" | toCurrency: '"+e.get("currencypattern"),e.get("fractionsize")?o+="': "+e.get("fractionsize")+"}}":o+="'}}");break;case"numberToString":e.get("fractionsize")&&(o="{{"+t+" | numberToString: '"+e.get("fractionsize")+"'}}");break;case"stringToNumber":o="{{"+t+" | stringToNumber}}";break;case"timeFromNow":o="{{"+t+" | timeFromNow}}";break;case"prefix":e.get("prefix")&&(o="{{"+t+" | prefix: '"+e.get("prefix")+"'}}");break;case"suffix":e.get("suffix")&&(o="{{"+t+" | suffix: '"+e.get("suffix")+"'}}");break;default:n.checkIsCustomPipeExpression(i)&&(o="{{"+t+" | "+i+" : row}}")}return o},ni=ti;t.register("wm-table-column",(function(){return{requires:["wm-table"],template:function(e,t){if(e.children.length){if(1===e.children.length&&e.children[0]instanceof i.Text&&0===e.children[0].value.trim().length)return;t.set("customExpression",!0),Wn(e.children)}},pre:function(e,i,o){var a="",r="",s="",l="";if(o){var c=o.get("table_reference");a="multicolumn"===o.get("filtermode")&&"false"!==e.get("searchable")?qn(e,c):"";var p=o.get("editmode"),d=p!==Te&&p!==Ae&&"true"!==e.get("readonly");r=d?Zn(e,!1,o.get("errorstyle"),c):"",s=d&&p===Re&&"false"!==o.get("shownewrow")?Zn(e,!0,e.get("errorstyle")):"",l=' [formGroup]="'+c+'.ngform" '}var u=e.get("formatpattern"),h='<ng-template #customExprTmpl let-row="row" let-colDef="colDef" let-editRow="editRow" let-deleteRow="deleteRow" let-addNewRow="addNewRow">',m="",f="";return i.get("customExpression")?(e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'">'):(u&&"None"!==u||n.isDateTimeType(e.get("type")))&&(f=ti(e))&&(i.set("customExpression",!0),e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'" title="'+f+'">'+f),"<div wmTableColumn "+t.getAttrMarkup(e)+" "+l+">\n "+a+"\n "+r+"\n "+s+"\n "+m},post:function(e,t){var n="";return t.get("customExpression")&&(n="</div></ng-template>"),n+"</div>"},imports:function(e){var t=e.get("edit-widget-type"),i=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING);return[n.getRequiredFormWidget(t),n.getRequiredFormWidget(i),"wm-table"]}}}));var ii=Object.freeze({__proto__:null,default:function(){},"\u02750":Un,"\u02751":zn,"\u02752":Yn,"\u02753":Qn,"\u02754":Jn,"\u02755":ei,"\u02756":ni}),oi=function(e){var t="anchor"===e.get("widget-type")?"a":"button",i="anchor"===e.get("widget-type")?"wmAnchor":"wmButton",o=e.get("display-name")||e.get("title")||"Collapse/Expand";return'<ng-template #rowExpansionActionTmpl let-row="row">\n <'+t+" "+i+"\n "+n.getRowActionAttrs(e)+'\n class="'+e.get("class")+' row-expansion-button"\n iconclass="'+e.get("collapseicon")+'"\n type="button" aria-label="'+o+'"></'+t+">\n </ng-template>"},ai=oi;t.register("wm-table-row",(function(){return{pre:function(e){return"<div wmTableRow "+t.getAttrMarkup(e)+">\n "+oi(e)+'\n <ng-template #rowExpansionTmpl let-row="row" let-rowDef="rowDef" let-containerLoad="containerLoad">\n <div wmContainer partialContainer content.bind="rowDef.content" load.event="containerLoad(widget)"\n [ngStyle]="{\'height\': rowDef.height, \'overflow-y\': \'auto\'}">\n <div *ngFor="let param of rowDef.partialParams | keyvalue" wmParam hidden\n [name]="param.key" [value]="param.value"></div>'},post:function(){return"</div></ng-template></div>"}}}));var ri=Object.freeze({__proto__:null,default:function(){},"\u02750":ai}),si=function(){return'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>'},li=si,ci=function(e){var t=e.get("action"),i=t?' click.event.delayed="'+t+'" ':"",o=t&&t.includes("editRow(")?'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>':"",a=t?t.includes("editRow(")?"edit edit-row-button":t.includes("deleteRow(")?"delete delete-row-button":"":"",r=e.get("tabindex")?'tabindex="'+e.get("tabindex")+'"':"",s="anchor"===e.get("widget-type")?"a":"button";return'<ng-template #rowActionTmpl let-row="row">\n <'+s+" "+("anchor"===e.get("widget-type")?"wmAnchor":"wmButton")+' data-action-key="'+e.get("key")+'"\n '+n.getRowActionAttrs(e)+'\n class="row-action row-action-button '+e.get("class")+" "+a+'"\n iconclass="'+e.get("iconclass")+'"\n '+i+"\n "+r+'\n type="button"></'+s+">\n "+o+"\n </ng-template>"},pi=ci;t.register("wm-table-row-action",(function(){return{pre:function(e){return"<div wmTableRowAction "+t.getAttrMarkup(e)+">\n "+ci(e)},post:function(){return"</div>"}}}));var di=Object.freeze({__proto__:null,default:function(){},"\u02750":li,"\u02751":pi}),ui=new n.IDGenerator("table_"),hi=0;function mi(e,t){var n=0;e.forEach((function(e){var o=e.name,a=void 0!==t?t:n;"wm-table-column"!==o&&"wm-table-column-group"!==o||(e.attrs.push(new i.Attribute("index",""+hi,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("headerIndex",""+a,1,1,1,void 0,void 0)),"wm-table-column-group"===o&&mi(e.children,n),hi++,n++)}))}t.register("wm-table",(function(){return{template:function(e,i){if(e.children.length){var o=e.children.some((function(e){return"wm-table-column"===e.name||"wm-table-column-group"===e.name}));mi(e.children),i.set("isdynamictable",o?"false":"true");var a=e.children.some((function(e){return"wm-table-row"===e.name}));i.set("isrowexpansionenabled",a?"true":"false")}else i.set("isdynamictable","true");var r=e.attrs.find((function(e){return"dataset"===e.name})),s=e.attrs.find((function(e){return"name"===e.name}));if(r){var l=t.getBoundToExpr(r.value);l&&n.updateTemplateAttrs(e,l,s.value,"","row")}},pre:function(e,n){var i=ui.nextUid();return n.set("counter",i),e.set("isdynamictable",n.get("isdynamictable")),e.set("isrowexpansionenabled",n.get("isrowexpansionenabled")),e.set("table_reference",i),'<div wmTable="'+i+'" wmTableFilterSort wmTableCUD #'+i+' data-identifier="table" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("table_reference",t.get("counter")),n.set("filtermode",e.get("filtermode")),n.set("errorstyle",e.get("errorstyle")),n.set("editmode",e.get("editmode")),n.set("shownewrow",e.get("shownewrow")),n}}}));var fi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-video",(function(){return{pre:function(e){return"<div wmVideo "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var gi=Object.freeze({__proto__:null,default:function(){}}),vi="parentLinearLayout.spacing";t.register("wm-linearlayout",(function(){return{requires:["wm-linearlayout"],pre:function(e,n,i){var o=e.get("spacing");return e.set("spacing",o&&"0"!==o||!i?o:i.get(vi)),"<div wmLinearLayout "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set(vi,e.get("spacing")),n}}}));var yi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-linearlayoutitem",(function(){return{pre:function(e){return"<div wmLinearLayoutItem "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var bi=Object.freeze({__proto__:null,default:function(){}});e.accordionBuild=z,e.accordionPaneBuild=Y,e.alertDlgBuild=ye,e.anchorBuild=h,e.audioBuild=m,e.barcodeScannerBuild=fe,e.breadcrumbBuild=Lt,e.buttonBuild=dt,e.buttonGroupBuild=ct,e.calendarBuild=at,e.cameraBuild=ve,e.cardActionsBuild=G,e.cardBuild=j,e.cardContentBuild=B,e.cardFooterBuild=$,e.carouselBuild=s,e.carouselTemplateBuild=c,e.chartBuild=V,e.checkboxBuild=ut,e.checkboxSetBuild=ht,e.chipsBuild=rt,e.colorPickerBuild=st,e.compositeBuild=mt,e.confirmDlgBuild=be,e.containerBuild=K,e.contentBuild=an,e.currencyBuild=lt,e.dateBuild=Ot,e.dateTimeBuild=_t,e.dlgBuild=Pe,e.dlgFooterBuild=we,e.fileUploadBuild=Rt,e.footerBuild=sn,e.formActionBuild=Ke,e.formBuild=ot,e.formFieldBuild=qe,e.headerBuild=cn,e.htmlBuild=g,e.iconBuild=v,e.iframeBuild=y,e.iframeDlgBuild=_e,e.initComponentsBuildTask=function(){},e.labelBuild=w,e.layoutBuild=en,e.leftPanelBuild=dn,e.lgBuild=J,e.lgcolBuild=Q,e.lgrowBuild=Z,e.linearLayoutBuild=yi,e.linearLayoutItemBuild=bi,e.listBuild=Dt,e.liveTableBuild=Nt,e.loginBuild=p,e.loginDlgBuild=Oe,e.marqueeBuild=d,e.mediaListBuild=Ct,e.mediaListItemBuild=It,e.menuBuild=Ft,e.messageBuild=Mt,e.mobileNavbarBuild=un,e.navBuild=Bt,e.navItemBuild=jt,e.navbarBuild=Gt,e.numberBuild=ft,e.pageBuild=Jt,e.pageContentBuild=Pn,e.paginationBuild=on,e.panelBuild=ee,e.partialBuild=In,e.partialDlgBuild=Ee,e.partialParamBuild=Dn,e.pictureBuild=O,e.popoverBuild=$t,e.prefabBuild=xn,e.prefabContainerBuild=jn,e.progressBarBuild=x,e.progressCircleBuild=N,e.radiosetBuild=gt,e.ratingBuild=At,e.repeatTemplateBuild=oe,e.rightPanelBuild=mn,e.routerOutletBuild=nn,e.rteBuild=M,e.searchBuild=L,e.segContentBuild=ne,e.segControlBuild=te,e.selectBuild=vt,e.sliderBuild=Tt,e.spinnerBuild=R,e.switchBuild=bt,e.tabBarBuild=_n,e.tabPaneBuild=ce,e.tableActionBuild=Bn,e.tableBuild=fi,e.tableColumnBuild=ii,e.tableColumnGroupBuild=Gn,e.tableRowActionBuild=di,e.tableRowBuild=ri,e.tabsBuild=le,e.textAreaBuild=Pt,e.textBuild=wt,e.tileBuild=pe,e.timeBuild=Et,e.topNavBuild=En,e.treeBuild=F,e.videoBuild=gi,e.wizardBuild=de,e.wizardStepBuild=he,Object.keys(t).forEach((function(n){"default"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("angular-imask"),require("@wm/components/base"),require("@wm/core"),require("rxjs")):"function"==typeof define&&define.amd?define("@wm/components/input",["exports","@angular/core","@angular/common","@angular/forms","angular-imask","@wm/components/base","@wm/core","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input={}),e.ng.core,e.ng.common,e.ng.forms,e["angular-imask"],e.wm.components.base,e.wm.core,e.rxjs)}(this,(function(e,t,n,i,o,a,r,s){"use strict";
|
|
43
|
+
***************************************************************************** */var d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function h(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function m(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function v(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var y=function(){},b=function(){},w=new t.InjectionToken("Context Provider Reference"),P=new Set([i.FormWidgetType.SELECT,i.FormWidgetType.CHECKBOXSET,i.FormWidgetType.RADIOSET,i.FormWidgetType.SWITCH,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.CHIPS,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.RATING]),O=function(e){var t,n,i,o,a,r,s,l,c,p="";for(e=e.replace(/\$\[data\[\$i\]/g,"$[__1"),i=0;i<e.length;i++)if(t=e[i],n=e[i+1],"$"===t&&"["===n){for(r=1,c=!1,s=!1,o=i+2;o<e.length;o++)if(" "!==(a=e[o])&&(c||(s='"'===e[o]||"'"===e[o],c=!0),"["===a?r++:"]"===a&&r--,!r)){l=e.substring(i+2,o),p+=s?"__1["+l+"]":l;break}i=o}else p+=t;return p},E=function(e,t){var n;return t?(t.replace(/\[(\w+)\]/g,".$1").split(".").forEach((function(t){n=n&&n[t]||(_.isNull(e)?e:e[t])})),n):e},R=function(e,t,n){var o,a=t.field,r=t.expression,s=t.bindExpression;return s?(o=s.replace("bind:",""),i.checkIsCustomPipeExpression(o)&&(o+=": __1"),o=O(o)):o=r||a,s||r?i.$parseExpr(o)(n,Object.assign({},e,{__1:e})):_.get(e,a)},A=function(e,t){return!(!e||!t)&&(t=-1===t.indexOf("?")?t:t.substring(0,t.indexOf("?")),e=-1===e.indexOf("?")?e:e.substring(0,e.indexOf("?")),new RegExp("^(#/|#)"+t+"$").test(e))},T=function(e,t){return e.some((function(e){return!!A(e.link,t)||(e.children?T(e.children,t):void 0)}))},S=function(e){return P.has(e)},C=function(e,t,n){return i.isValidWebURL(e)||(e||(e=n||"resources/images/imagelists/default-image.png"),e=t?i.encodeUrl(e):e,i.stringStartsWith(e,"services/prefabs")),e},I=function(e){return""===e||"none"===e?e:"url("+C(e)+")"};function D(e,n,i){return{provide:n,useExisting:t.forwardRef((function(){return e})),multi:i}}function x(e){return D(e,y)}var N,k=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join("_")},M={number:["number","integer","big_integer","short","float","big_decimal","double","long","byte"],string:["string","text"],character:["character"],date:["date","time","timestamp","datetime"]},L={number:["exact","notequals","lessthan","lessthanequal","greaterthan","greaterthanequal","null","isnotnull"],string:["anywhereignorecase","anywhere","startignorecase","start","endignorecase","end","exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],character:["exactignorecase","exact","notequalsignorecase","notequals","null","isnotnull","empty","isnotempty","nullorempty"],date:["exact","lessthan","lessthanequal","greaterthan","greaterthanequal","null","notequals","isnotnull"]},F={boolean:["exact","null","isnotnull"],clob:[],blob:[]},j=function(e){var t=[];return _.isArray(e)?(e.forEach((function(e){t=t.concat(j(e))})),t):_.isObject(e)?(_.forEach(e,(function(e,n){e&&(t=t.concat(n.split(" ")))})),t):void 0},B=function(e,t){var n,i,o=e.toAdd||e,a=e.toRemove||t;return _.isObject(e)?(n=_.isArray(o)?o:j(o||[]),i=a?_.isArray(a)?a:j(a):[]):(n=o?[o]:[],i=a?[a]:[]),{toAdd:n,toRemove:i}},G=function(e,t,n,o){var a,r,s,l,c,p;o||(o={}),_.forEach(e,(function(e,d){_.includes(d,".")&&(l=_.split(d,"."),r=l[0],s=l[1],p=!0),o.noModifyTitle?a=d:_.isString(d)?(a=i.prettifyLabel(d),a=i.deHyphenate(a),a=n?i.initCaps(n)+" "+a:a):a=d,d=n?n+"."+d:d,c=p?(c=_.split(a," ")).length>1?c[c.length-2]+" "+c[c.length-1]:c[0]:a;var u=o.setBindingField?{displayName:c,field:d,relatedTable:r,relatedField:s||a}:{displayName:c,relatedTable:r,relatedField:s||a};if(!_.isObject(e)||_.isArray(e)&&!e[0]){if(o.upperBound&&o.columnCount===o.upperBound)return;t.terminals.push(u),o.columnCount+=1}else o.columnCount!==o.upperBound&&t.objects.push(u),_.isArray(e)&&e[0]?G(e[0],t,d+"[0]",o):G(e,t,d,o)}))},V=function(e){var t;return _.isArray(e)?_.isObject(e[0])?(t=i.getClonedObject(e[0]),_.forEach(e,(function(e,n){if(n+1>=10)return!1;_.assignWith(t,e,(function(e,t){return null==e?t:e}))}))):t=e[0]:t=e,t};e.APPLY_STYLES_TYPE=void 0,(N=e.APPLY_STYLES_TYPE||(e.APPLY_STYLES_TYPE={}))[N.CONTAINER=0]="CONTAINER",N[N.SCROLLABLE_CONTAINER=1]="SCROLLABLE_CONTAINER",N[N.INNER_SHELL=2]="INNER_SHELL",N[N.SHELL=3]="SHELL";var W={backgroundattachment:"backgroundAttachment",backgroundcolor:"backgroundColor",backgroundgradient:"backgroundGradient",backgroundimage:"backgroundImage",backgroundposition:"backgroundPosition",backgroundrepeat:"backgroundRepeat",backgroundsize:"backgroundSize",bordercolor:"borderColor",borderradius:"borderRadius",borderstyle:"borderStyle",borderwidth:"borderWidth",borderbottomwidth:"borderBottomWidth",borderleftwidth:"borderLeftWidth",borderrightwidth:"borderRightWidth",bordertopwidth:"borderTopWidth",color:"color",cursor:"cursor",display:"display",fontsize:"fontSize",fontfamily:"fontFamily",fontstyle:"fontStyle",fontunit:"fontunit",fontvariant:"fontVariant",fontweight:"fontWeight",height:"height",horizontalalign:"textAlign",lineheight:"lineHeight",margin:"margin",marginbottom:"marginBottom",marginleft:"marginLeft",marginright:"marginRight",margintop:"marginTop",opacity:"opacity",overflow:"overflow",padding:"padding",paddingbottom:"paddingBottom",paddingleft:"paddingLeft",paddingright:"paddingRight",paddingtop:"paddingTop",picturesource:"backgroundImage",textalign:"textAlign",textdecoration:"textDecoration",verticalalign:"verticalAlign",visibility:"visibility",whitespace:"whiteSpace",width:"width",wordbreak:"wordbreak",zindex:"zIndex"},U=function(e){return!!W[e]},q={height:!0,overflow:!0,padding:!0,paddingbottom:!0,paddingleft:!0,paddingright:!0,paddingtop:!0},z={textalign:!0},H={textalign:!0,width:!0};function Y(t,n,o,a){var r=Object.create(null);a&&a.forEach((function(e){return r[e]=!0})),n.registerStyleChangeListener((function(a,s){if(!(r[a]||o===e.APPLY_STYLES_TYPE.SHELL&&q[a])){if(o===e.APPLY_STYLES_TYPE.INNER_SHELL){if(!q[a])return;"height"===a&&i.setCSS(t,"overflow",s?"auto":"")}if(o!==e.APPLY_STYLES_TYPE.CONTAINER||!z[a]){if(o===e.APPLY_STYLES_TYPE.SCROLLABLE_CONTAINER){if(H[a])return;"height"===a&&i.setCSS(t,"overflow",s?"auto":"")}"fontsize"===a||"fontunit"===a?i.setCSS(t,"fontSize",""===n.fontsize?"":n.fontsize+(n.fontunit||"px")):"backgroundimage"===a?i.setCSS(t,"backgroundImage",n.picturesource||I(s)):W[a]&&i.setCSS(t,W[a],s)}}}))}var K,Q="wm-form-field-",Z=function(){var e=new Map;for(var t in i.FormWidgetType)e.set(Q+i.FormWidgetType[t],new Map);return e}(),J=function(e){return Z.get(e)},X=function(e,t){Z.set(e,t),window.WM_LOADED_COMPONENTS=v(v([],g(window.WM_LOADED_COMPONENTS||[])),[e])};e.PROP_TYPE=void 0,(K=e.PROP_TYPE||(e.PROP_TYPE={}))[K.BOOLEAN=1]="BOOLEAN",K[K.NUMBER=2]="NUMBER",K[K.STRING=3]="STRING";var ee={type:e.PROP_TYPE.STRING},te={type:e.PROP_TYPE.NUMBER},ne={type:e.PROP_TYPE.BOOLEAN},ie={arrayType:!0},oe=function(){X("wm-container",new Map([["animation",ee],["class",ee],["conditionalclass",ie],["conditionalstyle",ie],["content",ee],["name",ee],["show",Object.assign({value:!0},ne)]]))},ae=new Map,re=new i.IDGenerator("widget-id"),se=new Map([["tap","click"]]),le={BLOCK:"block",INLINE_BLOCK:"inline-block",INLINE:"inline"},ce=new Set(["readonly","autofocus","disabled","startchecked","multiple","selected","required","controls","autoplay","loop","muted","show"]),pe=function(e){return ce.has(e)},de=new Set(["width","height","iconheight","iconwidth","popoverwidth","popoverheight","imagewidth","imageheight"]),ue=function(e){return de.has(e)},he=function(t,n,o){return o===e.PROP_TYPE.BOOLEAN?i.toBoolean(n,pe(t)&&t):o===e.PROP_TYPE.NUMBER?+n:n},me=function(e,t,n){var o=e.widgetId,a=e[t];i.isChangeFromWatch()||i.$unwatch(k(o,t)),i.resetChangeFromWatch();var r=J(e.getWidgetSubType()).get(t);if(r){var s=r.type;s&&(n=he(t,n,s))}if(n!==a||i.isObject(n)||i.isObject(a)){if(ue(t))n=i.toDimension(n);else if(_.startsWith(n,"resources/")){var l=e;void 0===l._parentPrefab_&&(l._parentPrefab_=e.$element.parent().closest('[prefabname][prefabname!="__self__"]').attr("prefabname")||""),l._parentPrefab_?n="./app/prefabs/"+l._parentPrefab_+"/"+n:r&&n!=r.value&&(n="./"+n)}e[t]=n,U(t)?e.notifyStyleChange(t,n,a):("conditionalclass"===t&&(n=B(n,a)),r&&e.notifyPropertyChange(t,n,a)),i.$appDigest()}},fe={set:function(e,t,n){return me(e,t,n),!0},get:function(e,t){var n=e[t];return _.isFunction(n)?n.bind(e):n}},ge=window.requestAnimationFrame,ve=[],ye=function(e){ve.length||ge((function(){ve.forEach((function(e){return e()})),ve.length=0})),ve.push(e)},be=function(){function e(){}return e.create=function(e,t,n){if(window.Proxy)return new Proxy(e,fe);var i=Object.create(e);return ye((function(){for(var t in e)_.isFunction(e[t])&&"constructor"!==t&&"super"!==t&&!_.startsWith(t,"ng")&&(e[t]=e[t].bind(e))})),Object.keys(W).forEach((function(t){Object.defineProperty(i,t,{get:function(){return e[t]},set:function(n){return me(e,t,n)}})})),n&&n.forEach((function(t,n){Object.defineProperty(i,n,{get:function(){return e[n]},set:function(t){return me(e,n,t)}})})),i},e}(),we=function(e,t,n){t&&t.length&&i.removeClass(n,_.join(t," ")),e&&e.length&&i.addClass(n,_.join(e," "))},Pe=function(e,t,n){t&&_.isObject(t)&&Object.keys(t||{}).forEach((function(e){i.setCSS(n,e,"")}));e&&_.isObject(e)&&i.setCSSFromObj(n,e)},_e=function(){function e(e,n,o){var a=this;this.inj=e,this.isAttached=!1,this.styleChange=new s.ReplaySubject,this.propertyChange=new s.Subject,this.readyState=new s.Subject,this.destroy=new s.Subject,this.eventHandlers=new Map,this.toBeSetupEventsQueue=[],this.__cloneable__=!1,this.$attrs=new Map,this.isMuted=!1;var l=e.get(t.ElementRef);this.nativeElement=l.nativeElement,this.widgetType=n.widgetType,this.widgetSubType=n.widgetSubType||n.widgetType,this.viewParent=e.view.component,this.displayType=n.displayType||le.BLOCK,this.context=e.view.context,this.widget=this.createProxy(),this.eventManager=e.get(r.EventManager),this.nativeElement.widget=this.widget,this.appLocale=e.get(i.App).appLocale||{},this.initContext(),n.hostClass&&i.addClass(this.nativeElement,n.hostClass),this.widgetId=this.generateWidgetId(),i.setAttr(this.nativeElement,"widget-id",this.widgetId,!0),this.registerStyleChangeListener(this.onStyleChange,this),this.registerPropertyChangeListener(this.onPropertyChange,this),o?(this.delayedInit=!0,o.then((function(){a.initWidget(),a.setInitProps()}))):this.initWidget()}return Object.defineProperty(e.prototype,"$element",{get:function(){return $(this.nativeElement)},enumerable:!1,configurable:!0}),e.prototype.getNativeElement=function(){return this.nativeElement},e.prototype.getWidgetType=function(){return this.widgetType},e.prototype.getWidgetSubType=function(){return this.widgetSubType},e.prototype.getWidget=function(){return this.widget},e.prototype.setProperty=function(e,t){this.widget[e]=t},e.prototype.getViewParent=function(){return this.viewParent},e.prototype.notifyStyleChange=function(e,t,n){this.styleChange.next({key:e,nv:t,ov:n})},e.prototype.notifyPropertyChange=function(e,t,n){this.propertyChange.next({key:e,nv:t,ov:n})},e.prototype.registerStyleChangeListener=function(e,t){t&&(e=e.bind(t)),this.styleChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerReadyStateListener=function(e,t){t&&(e=e.bind(t)),this.readyState.isStopped?e():this.readyState.subscribe((function(){return e()}))},e.prototype.registerPropertyChangeListener=function(e,t){t&&(e=e.bind(t)),this.propertyChange.subscribe((function(t){var n=t.key,i=t.nv,o=t.ov;return e(n,i,o)}))},e.prototype.registerDestroyListener=function(e,t){t&&(e=e.bind(t)),this.destroy.subscribe((function(){}),(function(){}),(function(){return e()}))},e.prototype.getDisplayType=function(){return this.displayType},e.prototype.createProxy=function(){return be.create(this,this.widgetSubType,J(this.widgetSubType))},e.prototype.initContext=function(){var e=this.inj.view.context,t=this.inj.get(w,{});if(this.viewParent!==e?this.context=e:this.context={},t){var n={};_.isArray(t)?_.forEach(t,(function(e){Object.assign(n,e)})):n=t,this.context=Object.assign({},n,this.context)}},e.prototype.setWidgetProperty=function(e,t){this.widget[e]=t},e.prototype.getAttr=function(e){return this.$attrs.get(e)},e.prototype.getAppInstance=function(){return this.inj.get(i.App)},e.prototype.generateWidgetId=function(){return re.nextUid()},e.prototype.onPropertyChange=function(e,t,n){if("show"===e)this.nativeElement.hidden=!t;else if("hint"===e)i.isMobileApp()||i.setAttr(this.nativeElement,"title",t);else if("class"===e){i.switchClass(this.nativeElement,t,n);var o=t.match(/(\W|^)(h([0-6]))(?=\s|$)/);o&&(i.setAttr(this.nativeElement,"role","heading"),i.setAttr(this.nativeElement,"aria-level",o[3]))}else if("name"===e||"tabindex"===e)i.setAttr(this.nativeElement,e,t),"name"===e&&t&&function(e,t,n,o){i.isDefined(e.Widgets)&&(o&&(e.Widgets[o]=void 0),n&&(e.Widgets[n]=t))}(this.viewParent,this.widget,t,n);else if("conditionalclass"===e)we(t.toAdd,t.toRemove,this.nativeElement);else if("autoplay"===e){var a="wm-audio"===this.widgetType?"audio":"video";this.nativeElement.querySelector(a).load()}else"conditionalstyle"===e?Pe(t,n,this.nativeElement):"animation"===e?i.addClass(this.nativeElement,"animated "+t):"disabled"===e&&(!0===t?i.setAttr(this.nativeElement,"disabled","true",!0):i.removeAttr(this.nativeElement,"disabled",!0))},e.prototype.onStyleChange=function(e,t,n){},e.prototype.registerWidget=function(e){var t,n,o,a,r;this.registerDestroyListener((t=this.widget,n=this.viewParent,o=this.widgetId,a=e,r=!1,ae.set(o,t),a&&i.isDefined(n.Widgets)&&(r=!0,n.Widgets[a]=t),function(){ae.delete(o),r&&(n.Widgets[a]=void 0)}))},e.prototype.getMappedEventName=function(e){return se.get(e)||e},e.prototype.handleEvent=function(e,t,n,i,o){this.eventManager.addEventListener(e,t,(function(e){if(i.$event=e,"delayed"!==o)return n();setTimeout((function(){return n()}),150)}))},e.prototype.processEventAttr=function(e,t,n){var o=this,a=i.$parseEvent(t),r=this.context;r.widget=this.widget;var s=a.bind(void 0,this.viewParent,r),l=function(){var t;i.$invokeWatchers(!0);try{if(r.$event=r.$event||new window.CustomEvent(e),!((t=s())instanceof Promise))return t;t.then((function(e){return e}),(function(e){return e}))}catch(e){console.error(e)}};this.eventHandlers.set(this.getMappedEventName(e),{callback:l,locals:r}),this[_.camelCase("on-"+e)]=l,this.toBeSetupEventsQueue.push((function(){o.handleEvent(o.nativeElement,o.getMappedEventName(e),l,r,n)}))},e.prototype.processBindAttr=function(e,t){var n=this;this.initState.delete(e),this.registerDestroyListener(i.$watch(t,this.viewParent,this.context,(function(t){return n.widget[e]=t}),k(this.widgetId,e),"datasource"===e,this.widgetProps.get(e),(function(){return n.isMuted})))},e.prototype.removePropertyBinding=function(e){i.$unwatch(k(this.widgetId,e))},e.prototype.invokeEventCallback=function(e,t){var n=this.eventHandlers.get(e);if(n){var i=n.callback,o=n.locals||{};if(i)return i(Object.assign(o,t))}},e.prototype.processAttr=function(e,t){var n=e.split("."),o=n[0],a=n[1],r=n[2],s=n.length;"bind"===a?("show"===o&&(this.nativeElement.hidden=!0),this.processBindAttr(o,t)):"event"===a?this.processEventAttr(o,t,r):1===s&&("class"===e?i.removeClass(this.nativeElement,t):"tabindex"!==e&&"name"!==e||i.removeAttr(this.nativeElement,e),this.initState.set(o,t))},e.prototype.processAttrs=function(){var e,t,n=this.inj.elDef;try{for(var i=f(n.element.attrs),o=i.next();!o.done;o=i.next()){var a=g(o.value,3),r=a[1],s=a[2];this.$attrs.set(r,s),this.processAttr(r,s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.initWidget=function(){var e=this;this.initState=new Map;var t=J(this.widgetSubType);t.forEach((function(t,n){i.isDefined(t.value)&&e.initState.set(n,t.value)})),this.widgetProps=t,this.processAttrs(),this.registerWidget(this.initState.get("name"))},e.prototype.setInitProps=function(){var e=this;this.initState.get("name")&&(this.widget.name=this.initState.get("name")),this.initState.forEach((function(t,n){(e.widgetProps.get(n)||U(n))&&"name"!==n&&(e.widget[n]=t)})),this.initState.clear(),this.initState=void 0,this.readyState.next(),this.readyState.complete()},e.prototype.hasEventCallback=function(e){return this.eventHandlers.has(e)},e.prototype.focus=function(){var e=this.$element[0].querySelector("[focus-target]");e||(e=this.$element[0]),e.focus()},e.prototype.execute=function(e,t){},e.prototype.mute=function(){this.isMuted=!0},e.prototype.unmute=function(){this.isMuted=!1},e.prototype.ngOnAttach=function(){this.isAttached=!0},e.prototype.ngOnDetach=function(){this.isAttached=!1},e.prototype.ngOnInit=function(){this.delayedInit||this.setInitProps()},e.prototype.ngAfterViewInit=function(){var e,t;if(this.toBeSetupEventsQueue.length)try{for(var n=f(this.toBeSetupEventsQueue),i=n.next();!i.done;i=n.next()){(0,i.value)()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.toBeSetupEventsQueue.length=0,this.isAttached=!0},e.prototype.ngAfterContentInit=function(){},e.prototype.ngOnDestroy=function(){this.isDestroyed=!0,this.widget=Object.create(null),this.styleChange.complete(),this.propertyChange.complete(),this.destroy.complete(),this.isAttached=!1},e}();_e.decorators=[{type:t.Injectable}],_e.ctorParameters=function(){return[{type:t.Injector},{type:void 0},{type:Promise}]};var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(_e);Oe.decorators=[{type:t.Injectable}];var Ee=function(e){this.redraw=function(){var t=e.$element.closest("[wmtabpane]"),n=e.$element.closest("[wmaccordionpane]").find(".panel-heading");if(!(t.length&&!t.hasClass("active")||n.length&&!n.hasClass("active")))return e.redraw&&e.redraw()}};Ee.decorators=[{type:t.Directive,args:[{selector:"[redrawable]"}]}],Ee.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.updateRedrawableComponents=function(e){var t=this;_.pickBy(e,(function(e){e&&e.nativeElement&&e.nativeElement.hasAttribute("redrawable")&&!_.includes(t.reDrawableComponents._results,e)&&t.reDrawableComponents._results.push(e),e&&e.Widgets&&t.updateRedrawableComponents(e.Widgets)}))},t.prototype.redrawChildren=function(){var e=this;this.content&&this.Widgets&&this.updateRedrawableComponents(this.Widgets),setTimeout((function(){e.reDrawableComponents&&e.reDrawableComponents.forEach((function(e){return e.redraw()}))}),100)},t.prototype.onPropertyChange=function(t,n,i){e.prototype.onPropertyChange.call(this,t,n,i),"show"===t&&n&&this.redrawChildren()},t}(Oe);Re.decorators=[{type:t.Directive}],Re.propDecorators={reDrawableComponents:[{type:t.ContentChildren,args:[Ee,{descendants:!0}]}]};var Ae="app-container",Te={widgetType:"wm-container",hostClass:Ae},Se=function(t){function n(n){var o=t.call(this,n,Te)||this;return i.addClass(o.nativeElement,Ae),Y(o.nativeElement,o,e.APPLY_STYLES_TYPE.CONTAINER),o}return u(n,t),n}(Re);Se.initializeProps=oe(),Se.decorators=[{type:t.Directive,args:[{selector:"[wmContainer]",providers:[x(Se)]}]}],Se.ctorParameters=function(){return[{type:t.Injector}]};var Ce=function(){function e(){}return e.prototype.transform=function(e,t,n){return i.transformFileURI(C(e,t,n))},e}();Ce.decorators=[{type:t.Pipe,args:[{name:"image"}]}];var Ie=function(){X("wm-item-template",new Map([["content",ee]]))},De={widgetType:"wm-item-template"},xe=function(e){function t(t,n,i){var o=e.call(this,t,De)||this;return o.app=i,o.nativeElement=n.nativeElement,o.context=t.view.context,o}return u(t,e),Object.defineProperty(t.prototype,"$index",{get:function(){return this.context.index},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wmItemTemplate",{set:function(e){this.widget.content=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.partialParams.item=this.userComponentParams.dataObject},t}(Oe);xe.initializeProps=Ie(),xe.decorators=[{type:t.Directive,args:[{selector:"[wmItemTemplate]",exportAs:"itemTemplateRef",providers:[x(xe)]}]}],xe.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},xe.propDecorators={userComponentParams:[{type:t.Input}],wmItemTemplate:[{type:t.Input}]};var Ne=function(){X("wm-repeat-template",new Map([["show",ne]]))},ke={widgetType:"wm-repeat-template",hostClass:"app-repeat-item"},Me=function(e){function t(t){var n=e.call(this,t,ke)||this;return Y(n.nativeElement,n),n}return u(t,e),t}(Oe);Me.initializeProps=Ne(),Me.decorators=[{type:t.Directive,args:[{selector:"[wmRepeatTemplate]"}]}],Me.ctorParameters=function(){return[{type:t.Injector}]};var Le=function(){function e(e,t,n){this.templateRef=t,this.viewContainer=n,this.viewParent=e.view.component,this.context=e.view.context}return Object.defineProperty(e.prototype,"lazyLoad",{set:function(e){var t=this;this.unSubscribeFn=i.$watch(e,this.viewParent,this.context,(function(e){!t.embeddedView&&e&&(t.embeddedView=t.viewContainer.createEmbeddedView(t.templateRef,t.context),t.unSubscribeFn())}))},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.unSubscribeFn()},e}();Le.decorators=[{type:t.Directive,args:[{selector:"[lazyLoad]"}]}],Le.ctorParameters=function(){return[{type:t.Injector},{type:t.TemplateRef},{type:t.ViewContainerRef}]},Le.propDecorators={lazyLoad:[{type:t.Input}]};var Fe=function(){X("wm-message",new Map([["animation",ee],["caption",Object.assign({value:"Message"},ee)],["class",ee],["hideclose",Object.assign({value:!1},ne)],["name",ee],["show",Object.assign({value:!0},ne)],["type",Object.assign({value:"success"},ee)]]))},je={widgetType:"wm-message",hostClass:"alert app-message"},Be=function(e){function t(t){var n=e.call(this,t,je)||this;return n.messageClass="",n.messageIconClass="",n.type="",Y(n.nativeElement,n),n}return u(t,e),t.prototype.showMessage=function(e,t){e&&(this.caption=e),t&&this.setWidgetProperty("type",t),this.setWidgetProperty("show",!0)},t.prototype.hideMessage=function(){this.setWidgetProperty("show",!1)},t.prototype.dismiss=function(e){this.hideMessage(),this.invokeEventCallback("close",{$event:e})},t.prototype.onMessageTypeChange=function(e){var t,n;switch(e){case"success":t="alert-success",n="wm-sl-l sl-check";break;case"error":t="alert-danger",n="wi wi-cancel";break;case"warn":case"warning":t="alert-warning",n="wm-sl-l sl-alarm-bell";break;case"info":t="alert-info",n="wi wi-info";break;case"loading":t="alert-info alert-loading",n="fa fa-spinner fa-spin"}i.switchClass(this.nativeElement,t,this.messageClass),this.messageClass=t,this.messageIconClass=n},t.prototype.onPropertyChange=function(t,n,i){"type"===t?this.onMessageTypeChange(n):e.prototype.onPropertyChange.call(this,t,n,i)},t}(Oe);Be.initializeProps=Fe(),Be.decorators=[{type:t.Component,args:[{selector:"[wmMessage]",template:'<i aria-hidden="true" [title]="type + \'Alert\'" class="icon {{type}} {{messageIconClass}}"></i>\n<span [innerHtml]="caption"></span>\n<button title="Close" type="button" class="btn-transparent close" [hidden]="hideclose" (click)="dismiss($event)" aria-label="Close">\n <span aria-hidden="true">×</span>\n</button>\n',providers:[x(Be)],exportAs:"wmMessage"}]}],Be.ctorParameters=function(){return[{type:t.Injector}]};var Ge=function(){X("wm-partial",new Map([["name",ee]]))},$e={widgetType:"wm-partial",hostClass:"app-partial clearfix"},Ve=function(e){function t(t,n){var i=e.call(this,t,$e)||this;return i.viewport=n,i.registerDestroyListener(i.viewport.subscribe("resize",(function(e){return i.callback("resize",e)}))),i.registerDestroyListener(i.viewport.subscribe("orientationchange",(function(e){return i.callback("orientationchange",e)}))),i}return u(t,e),t.prototype.callback=function(e,t){t=_.assign({widget:this},t),this.invokeEventCallback(e,t)},t.prototype.ngOnAttach=function(){this.callback("attach")},t.prototype.ngOnDetach=function(){this.callback("detach")},t.prototype.ngOnDestroy=function(){this.callback("destroy")},t}(Oe);Ve.initializeProps=Ge(),Ve.decorators=[{type:t.Directive,args:[{selector:"[wmPartial]",providers:[x(Ve)]}]}],Ve.ctorParameters=function(){return[{type:t.Injector},{type:i.Viewport}]};var We=function(){function e(e){this.widgetRef=e,this.widgetRef.partialParams={},this.widgetRef.pageParams=this.widgetRef.partialParams,this.widgetRef.params$=new s.Subject}return e.prototype.registerParams=function(e,t,n,o){var a=this;this.widgetRef.partialParams[e]=t,!t&&n?this.widgetRef.registerDestroyListener(i.$watch(n,this.widgetRef.getViewParent(),_.get(this.widgetRef,"context"),(function(t){a.widgetRef.partialParams[e]=t,a.widgetRef.params$.next()}))):this.widgetRef.params$.next()},e}();We.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],We.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]}]};var Ue=function(){function e(e,t,n){this.bindValue=e,this.type=t,this.partialParamsProvider=n}return e.prototype.ngOnInit=function(){this.partialParamsProvider.registerParams(this.name,this.value,this.bindValue,this.type)},e}();Ue.decorators=[{type:t.Directive,args:[{selector:"[wmParam]"}]}],Ue.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Attribute,args:["value.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["type"]}]},{type:We}]},Ue.propDecorators={name:[{type:t.Input}],value:[{type:t.Input}]};var qe=function(){function e(e,t,n,o,a,r,s,c){var p=this;this.componentInstance=e,this.vcRef=t,this.elRef=n,this.inj=o,this.app=a,this.resolver=s,this.partialRefProvider=c,this.contentInitialized=!1,this.renderPartial=_.debounce(this._renderPartial,200),e.registerPropertyChangeListener((function(t,n,o){"content"===t&&(e.$lazyLoad?e.$lazyLoad=function(){p.renderPartial(n),e.$lazyLoad=i.noop}:p.renderPartial(n))}));var d=e.params$.pipe(l.filter((function(){return p.contentInitialized})),l.debounceTime(200)).subscribe((function(){return p.renderPartial(e.content)}));e.registerDestroyListener((function(){return d.unsubscribe()}))}return Object.defineProperty(e.prototype,"name",{get:function(){return this.componentInstance.name},enumerable:!1,configurable:!0}),e.prototype._renderPartial=function(e){return h(this,void 0,void 0,(function(){var t,n,o,a,r=this;return m(this,(function(s){switch(s.label){case 0:return this.vcRef.clear(),i.$invokeWatchers(!0),(t=$(this.elRef.nativeElement).closest(".app-prefab")).length?n=t.attr("prefabname"):this.componentInstance.viewParent&&(n=this.componentInstance.viewParent.prefabName),[4,this.partialRefProvider.getComponentFactoryRef(e,i.ComponentType.PARTIAL,{prefab:n})];case 1:return(o=s.sent())&&((a=this.vcRef.createComponent(o,0,this.inj))&&a._component&&n&&(a._component.prefabName=n),this.$target||(this.$target=this.elRef.nativeElement.querySelector("[partial-container-target]")||this.elRef.nativeElement),this.$target.innerHTML="",this.$target.appendChild(a.location.nativeElement),this.contentInitialized=!0,setTimeout((function(){return r.onLoadSuccess()}),200)),[2]}}))}))},e.prototype.onLoadSuccess=function(){this.componentInstance.invokeEventCallback("load"),this.app.notify("partialLoaded")},e}();qe.decorators=[{type:t.Directive,args:[{selector:"[partialContainer]"}]}],qe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.ElementRef},{type:t.Injector},{type:i.App},{type:String,decorators:[{type:t.Attribute,args:["content"]}]},{type:t.ComponentFactoryResolver},{type:i.PartialRefProvider}]};var ze=function(){function e(e,t,n,i,o){this.elRef=e,this.widget=t,this.viewContainerRef=n,this.templateRef=o,this.context=i.view.context,window.addEventListener("resize",this.onResize.bind(this))}return Object.defineProperty(e.prototype,"showInDevice",{set:function(e){this.devices=e.split(","),this.onResize()},enumerable:!1,configurable:!0}),e.prototype.onResize=function(e){var t=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg")||"1200px",n=getComputedStyle(document.documentElement).getPropertyValue("--screen-md")||"992px",o=getComputedStyle(document.documentElement).getPropertyValue("--screen-sm")||"768px",a=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg-tab-landscape")||"1366px",r=getComputedStyle(document.documentElement).getPropertyValue("--screen-lg-tab-portrait")||"1024px",s=parseFloat(t)-1+"px",l=parseFloat(n)-1+"px",c=parseFloat(o)-1+"px";this.devices.indexOf("lg")>-1&&window.matchMedia("(min-width: "+t+")").matches&&!i.isLargeTabletLandscape(a,r)||this.devices.indexOf("md")>-1&&(i.isLargeTabletLandscape(a,r)||window.matchMedia("(min-width: "+n+") and (max-width: "+s+")").matches&&!i.isLargeTabletPortrait(a,r))||this.devices.indexOf("sm")>-1&&(window.matchMedia("(min-width: "+o+") and (max-width: "+l+")").matches||i.isLargeTabletPortrait(a,r))||this.devices.indexOf("xs")>-1&&window.matchMedia("(max-width: "+c+")").matches||this.devices.indexOf("all")>-1?this.embeddedView||(this.embeddedView=this.viewContainerRef.createEmbeddedView(this.templateRef,this.context)):(this.viewContainerRef.clear(),this.embeddedView="")},e.prototype.ngOnDestroy=function(){window.removeEventListener("resize",this.onResize)},e}();ze.decorators=[{type:t.Directive,args:[{selector:"[showInDevice]"}]}],ze.ctorParameters=function(){return[{type:t.ElementRef},{type:_e,decorators:[{type:t.Inject,args:[y]}]},{type:t.ViewContainerRef},{type:t.Injector},{type:t.TemplateRef}]},ze.propDecorators={showInDevice:[{type:t.Input}]};var He=function(){function e(e,t,n){this._isEnabled=!1,this._lastScrollY=-1,this._waitRefreshTill=-1,this.pendingIscrolls=[],this._$el=$(t.nativeElement),this.app=n}return e.prototype.ngOnInit=function(){var e=this;this.cancelSubscription=this.app.subscribe("no-iscroll",(function(t){e.pendingIscrolls.push(t)}))},e.prototype.ngDoCheck=function(){this._isEnabled?this._smoothScrollInstance?this.refreshIScroll():this._smoothScrollInstance=this.applySmoothScroll():this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy()},e.prototype.ngOnDestroy=function(){this._smoothScrollInstance&&this._smoothScrollInstance.destroy&&this._smoothScrollInstance.destroy(),this.cancelSubscription&&this.cancelSubscription()},Object.defineProperty(e.prototype,"wmSmoothscroll",{set:function(e){this._isEnabled=!0===e||"true"===e,this._isEnabled?this._smoothScrollInstance||(this._smoothScrollInstance=this.applySmoothScroll()):this.ngOnDestroy()},enumerable:!1,configurable:!0}),e.prototype.applySmoothScroll=function(e,t){var n=this;if(!i.isMobileApp()||i.isKitkatDevice())return null;var o={scrollbars:!0,preventDefault:!1,momentum:!0,bounce:!1,mouseWheel:!0,disablePointer:!0,disableTouch:!1,disableMouse:!1},a=this._$el[0];if(!a.children.length)return null;this._$el.addClass("smoothscroll-wrapper"),a.onscroll=function(e){e.target.iscroll&&e.target.scrollTop&&(e.target.iscroll.scrollTo(e.target.iscroll.x,e.target.iscroll.y-e.target.scrollTop),e.target.scrollTop=0)},t&&"INPUT"===t.tagName&&t.focus(),e&&(o.fadeScrollbars=!0);var r=new IScroll(a,o);if(e){_.forEach(e,(function(e,t){_.forEach(e,(function(e){r.on(t,e)}))}));var s=this;r.on("scrollStart",(function(){this._scrolling=!0,i.isMobileApp()&&s.app.notify("iscroll-start",{})})),r.on("scrollEnd",(function(){this._scrolling=!1})),r.refresh()}return this.app.notify("iscroll-start",{}),r.indicatorRefresh=function(){var e,t=n._$el[0].iscroll.indicators;if(t.length)for(e=0;e<t.length;e++)t[e].refresh()},this._$el[0].iscroll=r,_.forEach(this.pendingIscrolls,(function(e,t){if(e.isSameNode(n._$el[0]))return n.app.notify("iscroll-update",{el:e}),void n.pendingIscrolls.splice(t,1)})),this.app.notify("iscroll-update",{}),{iScroll:r,destroy:function(){r.destroy(),$(r.scroller).css({"transition-timing-function":"","transition-duration":"",transform:""}),r=null,delete a.iscroll}}},e.prototype.refreshIScroll=function(){var e=this._smoothScrollInstance.iScroll;if(!(e._scrolling||this._waitRefreshTill>Date.now())){if(e.wrapper&&!_.includes(e.wrapper.children[0].classList,"smoothscroll-container")&&e.wrapper.scrollHeight>e.wrapper.clientHeight){var t=e._events,n=document.activeElement;$(e.wrapper.children).wrapAll('<div class="smoothscroll-container"></div>'),this._smoothScrollInstance.destroy(),this._smoothScrollInstance=this.applySmoothScroll(t,n)}this._lastScrollY!==this._$el[0].iscroll.maxScrollY?(Ye(this._smoothScrollInstance.iScroll),this._lastScrollY=this._$el[0].iscroll.maxScrollY):this._smoothScrollInstance.iScroll.refresh(),this._waitRefreshTill=Date.now()+500}},e}();He.decorators=[{type:t.Directive,args:[{selector:"[wmSmoothscroll]"}]}],He.ctorParameters=function(){return[{type:t.Injector},{type:t.ElementRef},{type:i.App}]},He.propDecorators={wmSmoothscroll:[{type:t.Input}]};var Ye=function(e){var t=!e&&$(".smoothscroll-container");e&&e.wrapper&&e.wrapper.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&$(document.activeElement).offset().top+document.activeElement.clientHeight>.9*window.innerHeight&&document.activeElement.scrollIntoView({behavior:"auto",block:"end",inline:"end"}),e?(e.indicatorRefresh&&e.indicatorRefresh(),e.refresh&&e.refresh()):t.length&&t.parent().each((function(e,t){t.iscroll.indicatorRefresh(),t.iscroll.refresh()}))},Ke=Ye;window.addEventListener("resize",i.debounce(Ye,200));var Qe=function(){function e(e){this.elRef=e}return Object.defineProperty(e.prototype,"textContent",{set:function(e){var t=e;null==e&&(t=""),this.elRef.nativeElement.textContent=t},enumerable:!1,configurable:!0}),e}();Qe.decorators=[{type:t.Directive,args:[{selector:"[textContent]"}]}],Qe.ctorParameters=function(){return[{type:t.ElementRef}]},Qe.propDecorators={textContent:[{type:t.Input}]};var Ze=function(e){return _.isDate(e)||isNaN(e)||(e=parseInt(e,10)),moment(e).valueOf()||moment((new Date).toDateString()+" "+e).valueOf()},Je=function(){function e(e){this.decimalPipe=e}return e.prototype.transform=function(e,t,n,i,o,a,r,s){n=o&&!r?"1."+a.length+"-16":n;var l=s?s.number:void 0;return this.decimalPipe.transform(e,n,i||l||t)},e}();Je.decorators=[{type:t.Pipe,args:[{name:"trailingZeroDecimalPipe"}]}],Je.ctorParameters=function(){return[{type:n.DecimalPipe}]};var Xe=function(){function e(e,t){this.datePipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n,o){var a;if("null"===e||""===e)return"";if(!i.isDefined(e))return"";if(a=Ze(e)){if("timestamp"===t)return a;if("UTC"===t)return new Date(a).toISOString();var r=this.i18nService?this.i18nService.getTimezone(o):n;return r&&(e===a||i.hasOffsetStr(e))?moment(a).tz(r).format(t.replaceAll("y","Y").replaceAll("d","D").replace("a","A")):this.datePipe.transform(a,t)}return""},e}();Xe.decorators=[{type:t.Pipe,args:[{name:"toDate"}]}],Xe.ctorParameters=function(){return[{type:n.DatePipe},{type:i.AbstractI18nService}]};var et=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t){if(t&&!String(t).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)&&(t="1."+t+"-"+t),!_.isNaN(+e)){var n=this.i18nService&&this.i18nService.getwidgetLocale()?this.i18nService.getwidgetLocale():void 0,i=n?n.number:null;return this.decimalPipe.transform(e,t,i)}},e}();et.decorators=[{type:t.Pipe,args:[{name:"toNumber"}]}],et.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var tt=function(){function e(e,t){this.decimalPipe=e,this.i18nService=t}return e.prototype.transform=function(e,t,n){var o=(i.CURRENCY_INFO[t]||{}).symbol||t||"",a=new et(this.decimalPipe,this.i18nService).transform(e,n),r=_.startsWith(a,"-");return r&&(a=a.replace("-","")),a?r?"-"+o+a:o+a:""},e}();tt.decorators=[{type:t.Pipe,args:[{name:"toCurrency"}]}],tt.ctorParameters=function(){return[{type:n.DecimalPipe},{type:i.AbstractI18nService,decorators:[{type:t.Inject,args:[i.AbstractI18nService]}]}]};var nt=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:(t||"")+e},e}();nt.decorators=[{type:t.Pipe,args:[{name:"prefix"}]}];var it=function(){function e(){}return e.prototype.transform=function(e,t){return _.isUndefined(e)||null===e||""===e?e:e+(t||"")},e}();it.decorators=[{type:t.Pipe,args:[{name:"suffix"}]}];var ot=function(){function e(e){this.custmeUserPipe=e}return e.prototype.transform=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n.push(arguments[i]);var o=this.custmeUserPipe.getCustomPipe(t);if(!o||!_.isFunction(o.formatter))return console.warn("formatter is not defined, please check the custom pipes documentation"),e;try{return o.formatter.apply(o,v([e],g(n)))}catch(n){return console.error("Pipe name: "+t,n),e}},e}();ot.decorators=[{type:t.Pipe,args:[{name:"custom"}]}],ot.ctorParameters=function(){return[{type:i.CustomPipeManager}]};var at=function(){function e(){}return e.prototype.transform=function(e){var t;if(i.isDefined(e))return(t=Ze(e))?moment(t).fromNow():void 0},e}();at.decorators=[{type:t.Pipe,args:[{name:"timeFromNow"}]}];var rt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t}(et);rt.decorators=[{type:t.Pipe,args:[{name:"numberToString"}]}];var st=function(){function e(){}return e.prototype.transform=function(e){return Number(e)||void 0},e}();st.decorators=[{type:t.Pipe,args:[{name:"stringToNumber"}]}];var lt=function(){function e(){}return e.prototype.transform=function(e,t,n){return e?_.isObject(t)?_.filter(e,t):_.filter(e,(function(e){return _.includes(e[t],n)})):[]},e}();lt.decorators=[{type:t.Pipe,args:[{name:"filter"}]}];var ct=function(){function e(){}return e.prototype.transform=function(e,t){for(var n=0;e>=1024;)e/=1024,n++;return e.toFixed(+t)+" "+["bytes","KB","MB","GB","TB","PB"][n]},e}();ct.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var pt=function(){function e(){}return e.prototype.transform=function(e){return"fa "+({zip:"fa-file-zip-o",pdf:"fa-file-pdf-o",rar:"fa-file-archive-o",txt:"fa-file-text-o",ppt:"fa-file-powerpoint-o",pot:"fa-file-powerpoint-o",pps:"fa-file-powerpoint-o",pptx:"fa-file-powerpoint-o",potx:"fa-file-powerpoint-o",ppsx:"fa-file-powerpoint-o",mpg:"fa-file-movie-o",mp4:"fa-file-movie-o",mov:"fa-file-movie-o",avi:"fa-file-movie-o",mp3:"fa-file-audio-o",docx:"fa-file-word-o",js:"fa-file-code-o",md:"fa-file-code-o",html:"fa-file-code-o",css:"fa-file-code-o",xlsx:"fa-file-excel-o",png:"fa-file-image-o",jpg:"fa-file-image-o",jpeg:"fa-file-image-o",file:"fa-file-o",default:"fa-file-o"}[e]||"fa-file-o")},e}();pt.decorators=[{type:t.Pipe,args:[{name:"fileIconClass"}]}];var dt=function(){function e(){}return e.prototype.transform=function(e){return{success:"wi wi-done text-success",error:"wi wi-error text-danger"}[e.toLowerCase()]},e}();dt.decorators=[{type:t.Pipe,args:[{name:"stateClass"}]}];var ut=function(){function e(){}return e.prototype.transform=function(e){return{"audio/aac":".aac","application/x-abiword":".abw","application/vnd.android.package-archive":".apk","video/x-msvideo":".avi","application/vnd.amazon.ebook":".azw","application/octet-stream":".bin","image/bmp":".bmp","application/x-bzip":".bz","application/x-bzip2":".bz2","application/x-csh":".csh","text/css":".css","text/csv":".csv","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.ms-fontobject":".eot","application/epub+zip":".epub","application/ecmascript":".es","image/gif":".gif","text/html":".html","image/x-icon":".ico","text/calendar":".ics","application/java-archive":".jar","image/jpeg":[".jpeg",".jpg"],"application/javascript":".js","application/json":".json","audio/midi":".mid","audio/x-midi":".midi","video/mpeg":".mpeg","application/vnd.apple.installer+xml":"mpkg","application/vnd.oasis.opendocument.presentation":".odp","application/vnd.oasis.opendocument.spreadsheet":".ods","application/vnd.oasis.opendocument.text":".odt","audio/ogg":".oga","video/ogg":".ogv","application/ogg":".ogx","font/otf":".otf","image/png":".png","application/pdf":".pdf","application/vnd.ms-powerpoint":".ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx","application/x-rar-compressed":".rar","application/rtf":".rtf","application/x-sh":".sh","image/svg+xml":".svg","application/x-shockwave-flash":".swf","application/x-tar":".tar","image/tiff":".tiff","application/typescript":".ts","font/ttf":".ttf","text/plain":".txt","application/vnd.visio":".vsd","audio/wav":".wav","audio/webm":".weba","video/webm":".webm","image/webp":".webp","font/woff":".woff","font/woff2":".woff2","application/xhtml+xml":".xhtml","application/vnd.ms-excel":".xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":".xlsx","application/xml":".xml","application/vnd.mozilla.xul+xml":".xul","application/zip":".zip","video/3gpp":".3gp","audio/3gpp":".3gp","video/3gpp2":".3g2","audio/3gpp2":".3g2","application/x-7z-compressed":".7z"}[e]},e}();ut.decorators=[{type:t.Pipe,args:[{name:"fileExtensionFromMime"}]}];var ht=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.bypassSecurityTrustHtml(e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.bypassSecurityTrustStyle(e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.bypassSecurityTrustScript(e);case"url":case t.SecurityContext.URL:return this.domSanitizer.bypassSecurityTrustUrl(e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.bypassSecurityTrustResourceUrl(e)}},e}();ht.decorators=[{type:t.Pipe,args:[{name:"trustAs"}]}],ht.ctorParameters=function(){return[{type:r.DomSanitizer}]};var mt=[],ft=[],gt=function(){function e(){this.dialogRefsCollection=new Map,this.appConfirmDialog="_app-confirm-dialog"}return e.prototype.register=function(e,t,n){e&&(this.dialogRefsCollection.get(e)?this.dialogRefsCollection.get(e).set(n,t):this.dialogRefsCollection.set(e,new Map([[n,t]])))},e.prototype.getDialogRefsCollection=function(){return this.dialogRefsCollection},e.prototype.deRegister=function(e,t){e&&this.dialogRefsCollection.get(e)&&this.dialogRefsCollection.get(e).delete(t)},e.prototype.getDialogRef=function(e,t){var n,i=this.dialogRefsCollection.get(e);return t?(n=i.get(t))||(t.pageName||t.partialName||t.prefabName?console.error('No dialog with the name "'+e+'" found in the given scope.'):i.forEach((function(t,i){i&&"Common"===i.partialName?n=t:console.error('No dialog with the name "'+e+'" found in the App scope.')}))):1===i.size?n=i.entries().next().value[1]:console.error("There are multiple instances of this dialog name. Please provide the Page/Partial/App instance in which the dialog exists."),n},e.prototype.open=function(e,t,n){var i=this.getDialogRef(e,t);i&&i.open(n)},e.prototype.close=function(e,t,n){var i=this.getDialogRef(e,t);i&&(i.closeCallBackFn=n,i.close())},e.prototype.closeAllDialogs=function(){_.forEach(mt.reverse(),(function(e){e.close()}))},e.prototype.showAppConfirmDialog=function(e){this.open(this.getAppConfirmDialog(),void 0,e)},e.prototype.closeAppConfirmDialog=function(){this.close(this.getAppConfirmDialog())},e.prototype.getAppConfirmDialog=function(){return this.appConfirmDialog},e.prototype.setAppConfirmDialog=function(e){this.appConfirmDialog=e},e.prototype.addToOpenedDialogs=function(e){mt.push(e)},e.prototype.getLastOpenedDialog=function(){return mt[mt.length-1]},e.prototype.removeFromOpenedDialogs=function(e){(-1!==mt.indexOf(e)&&mt.splice(mt.indexOf(e),1),0===mt.length&&(i.isMobile()||i.isMobileApp()))&&$("body > app-root")[0].removeAttribute("aria-hidden")},e.prototype.getOpenedDialogs=function(){return mt},e.prototype.addToClosedDialogs=function(e){ft.push(e)},e.prototype.removeFromClosedDialogs=function(e){-1!==ft.indexOf(e)&&ft.splice(ft.indexOf(e),1)},e.prototype.getDialogRefFromClosedDialogs=function(){return ft[ft.length-1]},e}();gt.decorators=[{type:t.Injectable}],gt.ctorParameters=function(){return[]};var vt=function(){function e(e){this.domSanitizer=e}return e.prototype.transform=function(e,n){if(null==e)return"";switch(n){case"html":case t.SecurityContext.HTML:return this.domSanitizer.sanitize(t.SecurityContext.HTML,e);case"style":case t.SecurityContext.STYLE:return this.domSanitizer.sanitize(t.SecurityContext.STYLE,e);case"script":case t.SecurityContext.SCRIPT:return this.domSanitizer.sanitize(t.SecurityContext.SCRIPT,e);case"url":case t.SecurityContext.URL:return this.domSanitizer.sanitize(t.SecurityContext.URL,e);case"resource":case t.SecurityContext.RESOURCE_URL:return this.domSanitizer.sanitize(t.SecurityContext.RESOURCE_URL,e);case"none":case t.SecurityContext.NONE:return this.domSanitizer.sanitize(t.SecurityContext.NONE,e)}},e}();vt.decorators=[{type:t.Pipe,args:[{name:"sanitize"}]}],vt.ctorParameters=function(){return[{type:r.DomSanitizer}]};var yt=[Se,xe,Me,Le,Be,Ve,We,Ue,qe,Ee,ze,He,Qe],bt=[Xe,pt,ut,lt,ct,et,tt,nt,it,at,rt,dt,st,Je,ht,Ce,ot,vt],wt=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Xe,lt,Je,ht,Ce,ot,vt,n.Location,{provide:i.AbstractDialogService,useClass:gt}]}},e}();wt.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.SecurityModule],declarations:v(v([],g(yt)),g(bt)),exports:v(v([],g(yt)),g(bt))}]}];var Pt,_t=function(){};e.Live_Operations=void 0,(Pt=e.Live_Operations||(e.Live_Operations={})).INSERT="insert",Pt.UPDATE="update",Pt.DELETE="delete",Pt.READ="read";var Ot="All Fields",Et={EMPTY_KEY:"EMPTY_NULL_FILTER",EMPTY_VALUE:"No Value",LABEL_KEY:"key",LABEL_VALUE:"value",NULL_EMPTY:["null","empty"],NULL:"null",EMPTY:"empty"};function Rt(e){return _.includes([i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.TYPEAHEAD,i.FormWidgetType.CHIPS],e)}var At=function(e,t,n){var o=i.debounce((function(){_.isFunction(n)&&n(t)}),300);o();var a=t?_.isObject(t)?t:JSON.parse(t):{},r=e.registerDestroyListener?e.registerDestroyListener.bind(e):_.noop,s=i.processFilterExpBindNode(e,a).subscribe((function(e){t=JSON.stringify(e.filterExpressions),o()}));r((function(){return s.unsubscribe()}))},Tt=function(e,t){var n,o={};return t["is-related"]?(o.tableName=t["lookup-type"],n=t["lookup-field"],o.distinctField=n,o.aliasColumn=n.replace(".","$"),o.filterExpr=t.filterexpressions?_.isObject(t.filterexpressions)?t.filterexpressions:JSON.parse(t.filterexpressions):{}):(o.tableName=e.execute(i.DataSource.Operation.GET_ENTITY_NAME),n=t.field||t.key,o.distinctField=n,o.aliasColumn=n),o};function St(e,t,n){var o;return new Promise((function(a,r){!S(t[n])||t.isDataSetBound&&"filterwidget"!==n||(o=Tt(e,t),e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:o.distinctField,entityName:o.tableName,pagesize:t.limit,filterExpr:t.filterexpressions?JSON.parse(t.filterexpressions):{}}).then((function(e){a({field:t,data:e.data,aliasColumn:o.aliasColumn})}),r))}))}function Ct(e,t){if(Rt(e[t.widget]))return e.datafield=t.aliasColumn||Et.LABEL_KEY,e.searchkey=t.distinctField||Et.LABEL_KEY,void(e.displaylabel=e.displayfield=t.aliasColumn||Et.LABEL_VALUE);e.datafield=Et.LABEL_KEY,e.displayfield=Et.LABEL_VALUE}function It(e,t,n){var o=[i.FormWidgetType.SELECT,i.FormWidgetType.RADIOSET],a={},r=[];n.isEnableEmptyFilter&&_.includes(o,e[n.widget])&&!e["is-range"]&&!e.multiple&&(a[Et.LABEL_KEY]=Et.EMPTY_KEY,a[Et.LABEL_VALUE]=n.EMPTY_VALUE||Et.EMPTY_VALUE,r.push(a)),_.each(t,(function(e){var t=e[n.aliasColumn],i={};null!==t&&""!==t&&(i[Et.LABEL_KEY]=t,i[Et.LABEL_VALUE]=t,r.push(i))})),Ct(e,n),e.dataset=r}function Dt(e,t,n){if(e&&t&&!t.isDataSetBound)if(Rt(t[n.widget])){var i=Tt(e,t);t.dataoptions=i,Ct(t,Object.assign(n||{},i)),t.datasource=e}else At(t.viewParent,t.filterexpressions,(function(i){t.filterexpressions=i,St(e,t,n.widget).then((function(e){It(e.field,e.data,{aliasColumn:e.aliasColumn,widget:n.widget,isEnableEmptyFilter:Mt(n.enableemptyfilter),EMPTY_VALUE:n.EMPTY_VALUE})}))}))}function xt(e){return i.isDefined(e)&&""!==e&&null!==e}function Nt(e,t){var n;return xt(e)&&xt(t)?n=[e,t]:xt(e)?n=e:xt(t)&&(n=t),n}function kt(e,t){var n;return xt(e)&&xt(t)?n=i.MatchMode.BETWEEN:xt(e)?n=i.MatchMode.GREATER:xt(t)&&(n=i.MatchMode.LESSER),n}function Mt(e){return e&&_.intersection(e.split(","),Et.NULL_EMPTY).length>0}function Lt(e){var t,n=_.split(e,",");return 2===_.intersection(n,Et.NULL_EMPTY).length?t=i.MatchMode.NULLOREMPTY:_.includes(n,Et.NULL)?t=i.MatchMode.NULL:_.includes(n,Et.EMPTY)&&(t=i.MatchMode.EMPTY),t}var Ft=function(e){return _.isUndefined(e)||_.isNull(e)?[]:(_.isString(e)&&(e=e.split(",").map(Function.prototype.call,String.prototype.trim)),_.isArray(e)||(e=[e]),e)};var jt,Bt=moment.localeData(),Gt=i.getClonedObject(Bt._calendar),$t=Bt._calendarDay||{lastDay:"[Yesterday]",lastWeek:"[Last] dddd",nextDay:"[Tomorrow]",nextWeek:"dddd",sameDay:"[Today]",sameElse:"L"},Vt="alphabet",Wt="Others",Ut={HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",YEAR:"year"},qt="yyyy-MM-dd",zt="w 'Week', yyyy",Ht="MMM, yyyy",Yt="YYYY",Kt="hh:mm a",Qt=function(e,t,n){if(!t)return _.cloneDeep(e);var i=t.split(","),o=[],a=[];return i.forEach((function(e){var t=e.split(":");o.push(n?n+"."+t[0]:t[0]),a.push(t[1])})),_.orderBy(e,o,a)},Zt=function(e){return _.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),e},Jt=function(e){return"wm-search"===e},Xt=function(e,t,n,o){if(e&&Jt(e.widgetType))if(e.groupby)if(_.includes(e.groupby,"(")){var a=i.$parseEvent(e.groupby);n.groupby=a(t,{row:n.dataObject||n})}else n.groupby=an(e.groupby,e.match,o,e.dateformat,e.datePipe,e.appDefaults,n);else n.groupby=""},en=function(e,t,n){var i=[];return _.forEach(_.keys(e),(function(o,a){var r=Qt(e[o],n,"dataObject");i.push({key:o,data:_.sortBy(r,(function(e){return e._groupIndex=a+1,_.get(e,t)||_.get(e.dataObject,t)}))})})),i},tn=function(e,t,n,i,o,a,r,s){n===Ut.DAY&&(Bt._calendar=$t),e=_.orderBy(e,(function(e){var n=_.get(r?e[r]:e,t);if(n)return _.toLower(n)}));var l=_.groupBy(e,an.bind(void 0,t,n,r,o,a,s));return Bt._calendar=Gt,l},nn=function(e,t,n,o){return"timestamp"===t?e:i.getFormattedDate(o,e,t||n)},on=function(e,t,n,i,o){var a,r=moment(e),s=n,l=moment(),c=function(){return"["+nn(this.valueOf(),s,qt,i)+"]"};switch(t){case Ut.HOUR:s=s||o.timeFormat,r.isValid()||(r=moment((new Date).toDateString()+" "+e)).isValid()&&(Bt._calendar.sameDay=function(){return"["+nn(this.valueOf(),s,Kt,i)+"]"}),r=r.startOf("hour"),Bt._calendar.sameElse=c,a=r.calendar(l);break;case Ut.WEEK:a=nn(r.valueOf(),s,zt,i);break;case Ut.MONTH:a=nn(r.valueOf(),s,Ht,i);break;case Ut.YEAR:a=r.format(Yt);break;case Ut.DAY:s=s||o.dateFormat,r=r.startOf("day"),Bt._calendar.sameElse=c,a=r.calendar(l)}return"Invalid date"===a?Wt:a},an=function(e,t,n,i,o,a,r){var s=_.get(n?r[n]:r,e);return _.isUndefined(s)||_.isNull(s)||""===s.toString().trim()?Wt:(t===Vt&&(s=s.substr(0,1)),_.includes(_.values(Ut),t)&&(s=on(s,t,i,o,a)),s)},rn=function(){},sn="default",ln="label",cn=function(e,t,n,i){_.forEach(e,(function(e){_.get(e,"isGroup")&&(e.field===n?e.columns[i]=t:cn(e.columns,t,n,i))}))},pn=function(e){return"true"===e||"false"!==e&&(/^\d+$/.test(e)?+e:e)},dn={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},un=function(e){if(e)return/^(\/|#\/|#)(?!\W).*/.test(e)?"#/"+(e=_.first(e.match(/[\w]+.*/g))||""):_.startsWith(e,"www.")?"//"+e:e},hn=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.nodes=[],i.nodes$=new s.Subject,i._resetNodes=_.debounce(i.resetNodes,50),i.securityService=i.inj.get(o.SecurityService),i.binditemlabel=i.nativeElement.getAttribute("itemlabel.bind"),i.binditemicon=i.nativeElement.getAttribute("itemicon.bind"),i.binditemaction=i.nativeElement.getAttribute("itemaction.bind"),i.binditembadge=i.nativeElement.getAttribute("itembadge.bind"),i.binditemchildren=i.nativeElement.getAttribute("itemchildren.bind"),i.binditemid=i.nativeElement.getAttribute("itemid.bind"),i.binditemlink=i.nativeElement.getAttribute("itemlink.bind"),i.binditemtarget=i.nativeElement.getAttribute("itemtarget.bind"),i.binduserrole=i.nativeElement.getAttribute("userrole.bind"),i.bindisactive=i.nativeElement.getAttribute("isactive.bind"),i}return u(t,e),t.prototype.getNode=function(e,t){var n=this.viewParent.pageScope||this.viewParent,o=R(t,{field:this.itemchildren,bindExpression:this.binditemchildren},n)||_.get(t,e.childrenField),a={action:R(t,{field:this.itemaction,bindExpression:this.binditemaction},n)||_.get(t,e.actionField),badge:R(t,{field:this.itembadge,bindExpression:this.binditembadge},n)||_.get(t,e.badgeField),children:Array.isArray(o)?this.getNodes(o):[],class:_.get(t,e.classField),disabled:t.disabled,icon:R(t,{field:this.itemicon,bindExpression:this.binditemicon},n)||_.get(t,e.iconField),id:R(t,{field:this.itemid,bindExpression:this.binditemid},n)||_.get(t,e.idField),label:R(t,{field:this.itemlabel,bindExpression:this.binditemlabel},n)||_.get(t,e.labelField),link:un(R(t,{field:this.itemlink,bindExpression:this.binditemlink},n)||_.get(t,e.linkField)),target:un(R(t,{field:this.itemtarget,bindExpression:this.binditemtarget},n)||_.get(t,e.targetField)),role:R(t,{field:this.userrole,bindExpression:this.binduserrole},n),isactive:R(t,{field:this.isactive,bindExpression:this.bindisactive},n),value:this.datafield?"All Fields"===this.datafield?t:i.findValueOf(t,this.datafield):t};return _.omitBy(a,_.isUndefined)},t.prototype.resetItemFieldMap=function(){this._itemFieldMap=null},t.prototype.getItemFieldsMap=function(){return this._itemFieldMap||(this._itemFieldMap={idField:this.itemid||"itemid",iconField:this.itemicon||"icon",labelField:this.itemlabel||"label",linkField:this.itemlink||"link",targetField:this.itemtarget||"target",badgeField:this.itembadge||"badge",childrenField:this.itemchildren||"children",classField:this.itemclass||"class",actionField:this.itemaction||"action",isactiveField:this.isactive||"isactive"}),this._itemFieldMap},t.prototype.prepareNodeDataSet=function(e){return(e=Ft(e)).map((function(e){return i.isObject(e)?e:{label:e,value:e}}))},t.prototype.getNodes=function(e){var t=this;void 0===e&&(e=this.dataset||{});var n=Qt(this.prepareNodeDataSet(e),this.orderby)||[];if(n.length){var o=this.userrole,a=this.getItemFieldsMap();n=n.reduce((function(e,n){return i.validateAccessRoles(n[o],t.securityService.loggedInUser)&&e.push(t.getNode(a,n)),e}),[])}return n},t.prototype.resetNodes=function(){this.resetItemFieldMap(),this.nodes=this.getNodes(),i.$appDigest(),this.nodes$.next()},t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":case"itemicon":case"itemlabel":case"itemlink":case"itemtarget":case"itemclass":case"itemchildren":case"isactive":case"orderby":this._resetNodes()}e.prototype.onPropertyChange.call(this,t,n,i)},t}(Oe),mn={pattern:"regexp",max:"maxvalue",min:"minvalue",required:"required",maxlength:"maxchars",mindate:"mindate",maxdate:"maxdate",excludedates:"excludedates",excludedays:"excludedays",invalidNumber:"invalidNumber"},fn=function(){function e(e,t,n,i,o,a){this.instance=e,this.formwidget=t,this.widgettype=n,this.widgetControl=i,this.widgetContext=o,this.defaultValidatorMessages=[],a&&(this.tableFieldType=a)}return e.prototype.getDefaultValidators=function(){var e=[];return this.instance.required&&!1!==this.instance.show&&(this.widgettype===i.FormWidgetType.CHECKBOX||this.widgettype===i.FormWidgetType.TOGGLE?e.push(c.Validators.requiredTrue):e.push(c.Validators.required)),this.instance.maxchars&&e.push(c.Validators.maxLength(this.instance.maxchars)),this.instance.minvalue&&e.push(c.Validators.min(this.instance.minvalue)),this.instance.maxvalue&&this.widgettype!==i.FormWidgetType.RATING&&e.push(c.Validators.max(this.instance.maxvalue)),this.instance.regexp&&e.push(c.Validators.pattern(this.instance.regexp)),this.formwidget&&_.isFunction(this.formwidget.validate)&&e.push(this.formwidget.validate.bind(this.formwidget)),e},e.prototype.setUpValidators=function(e){if(!this.hasValidators&&(this.instance._validators=this.getDefaultValidators(),e&&this.instance._validators.push(e),this.widgetContext.ngform)){this.widgetControl.setValidators(this.instance._validators);var t={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(t.emitEvent=!1),this.widgetControl.updateValueAndValidity(t)}},e.prototype.getPromiseList=function(e){var t=this,n=[];return _.forEach(e,(function(e,i){var o=e;e instanceof Function&&e.bind&&(o=e(t.widgetControl,t.widgetContext)),o instanceof Promise&&n.push(o)})),n},e.prototype.setAsyncValidators=function(e){var t=this;if(this._asyncValidatorFn=function(){return function(){return Promise.all(t.getPromiseList(e)).then((function(){return t.instance.validationmessage="",null}),(function(e){if(e.hasOwnProperty("errorMessage"))t.instance.validationmessage=_.get(e,"errorMessage");else{var n=_.keys(e);t.instance.validationmessage=e[n[0]].toString()}return e})).then((function(e){var n=function(){setTimeout((function(){"PENDING"===t.widgetControl.status?n():t.instance.onStatusChange(t.widgetControl.status,t.tableFieldType)}),100)};return n(),e}))}},this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetContext.ngform.touched){var n={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(n.emitEvent=!1),this.widgetControl.updateValueAndValidity(n)}},e.prototype.isDefaultValidator=function(e){return _.get(i.VALIDATOR,_.toUpper(e))},e.prototype.setDefaultValidator=function(e,t){t&&t instanceof Function?this.watchDefaultValidatorExpr(t.bind(void 0,this.widgetControl,this.widgetContext),e):(this.instance.widget[e]=t,this.instance[e]=t)},e.prototype.setValidators=function(e){var t=this,n=_.cloneDeep(e);this.hasValidators=!0,this._syncValidators=[],_.forEach(n,(function(e,i){if(e&&e instanceof Function)n[i]=e.bind(void 0,t.widgetControl,t.widgetContext),t._syncValidators.push(n[i]);else{var o=_.get(e,"type");if(t.defaultValidatorMessages[o]=_.get(e,"errorMessage"),t.isDefaultValidator(o)){var a=_.get(e,"validator");t.setDefaultValidator(o,a),n[i]=""}}})),this._syncValidators=_.filter(n,(function(e){if(e)return e})),this.applyDefaultValidators()},e.prototype.observeOn=function(e,t){var n=this;_.forEach(e,(function(e){var i=_.find(n.widgetContext[t],{key:e});i&&(i.notifyForFields||(i.notifyForFields=[]),i.notifyForFields.push(n.instance))}))},e.prototype.validate=function(){if(this.applyDefaultValidators(),this._asyncValidatorFn){var e={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(e.emitEvent=!1),this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]),this.widgetControl.updateValueAndValidity(e)}this.widgetContext.ngform.touched&&this.widgetControl.markAsTouched()},e.prototype.watchDefaultValidatorExpr=function(e,t){var n=this,o=this.instance.widgetId+"_"+t+"_formField";i.$unwatch(o),this.instance.registerDestroyListener(i.$watch("boundFn(fn)",_.extend(this.instance,this.instance.viewParent),{fn:e},(function(e,i){n.instance.widget[t]=e,n.applyDefaultValidators()}),o))},e.prototype.applyDefaultValidators=function(){var e=this.getDefaultValidators(),t={};this.formwidget&&this.instance.value===this.formwidget.prevDatavalue&&(t.emitEvent=!1),this.widgetControl.setValidators(_.concat(this._syncValidators||[],e)),this.widgetControl.updateValueAndValidity(t),this.setCustomValidationMessage()},e.prototype.setCustomValidationMessage=function(){var e=this.widgetControl&&this.widgetControl.errors;if(e)if(e.hasOwnProperty("errorMessage"))this.instance.validationmessage=_.get(e,"errorMessage");else{var t=_.keys(e)[0],n=_.get(mn,t)||this.formwidget.validateType;if(n){var i=_.get(this.defaultValidatorMessages,n)||this.instance.validationmessage;this.instance.validationmessage=i&&i instanceof Function?i(this.widgetControl,this.widgetContext):i}else this.instance.validationmessage=""}},e}(),gn=function(e){function t(t,n,o){var a=e.call(this)||this;a.$el=t,a.app=n,a.onPullToRefresh=o,a.count=0;return a.$el.prepend('<div class="refresh-container"></div>'),a.infoContainer=a.$el.find(".refresh-container"),i.isIos()&&a.infoContainer.addClass("ios-refresh-container"),a.init(a.$el),a}return u(t,e),t.prototype.threshold=function(){return 10},t.prototype.direction=function(){return $.fn.swipey.DIRECTIONS.VERTICAL},t.prototype.subscribe=function(){var e=this;this.cancelSubscription=this.app.subscribe("toggle-variable-state",(function(t){t.active&&e.animationInProgress?(e.count++,e.wait()):e.count>0&&e.count--,!e.count&&e.animationInProgress&&e.stopAnimation()}))},t.prototype.bounds=function(e,t){var n=this.$el[0].iscroll;return t<0||n&&!isNaN(n.y)&&0!==n.y?{lower:void 0,upper:void 0}:(this.spinner||(this.spinner=i.isIos()?new yn(this.infoContainer):new vn(this.infoContainer),this.subscribe()),{lower:0,center:0,upper:i.isIos()?0:150,strict:!i.isIos()})},t.prototype.context=function(){var e=this;return this.infoContainer.show(),i.isIos()&&this.infoContainer.addClass("entry"),{spin:function(t){e.spinner.setRotation(2*t)}}},t.prototype.animation=function(){return i.isIos()?{css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}"}}:{target:this.infoContainer,css:{transform:"translate3d(0, ${{$D + $d}}px, 0)",spin:"${{spin($d)}}",opacity:"${{min(($D + $d) / 100, 1)}}"}}},t.prototype.onAnimation=function(){var e=this;this.animationInProgress=!0,this.spinner.start(),this.onPullToRefresh&&this.onPullToRefresh(),setTimeout((function(){e.runAnimation||e.stopAnimation()}))},t.prototype.stopAnimation=function(){var e=this;setTimeout((function(){e.runAnimation=!1,e.animationInProgress=!1,e.spinner.stop(),e.infoContainer.hide(),i.setCSS(e.infoContainer[0],"transform","none"),i.isIos()||i.setCSS(e.infoContainer[0],"opacity",0),e.infoContainer.removeClass("entry")}),800)},t.prototype.wait=function(){this.runAnimation=!0},t}(p.SwipeAnimation),vn=function(){function e(e,t){this.$el=e,this.options=t||{}}return e.prototype.polarToCartesian=function(e,t,n,i){var o=(i-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}},e.prototype.describeArc=function(e,t,n,i,o){var a=this.polarToCartesian(e,t,n,o),r=this.polarToCartesian(e,t,n,i),s=o-i<=180?"0":"1";return["M",a.x,a.y,"A",n,n,0,s,0,r.x,r.y,"L",r.x,r.y].join(" ")},e.prototype.init=function(){if(!this.initialized){var e=$('<svg><path id="arc1"/></svg>'),t=$('<div class="android-spinner"></div>');t.append(e),this.$el.append(t),this.cx=t.outerWidth()/2,this.cy=t.outerHeight()/2,this.r=.6*this.cx,this.path=t.find("path"),this.initialized=!0,this.container=t}},e.prototype.setRotation=function(e){this.init(),this.path.attr("d",this.describeArc(this.cx,this.cy,this.r,0,e))},e.prototype.start=function(){var e=this;this.init();var t=this,n=this.options.time||1800,i=0;this.container.addClass("spin"),this.intervalId=setInterval((function(){var n;n=(i+=10)>720?i=0:i>360?720-i:i,t.path.attr("d",e.describeArc(t.cx,t.cy,t.r,0,n))}),10*n/360)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0),this.container.removeClass("spin")},e}(),yn=function(){function e(e){this.$el=e}return e.prototype.init=function(){if(!this.svg){var e=$('<div class="ios-spinner"><svg></svg></div>'),t=e.find("svg");this.$el.append(e);for(var n=e.width(),i=0;i<12;i++)t[0].innerHTML+='<line y1="'+.15*n+'" y2="'+.3*n+'"\n transform="translate('+.5*n+", "+.5*n+") rotate("+30*i+')">\n </line>';e.append(t),this.svg=t}},e.prototype.setRotation=function(e){this.init(),this.svg.css("transform","rotateZ( "+30*Math.round(e/30)+"deg)")},e.prototype.start=function(){var e=this;this.init();var t=0;this.intervalId=setInterval((function(){t+=10,e.setRotation(t)}),20)},e.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=0)},e}(),bn=this;!function(e){e.LEFT_PANEL="page-left-panel",e.RIGHT_PANEL="page-right-panel",e.SWIPE_ELEM="page-left-panel-icon",e.CONTENT="app-content-column",e.HEADER="page-header",e.SEARCH="app-search"}(jt||(jt={}));var wn=function(e){return"[data-role='"+e+"']"},Pn=(wn("pageContainer"),function(e,t){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.removeEventListener("click",t),e.addEventListener("click",t))}),_n=function(e,t){if(i.isMobile()){if(e)try{e.widget.collapse()}catch(e){}t&&i.setCSS(t,"display","none")}},On=function(e,t,n,i){void 0===i&&(i=!1),i||Pn(t,_n.bind(bn,e,n))},En=function(e,t){Pn(wn(jt.SWIPE_ELEM),(function(){e&&(e.widget.toggle(),e.classList.contains("visible")&&t&&i.setCSS(t,"display","none"))}))},Rn=function(e){Pn(e,_n)},An=function(e,t){"none"===$(e).css("display")?(_n(t),i.setCSS(e,"display","inline-table")):_n(t,e)},Tn=function(e,t){$(e).each((function(e,n){var i=$('<a class="app-header-action"><i class="wi wi-search"></i></a>');$(n).before(i),Pn(i,(function(){return An(n,t)}))}))};e.ALLFIELDS=Ot,e.AUTOCLOSE_TYPE={OUTSIDECLICK:"outsideClick",ALWAYS:"always",DISABLED:"disabled"},e.BaseComponent=_e,e.BaseContainerComponent=Re,e.BaseFieldValidations=fn,e.ContainerDirective=Se,e.Context=w,e.CustomPipe=ot,e.DEBOUNCE_TIMES={PAGINATION_DEBOUNCE_TIME:250},e.DISPLAY_TYPE=le,e.DataSetItem=rn,e.DatasetAwareNavComponent=hn,e.DialogRef=b,e.DialogServiceImpl=gt,e.EDIT_MODE={QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog"},e.EVENTS_MAP=se,e.FileExtensionFromMimePipe=ut,e.FileIconClassPipe=pt,e.FileSizePipe=ct,e.FilterPipe=lt,e.INPUTMODE={FINANCIAL:"financial",NATURAL:"natural"},e.ImagePipe=Ce,e.ItemTemplateDirective=xe,e.LIVE_CONSTANTS=Et,e.LazyLoadDirective=Le,e.MessageComponent=Be,e.NAVIGATION_TYPE={ADVANCED:"Advanced",BASIC:"Basic",CLASSIC:"Classic",INLINE:"Inline",NONE:"None",ONDEMAND:"On-Demand",PAGER:"Pager",SCROLL:"Scroll"},e.NumberToStringPipe=rt,e.PROP_ANY=ie,e.PROP_BOOLEAN=ne,e.PROP_NUMBER=te,e.PROP_STRING=ee,e.PartialContainerDirective=qe,e.PartialDirective=Ve,e.PartialParamDirective=Ue,e.PartialParamHandlerDirective=We,e.PrefixPipe=nt,e.PullToRefresh=gn,e.RedrawableDirective=Ee,e.RepeatTemplateDirective=Me,e.SanitizePipe=vt,e.ShowInDeviceDirective=ze,e.SmoothScrollDirective=He,e.StateClassPipe=dt,e.StringToNumberPipe=st,e.StylableComponent=Oe,e.SuffixPipe=it,e.TextContentDirective=Qe,e.TimeFromNowPipe=at,e.ToCurrencyPipe=tt,e.ToDatePipe=Xe,e.ToNumberPipe=et,e.TrailingZeroDecimalPipe=Je,e.TrustAsPipe=ht,e.WidgetRef=y,e.WmComponentsModule=wt,e.applyFilterOnField=function(e,t,n,o,a){void 0===a&&(a={});var r=t.field||t.key,s=_.filter(n,{"filter-on":r});o=t["is-range"]?Nt(t.minValue,t.maxValue):i.isDefined(o)?o:t.value,!e||a.isFirst&&(_.isUndefined(o)||""===o)||_.forEach(s,(function(n){var r,s,l,c=n.field||n.key,p=t["lookup-field"]||t._primaryKey,d=n["edit-widget-type"]||n.widgettype,u={},h=n["filter-on"];S(d)&&!n.isDataSetBound&&h!==c&&(t&&t["is-related"]&&(h+="."+p),i.isDefined(o)?(l=t["is-range"]?kt(t.minValue,t.maxValue):Mt(a.enableemptyfilter)&&o===Et.EMPTY_KEY?Lt(a.enableemptyfilter):i.MatchMode.EQUALS,r=_.isObject(o)&&!_.isArray(o)?o[p]:o,u[h]={value:r,matchMode:l}):u={},s=c,Rt(d)&&n.dataoptions?n.dataoptions.filterFields=u:e.execute(i.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:s,filterFields:u,pagesize:n.limit}).then((function(e){It(n,e.data,{aliasColumn:s,widget:a.widget||"widgettype",isEnableEmptyFilter:Mt(a.enableemptyfilter),EMPTY_VALUE:a.EMPTY_VALUE})}),_t))}))},e.configureDnD=function(e,t,n,i,o){var a=Object.assign({containment:e,delay:100,opacity:.8,helper:"clone",zIndex:1050,tolerance:"pointer",start:n,update:i,sort:o},t);e.sortable(a)},e.convertDataToObject=Zt,e.createArrayFrom=Ft,e.extractDataAsArray=function(e){return _.isUndefined(e)||_.isNull(e)||""===_.trim(e)?[]:(_.isString(e)&&(e=_.split(e,",").map((function(e){return e.trim()}))),_.isArray(e)||(e=[e]),e)},e.extractDataSourceName=function(e){if(e){var t,n=e.split(".");return n.length>1&&"Variables"===n[0]&&(t=n[1]),t}},e.fetchDistinctValues=function(e,t,n){_.isEmpty(t)||t.forEach((function(t){Dt(e,t,n)}))},e.fetchRelatedFieldData=function(e,t,n){var o,a,r=n.relatedField,s=n.datafield;e&&(o=e.execute(i.DataSource.Operation.GET_RELATED_PRIMARY_KEYS,r),t.datafield=s,t._primaryKey=_.isEmpty(o)?void 0:o[0],t.compareby=o&&o.join(","),a=s===Ot?void 0:s,t.displayfield=a=t.displayfield||a||t._primaryKey,Rt(t[n.widget])?(t.dataoptions={relatedField:r,filterExpr:t.filterexpressions?t.filterexpressions:{}},t.datasource=e,t.searchkey=t.searchkey||a,t.displaylabel=t.displayfield=t.displaylabel||a,t.showPendingSpinner&&(t.showPendingSpinner=!1)):At(t.viewParent,t.filterexpressions,(function(n){t.filterexpressions=n,e.execute(i.DataSource.Operation.GET_RELATED_TABLE_DATA,{relatedField:r,pagesize:t.limit,orderBy:t.orderby?_.replace(t.orderby,/:/g," "):"",filterFields:{},filterExpr:t.filterexpressions?t.filterexpressions:{}}).then((function(e){t.dataset=e.data,t.displayfield=t.displayfield||_.head(_.keys(_.get(e,"[0]"))),t.showPendingSpinner&&(t.showPendingSpinner=!1)}),_t)})))},e.filterDate=nn,e.getBackGroundImageUrl=I,e.getConditionalClasses=B,e.getContainerTargetClass=function(e){return".wm-app"},e.getDataTableFilterWidget=function(e){var t=dn[e]&&dn[e][0];return e===i.DataType.BOOLEAN&&(t=i.FormWidgetType.SELECT),_.includes([i.FormWidgetType.TEXT,i.FormWidgetType.NUMBER,i.FormWidgetType.SELECT,i.FormWidgetType.AUTOCOMPLETE,i.FormWidgetType.DATE,i.FormWidgetType.TIME,i.FormWidgetType.DATETIME],t)?t:i.FormWidgetType.TEXT},e.getDefaultValue=function(e,t,n){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?pn(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?pn(e):e},e.getDefaultViewModeWidget=function(e){return _.includes(["checkbox","toggle","rating"],e)?sn:ln},e.getDistinctFieldProperties=Tt,e.getDistinctValues=St,e.getDistinctValuesForField=Dt,e.getEditModeWidget=function(e){return e["related-entity-name"]&&e["primary-key"]?i.FormWidgetType.SELECT:dn[e.type]&&dn[e.type][0]||i.FormWidgetType.TEXT},e.getEmptyMatchMode=Lt,e.getEnableEmptyFilter=Mt,e.getEvaluatedData=R,e.getFieldLayoutConfig=function(e,t,n){var o="",a="";return"top"===(t=t||"top")||"floating"===t?n&&"android"===n||!i.isMobileApp()||i.isAndroid()?o=a="col-xs-12":i.isMobileApp()&&(o="col-xs-4",a="col-xs-8"):e&&_.forEach(_.split(e," "),(function(e){var t,n,i=_.split(e,"-"),r=i[0];t=parseInt(i[1],10),o+=" col-"+r+"-"+t,a+=" col-"+r+"-"+(n=(n=12-t)<=0?12:n)})),{captionCls:o,widgetCls:a}},e.getFieldTypeWidgetTypesMap=function(){return dn},e.getImageUrl=C,e.getKeyboardFocusableElements=function(e){var t=e.querySelectorAll("a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable]");return Array.from(t).filter((function(e){return!e.hasAttribute("disabled")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("tabindex")||e.hasAttribute("tabindex")&&!e.getAttribute("tabindex").startsWith("-"))}))},e.getMatchModeMsgs=function(e){return{start:e.LABEL_STARTS_WITH,startignorecase:e.LABEL_STARTS_WITH_IGNORECASE,end:e.LABEL_ENDS_WITH,endignorecase:e.LABEL_ENDS_WITH_IGNORECASE,anywhere:e.LABEL_CONTAINS,anywhereignorecase:e.LABEL_CONTAINS_IGNORECASE,exact:e.LABEL_IS_EQUAL_TO,exactignorecase:e.LABEL_IS_EQUAL_TO_IGNORECASE,notequals:e.LABEL_IS_NOT_EQUAL_TO,notequalsignorecase:e.LABEL_IS_NOT_EQUAL_TO_IGNORECASE,lessthan:e.LABEL_LESS_THAN,lessthanequal:e.LABEL_LESS_THAN_OR_EQUALS_TO,greaterthan:e.LABEL_GREATER_THAN,greaterthanequal:e.LABEL_GREATER_THAN_OR_EQUALS_TO,null:e.LABEL_IS_NULL,isnotnull:e.LABEL_IS_NOT_NULL,empty:e.LABEL_IS_EMPTY,isnotempty:e.LABEL_IS_NOT_EMPTY,nullorempty:e.LABEL_IS_NULL_OR_EMPTY,in:e.LABEL_IN,notin:e.LABEL_NOT_IN,between:e.LABEL_BETWEEN}},e.getMatchModeTypesMap=function(e){return e&&(L.number.push("in","notin","between"),L.date.push("between"),L.string.push("in","notin"),L.character.push("in","notin")),_.forEach(M,(function(e,t){_.forEach(e,(function(e){F[e]=L[t]}))})),F.default=_.union(L.number,L.string,L.character,L.date,L.date),F},e.getObjValueByKey=E,e.getOrderByExpr=function(e){e=e||[];var t=[];return _.forEach(e,(function(e){e.direction&&t.push(e.property+" "+e.direction.toLowerCase())})),_.join(t,",")},e.getOrderedDataset=Qt,e.getRangeFieldValue=Nt,e.getRangeMatchMode=kt,e.getRowOperationsColumn=function(){return{field:"rowOperations",type:"custom",displayName:"Actions",width:"120px",readonly:!0,sortable:!1,searchable:!1,resizable:!1,selectable:!1,show:!0,operations:[],opConfig:{},pcDisplay:!0,mobileDisplay:!0,tabletDisplay:!0,include:!0,isRowOperation:!0}},e.getUniqObjsByDataField=function(e,t,n,i){var o,a=t===Ot;return o=a?_.uniqWith(e,_.isEqual):_.uniqBy(e,"key"),!n||i?o:_.filter(o,(function(e){return(a||_.trim(e.key))&&_.trim(e.label)}))},e.getWatchIdentifier=k,e.getWidgetPropsByType=J,e.groupData=function(e,t,n,o,a,r,s,l,c){var p={};if(_.includes(n,"(")){var d=i.$parseEvent(n);p=_.groupBy(t,(function(t){return d(e.viewParent,{row:t.dataObject||t})}))}else p=tn(t,n,o,a,r,s,l,c);return en(p,n,a)},e.handleHeaderClick=function(e){var t=$(e.target).closest(".item-group"),n=t.find("li.list-group-header .app-icon");n.hasClass("wi-chevron-down")?n.removeClass("wi-chevron-down").addClass("wi-chevron-up"):n.removeClass("wi-chevron-up").addClass("wi-chevron-down"),t.find(".group-list-item").toggle()},e.hasLinkToCurrentPage=T,e.interpolateBindExpressions=At,e.isActiveNavItem=A,e.isBooleanAttr=pe,e.isDataSetWidget=S,e.isDimensionProp=ue,e.isStyle=U,e.parseValueByType=function(e,t,n,o){return n?n===i.FormWidgetType.NUMBER||n===i.FormWidgetType.SLIDER||n===i.FormWidgetType.CURRENCY?isNaN(Number(e))?null:o?e:Number(e):n===i.FormWidgetType.CHECKBOX||n===i.FormWidgetType.TOGGLE?pn(e):e:i.isNumberType(t)?isNaN(Number(e))?null:Number(e):t===i.DataType.BOOLEAN?pn(e):e},e.performDataOperation=function(t,n,o){return new Promise((function(a,r){if(t.execute(i.DataSource.Operation.SUPPORTS_CRUD)){var s=void 0;switch(o.operationType){case e.Live_Operations.UPDATE:s=i.DataSource.Operation.UPDATE_RECORD;break;case e.Live_Operations.INSERT:s=i.DataSource.Operation.INSERT_RECORD;break;case e.Live_Operations.DELETE:s=i.DataSource.Operation.DELETE_RECORD}t.execute(s,n).then((function(e){return function(e,t,n){e.error?n(e):t(e)}(e,a,r)}),r)}else if(t.execute(i.DataSource.Operation.IS_API_AWARE))if("wm.CrudVariable"===t.category){var l="insert"===o.operationType?"create":"delete"===o.operationType?"delete":"update";t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0,operation:l,inputFields:n}).then(a,r)}else t.execute(i.DataSource.Operation.SET_INPUT,n),t.execute(i.DataSource.Operation.INVOKE,{skipNotification:!0}).then(a,r);else a(n)}))},e.prepareFieldDefs=function(e,t){var n,i={objects:[],terminals:[]};if(e||(e=[]),t||(t={}),t.setBindingField=!0,t.columnCount=0,n=V(e),G(n,i,"",t),!t||t&&!t.filter)return i.terminals;switch(t.filter){case"all":return i;case"objects":return i.objects;case"terminals":return i.terminals}return i},e.propNameCSSKeyMap=W,e.provideAs=D,e.provideAsDialogRef=function(e){return D(e,b)},e.provideAsWidgetRef=x,e.refreshDataSource=function(e,t){return new Promise((function(n,o){e?e.execute(i.DataSource.Operation.LIST_RECORDS,{filterFields:t.filterFields||{},orderBy:t.orderBy,page:t.page||1,logicalOp:t.condition||""}).then(n,o):o()}))},e.register=X,e.registerFormWidget=function(e,t){var n=Q+e,i=Z.get(n);i&&t.forEach((function(e,t){return i.set(t,e)}))},e.setFocusTrap=function(e,t,n){return a.createFocusTrap(e,{onActivate:function(){return e.classList.add("is-active")},onDeactivate:function(){return e.classList.remove("is-active")},allowOutsideClick:t,setReturnFocus:n})},e.setHeaderConfig=cn,e.setHeaderConfigForTable=function(e,t,n,i){n?cn(e,t,n,i):e[i]=t},e.setItemByCompare=function(e,t,n){_.forEach(e,(function(e){if(i.isEqualWithFields(e.value,t,n))return e.selected=!0,!1}))},e.styler=Y,e.toggleAllHeaders=function(e){var t=$(e.nativeElement).find(".item-group");t.find(".group-list-item").toggle();var n=t.find("li.list-group-header .app-icon");n&&_.forEach(n,(function(e){(e=$(e)).hasClass("wi-chevron-down")?e.removeClass("wi-chevron-down").addClass("wi-chevron-up"):e.removeClass("wi-chevron-up").addClass("wi-chevron-down")}))},e.transformData=function(e,t){var n,i,o,a,r,s,l;return e=e||[],_.isArray(e)?_.isString(e[0])&&(i=[],_.forEach(e,(function(e){(n={})[t.split(".").join("-")]=e,i.push(n)})),e=i):(_.isString(e)&&(o=t.substring(t.indexOf(".")+1,t.length).split("."),a=[],r=o.length,l=s={},o.forEach((function(t,n){a.forEach((function(e){l=s[e]})),l[t]=n===r-1?e:{},a.push(t)})),e=s),e=[e]),e},e.transformDataWithKeys=function(e){var t=[];if(_.isObject(e[0])||_.isObject(e)&&!(e instanceof Array)){var n=Object.keys(e[0]||e);_.forEach(n,(function(e,n){t.push({key:e,label:e,value:e,index:n+1})}))}return t},e.transformFormData=function(e,t,n,o,a,r){var s=[];if(t){if(t=Zt(t),_.isUndefined(a)&&(a=1),_.isString(t))(t=t.split(",").map((function(e){return e.trim()}))).forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:a+n};Xt(r,e,o,"value"),s.push(o)}));else if(_.isArray(t)&&!_.isObject(t[0]))t.forEach((function(t,n){var o={key:t,value:t,label:i.isDefined(t)&&null!==t?t.toString():"",index:a+n};Xt(r,e,o,"value"),s.push(o)}));else if(t instanceof Array||!_.isObject(t))n||(n=Ot),t.forEach((function(t,l){var c=n===Ot?a+l:E(t,n);if(!_.isUndefined(c)&&!_.isNull(c)){var p=R(t,{field:o.displayField,expression:o.displayExpr,bindExpression:o.bindDisplayExpr},e),d={key:c,label:i.isDefined(p)&&null!==p?p.toString():"",value:n===Ot?t:c,dataObject:t,index:a+l};(o.displayImgSrc||o.bindDisplayImgSrc)&&(d.imgSrc=R(t,{expression:o.displayImgSrc,bindExpression:o.bindDisplayImgSrc},e)),Xt(r,e,d,"dataObject"),s.push(d)}}));else{_.forEach(t,(function(n,o){var l={key:_.trim(o),value:o,label:i.isDefined(n)&&null!==n?n.toString():"",index:a,dataObject:t};Xt(r,e,l,"value"),s.push(l)}))}return s}},e.unsupportedStatePersistenceTypes=["On-Demand","Scroll"],e.updateDeviceView=function(e,t){void 0===t&&(t=!1);var n=e.querySelector(wn(jt.LEFT_PANEL)),i=e.querySelector(wn(jt.RIGHT_PANEL)),o=e.querySelector(wn(jt.HEADER)),a=o&&o.querySelector("."+jt.SEARCH),r=e.querySelector("."+jt.CONTENT);On(n,r,a,t),n?En(n,a):$(o).find(wn(jt.SWIPE_ELEM)).remove(),i&&Rn(i),a&&Tn(a,n)},e["\u02750"]=Ke,e["\u0275a"]=oe,e["\u0275b"]=Ie,e["\u0275c"]=Ne,e["\u0275d"]=Fe,e["\u0275e"]=Ge,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wm/transpiler"),require("@wm/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@wm/buildTask",["exports","@wm/transpiler","@wm/core","@angular/compiler"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.buildTask={}),e.wm.transpiler,e.wm.core,e.ng.compiler)}(this,(function(e,t,n,i){"use strict";var o=new n.IDGenerator("wm_carousel_ref_"),a=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},r=a;t.register("wm-carousel",(function(){return{pre:function(e,n){var i=o.nextUid();return n.set("carousel_ref",i),'<div class="app-carousel carousel"><carousel wmCarousel #'+i+'="wmCarousel" '+t.getAttrMarkup(e)+' interval="0" [ngClass]="'+i+'.navigationClass">'},post:function(){return"</carousel></div>"},template:function(e){if(a(e)){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(!i)return;var r=t.getBoundToExpr(i.value);if(!r)return;n.updateTemplateAttrs(e,r,o.value)}},provide:function(e,t){var n=new Map;return n.set("carousel_ref",t.get("carousel_ref")),n}}}));var s=Object.freeze({__proto__:null,default:function(){},"\u02750":r}),l=1;t.register("wm-carousel-content",(function(){return{pre:function(e){return"<slide wmCarouselTemplate "+t.getAttrMarkup(e)+">"},post:function(){return"</slide>"}}})),t.register("wm-carousel-template",(function(){return{requires:["wm-carousel"],pre:function(e,n,i){var o=i.get("carousel_ref");return'<div *ngIf="!'+o+'.fieldDefs">{{'+o+".nodatamessage}}</div>\n <"+"slide wmCarouselTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+o+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="carouselTempRef'+l+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </'+"slide>\n <ng-template #carouselTempRef"+l+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var c=Object.freeze({__proto__:null,default:function(){}});t.register("wm-login",(function(){return{pre:function(e){return"<div wmLogin "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction">'},post:function(){return"</div>"},provide:function(){var e=new Map;return e.set("isLogin",!0),e}}}));var p=Object.freeze({__proto__:null,default:function(){}});t.register("wm-marquee",(function(){return{pre:function(e){return'<marquee onmouseover="this.stop();" onmouseout="this.start();" wmMarquee role="marquee" aria-live="off" '+t.getAttrMarkup(e)+">"},post:function(){return"</marquee>"}}}));var d=Object.freeze({__proto__:null,default:function(){}}),u=new n.IDGenerator("wm_anchor");t.register("wm-anchor",(function(){return{pre:function(e){var n=u.nextUid();return"<a wmAnchor #"+n+'="wmAnchor" role="link" data-identifier="anchor" [attr.aria-label]="'+n+".hint || "+n+'.caption" '+t.getAttrMarkup(e)+">"},post:function(){return"</a>"}}}));var h=Object.freeze({__proto__:null,default:function(){}});t.register("wm-audio",(function(){return{pre:function(e){return"<div wmAudio "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var m=Object.freeze({__proto__:null,default:function(){}}),f=new n.IDGenerator("wm_html");t.register("wm-html",(function(){return{pre:function(e){var n=f.nextUid();return"<div wmHtml #"+n+'="wmHtml" [attr.aria-label]="'+n+".hint || 'HTML content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var g=Object.freeze({__proto__:null,default:function(){}});t.register("wm-icon",(function(){return{pre:function(e){return'<span wmIcon aria-hidden="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</span>"}}}));var v=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframe",(function(){return{pre:function(e){return"<div wmIframe "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var y=Object.freeze({__proto__:null,default:function(){}}),b=new n.IDGenerator("wm_label");t.register("wm-label",(function(){return{pre:function(e){var n=b.nextUid();return"<label wmLabel #"+n+'="wmLabel" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</label>"}}}));var w=Object.freeze({__proto__:null,default:function(){}}),P=new n.IDGenerator("wm_picture");t.register("wm-picture",(function(){return{pre:function(e){var n=P.nextUid();return"<img wmPicture #"+n+'="wmPicture" alt="image" wmImageCache="'+(e.get("offline")||"true")+'" [attr.aria-label]="'+n+".hint || 'Image'\" "+t.getAttrMarkup(e)+">"}}}));var O=Object.freeze({__proto__:null,default:function(){}}),E=new n.IDGenerator("wm_spinner");t.register("wm-spinner",(function(){return{pre:function(e){var n=E.nextUid();return"<div wmSpinner #"+n+'="wmSpinner" role="alert" [attr.aria-label]="'+n+'.hint || \'Loading...\'" aria-live="assertive" aria-busy="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var R=Object.freeze({__proto__:null,default:function(){}}),A=function(e,t){return e.attrs.find((function(e){return e.name===t}))},T=A,S=function(e,t){var n=A(e,t);if(n)return n.value},C=S,I=function(e){return new RegExp("bind:("+e+"|"+e+"\\[\\$i])\\.","g")},D=I;t.register("wm-progress-bar",(function(){return{template:function(e){var n=S(e,"dataset"),i=t.getBoundToExpr(n);if(i){var o=S(e,"type"),a=S(e,"datavalue"),r=I(i);o&&o.includes(i)&&(o=o.replace(r,""),A(e,"type").value=o),a&&a.includes(i)&&(a=a.replace(r,""),A(e,"datavalue").value=a)}},pre:function(e){return"<div wmProgressBar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var x=Object.freeze({__proto__:null,default:function(){},"\u02750":T,"\u02751":C,"\u02752":D});t.register("wm-progress-circle",(function(){return{pre:function(e){return"<div wmProgressCircle "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var N=Object.freeze({__proto__:null,default:function(){}}),k=new n.IDGenerator("wm_richtexteditor");t.register("wm-richtexteditor",(function(){return{pre:function(e){var n=k.nextUid();return"<div wmRichTextEditor #"+n+'="wmRichTextEditor" role="textbox" [attr.aria-label]="'+n+".hint || 'Richtext editor'\" "+t.getFormMarkupAttr(e)+">"},post:function(){return"</div>"}}}));var M=Object.freeze({__proto__:null,default:function(){}});t.register("wm-search",(function(){return{pre:function(e){return"<div wmSearch "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var L=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tree",(function(){return{pre:function(e){return'<ul wmTree class="ztree" '+t.getAttrMarkup(e)+">"},post:function(){return"</ul>"}}}));var F=Object.freeze({__proto__:null});t.register("wm-card",(function(){return{pre:function(e){return"<div wmCard "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var j=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-content",(function(){return{pre:function(e){return"<div wmCardContent partialContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var B=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-actions",(function(){return{pre:function(e){return"<div wmCardActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var G=Object.freeze({__proto__:null,default:function(){}});t.register("wm-card-footer",(function(){return{pre:function(e){return"<div wmCardFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var $=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chart",(function(){return{pre:function(e){return'<div wmChart redrawable aria-label="'+e.get("type")+' Chart" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var V=Object.freeze({__proto__:null,default:function(){}}),W=new n.IDGenerator("wm_accordion_ref_"),U=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},q=U;t.register("wm-accordion",(function(){return{pre:function(e,n){var i=W.nextUid();return n.set("accordion_ref",i),"<div wmAccordion #"+i+'="wmAccordion" role="tablist" aria-multiselectable="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(U(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),a=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var r=t.getBoundToExpr(o.value);if(!r)return;n.updateTemplateAttrs(e,r,a.value)}},provide:function(e,t){var n=new Map;return n.set("accordion_ref",t.get("accordion_ref")),n}}}));var z=Object.freeze({__proto__:null,default:function(){},"\u02750":q}),H=new n.IDGenerator("wm_accordionpane");t.register("wm-accordionpane",(function(){return{pre:function(e){var n=H.nextUid();return"<div #"+n+'="wmAccordionPane" [attr.aria-expanded]="'+n+'.isActive" wmAccordionPane partialContainer wm-navigable-element="true" role="tab" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Y=Object.freeze({__proto__:null,default:function(){}});t.register("wm-container",(function(){return{pre:function(e){return'<div wmContainer partialContainer wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var K=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridcolumn",(function(){return{pre:function(e){return"<div wmLayoutGridColumn "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Q=Object.freeze({__proto__:null,default:function(){}});t.register("wm-gridrow",(function(){return{pre:function(e){return"<div wmLayoutGridRow "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Z=Object.freeze({__proto__:null,default:function(){}});t.register("wm-layoutgrid",(function(){return{pre:function(e){return"<div wmLayoutGrid "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var J=Object.freeze({__proto__:null,default:function(){}}),X=new n.IDGenerator("wm_panel");t.register("wm-panel",(function(){return{pre:function(e){return"<div wmPanel #"+X.nextUid()+'="wmPanel" partialContainer wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}})),t.register("wm-panel-footer",(function(){return{pre:function(e){return"<div wmPanelFooter "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ee=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segmented-control",(function(){return{pre:function(e){return"<div wmSegmentedControl "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var te=Object.freeze({__proto__:null,default:function(){}});t.register("wm-segment-content",(function(){return{pre:function(e){return"<li wmSegmentContent partialContainer wmSmoothscroll="+(e.get("smoothscroll")||"false")+' wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var ne=Object.freeze({__proto__:null,default:function(){}}),ie=1;t.register("wm-repeat-template",(function(){return{requires:["wm-accordion","wm-tabs"],pre:function(e,n,i,o){var a=i&&i.get("accordion_ref")||o&&o.get("tabs_ref");if(a)return'<div *ngIf="'+a+".fieldDefs && !"+a+'.fieldDefs.length">{{'+a+".nodatamessage}}</div>\n <div wmRepeatTemplate "+t.getAttrMarkup(e)+' *ngFor="let item of '+a+'.fieldDefs; let i = index;">\n <ng-container [ngTemplateOutlet]="widgetRef'+ie+'" [ngTemplateOutletContext]="{item:item, index:i}"></ng-container>\n </div>\n <ng-template #widgetRef'+ie+++' let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var oe=Object.freeze({__proto__:null,default:function(){}}),ae=new n.IDGenerator("wm_tabs_ref_"),re=function(e){return e.attrs.find((function(e){return"type"===e.name&&"dynamic"===e.value}))},se=re;t.register("wm-tabs",(function(){return{pre:function(e,n){var i=ae.nextUid();return n.set("tabs_ref",i),"<div wmTabs #"+i+'="wmTabs" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},template:function(e,i){if(re(e)){var o=e.attrs.find((function(e){return"dataset"===e.name})),a=e.attrs.find((function(e){return"name"===e.name}));if(!o)return;var r=t.getBoundToExpr(o.value);if(!r)return;n.updateTemplateAttrs(e,r,a.value)}},provide:function(e,t){var n=new Map;return n.set("tabs_ref",t.get("tabs_ref")),n}}}));var le=Object.freeze({__proto__:null,default:function(){},"\u02750":se});t.register("wm-tabpane",(function(){return{pre:function(e){return"<div wmTabPane partialContainer "+t.getAttrMarkup(e)+' wm-navigable-element="true" role="tabpanel">'},post:function(){return"</div>"}}}));var ce=Object.freeze({__proto__:null,default:function(){}});t.register("wm-tile",(function(){return{pre:function(e){return'<div wmTile aria-describedby="Tile" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-wizard",(function(){return{pre:function(e){return'<div wmWizard role="tablist" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var de=Object.freeze({__proto__:null,default:function(){}}),ue=new n.IDGenerator("wizard_step_id_");t.register("wm-wizardstep",(function(){return{pre:function(e){var n=ue.nextUid();return"<form wmWizardStep #"+n+'="wmWizardStep" '+t.getAttrMarkup(e)+'>\n <ng-template [ngIf]="'+n+'.isInitialized">'},post:function(){return"</ng-template></form>"}}}));var he=Object.freeze({__proto__:null,default:function(){}}),me=new n.IDGenerator("wm_barcodescanner");t.register("wm-barcodescanner",(function(){return{pre:function(e){var n=me.nextUid();return"<button wmBarcodescanner #"+n+'="wmBarcodescanner" [attr.aria-label]="'+n+".hint || 'Barcode scanner'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var fe=Object.freeze({__proto__:null,default:function(){}}),ge=new n.IDGenerator("wm_camera");t.register("wm-camera",(function(){return{pre:function(e){var n=ge.nextUid();return"<button type='button' wmCamera #"+n+'="wmCamera" [attr.aria-label]="'+n+".hint || 'Camera'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var ve=Object.freeze({__proto__:null,default:function(){}});t.register("wm-alertdialog",(function(){return{pre:function(e){return'<div wmAlertDialog role="alertdialog" wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ye=Object.freeze({__proto__:null,default:function(){}});t.register("wm-confirmdialog",(function(){return{pre:function(e){return'<div wmConfirmDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var be=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialogactions",(function(){return{pre:function(e){return'<ng-template #dialogFooter><div wmDialogFooter data-identfier="actions" '+t.getAttrMarkup(e)+">"},post:function(){return"</div></ng-template>"}}}));var we=Object.freeze({__proto__:null,default:function(){}});t.register("wm-dialog",(function(){return{pre:function(e){return"<div wmDialog "+t.getAttrMarkup(e)+' aria-modal="true" role="dialog" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}})),t.register("wm-view",(function(){return{pre:function(e){return""},post:function(){return""}}}));var Pe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-iframedialog",(function(){return{pre:function(e){return'<div wmIframeDialog wm-navigable-element="true" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _e=Object.freeze({__proto__:null,default:function(){}});t.register("wm-logindialog",(function(){return{pre:function(e){return"<div wmDialog wmLoginDialog "+t.getAttrMarkup(e)+' eventsource.bind="Actions.loginAction" wm-navigable-element="true"><ng-template #dialogBody>'},post:function(){return"</ng-template></div>"}}}));var Oe=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagedialog",(function(){return{pre:function(e,n){var i=e.get("content");e.delete("content");var o=e.get("content.bind");e.delete("content.bind");var a=e.get("load.event");e.delete("load.event");var r="",s="";a&&(r='load.event="'+a+'"'),o?s='content.bind="'+o+'"':i&&(s='content="'+i+'"');var l="";return s&&(n.set("hasPartialContent",!0),l+="<ng-template><div wmContainer #partial partialContainer "+s+' width="100%" height="100%" '+r+">"),"<div wmPartialDialog "+t.getAttrMarkup(e)+">"+l},post:function(e,t){var n="";return t.get("hasPartialContent")&&(n="</div></ng-template>"),n+"</div>"}}}));var Ee=Object.freeze({__proto__:null,default:function(){}}),Re="quickedit",Ae="form",Te="dialog",Se={integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],big_integer:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],short:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],float:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],big_decimal:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],number:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],double:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],long:["number","text","select","checkboxset","radioset","rating","slider","currency","autocomplete","chips"],byte:["number","text","select","checkboxset","radioset","slider","currency","autocomplete","chips"],string:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],character:["text","number","textarea","password","richtext","select","checkboxset","radioset","switch","currency","autocomplete","chips"],text:["text","number","textarea","password","richtext","select","checkboxset","radioset","date","time","timestamp","switch","currency","autocomplete","chips","colorpicker"],date:["date","text","number","select","checkboxset","radioset","autocomplete","chips"],time:["time","text","number","select","checkboxset","radioset","autocomplete","chips"],timestamp:["timestamp","text","number","select","checkboxset","radioset","autocomplete","chips"],datetime:["datetime","text","select","checkboxset","radioset","autocomplete","chips"],boolean:["checkbox","radioset","toggle","select"],list:["select","radioset","checkboxset","switch","autocomplete","chips"],clob:["text","textarea","richtext"],blob:["upload"],file:["upload"],custom:["text","number","textarea","password","checkbox","toggle","slider","richtext","currency","switch","select","checkboxset","radioset","date","time","timestamp","rating","datetime","autocomplete","chips","colorpicker"]},Ce=new Set([n.FormWidgetType.SELECT,n.FormWidgetType.CHECKBOXSET,n.FormWidgetType.RADIOSET,n.FormWidgetType.SWITCH,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.CHIPS,n.FormWidgetType.TYPEAHEAD,n.FormWidgetType.RATING]),Ie=function(e){var t=Se[e]&&Se[e][0];return e===n.DataType.BOOLEAN&&(t=n.FormWidgetType.SELECT),[n.FormWidgetType.TEXT,n.FormWidgetType.NUMBER,n.FormWidgetType.SELECT,n.FormWidgetType.AUTOCOMPLETE,n.FormWidgetType.DATE,n.FormWidgetType.TIME,n.FormWidgetType.DATETIME].includes(t)?t:n.FormWidgetType.TEXT},De=new n.IDGenerator("formfield_"),xe=function(e){var n=new Map;return e.has("focus.event")||e.set("focus.event",""),e.has("blur.event")||e.set("blur.event",""),e.forEach((function(t,i){i.endsWith(".event")&&("focus.event"===i?t="_onFocusField($event);"+t:"blur.event"===i&&(t="_onBlurField($event);"+t),n.set(i,t),e.delete(i))})),t.getFormMarkupAttr(n)},Ne=xe,ke=new Map([[n.FormWidgetType.SELECT,["Select Min value","Select Max value","Select value"]],[n.FormWidgetType.DATETIME,["Select Min date time","Select Max date time","Select date time"]],[n.FormWidgetType.TIME,["Select Min time","Select Max time","Select time"]],[n.FormWidgetType.DATE,["Select Min date","Select Max date","Select date"]],[n.FormWidgetType.TEXTAREA,["","","Enter value"]],[n.FormWidgetType.RICHTEXT,["","","Enter value"]],[n.FormWidgetType.COLORPICKER,["Select Color","Select Color","Select Color"]],[n.FormWidgetType.CHIPS,["","","Type here..."]],[n.FormWidgetType.PASSWORD,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.NUMBER,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.TEXT,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.CURRENCY,["Enter Min value","Enter Max value","Enter value"]],[n.FormWidgetType.AUTOCOMPLETE,["","","Search"]]]),Me=function(e,t,n){var i=1===n?"maxplaceholder":"placeholder",o=e.get(i);o||""===o||(o=ke.get(t)&&ke.get(t)[n])&&e.set(i,o)},Le=Me,Fe=function(e,t){var i=e.get("name"),o=(e.get("key")||i||"").trim(),a=t.isMaxWidget?'formControlName="'+o+'_max"':t.isInList?'[formControlName]="'+t.counter+'._fieldName"':'formControlName="'+o+'"',r=t.isMaxWidget?"#formWidgetMax":"#formWidget",s=i?t.isMaxWidget?'name="'+i+'_formWidgetMax"':'name="'+i+'_formWidget"':"",l='[ngClass]="'+e.get("ngclass")+'"',c='[class.hidden]="!'+t.pCounter+".isUpdateMode && "+t.counter+".viewmodewidget !== 'default'\" "+a+" "+t.eventsTmpl+" "+l+" "+r+" "+s;return n.getFormWidgetTemplate(t.widgetType,c,e,{counter:t.counter,pCounter:t.pCounter})},je=Fe,Be=function(e,t,i,o,a,r){if(!("true"===e.get("is-range")))return Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:a,isInList:r});var s=n.isMobileApp()?"col-xs-6":"col-sm-6";return'<div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:a})+'</div>\n <div class="'+s+'">'+Fe(e,{widgetType:t,eventsTmpl:i,counter:o,pCounter:a,isMaxWidget:!0})+"</div>"},Ge=Be,$e=function(e,t,i){if("true"===e.get("is-related"))return i+".getDisplayExpr()";if(t===n.FormWidgetType.PASSWORD)return"'********'";var o,a=i+".value";return t===n.FormWidgetType.DATETIME||t===n.FormWidgetType.TIMESTAMP?a+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MM-dd hh:mm:ss a'":t===n.FormWidgetType.TIME?a+=" | toDate:"+i+".formWidget.timepattern || 'hh:mm a'":t===n.FormWidgetType.DATE?a+=" | toDate:"+i+".formWidget.datepattern || 'yyyy-MMM-dd'":t===n.FormWidgetType.RATING||t===n.FormWidgetType.UPLOAD?"":(o=t,Ce.has(o)&&"All Fields"===e.get("datafield")?i+".getDisplayExpr()":i+".getCaption()")},Ve=$e,We=function(e){return{requires:["wm-form","wm-liveform","wm-livefilter","wm-list"],pre:function(i,o,a,r,s,l){var c=De.nextUid(),p=a||r||s,d=p&&p.get("form_reference")||"form",u=i.get("widget")||n.FormWidgetType.TEXT,h=e?"form-field":"filter-field",m="wmform-field-error-"+n.generateGUId(),f=e?'<p *ngIf="'+c+"._control?.invalid && "+c+"._control?.touched && "+d+'.isUpdateMode"\n class="help-block text-danger" aria-hidden="false" role="alert"\n aria-live="assertive" [attr.aria-label]="'+c+'.validationmessage" id="'+m+'"><span aria-hidden="true" [textContent]="'+c+'.validationmessage"></span></p>':"",g=u===n.FormWidgetType.UPLOAD?"":xe(i),v=n.isMobileApp()?"col-xs-12":"col-sm-12",y=d===(l&&l.get("parent_form_reference"));return i.set("__validationId",m),i.set("__widgetType",u),i.delete("widget"),o.set("counter",c),"true"===i.get("is-range")?(Me(i,u,0),Me(i,u,1)):Me(i,u,2),'<div data-role="'+h+'" [formGroup]="'+d+'.ngform" wmFormField captionPosition #'+c+'="wmFormField" widgettype="'+u+'" '+t.getFormMarkupAttr(i)+'>\n <div class="live-field form-group app-composite-widget clearfix caption-{{'+d+'.captionposition}}" widget="'+u+'">\n <label [hidden]="!'+c+'.displayname" class="app-label control-label formfield-label {{'+d+'._captionClass}}"\n [ngStyle]="{width: '+d+".captionsize}\" [ngClass]=\"{'text-danger': "+c+"._control?.invalid && "+c+"._control?.touched && "+d+".isUpdateMode,\n required: "+d+".isUpdateMode && "+c+'.required}" [textContent]="'+c+'.displayname"> </label>\n <div [ngClass]="'+c+".displayname ? "+d+"._widgetClass : '"+v+'\'">\n <label class="form-control-static app-label"\n [hidden]="'+d+".isUpdateMode || "+c+".viewmodewidget === 'default' || "+c+".widgettype === 'upload'\" [innerHTML]=\""+$e(i,u,c)+'"></label>\n '+Be(i,u,g,c,d,y)+'\n <span aria-hidden="true" *ngIf="'+c+'.showPendingSpinner" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <p *ngIf="!('+c+"._control?.invalid && "+c+"._control?.touched) && "+d+'.isUpdateMode"\n class="help-block" aria-hidden="true" role="alert" aria-live="polite" [textContent]="'+c+'.hint"></p>\n '+f+"\n </div>\n </div>"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n},imports:function(e){var t=n.getRequiredFormWidget(e.get("__widgetType")||e.get("type"));return e.delete("__widgetType"),[t,"wm-form"]}}},Ue=We;t.register("wm-form-field",We.bind(this,!0)),t.register("wm-filter-field",We.bind(this,!1));var qe=Object.freeze({__proto__:null,default:function(){},"\u02750":Ne,"\u02751":Le,"\u02752":je,"\u02753":Ge,"\u02754":Ve,"\u02755":Ue}),ze=function(e){return{pre:function(n){return'<div wmFormAction name="'+(n.get("name")||n.get("key"))+'" '+t.getAttrMarkup(n)+" "+e+">"},post:function(){return"</div>"}}},He=ze;t.register("wm-form-action",ze.bind(this,"")),t.register("wm-filter-action",ze.bind(this,' update-mode="true" '));var Ye,Ke=Object.freeze({__proto__:null,default:function(){},"\u02750":He}),Qe=new n.IDGenerator("form_"),Ze=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-richtexteditor","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-upload","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker","wm-table"]),Je=function(e){void 0===e&&(e=[]),e.forEach((function(e){if("wm-form-field"===e.name&&Ye++,Ze.has(e.name)){var t=e.attrs.find((function(e){return"key"===e.name||"name"===e.name}));if(!(t=t&&t.value)){var n=e.attrs.find((function(e){return"datavalue"===e.name}));if(n&&n.value){(n=n.value.match(/\((.*)\)/))&&n.length>1&&(t=n[1].replace(/["']/g,""))}}e.attrs.push(new i.Attribute("formControlName",t,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("wmFormWidget","",1,1,1,void 0,void 0))}Je(e.children)}))},Xe=Je,et=function(e){if(e.get("formdata.bind")){var n=t.getDataSource(e.get("formdata.bind"));n&&e.set("formdatasource.bind",n)}},tt=et,nt=function(e){return void 0===e&&(e=""),{requires:["wm-livetable","wm-login"],template:function(e){Ye=0,Je(e.children)},pre:function(n,i,o,a){var r,s,l=a&&a.get("isLogin")?"app-login":"",c=Qe.nextUid(),p=n.get("dependson")?'dependson="'+n.get("dependson")+'"':"",d="page"===n.get("formlayout")?"app-device-liveform panel liveform-inline":"";n.delete("dependson");var u='<form wmForm data-role="'+l+'" '+e+" #"+c+' ngNativeValidate [formGroup]="'+c+'.ngform" [noValidate]="'+c+".validationtype !== 'html'\"\n class=\""+d+'" [class]="'+c+'.captionAlignClass" [autocomplete]="'+c+".autocomplete ? 'on' : 'off'\" captionposition="+n.get("captionposition");if(n.set("numberOfFields",""+Ye),i.set("counter",c),et(n),"dialog"===n.get("formlayout")){s=o?o.get("liveform_dialog_id"):"liveform_dialog_id_"+c,n.set("dialogId",s);var h=new Map;return["title","title.bind","iconclass","iconclass.bind","width"].forEach((function(e){n.get(e)&&h.set(e,n.get(e))})),n.set("width","100%"),r=t.getAttrMarkup(n),'<div data-identifier="liveform" init-widget class="app-liveform liveform-dialog" '+p+' dialogid="'+s+'">\n <div wmDialog class="app-liveform-dialog" name="'+s+'" role="form" '+t.getAttrMarkup(h)+' modal="true">\n <ng-template #dialogBody>\n '+u+" "+r+">"}var m="",f="";if("page"===n.get("formlayout")){var g="device_liveform_header_"+c,v=new Map;v.set("title",n.get("title")),v.set("backbtnclick.event",n.get("backbtnclick.event")),f='<ng-template #buttonRef let-btn="btn">\n <button wmButton name="{{btn.key}}" class="navbar-btn btn-primary btn-transparent" iconclass.bind="btn.iconclass" show.bind="btn.show"\n (click)="'+c+'.invokeActionEvent($event, btn.action)" type.bind="btn.type" hint.bind="btn.title" shortcutkey.bind="btn.shortcutkey" disabled.bind="btn.disabled"\n tabindex.bind="btn.tabindex" [class.hidden]="btn.updateMode ? !'+c+".isUpdateMode : "+c+'.isUpdateMode"></button>\n </ng-template>',m='<header wmMobileNavbar name="'+g+'" '+t.getAttrMarkup(v)+'>\n <ng-container *ngFor="let btn of '+c+'.buttonArray" [ngTemplateOutlet]="buttonRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n </header>\n <div class="form-elements panel-body" >'}return u+" "+(r=t.getAttrMarkup(n))+" "+p+">\n "+f+" "+m},post:function(e){return"dialog"===e.get("formlayout")?"</form></ng-template></div></div>":"page"===e.get("formlayout")?"</div></form>":"</form>"},provide:function(e,t){var n=new Map;return n.set("form_reference",t.get("counter")),n}}},it=nt;t.register("wm-form",nt),t.register("wm-liveform",(function(){return nt("wmLiveForm")})),t.register("wm-livefilter",(function(){return nt("wmLiveFilter")}));var ot=Object.freeze({__proto__:null,default:function(){},"\u02750":Xe,"\u02751":tt,"\u02752":it});t.register("wm-calendar",(function(){return{pre:function(e){return'<div wmCalendar redrawable style="width:100%" aria-label="'+(e.get("view")?e.get("view")+" view":"month view")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var at=Object.freeze({__proto__:null,default:function(){}});t.register("wm-chips",(function(){return{pre:function(e){return'<ul wmChips role="listbox" '+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var rt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-colorpicker",(function(){return{pre:function(e){return"<div wmColorPicker "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var st=Object.freeze({__proto__:null,default:function(){}});t.register("wm-currency",(function(){return{pre:function(e){return"<div wmCurrency "+t.getAttrMarkup(e)+' role="input" '+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-buttongroup",(function(){return{pre:function(e){return'<div wmButtonGroup role="group" aria-labelledby="button group" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var ct=Object.freeze({__proto__:null,default:function(){}}),pt=new n.IDGenerator("wm_button");t.register("wm-button",(function(){return{pre:function(e){var n=pt.nextUid();return"<button wmButton #"+n+'="wmButton" [attr.aria-label]="'+n+".hint || "+n+'.caption || null" '+t.getAttrMarkup(e)+">"},post:function(){return"</button>"}}}));var dt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkbox",(function(){return{pre:function(e){return"<div wmCheckbox "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var ut=Object.freeze({__proto__:null,default:function(){}});t.register("wm-checkboxset",(function(){return{pre:function(e){return'<ul role="group" wmCheckboxset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var ht=Object.freeze({__proto__:null,default:function(){}});t.register("wm-composite",(function(){return{pre:function(e){return"<div wmComposite captionPosition "+t.setChildAttrs(e)+" "+t.getAttrMarkup(e)+">"},post:function(){return"</div"+t.clearChildAttrs()+">"}}}));var mt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-number",(function(){return{pre:function(e){return"<div wmNumber "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-radioset",(function(){return{pre:function(e){return'<ul role="radiogroup" wmRadioset '+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</ul>"}}}));var gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-select",(function(){return{pre:function(e){return"<wm-select "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-select>"}}}));var vt=Object.freeze({__proto__:null,default:function(){}}),yt=new n.IDGenerator("wm_switch");t.register("wm-switch",(function(){return{pre:function(e){var i=yt.nextUid();return"<div wmSwitch #"+i+'="wmSwitch" [attr.aria-label]="'+i+".hint || 'Switch button'\" "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-text",(function(){return{pre:function(e){return"<wm-input "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-input>"}}}));var wt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-textarea",(function(){return{pre:function(e){return"<wm-textarea "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</wm-textarea>"}}}));var Pt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-datetime",(function(){return{pre:function(e){return"<div wmDateTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var _t=Object.freeze({__proto__:null,default:function(){}});t.register("wm-date",(function(){return{pre:function(e){return"<div wmDate "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Ot=Object.freeze({__proto__:null,default:function(){}});t.register("wm-time",(function(){return{pre:function(e){return"<div wmTime "+t.getFormMarkupAttr(e)+" "+t.getChildAttrs(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Et=Object.freeze({__proto__:null,default:function(){}});t.register("wm-fileupload",(function(){return{pre:function(e){if(e.get("select.event")){var n=t.getDataSource(e.get("select.event"));e.set("datasource.bind",n)}return"<div wmFileUpload "+t.getAttrMarkup(e)+' role="input">'},post:function(){return"</div>"}}}));var Rt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-rating",(function(){return{pre:function(e){return"<div wmRating "+t.getFormMarkupAttr(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var At=Object.freeze({__proto__:null,default:function(){}});t.register("wm-slider",(function(){return{pre:function(e){return"<div wmSlider "+t.getAttrMarkup(e)+" "+n.getNgModelAttr(e)+">"},post:function(){return"</div>"}}}));var Tt=Object.freeze({__proto__:null,default:function(){}});function St(e,t,n,o){var a=e.attrs.find((function(e){return e.name===t}));a&&n.attrs.push(new i.Attribute(o,a.value,a.sourceSpan,a.keySpan,a.valueSpan,void 0,void 0))}t.register("wm-media-list",(function(){return{template:function(e){var t,n=e.attrs.find((function(e){return"dataset"===e.name})),o=function(e){void 0===e&&(e=[]),e.forEach((function(e){e.name&&"wm-list"!==e.name&&(e.attrs.forEach((function(e){e.value.startsWith("bind:"+t+".data[$i]")?e.value=e.value.replace(t+".data[$i]","item"):e.value.startsWith("bind:"+t)&&(e.value=e.value.replace(t,"item"))})),o(e.children))}))};n&&n.value.startsWith("bind:")&&(t=n.value.replace("bind:","")),t&&o(e.children);var a=e.children.find((function(e){return e instanceof i.Element&&"wm-media-template"===e.name}));null!=a&&(St(a,"width",e,"thumbnailwidth"),St(a,"height",e,"thumbnailheight"))},pre:function(e){return"<div wmMediaList "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Ct=Object.freeze({__proto__:null,default:function(){}});t.register("wm-media-template",(function(){return{pre:function(){return'<ng-template #mediaListTemplate let-item="item" let-index="index">'},post:function(){return"</ng-template>"}}}));var It=Object.freeze({__proto__:null,default:function(){}});t.register("wm-list",(function(){return{requires:["wm-form","wm-liveform"],template:function(e){var i=e.attrs.find((function(e){return"dataset"===e.name})),o=e.attrs.find((function(e){return"name"===e.name}));if(i){var a=t.getBoundToExpr(i.value);a&&n.updateTemplateAttrs(e,a,o.value,"itemRef.")}},pre:function(e,n,i,o){var a=i||o;return n.set("form_reference",a&&a.get("form_reference")),"<div wmList wmLiveActions "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("parent_form_reference",t.get("form_reference")),n}}})),t.register("wm-listtemplate",(function(){return{pre:function(){return'<ng-template #listTemplate let-item="item" let-$index="$index" let-itemRef="itemRef" let-$first="$first" let-$last="$last" let-currentItemWidgets="currentItemWidgets" >'},post:function(){return"</ng-template>"}}})),t.register("wm-list-action-template",(function(){return{template:function(e){e.attrs.find((function(e){return"position"===e.name})).value;e.children.filter((function(e){return e instanceof i.Element&&"wm-button"===e.name})).forEach((function(t){var n,o,a,r;n="position",o=t,a="swipe-position",(r=e.attrs.find((function(e){return e.name===n})))&&o.attrs.push(new i.Attribute(a,r.value,r.sourceSpan,r.keySpan,r.valueSpan,void 0,void 0))}))},pre:function(e,n){return"left"===e.get("position")?'<ng-template #listLeftActionTemplate>\n <li class="app-list-item-action-panel app-list-item-left-action-panel actionMenu" '+t.getAttrMarkup(e)+">":"right"===e.get("position")?'<ng-template #listRightActionTemplate>\n <li class="app-list-item-action-panel app-list-item-right-action-panel actionMenu" '+t.getAttrMarkup(e)+">":void 0},post:function(){return"</li></ng-template>"}}}));var Dt=Object.freeze({__proto__:null,default:function(){}}),xt=new n.IDGenerator("liveform_dialog_id_");t.register("wm-livetable",(function(){return{pre:function(e,n){var i=xt.nextUid();return n.set("counter",i),"<div wmLiveTable "+t.getAttrMarkup(e)+' dialogid="'+i+'">'},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("liveform_dialog_id",t.get("counter")),n}}}));var Nt=Object.freeze({__proto__:null,default:function(){}}),kt=new n.IDGenerator("wm_message");t.register("wm-message",(function(){return{pre:function(e){return'<p wmMessage tabindex="0" #'+kt.nextUid()+'="wmMessage" '+t.getAttrMarkup(e)+">"},post:function(){return"</p>"}}}));var Mt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-breadcrumb",(function(){return{pre:function(e){return"<ol wmBreadcrumb "+t.getAttrMarkup(e)+">"},post:function(){return"</ol>"}}}));var Lt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-menu",(function(){return{pre:function(e){return"<div wmMenu dropdown "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Ft=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav-item",(function(){return{pre:function(e){return'<li wmNavItem role="listitem" '+t.getAttrMarkup(e)+">"},post:function(){return"</li>"}}}));var jt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-nav",(function(){return{pre:function(e){return'<ul wmNav data-element-type="wmNav" data-role="page-header" role="list" '+t.getAttrMarkup(e)+">"},post:function(){return"</ul>"}}}));var Bt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-navbar",(function(){return{pre:function(e){return'<nav wmNavbar data-element-type="wmNavbar" role="navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var Gt=Object.freeze({__proto__:null,default:function(){}});t.register("wm-popover",(function(){return{requires:["wm-table"],pre:function(e,n,i){var o;if("inline"!==e.get("contentsource")){var a=e.get("content"),r=e.get("content.bind"),s="";a?s='content="'+a+'"':r&&(s='content.bind="'+r+'"'),o="<div wmContainer #partial partialContainer "+s+">",n.set("hasPopoverContent",!0)}var l="<wm-popover wmPopover "+t.getAttrMarkup(e)+">";return l+="<ng-template "+(i?'let-row="row"':"")+'><div tabindex="0" class="popover-start sr-only" aria-label="">popover content start</div>',o&&(l+=""+(o||"")),l},post:function(e,t){var n="";return t.get("hasPopoverContent")&&(n+="</div>"),n+'<div tabindex="0" class="popover-end sr-only" aria-label="">popover content ended</div></ng-template></'+"wm-popover>"}}}));var $t=Object.freeze({__proto__:null,default:function(){}}),Vt=function(e,t){return e&&e.children.find((function(e){return e instanceof i.Element&&e.name===t}))},Wt=Vt,Ut=function(e){return new i.Element(e,[],[],Qt,Qt,Qt)},qt=Ut,zt=function(e,t,n){var o=new i.Attribute(t,n,Qt,Qt,Qt,void 0,void 0);e.attrs.push(o)},Ht=zt,Yt=function(e,t){var n;if(t)return _.forEach(t.children,(function(t){return t instanceof i.Element&&(t.name===e?n=t:t.children&&(n=Yt(e,t))),!n})),n},Kt=Yt,Qt={},Zt=new n.IDGenerator("wm_page");t.register("wm-page",(function(){return{template:function(e){var t=Vt(Vt(e,"wm-content"),"wm-page-content");if(t||(t=Yt("wm-page-content",Yt("wm-content",e))),t){var o=Ut("ng-container");if(zt(o,"*ngIf","compilePageContent"),o.children=o.children.concat(t.children),o.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),t.children=[o],n.isMobileApp()){var a=Ut("div");zt(a,"wmPageContentLoader",""),zt(a,"*ngIf","!showPageContent"),t.children.push(a)}}},pre:function(e){var n=Zt.nextUid();return"<div wmPage #"+n+'="wmPage" data-role="pageContainer" [attr.aria-label]="'+n+'.hint" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Jt=Object.freeze({__proto__:null,default:function(){},"\u02750":Wt,"\u02751":qt,"\u02752":Ht,"\u02753":Kt}),Xt=new n.IDGenerator("wm_layout");t.register("wm-layout",(function(){return{pre:function(e){var n=Xt.nextUid();return"<div wmLayout #"+n+'="wmLayout" data-role="pageContainer" [attr.aria-label]="'+n+".hint || 'Main page content'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var en=Object.freeze({__proto__:null,default:function(){}}),tn="router-outlet";t.register("wm-router-outlet",(function(){return{pre:function(e){return'<div wmRouterOutlet name="wmRouterOutlet" '+t.getAttrMarkup(e)+"><"+tn+' (activate)="onActivate($event)">'},post:function(){return"</router-outlet></div>"}}}));var nn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-pagination",(function(){return{pre:function(e){return'<nav wmPagination data-identifier="pagination" aria-label="Page navigation" '+t.getAttrMarkup(e)+">"},post:function(){return"</nav>"}}}));var on=Object.freeze({__proto__:null,default:function(){}});t.register("wm-content",(function(){return{pre:function(e){return'<main wmContent data-role="page-content" role="main" '+t.getAttrMarkup(e)+">"},post:function(){return"</main>"}}}));var an=Object.freeze({__proto__:null,default:function(){}}),rn=new n.IDGenerator("wm_footer");t.register("wm-footer",(function(){return{pre:function(e){var n=rn.nextUid();return"<footer wmFooter #"+n+'="wmFooter" partialContainer data-role="page-footer" role="contentinfo" [attr.aria-label]="'+n+".hint || 'Page footer'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</footer>"}}}));var sn=Object.freeze({__proto__:null,default:function(){}}),ln=new n.IDGenerator("wm_header");t.register("wm-header",(function(){return{pre:function(e){var n=ln.nextUid();return"<header wmHeader #"+n+'="wmHeader" partialContainer data-role="page-header" role="banner" [attr.aria-label]="'+n+".hint || 'Page header'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var cn=Object.freeze({__proto__:null,default:function(){}}),pn=new n.IDGenerator("wm_left_panel");t.register("wm-left-panel",(function(){return{pre:function(e){var n=pn.nextUid();return"<aside wmLeftPanel #"+n+'="wmLeftPanel" partialContainer data-role="page-left-panel" [attr.aria-label]="'+n+".hint || 'Left navigation panel'\" wmSmoothscroll=\""+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var dn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-mobile-navbar",(function(){return{pre:function(e){return"<header wmMobileNavbar "+t.getAttrMarkup(e)+">"},post:function(){return"</header>"}}}));var un=Object.freeze({__proto__:null,default:function(){}}),hn=new n.IDGenerator("wm_right_panel");t.register("wm-right-panel",(function(){return{pre:function(e){var n=hn.nextUid();return"<aside wmRightPanel #"+n+'="wmRightPanel" partialContainer data-role="page-right-panel" role="complementary" [attr.aria-label]="'+n+".hint || 'Right navigation panel'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</aside>"}}}));var mn=Object.freeze({__proto__:null,default:function(){}});Object.create;function fn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var gn=function(e){return new i.Element(e,[],[],wn,wn,wn)},vn=gn,yn=function(e,t,n){var o=new i.Attribute(t,n,wn,wn,wn,void 0,void 0);e.attrs.push(o)},bn=yn,wn={};t.register("wm-page-content",(function(){return{template:function(e){var t,n;try{for(var o=fn(e.attrs),a=o.next();!a.done;a=o.next()){var r=a.value;if("spa"===r.name&&"true"===r.value){var s=gn("ng-container");yn(s,"*ngIf","compilePageContent"),s.children=s.children.concat(e.children),s.children.push(new i.Text("{{onPageContentReady()}}",null,void 0,void 0)),e.children=[s];break}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},pre:function(e){return"<div wmPageContent "+(e.get("spa")?"wmSpaPage":"")+' wmSmoothscroll="'+(e.get("smoothscroll")||"false")+'" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Pn=Object.freeze({__proto__:null,default:function(){},"\u02750":vn,"\u02751":bn});t.register("wm-mobile-tabbar",(function(){return{pre:function(e){return"<div wmMobileTabbar "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var _n=Object.freeze({__proto__:null,default:function(){}}),On=new n.IDGenerator("wm_top_nav");t.register("wm-top-nav",(function(){return{pre:function(e){var n=On.nextUid();return"<section wmTopNav #"+n+'="wmTopNav" partialContainer data-role="page-topnav" role="navigation" [attr.aria-label]="'+n+".hint || 'Second level navigation'\" "+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var En=Object.freeze({__proto__:null,default:function(){}}),Rn={},An=function(e){return new i.Element(e,[],[],Rn,Rn,Rn)},Tn=An,Sn=function(e,t,n){var o=new i.Attribute(t,n,Rn,Rn,Rn,void 0,void 0);e.attrs.push(o)},Cn=Sn;t.register("wm-partial",(function(){return{template:function(e){var t=An("ng-container");Sn(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return'<section wmPartial data-role="partial" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var In=Object.freeze({__proto__:null,default:function(){},"\u02750":Tn,"\u02751":Cn});t.register("wm-param",(function(){return{pre:function(e){return"<div wmParam hidden "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Dn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-prefab",(function(){return{pre:function(e){return'<section wmPrefab redrawable data-role="perfab" '+t.getAttrMarkup(e)+">"},post:function(){return"</section>"}}}));var xn=Object.freeze({__proto__:null,default:function(){}}),Nn={},kn=function(e){return new i.Element(e,[],[],Nn,Nn,Nn)},Mn=kn,Ln=function(e,t,n){var o=new i.Attribute(t,n,Nn,Nn,Nn,void 0,void 0);e.attrs.push(o)},Fn=Ln;t.register("wm-prefab-container",(function(){return{template:function(e){var t=kn("ng-container");Ln(t,"*ngIf","compileContent"),t.children=t.children.concat(e.children),e.children.length=0,e.children.push(t)},pre:function(e){return"<div wmPrefabContainer "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var jn=Object.freeze({__proto__:null,default:function(){},"\u02750":Mn,"\u02751":Fn});t.register("wm-table-action",(function(){return{pre:function(e){return'<div name="'+(e.get("name")||e.get("key"))+'" wmTableAction '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Bn=Object.freeze({__proto__:null,default:function(){}});t.register("wm-table-column-group",(function(){return{pre:function(e){return"<div wmTableColumnGroup "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var Gn=Object.freeze({__proto__:null,default:function(){}}),$n=new n.IDGenerator("data_table_form_"),Vn=new Set(["wm-text","wm-textarea","wm-checkbox","wm-slider","wm-currency","wm-switch","wm-select","wm-checkboxset","wm-radioset","wm-date","wm-time","wm-timestamp","wm-rating","wm-datetime","wm-search","wm-chips","wm-colorpicker"]),Wn=function(e){void 0===e&&(e=[]);e.forEach((function(e){if(Vn.has(e.name)){if("wm-checkbox"===e.name&&e.attrs.filter((function(e){return"formControlName"===e.name})).length)return;e.attrs.push(new i.Attribute("[ngModelOptions]","{standalone: true}",1,1,1,void 0,void 0))}Wn(e.children)}))},Un=Wn,qn=function(e,i){var o,a,r=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING),s=e.get("binding"),l=e.get("type")||"string",c=e.get("filterdataset.bind");if("autocomplete"===e.get("filterwidget")){if(c)o='dataset.bind="'+c+'" datasource.bind="'+t.getDataSource(c)+'"';a="submit.event=\"changeFn('"+s+"')\""}var p='#filterWidget formControlName="'+s+'_filter" '+o+" "+a+" change.event=\"changeFn('"+s+"')\"\n disabled.bind=\"isDisabled('"+s+"')\"";return'<ng-template #filterTmpl let-changeFn="changeFn" let-isDisabled="isDisabled">\n <div class="input-group '+r+'" data-col-identifier="'+s+'">\n '+(""+n.getFormWidgetTemplate(r,p,e,{inputType:"filterinputtype"}))+'\n <span class="input-group-addon filter-clear-icon" *ngIf="'+i+".showClearIcon('"+s+'\')">\n <button class="btn-transparent btn app-button" aria-label="Clear button" type="button" (click)="'+i+".clearRowFilter('"+s+'\')">\n <i class="app-icon wi wi-clear" aria-hidden="true"></i>\n </button>\n </span>\n <span class="input-group-addon" dropdown container="body" (onShown)="'+i+".adjustContainer('"+s+'\');">\n <button class="btn-transparent btn app-button" type="button" dropdownToggle><i class="app-icon wi wi-filter-list"></i></button>\n <ul class="matchmode-dropdown dropdown-menu" *dropdownMenu>\n <li *ngFor="let matchMode of '+i+".matchModeTypesMap['"+l+'\']"\n [ngClass]="{active: matchMode === ('+i+".rowFilter['"+s+"'].matchMode || "+i+".matchModeTypesMap['"+l+'\'][0])}">\n <a href="javascript:void(0);" (click)="'+i+".onFilterConditionSelect('"+s+'\', matchMode)" [innerText]="'+i+'.matchModeMsgs[matchMode]"></a>\n </li>\n </ul>\n </span>\n </div></ng-template>'},zn=qn,Hn=function(e){var t="";return e.forEach((function(e,n){n.endsWith(".event")&&(t+=n+'="'+e+'" ')})),t},Yn=Hn,Kn=function(e){var n=new Map;return["disabled","disabled.bind"].forEach((function(t){e.get(t)&&(n.set(t,e.get(t)),e.delete(t))})),t.getAttrMarkup(n)},Qn=Kn,Zn=function(e,t,i,o){var a,r={},s=e.get("binding"),l=e.get("edit-widget-type")||((a={type:e.get("type"),"related-entity-name":e.get("related-entity-name"),"primary-key":e.get("primary-key")})["related-entity-name"]&&a["primary-key"]?n.FormWidgetType.SELECT:Se[a.type]&&Se[a.type][0]||n.FormWidgetType.TEXT),c="",p="",d="";l===n.FormWidgetType.UPLOAD?(r.uploadProps={formName:$n.nextUid(),name:s},r.counter=o):(c=t?"#inlineWidgetNew":"#inlineWidget",p=t?'formControlName="'+s+'_new"':'formControlName="'+s+'"',d="wmFormWidget"),r.inputType="editinputtype";var u=t?"#inlineWidgetTmplNew":"#inlineWidgetTmpl",h=c+" "+d+' key="'+s+'" data-field-name="'+s+'" '+p+" "+(l===n.FormWidgetType.UPLOAD?"":Hn(e))+" "+Kn(e),m=t?"getPendingSpinnerStatusNew":"getPendingSpinnerStatus";return"<ng-template "+u+' let-row="row" let-getControl="getControl" let-getValidationMessage="getValidationMessage" let-'+m+'="'+m+'">\n <div data-col-identifier="'+s+'" >\n '+n.getFormWidgetTemplate(l,h,e,r)+"\n "+Xn(i)+'\n <div class="overlay" *ngIf="'+m+'()"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>\n <span class="sr-only" *ngIf="getValidationMessage()">{{getValidationMessage()}}</span>\n </div>\n </ng-template>'},Jn=Zn,Xn=function(e){var t="";switch(e){case"bottom":t='<span class="help-block text-danger" *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">{{getValidationMessage()}}</span>';break;case"hover":default:t='<span placement="top" container="body" tooltip="{{getValidationMessage()}}" class="text-danger wi wi-error"\n *ngIf="getValidationMessage() && getControl() && getControl().invalid && getControl().touched">\n </span>'}return t},ei=Xn,ti=function(e){var t="row.getProperty('"+e.get("binding")+"')",i=e.get("custompipeformat")||e.get("formatpattern"),o="";switch(!n.isDateTimeType(e.get("type"))||i&&"None"!==i||(e.set("formatpattern","toDate"),e.delete("datepattern"),i="toDate"),i){case"toDate":o="{{"+t+" | toDate: colDef.datepattern}}";break;case"toCurrency":e.get("currencypattern")&&(o="{{"+t+" | toCurrency: '"+e.get("currencypattern"),e.get("fractionsize")?o+="': "+e.get("fractionsize")+"}}":o+="'}}");break;case"numberToString":e.get("fractionsize")&&(o="{{"+t+" | numberToString: '"+e.get("fractionsize")+"'}}");break;case"stringToNumber":o="{{"+t+" | stringToNumber}}";break;case"timeFromNow":o="{{"+t+" | timeFromNow}}";break;case"prefix":e.get("prefix")&&(o="{{"+t+" | prefix: '"+e.get("prefix")+"'}}");break;case"suffix":e.get("suffix")&&(o="{{"+t+" | suffix: '"+e.get("suffix")+"'}}");break;default:n.checkIsCustomPipeExpression(i)&&(o="{{"+t+" | "+i+" : row}}")}return o},ni=ti;t.register("wm-table-column",(function(){return{requires:["wm-table"],template:function(e,t){if(e.children.length){if(1===e.children.length&&e.children[0]instanceof i.Text&&0===e.children[0].value.trim().length)return;t.set("customExpression",!0),Wn(e.children)}},pre:function(e,i,o){var a="",r="",s="",l="";if(o){var c=o.get("table_reference");a="multicolumn"===o.get("filtermode")&&"false"!==e.get("searchable")?qn(e,c):"";var p=o.get("editmode"),d=p!==Te&&p!==Ae&&"true"!==e.get("readonly");r=d?Zn(e,!1,o.get("errorstyle"),c):"",s=d&&p===Re&&"false"!==o.get("shownewrow")?Zn(e,!0,e.get("errorstyle")):"",l=' [formGroup]="'+c+'.ngform" '}var u=e.get("formatpattern"),h='<ng-template #customExprTmpl let-row="row" let-colDef="colDef" let-editRow="editRow" let-deleteRow="deleteRow" let-addNewRow="addNewRow">',m="",f="";return i.get("customExpression")?(e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'">'):(u&&"None"!==u||n.isDateTimeType(e.get("type")))&&(f=ti(e))&&(i.set("customExpression",!0),e.set("customExpression","true"),m=h+'<div data-col-identifier="'+e.get("binding")+'" title="'+f+'">'+f),"<div wmTableColumn "+t.getAttrMarkup(e)+" "+l+">\n "+a+"\n "+r+"\n "+s+"\n "+m},post:function(e,t){var n="";return t.get("customExpression")&&(n="</div></ng-template>"),n+"</div>"},imports:function(e){var t=e.get("edit-widget-type"),i=e.get("filterwidget")||Ie(e.get("type")||n.DataType.STRING);return[n.getRequiredFormWidget(t),n.getRequiredFormWidget(i),"wm-table"]}}}));var ii=Object.freeze({__proto__:null,default:function(){},"\u02750":Un,"\u02751":zn,"\u02752":Yn,"\u02753":Qn,"\u02754":Jn,"\u02755":ei,"\u02756":ni}),oi=function(e){var t="anchor"===e.get("widget-type")?"a":"button",i="anchor"===e.get("widget-type")?"wmAnchor":"wmButton",o=e.get("display-name")||e.get("title")||"Collapse/Expand";return'<ng-template #rowExpansionActionTmpl let-row="row">\n <'+t+" "+i+"\n "+n.getRowActionAttrs(e)+'\n class="'+e.get("class")+' row-expansion-button"\n iconclass="'+e.get("collapseicon")+'"\n type="button" aria-label="'+o+'"></'+t+">\n </ng-template>"},ai=oi;t.register("wm-table-row",(function(){return{pre:function(e){return"<div wmTableRow "+t.getAttrMarkup(e)+">\n "+oi(e)+'\n <ng-template #rowExpansionTmpl let-row="row" let-rowDef="rowDef" let-containerLoad="containerLoad">\n <div wmContainer partialContainer content.bind="rowDef.content" load.event="containerLoad(widget)"\n [ngStyle]="{\'height\': rowDef.height, \'overflow-y\': \'auto\'}">\n <div *ngFor="let param of rowDef.partialParams | keyvalue" wmParam hidden\n [name]="param.key" [value]="param.value"></div>'},post:function(){return"</div></ng-template></div>"}}}));var ri=Object.freeze({__proto__:null,default:function(){},"\u02750":ai}),si=function(){return'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>'},li=si,ci=function(e){var t=e.get("action"),i=t?' click.event.delayed="'+t+'" ':"",o=t&&t.includes("editRow(")?'<button type="button" aria-label="Save edit icon" class="save row-action-button btn app-button btn-transparent save-edit-row-button hidden" title="Save">\n <i class="wi wi-done" aria-hidden="true"></i>\n </button>\n <button type="button" aria-label="Cancel edit icon" class="cancel row-action-button btn app-button btn-transparent cancel-edit-row-button hidden" title="Cancel">\n <i class="wi wi-cancel" aria-hidden="true"></i>\n </button>':"",a=t?t.includes("editRow(")?"edit edit-row-button":t.includes("deleteRow(")?"delete delete-row-button":"":"",r=e.get("tabindex")?'tabindex="'+e.get("tabindex")+'"':"",s="anchor"===e.get("widget-type")?"a":"button";return'<ng-template #rowActionTmpl let-row="row">\n <'+s+" "+("anchor"===e.get("widget-type")?"wmAnchor":"wmButton")+' data-action-key="'+e.get("key")+'"\n '+n.getRowActionAttrs(e)+'\n class="row-action row-action-button '+e.get("class")+" "+a+'"\n iconclass="'+e.get("iconclass")+'"\n '+i+"\n "+r+'\n type="button"></'+s+">\n "+o+"\n </ng-template>"},pi=ci;t.register("wm-table-row-action",(function(){return{pre:function(e){return"<div wmTableRowAction "+t.getAttrMarkup(e)+">\n "+ci(e)},post:function(){return"</div>"}}}));var di=Object.freeze({__proto__:null,default:function(){},"\u02750":li,"\u02751":pi}),ui=new n.IDGenerator("table_"),hi=0;function mi(e,t){var n=0;e.forEach((function(e){var o=e.name,a=void 0!==t?t:n;"wm-table-column"!==o&&"wm-table-column-group"!==o||(e.attrs.push(new i.Attribute("index",""+hi,1,1,1,void 0,void 0)),e.attrs.push(new i.Attribute("headerIndex",""+a,1,1,1,void 0,void 0)),"wm-table-column-group"===o&&mi(e.children,n),hi++,n++)}))}t.register("wm-table",(function(){return{template:function(e,i){if(e.children.length){var o=e.children.some((function(e){return"wm-table-column"===e.name||"wm-table-column-group"===e.name}));mi(e.children),i.set("isdynamictable",o?"false":"true");var a=e.children.some((function(e){return"wm-table-row"===e.name}));i.set("isrowexpansionenabled",a?"true":"false")}else i.set("isdynamictable","true");var r=e.attrs.find((function(e){return"dataset"===e.name})),s=e.attrs.find((function(e){return"name"===e.name}));if(r){var l=t.getBoundToExpr(r.value);l&&n.updateTemplateAttrs(e,l,s.value,"","row")}},pre:function(e,n){var i=ui.nextUid();return n.set("counter",i),e.set("isdynamictable",n.get("isdynamictable")),e.set("isrowexpansionenabled",n.get("isrowexpansionenabled")),e.set("table_reference",i),'<div wmTable="'+i+'" wmTableFilterSort wmTableCUD #'+i+' data-identifier="table" '+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set("table_reference",t.get("counter")),n.set("filtermode",e.get("filtermode")),n.set("errorstyle",e.get("errorstyle")),n.set("editmode",e.get("editmode")),n.set("shownewrow",e.get("shownewrow")),n}}}));var fi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-video",(function(){return{pre:function(e){return"<div wmVideo "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var gi=Object.freeze({__proto__:null,default:function(){}}),vi="parentLinearLayout.spacing";t.register("wm-linearlayout",(function(){return{requires:["wm-linearlayout"],pre:function(e,n,i){var o=e.get("spacing");return e.set("spacing",o&&"0"!==o||!i?o:i.get(vi)),"<div wmLinearLayout "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"},provide:function(e,t){var n=new Map;return n.set(vi,e.get("spacing")),n}}}));var yi=Object.freeze({__proto__:null,default:function(){}});t.register("wm-linearlayoutitem",(function(){return{pre:function(e){return"<div wmLinearLayoutItem "+t.getAttrMarkup(e)+">"},post:function(){return"</div>"}}}));var bi=Object.freeze({__proto__:null,default:function(){}});e.accordionBuild=z,e.accordionPaneBuild=Y,e.alertDlgBuild=ye,e.anchorBuild=h,e.audioBuild=m,e.barcodeScannerBuild=fe,e.breadcrumbBuild=Lt,e.buttonBuild=dt,e.buttonGroupBuild=ct,e.calendarBuild=at,e.cameraBuild=ve,e.cardActionsBuild=G,e.cardBuild=j,e.cardContentBuild=B,e.cardFooterBuild=$,e.carouselBuild=s,e.carouselTemplateBuild=c,e.chartBuild=V,e.checkboxBuild=ut,e.checkboxSetBuild=ht,e.chipsBuild=rt,e.colorPickerBuild=st,e.compositeBuild=mt,e.confirmDlgBuild=be,e.containerBuild=K,e.contentBuild=an,e.currencyBuild=lt,e.dateBuild=Ot,e.dateTimeBuild=_t,e.dlgBuild=Pe,e.dlgFooterBuild=we,e.fileUploadBuild=Rt,e.footerBuild=sn,e.formActionBuild=Ke,e.formBuild=ot,e.formFieldBuild=qe,e.headerBuild=cn,e.htmlBuild=g,e.iconBuild=v,e.iframeBuild=y,e.iframeDlgBuild=_e,e.initComponentsBuildTask=function(){},e.labelBuild=w,e.layoutBuild=en,e.leftPanelBuild=dn,e.lgBuild=J,e.lgcolBuild=Q,e.lgrowBuild=Z,e.linearLayoutBuild=yi,e.linearLayoutItemBuild=bi,e.listBuild=Dt,e.liveTableBuild=Nt,e.loginBuild=p,e.loginDlgBuild=Oe,e.marqueeBuild=d,e.mediaListBuild=Ct,e.mediaListItemBuild=It,e.menuBuild=Ft,e.messageBuild=Mt,e.mobileNavbarBuild=un,e.navBuild=Bt,e.navItemBuild=jt,e.navbarBuild=Gt,e.numberBuild=ft,e.pageBuild=Jt,e.pageContentBuild=Pn,e.paginationBuild=on,e.panelBuild=ee,e.partialBuild=In,e.partialDlgBuild=Ee,e.partialParamBuild=Dn,e.pictureBuild=O,e.popoverBuild=$t,e.prefabBuild=xn,e.prefabContainerBuild=jn,e.progressBarBuild=x,e.progressCircleBuild=N,e.radiosetBuild=gt,e.ratingBuild=At,e.repeatTemplateBuild=oe,e.rightPanelBuild=mn,e.routerOutletBuild=nn,e.rteBuild=M,e.searchBuild=L,e.segContentBuild=ne,e.segControlBuild=te,e.selectBuild=vt,e.sliderBuild=Tt,e.spinnerBuild=R,e.switchBuild=bt,e.tabBarBuild=_n,e.tabPaneBuild=ce,e.tableActionBuild=Bn,e.tableBuild=fi,e.tableColumnBuild=ii,e.tableColumnGroupBuild=Gn,e.tableRowActionBuild=di,e.tableRowBuild=ri,e.tabsBuild=le,e.textAreaBuild=Pt,e.textBuild=wt,e.tileBuild=pe,e.timeBuild=Et,e.topNavBuild=En,e.treeBuild=F,e.videoBuild=gi,e.wizardBuild=de,e.wizardStepBuild=he,Object.keys(t).forEach((function(n){"default"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("angular-imask"),require("@wm/components/base"),require("@wm/core"),require("rxjs")):"function"==typeof define&&define.amd?define("@wm/components/input",["exports","@angular/core","@angular/common","@angular/forms","angular-imask","@wm/components/base","@wm/core","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input={}),e.ng.core,e.ng.common,e.ng.forms,e["angular-imask"],e.wm.components.base,e.wm.core,e.rxjs)}(this,(function(e,t,n,i,o,a,r,s){"use strict";
|
|
44
44
|
/*! *****************************************************************************
|
|
45
45
|
Copyright (c) Microsoft Corporation.
|
|
46
46
|
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
111
111
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
112
112
|
PERFORMANCE OF THIS SOFTWARE.
|
|
113
|
-
***************************************************************************** */var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function u(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var h=new Map([["casesensitive",Object.assign({value:!1},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datacompletemsg",Object.assign({value:"No more data to load"},a.PROP_STRING)],["datafield",Object.assign({value:"All Fields"},a.PROP_STRING)],["dataoptions",a.PROP_ANY],["dataset",a.PROP_ANY],["datasource",a.PROP_ANY],["datavalue",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayimagesrc",a.PROP_STRING],["displaylabel",a.PROP_STRING],["displayexpression",a.PROP_STRING],["dropup",a.PROP_BOOLEAN],["groupby",a.PROP_STRING],["hint",a.PROP_STRING],["imagewidth",Object.assign({value:"16px"},a.PROP_STRING)],["limit",a.PROP_NUMBER],["loadingdatamsg",Object.assign({value:"Loading items..."},a.PROP_STRING)],["match",a.PROP_STRING],["matchmode",a.PROP_STRING],["minchars",a.PROP_NUMBER],["name",a.PROP_STRING],["navsearchbar",Object.assign({value:!1},a.PROP_BOOLEAN)],["orderby",a.PROP_STRING],["placeholder",Object.assign({value:"Search"},a.PROP_STRING)],["position",a.PROP_STRING],["query",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["searchkey",a.PROP_STRING],["searchon",Object.assign({value:"typing"},a.PROP_STRING)],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showclear",Object.assign({value:!1},a.PROP_BOOLEAN)],["showsearchicon",a.PROP_BOOLEAN],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"search"},a.PROP_STRING)],["debouncetime",Object.assign({value:250},a.PROP_NUMBER)],["width",a.PROP_STRING]]),m=function(){a.register("wm-search",h),a.registerFormWidget(l.FormWidgetType.AUTOCOMPLETE,new Map(h)),a.registerFormWidget(l.FormWidgetType.TYPEAHEAD,new Map(h))},f=function(){function e(){}return e.prototype.applyFilter=function(e,t,n){return e=_.isNumber(e)?e.toString():e,_.includes(n,"start")?_.startsWith(e,t):_.includes(n,"end")?_.endsWith(e,t):_.includes(n,"exact")?_.isEqual(e,t):_.includes(e,t)},e.prototype.filter=function(e){var t=this,n=e.dataset,i=e.casesensitive,o=e.matchMode;o&&!_.includes(o,"ignorecase")&&(i=!0);var a,r=e.query;return new Promise((function(s,l){if(e.searchKey){var c=_.split(e.searchKey,",");a=_.filter(e.dataset,(function(e){return c.some((function(n){var a=_.get(e,n),s=r;return i||(a=_.toLower(_.toString(a)),s=_.toLower(_.toString(s))),t.applyFilter(a,s,o)}))}))}else a=_.isArray(n)&&_.isObject(n[0])?_.filter(n,(function(e){var n=_.values(e).join(" ");return i||(n=_.toLower(n),r=_.toLower(r)),t.applyFilter(n,r)})):_.filter(n,(function(e){return i||(e=_.toLower(e),r=_.toLower(r)),t.applyFilter(e,r,o)}));s({data:a,hasMoreData:!1,isLastPage:!0})}))},e}(),g=function(){function e(){}return e.prototype.filter=function(e){var t=this;return this.filterData(e).then((function(n){return t.onFilterSuccess(e,n)}),(function(){return t.onFilterFailure()}))},e.prototype.filterData=function(e){if(e.dataoptions){var t=e.dataoptions,n=e.datasource.execute(l.DataSource.Operation.GET_REQUEST_PARAMS,e);if(t.relatedField)return new Promise((function(i,o){a.interpolateBindExpressions(e.viewParent,t.filterExpr,(function(a){n.filterExpr=t.filterExpr=a,t.filterExpr=a,e.datasource.execute(l.DataSource.Operation.GET_RELATED_TABLE_DATA,_.assign({relatedField:t.relatedField},n)).then(i,o)}))}));if(t.distinctField)return e.datasource.execute(l.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{pagesize:e.limit||e.pagesize,page:e.page,fields:t.distinctField,entityName:t.tableName,filterFields:_.assign(t.filterFields,n.filterFields),filterExpr:l.getClonedObject(t.filterExpr||{})})}return e.datasource.execute(l.DataSource.Operation.SEARCH_RECORDS,e)},e.prototype.isLast=function(e,t,n,i){return t===l.AppConstants.INT_MAX_VALUE?0!==i&&i<n:e===(t>n?Math.ceil(t/n):t<0?0:1)},e.prototype.getTransformedData=function(e,t){var n=e.operation+"Result",i=t[n];if(i){var o={};_.set(o,n,i),t=[o]}else t=[t];return t},e.prototype.onFilterFailure=function(){return[]},e.prototype.isLastPageForDistinctApi=function(e,t,n,i){return t>1&&!i&&_.isEmpty(e)&&n===l.AppConstants.INT_MAX_VALUE},e.prototype.onFilterSuccess=function(e,t){var n,i,o,a,r=this,s=t.data,c=_.split(e.binddataset,"."),p=_.slice(c,_.indexOf(c,"dataSet")+1).join(".");return new Promise((function(c,d){var u=t.pagination;if(e.datasource.execute(l.DataSource.Operation.IS_PAGEABLE)&&(o=u.number+1,i=r.isLast(o,e.limit>0&&e.limit||u.totalElements,u.size,u.numberOfElements),a=!0,r.isLastPageForDistinctApi(s,o,u.totalElements,i)))c({data:[],isLastPage:i=!0,hasMoreData:o>1,isPaginatedData:a,page:o});else{if(p){if(_.isArray(s)){var h=p.lastIndexOf("[$i]");if(h>-1){var m=p.substr(h+5);n=s.map((function(e){return l.findValueOf(e,m)}))}}else _.isObject(s)&&(n=_.get(s,p));s=n||s}_.isArray(s)||(s=r.getTransformedData(e.datasource,s)),s.length?c({data:s,isLastPage:i,hasMoreData:o>1,isPaginatedData:a,page:o}):c({data:[],isLastPage:i,hasMoreData:o>1,isPaginatedData:a,page:o})}}))},e}(),v=function(){function e(){}return e.prototype.filter=function(t){var n=this,i=t.datasource&&t.datasource.execute(l.DataSource.Operation.IS_UPDATE_REQUIRED,t.hasData);return(!t.isLocalFilter&&(t.dataoptions||t.datasource&&t.datasource.execute(l.DataSource.Operation.IS_API_AWARE)&&t.searchKey&&i)?e.remoteDataProvider.filter(t):e.localDataProvider.filter(t)).then((function(e){return n.updateDataset=t.datasource&&!t.datasource.execute(l.DataSource.Operation.SUPPORTS_CRUD)&&i,n.hasMoreData=e.hasMoreData,n.isLastPage=e.isLastPage,n.page=e.page,n.isPaginatedData=e.isPaginatedData,e}))},e}();v.remoteDataProvider=new g,v.localDataProvider=new f;var y={widgetType:"wm-search",hostClass:"input-group"},b=function(e){function t(t,n,i,o){var a=e.call(this,t,y)||this;a.binddatavalue=i,a.binddataset=o,a.query="",a.page=1,a.allowempty=!1,a.app=n,l.addClass(a.nativeElement,"app-search",!0),a.typeaheadDataSource=r.Observable.create((function(e){a.listenQuery&&(a._defaultQueryInvoked=!1,a._loadingItems=!0,e.next(a.query)),a.lastSelectedIndex&&(a.typeahead._container=void 0)})).pipe(s.filter((function(){return a._loadingItems=!1,0===a.minchars||a.query&&a.query.length>=a.minchars})),s.mergeMap((function(e){return a.getDataSourceAsObservable(e)}))),a.dataProvider=new v;var c=a.datavalue$.subscribe((function(e){var t=_.isArray(e)?e[0]:e;if(null===t||""===t)return a._modelByValue="",a.query=a.queryModel="",void(a._lastResult=void 0);a._unsubscribeDv||(a._defaultQueryInvoked=!1,_.isObject(e)||a.prevDatavalue===e||(a._modelByKey=void 0,a.query=a.queryModel=""),a.updateByDatavalue(e)),a.showClosebtn=""!==a.query}));a.registerDestroyListener((function(){return c.unsubscribe()}));var p=a.dataset$.subscribe((function(){a.startIndex=a.datasetItems.length,a._lastResult=void 0;var e=a.datavalue||a.toBeProcessedDatavalue;l.isDefined(e)&&a.updateByDataset(e)}));return a.registerDestroyListener((function(){return p.unsubscribe()})),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"datasource",{get:function(){return this._datasource},set:function(e){this._datasource=e;var t=this.datavalue||this.toBeProcessedDatavalue;this.updateByDatavalue(t)},enumerable:!1,configurable:!0}),t.prototype.clearSearch=function(e,t){this.query="",this.onInputChange(e),this.dataProvider.isLastPage=!1,this.listenQuery=!1,t&&(this.listenQuery=!0,this._unsubscribeDv=!1,this.loadMoreData()),this.invokeEventCallback("clearsearch"),this._loadingItems=!1,e&&this.$element.find(".app-search-input").focus()},t.prototype.clearText=function(){this.query="",this.showClosebtn=!1},t.prototype.closeSearch=function(){this._loadingItems=!1,this.page=1,this.insertAtIndex(this.elIndex),this.elIndex=void 0,this.parentEl=void 0,this.$element.removeClass("full-screen"),this._domUpdated&&(this._domUpdated=!1),this.listenQuery=!1,this._unsubscribeDv=!0,this.typeahead.hide()},t.prototype.renderMobileAutoComplete=function(){l.isDefined(this.elIndex)||(this.parentEl=this.$element.parent(),this.elIndex=this.parentEl.children().index(this.$element)),this.$element.hasClass("full-screen")||(this._domUpdated=!0,this.$element.addClass("full-screen"),"inline"===this.position&&this.$element.addClass(this.position)),this.$element.hasClass("full-screen")&&this.$element.find(".app-search-input").focus()},t.prototype.getDataSourceAsObservable=function(e){if(this._lastQuery===e&&!_.get(this.dataoptions,"filterFields")&&l.isDefined(this._lastResult))return this._loadingItems=!1,r.of(this._lastResult);if("autocomplete"===this.type&&this.searchkey&&this.query&&this.datavalue){var t=[],n=_.split(this.searchkey,","),i=void 0;if(this.binddisplaylabel&&1===(t=_.split(this.binddisplaylabel,"+")).length)if(_.includes(t[0],"|"))i=!0;else{i=/\[(.*?)\]/.exec(t[0])[1]}if(t.length>1||i&&!_.includes(n,i)||this.displayexpression&&!_.includes(n,this.displayexpression))return this._loadingItems=!1,r.of([])}return this._lastQuery=this.query,r.from(this.getDataSource(e))},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","select","submit","change"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.highlight=function(e,t){if(this.typeaheadContainer)return e.value=e.item.label.toString(),this.typeaheadContainer.highlight(e,t)},t.prototype.insertAtIndex=function(e){0===e?this.parentEl.prepend(this.$element):this.parentEl.children().eq(e).length?this.$element.insertBefore(this.parentEl.children().eq(e)):this.$element.insertAfter(this.parentEl.children().eq(e-1))},t.prototype.isMobileAutoComplete=function(){return"autocomplete"===this.type&&l.isMobile()},t.prototype.isQueryEntered=function(){return this.showclear&&this.showClosebtn},t.prototype.loadMoreData=function(e){this.dataProvider.isLastPage||(this.page=e?this.page+1:this.page,this.isScrolled=!0,this._loadingItems=!0,e&&(this._lastQuery=void 0),this.typeahead.onInput({target:{value:_.trim(this.query)||"0"}}))},t.prototype.onFocusOut=function(){this._unsubscribeDv=!1,this._loadingItems=!1,this.page=1,!this._domUpdated&&this._isOpen&&(this.listenQuery=!1),this._isOpen=!1,this._domUpdated&&this.typeahead&&this.typeahead._container&&(this.typeahead._container.isFocused=!0)},t.prototype.onInputChange=function(e){this.result=[],this.page=1,this.listenQuery=this.isUpdateOnKeyPress(),this._modelByValue=void 0,""===this.query?(this.queryModel="",this._modelByValue="",this.updatePrevDatavalue(this._lastQuery),this.invokeOnChange(this._modelByValue,{},!0),this.invokeEventCallback("clear",{$event:e}),e&&9!==e.which&&this.invokeEventCallback("submit",{$event:e})):this.invokeEventCallback("change",{$event:e,newVal:this._modelByValue||this.query,oldVal:this.prevDatavalue}),this.showClosebtn=""!==this.query},t.prototype.handleEnterEvent=function(e){_.get(this.typeahead,"matches.length")||this.onSearchSelect(e)},t.prototype.onSearchSelect=function(e){var t,n,i,o=(null===(n=null===(t=this.typeaheadContainer)||void 0===t?void 0:t.active)||void 0===n?void 0:n.value)===this.query;if(this.typeaheadContainer&&this.typeaheadContainer.active&&o&&(i=this.typeaheadContainer.active.item),e=this.eventData(e,i||{}),!this.isUpdateOnKeyPress())return this.listenQuery=!0,void this.typeahead.onInput({target:{value:this.query}});this.typeaheadContainer&&this.liElements.length&&o?this.typeaheadContainer.selectActiveMatch():(this.queryModel=this.query,this.invokeEventCallback("submit",{$event:e}))},t.prototype.invokeOnBeforeServiceCall=function(e){this.invokeEventCallback("beforeservicecall",{inputData:e})},t.prototype.onDropdownOpen=function(){var e=this;if(this.clearData&&this.typeahead.hide(),_.debounce((function(){e._isOpen=!0,e.typeaheadContainer=e.typeahead._container||e.typeahead._typeahead.instance,e.typeaheadContainer.liElements=e.liElements,e.typeaheadContainer.ulElement=e.ulElement,l.adjustContainerPosition($("typeahead-container"),e.nativeElement,e.typeahead._typeahead,$("typeahead-container .dropdown-menu"))}))(),this.isMobileAutoComplete()){this.$element.hasClass("full-screen")||this.renderMobileAutoComplete();var t=this.dropdownEl.closest("typeahead-container");t.insertAfter(this.$element.find("input").first());var n=this.$element.closest(".app-content").height();t.css({position:"relative",top:0,height:n+"px"}),this.showClosebtn=this.query&&""!==this.query,_.isUndefined(this.dataProvider.isLastPage)||this.dataProvider.isLastPage||this.triggerSearch()}},t.prototype.selectNext=function(){var e=this.typeaheadContainer.matches;if(e){var t=e.indexOf(this.typeaheadContainer.active);!this._loadingItems&&!this.dataProvider.isLastPage&&t+1>e.length-1&&(this.lastSelectedIndex=t,this.loadMoreData(!0))}},t.prototype.setLastActiveMatchAsSelected=function(){this.lastSelectedIndex&&(this.typeaheadContainer._active=this.typeaheadContainer.matches[this.lastSelectedIndex],this.typeaheadContainer.nextActiveMatch(),this.lastSelectedIndex=void 0)},t.prototype.triggerSearch=function(){if(!this.dataProvider.isLastPage&&this.$element.hasClass("full-screen")){var e=this.dropdownEl,t=e.find("li").last();t.length&&e.length&&e.height()+e.position().top>t.height()+t.position().top&&this.loadMoreData(!0)}},t.prototype.isUpdateOnKeyPress=function(){return"typing"===this.searchon},t.prototype.debounceDefaultQuery=function(e){var t=this;this._defaultQueryInvoked=!0,this.getDataSource(e,!0).then((function(e){e.length?(t.queryModel=e,t._lastQuery=t.query=t.queryModel[0].label||"",t._modelByValue=t.queryModel[0].value,t._modelByKey=t.queryModel[0].key,t.showClosebtn=""!==t.query):(t._modelByValue=void 0,t.queryModel=void 0,t.query=""),t.clearData&&_.get(t.typeahead,"_typeahead.isShown")&&t.typeahead.hide()}))},t.prototype.updateByDatavalue=function(e){this.updateByDataset(e),this.updateByDataSource(e)},t.prototype.updateByDataSource=function(e){if(l.isDefined(e)&&!_.isObject(e)&&this.datasource&&!l.isDefined(this._modelByKey)&&this.datafield!==a.ALLFIELDS){if(l.isDefined(this.queryModel)&&!_.isEmpty(this.queryModel))return void this.updateDatavalueFromQueryModel();!this._defaultQueryInvoked&&this.datasource.execute(l.DataSource.Operation.SUPPORTS_CRUD)&&this.debounceDefaultQuery(e)}},t.prototype.updateDatavalueFromQueryModel=function(){l.isDefined(this.queryModel)&&(this._modelByValue=_.isArray(this.queryModel)?this.queryModel[0].value:this.queryModel,this._modelByKey=_.isArray(this.queryModel)?this.queryModel[0].key:this.queryModel,this.toBeProcessedDatavalue=void 0)},t.prototype.updateByDataset=function(e){if(!this._defaultQueryInvoked||!this.searchkey){var t=_.find(this.datasetItems,(function(t){return _.isObject(t.value)?_.isEqual(t.value,e):_.toString(t.value).toLowerCase()===_.toString(e).toLowerCase()}));if(t)this.queryModel=[t];else if(this.datafield===a.ALLFIELDS&&_.isObject(e))this.queryModel=this.getTransformedData(a.extractDataAsArray(e));else if(this.prevDatavalue!==e)return this.queryModel=void 0,void(this.query="");this.updateDatavalueFromQueryModel(),this._lastQuery=this.query=l.isDefined(this.queryModel)&&this.queryModel.length?_.get(this.queryModel[0],"label"):"",this.showClosebtn=""!==this.query}},t.prototype.handleFocus=function(e){"search"===this.type&&this.query===this._lastQuery&&this._lastResult&&this.typeahead.keyUpEventEmitter.emit(this.query)},t.prototype.notifySubscriber=function(){var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:!0,nativeEl:e})},t.prototype.getDataSource=function(e,t,n){var i=this;if(t&&this.datafield===a.ALLFIELDS)return this._loadingItems=!1,Promise.resolve([]);var o={dataset:this.dataset?a.convertDataToObject(this.dataset):void 0,binddataset:this.binddataset,datasource:this.datasource,datafield:this.datafield,hasData:this.dataset&&this.dataset.length,query:e,isLocalFilter:!this.searchkey,searchKey:t?this.datafield:this.searchkey,matchMode:t?"startignorecase":this.matchmode,casesensitive:this.casesensitive,isformfield:this.isformfield,orderby:this.orderby,limit:this.limit,pagesize:this.pagesize,page:this.page,onBeforeservicecall:this.invokeOnBeforeServiceCall.bind(this)};return this.dataoptions&&(o.dataoptions=this.dataoptions,o.viewParent=this.viewParent),this._loadingItems=!0,this.dataProvider.filter(o).then((function(e){e=e.data||e,l.isDefined(i.dataset)&&i.dataset.length||!i.dataProvider.updateDataset||(i.dataset=e),i.dataProvider.hasMoreData?i.formattedDataset=i.formattedDataset.concat(e):i.formattedDataset=e,i.formattedDataset.length>20&&!l.isDefined(i.limit)&&(i.typeahead.typeaheadOptionsLimit=i.formattedDataset.length),i._isOpen&&i.isMobileAutoComplete()&&!_.isUndefined(i.dataProvider.isLastPage)&&!i.dataProvider.isLastPage&&i.triggerSearch();var t=i.getTransformedData(i.formattedDataset,n);return i.result=_.map(t,"value"),t}),(function(e){return i._loadingItems=!1,[]})).then((function(t){return i.isScrolled&&(_.debounce((function(){i.setLastActiveMatchAsSelected()}),30)(),i.isScrolled=!1),t.length||(i._modelByValue=void 0,i.queryModel=e),i._unsubscribeDv&&(t=[]),i._loadingItems=!1,i._lastResult=t,t}))},t.prototype.getContext=function(e){return e&&_.get(e,"widget")?this.getContext(e.viewParent):e},t.prototype.getTransformedData=function(e,t,n){l.isDefined(t)&&t++;var i=a.transformFormData(this.getContext(this.viewParent),e,this.datafield,{displayField:this.displaylabel||this.displayfield,displayExpr:n?"":this.displayexpression,bindDisplayExpr:n?"":this.binddisplaylabel,bindDisplayImgSrc:this.binddisplayimagesrc,displayImgSrc:this.displayimagesrc},t,this);return a.getUniqObjsByDataField(i,this.datafield,this.displayfield||this.displaylabel,l.toBoolean(this.allowempty))},t.prototype.onScroll=function(e,t){var n=e.scrollHeight,i=e.clientHeight;!this._loadingItems&&!this.dataProvider.isLastPage&&e.scrollTop+i>=n&&this.loadMoreData(!0)},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),l.isDefined(this.minchars)||("autocomplete"===this.type?this.minchars=0:this.minchars=1),this.listenQuery=this.isUpdateOnKeyPress(),this.showsearchicon=l.isDefined(this.showsearchicon)?this.showsearchicon:"search"===this.type},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.nativeElement,this),this.containerTarget=a.getContainerTargetClass(this.nativeElement)},t.prototype.eventData=function(e,t){return e&&(e.data={item:t.dataObject,model:t.value,label:t.label,query:this.query}),e},t.prototype.typeaheadOnSelect=function(e,t){var n=e.item;this.queryModel=n,n.selected=!0,this.query=n.label,this.showClosebtn=""!==this.query,t=t||this.$typeaheadEvent,this._modelByKey=n.key,this._modelByValue=n.value,t=this.eventData(t,n),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,t||{}),this.datavalue!==this.prevDatavalue&&this.updateBoundVariable(this.datavalue),this.$element.hasClass("full-screen")&&this.closeSearch(),this.invokeEventCallback("select",{$event:t,selectedValue:this.datavalue}),this.invokeEventCallback("submit",{$event:t}),this.updatePrevDatavalue(this.datavalue)},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("autocomplete"===this.type&&"displaylabel"===t&&this.displaylabel&&(!this.displayexpression||this.displayexpression&&!this.datasource)&&(this.displayexpression=this.displaylabel,this.displaylabel=void 0),"displaylabel"===t&&this.dataoptions&&null===this.binddisplaylabel&&(this.query=_.get(this._modelByValue,n)||this._modelByValue),"disabled"===t&&(!1===n?this.clearData=!1:(this.clearData=!0,_.get(this.typeahead,"_typeahead.isShown")&&this.typeahead.hide())),e.prototype.onPropertyChange.call(this,t,n,i))},t}(c.DatasetAwareFormComponent);b.initializeProps=m(),b.decorators=[{type:t.Component,args:[{selector:"[wmSearch]",template:'<ng-template #customItemTemplate let-model="item" let-index="index" let-query="query" let-match="match">\n \x3c!-- Default item template --\x3e\n <a *ngIf="!content">\n <img *ngIf="model.imgSrc" [src]="model.imgSrc" alt="Search" [style.width]="imagewidth">\n <span [title]="model.label" [innerHtml]="highlight(match, query) || model.label"></span>\n </a>\n \x3c!-- Custom partial template --\x3e\n <a *ngIf="content" [ngClass]="{customTemplate: content}" partialContainer [wmItemTemplate]="content" [userComponentParams]="match.item">\n <div partial-container-target></div>\n </a>\n</ng-template>\n\n<ng-template #customListTemplate let-matches="matches" let-itemTemplate="itemTemplate" let-query="query">\n <ul #ulElement class="app-search dropdown-menu" scrollable>\n <li #liElements *ngFor="let match of matches" [ngClass]="{active: typeaheadContainer && typeaheadContainer.isActive(match), \'list-group-header\': match && match.isHeader()}"\n (mouseenter)="typeaheadContainer.selectActive(match);"\n (click)="match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();">\n \x3c!-- itemTemplate comes from the <input> --\x3e\n <h4 *ngIf="match.isHeader()" class="group-title">{{match.value}}</h4>\n <ng-container *ngIf="!match.isHeader()" [ngTemplateOutlet]="itemTemplate"\n [ngTemplateOutletContext]="{item: match.item, index: i, match: match, query: query}">\n </ng-container>\n </li>\n <div class="status" [hidden]="_loadingItems || !(datacompletemsg && dataProvider.isLastPage)">\n <span [textContent]="datacompletemsg"></span>\n </div>\n <div class="status" [hidden]="!_loadingItems">\n <i class="fa fa-circle-o-notch fa-spin"></i>\n <span [textContent]="loadingdatamsg"></span>\n </div>\n </ul>\n</ng-template>\n\n\x3c!--This template is for search inside mobile navbar.--\x3e\n<ng-container *ngIf="navsearchbar; else searchTemplate">\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n container="body"\n [disabled]="disabled"\n autocomplete="off"\n [(ngModel)]="query"\n [readonly]="readonly"\n [disabled]="disabled"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event)"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event);"\n (focusout)="onFocusOut()"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [dropup]="dropup"\n [tabindex]="tabindex"\n [attr.name]="name"\n [attr.aria-label]="hint || \'Search field\'"/>\n <i class="btn-close wi wi-cancel" [hidden]="!showClosebtn" (click)="clearSearch($event);"></i>\n</ng-container>\n\x3c!--This template is for both web and fullscreen mode in mobile.--\x3e\n<ng-template #searchTemplate>\n <span class="wi wi-arrow-left form-control-feedback back-btn" aria-hidden="true" (click)="closeSearch()"></span>\n <span class="sr-only">Back button</span>\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n [container]="containerTarget || \'body\'"\n [disabled]="disabled"\n autocomplete="off"\n [(ngModel)]="query"\n [readonly]="readonly"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event); onFocusOut()"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event)"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [tabindex]="tabindex"\n [dropup]="dropup"\n [attr.name]="name"\n [attr.aria-label]="hint || \'Search field\'">\n <input class="model-holder" ng-model="proxyModel" ng-required="required" tabindex="-1" aria-hidden="true">\n <span *ngIf="_loadingItems" aria-hidden="true" class="fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <span class="wi wi-close form-control-feedback clear-btn" [ngClass]="{\'show-btn\': isQueryEntered()}" (click)="clearSearch($event, true)"></span>\n <span class="sr-only">Clear button</span>\n <span *ngIf="showsearchicon" class="input-group-addon" aria-label="search icon" [ngClass]="{\'disabled\': disabled}">\n <form>\n <button title="Search" [disabled]="disabled" class="app-search-button wm-sl-l sl-search" type="submit"\n (click)="onSearchSelect($event)"></button>\n </form>\n </span>\n</ng-template>\n',providers:[a.provideAs(b,i.NG_VALUE_ACCESSOR,!0),a.provideAs(b,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(b)]}]}],b.ctorParameters=function(){return[{type:t.Injector},{type:l.App},{type:void 0,decorators:[{type:t.Attribute,args:["datavalue.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]}]},b.propDecorators={typeahead:[{type:t.ViewChild,args:[o.TypeaheadDirective]}],ulElement:[{type:t.ViewChild,args:["ulElement"]}],liElements:[{type:t.ViewChildren,args:["liElements"]}]};var w=function(){function e(e,n){this.searchRef=n,this.elementRef=e.get(t.ElementRef)}return e.prototype.ngAfterContentInit=function(){this.elementRef.nativeElement.addEventListener("scroll",this.notifyParent.bind(this)),this.searchRef.dropdownEl=$(this.elementRef.nativeElement),this.searchRef.onDropdownOpen()},e.prototype.ngAfterViewInit=function(){if(!this.searchRef.isMobileAutoComplete()){var e=this.searchRef.$element.find("input").first();this.searchRef.dropdownEl.width(e.outerWidth())}},e.prototype.notifyParent=function(e){this.searchRef.onScroll(this.elementRef.nativeElement,e)},e}();w.decorators=[{type:t.Directive,args:[{selector:"[scrollable]"}]}],w.ctorParameters=function(){return[{type:t.Injector},{type:b}]};var P=[b,w],O=function(){};O.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,o.TypeaheadModule,a.WmComponentsModule],declarations:u([],d(P)),exports:u([],d(P)),entryComponents:[]}]}],e.ScrollableDirective=w,e.SearchComponent=b,e.SearchModule=O,e["\u0275a"]=m,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/basic/tree",["exports","@angular/core","@angular/common","@wm/components/base","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.tree={}),e.ng.core,e.ng.common,e.wm.components.base,e.wm.core)}(this,(function(e,t,n,i,o){"use strict";
|
|
113
|
+
***************************************************************************** */var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function u(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var h=new Map([["casesensitive",Object.assign({value:!1},a.PROP_BOOLEAN)],["class",a.PROP_STRING],["datacompletemsg",Object.assign({value:"No more data to load"},a.PROP_STRING)],["datafield",Object.assign({value:"All Fields"},a.PROP_STRING)],["dataoptions",a.PROP_ANY],["dataset",a.PROP_ANY],["datasource",a.PROP_ANY],["datavalue",a.PROP_STRING],["datavaluesource",a.PROP_ANY],["dateformat",a.PROP_STRING],["disabled",a.PROP_BOOLEAN],["displayimagesrc",a.PROP_STRING],["displaylabel",a.PROP_STRING],["displayexpression",a.PROP_STRING],["dropup",a.PROP_BOOLEAN],["groupby",a.PROP_STRING],["hint",a.PROP_STRING],["imagewidth",Object.assign({value:"16px"},a.PROP_STRING)],["limit",a.PROP_NUMBER],["loadingdatamsg",Object.assign({value:"Loading items..."},a.PROP_STRING)],["match",a.PROP_STRING],["matchmode",a.PROP_STRING],["minchars",a.PROP_NUMBER],["name",a.PROP_STRING],["navsearchbar",Object.assign({value:!1},a.PROP_BOOLEAN)],["orderby",a.PROP_STRING],["placeholder",Object.assign({value:"Search"},a.PROP_STRING)],["position",a.PROP_STRING],["query",a.PROP_STRING],["readonly",a.PROP_BOOLEAN],["required",a.PROP_BOOLEAN],["searchkey",a.PROP_STRING],["searchon",Object.assign({value:"typing"},a.PROP_STRING)],["shortcutkey",a.PROP_STRING],["show",Object.assign({value:!0},a.PROP_BOOLEAN)],["showclear",Object.assign({value:!1},a.PROP_BOOLEAN)],["showsearchicon",a.PROP_BOOLEAN],["tabindex",Object.assign({value:0},a.PROP_NUMBER)],["type",Object.assign({value:"search"},a.PROP_STRING)],["debouncetime",Object.assign({value:250},a.PROP_NUMBER)],["width",a.PROP_STRING]]),m=function(){a.register("wm-search",h),a.registerFormWidget(l.FormWidgetType.AUTOCOMPLETE,new Map(h)),a.registerFormWidget(l.FormWidgetType.TYPEAHEAD,new Map(h))},f=function(){function e(){}return e.prototype.applyFilter=function(e,t,n){return e=_.isNumber(e)?e.toString():e,_.includes(n,"start")?_.startsWith(e,t):_.includes(n,"end")?_.endsWith(e,t):_.includes(n,"exact")?_.isEqual(e,t):_.includes(e,t)},e.prototype.filter=function(e){var t=this,n=e.dataset,i=e.casesensitive,o=e.matchMode;o&&!_.includes(o,"ignorecase")&&(i=!0);var a,r=e.query;return new Promise((function(s,l){if(e.searchKey){var c=_.split(e.searchKey,",");a=_.filter(e.dataset,(function(e){return c.some((function(n){var a=_.get(e,n),s=r;return i||(a=_.toLower(_.toString(a)),s=_.toLower(_.toString(s))),t.applyFilter(a,s,o)}))}))}else a=_.isArray(n)&&_.isObject(n[0])?_.filter(n,(function(e){var n=_.values(e).join(" ");return i||(n=_.toLower(n),r=_.toLower(r)),t.applyFilter(n,r)})):_.filter(n,(function(e){return i||(e=_.toLower(e),r=_.toLower(r)),t.applyFilter(e,r,o)}));s({data:a,hasMoreData:!1,isLastPage:!0})}))},e}(),g=function(){function e(){}return e.prototype.filter=function(e){var t=this;return this.filterData(e).then((function(n){return t.onFilterSuccess(e,n)}),(function(){return t.onFilterFailure()}))},e.prototype.filterData=function(e){if(e.dataoptions){var t=e.dataoptions,n=e.datasource.execute(l.DataSource.Operation.GET_REQUEST_PARAMS,e);if(t.relatedField)return new Promise((function(i,o){a.interpolateBindExpressions(e.viewParent,t.filterExpr,(function(a){n.filterExpr=t.filterExpr=a,t.filterExpr=a,e.datasource.execute(l.DataSource.Operation.GET_RELATED_TABLE_DATA,_.assign({relatedField:t.relatedField},n)).then(i,o)}))}));if(t.distinctField)return e.datasource.execute(l.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{pagesize:e.limit||e.pagesize,page:e.page,fields:t.distinctField,entityName:t.tableName,filterFields:_.assign(t.filterFields,n.filterFields),filterExpr:l.getClonedObject(t.filterExpr||{})})}return e.datasource.execute(l.DataSource.Operation.SEARCH_RECORDS,e)},e.prototype.isLast=function(e,t,n,i){return t===l.AppConstants.INT_MAX_VALUE?0!==i&&i<n:e===(t>n?Math.ceil(t/n):t<0?0:1)},e.prototype.getTransformedData=function(e,t){var n=e.operation+"Result",i=t[n];if(i){var o={};_.set(o,n,i),t=[o]}else t=[t];return t},e.prototype.onFilterFailure=function(){return[]},e.prototype.isLastPageForDistinctApi=function(e,t,n,i){return t>1&&!i&&_.isEmpty(e)&&n===l.AppConstants.INT_MAX_VALUE},e.prototype.onFilterSuccess=function(e,t){var n,i,o,a,r=this,s=t.data,c=_.split(e.binddataset,"."),p=_.slice(c,_.indexOf(c,"dataSet")+1).join(".");return new Promise((function(c,d){var u=t.pagination;if(e.datasource.execute(l.DataSource.Operation.IS_PAGEABLE)&&(o=u.number+1,i=r.isLast(o,e.limit>0&&e.limit||u.totalElements,u.size,u.numberOfElements),a=!0,r.isLastPageForDistinctApi(s,o,u.totalElements,i)))c({data:[],isLastPage:i=!0,hasMoreData:o>1,isPaginatedData:a,page:o});else{if(p){if(_.isArray(s)){var h=p.lastIndexOf("[$i]");if(h>-1){var m=p.substr(h+5);n=s.map((function(e){return l.findValueOf(e,m)}))}}else _.isObject(s)&&(n=_.get(s,p));s=n||s}_.isArray(s)||(s=r.getTransformedData(e.datasource,s)),s.length?c({data:s,isLastPage:i,hasMoreData:o>1,isPaginatedData:a,page:o}):c({data:[],isLastPage:i,hasMoreData:o>1,isPaginatedData:a,page:o})}}))},e}(),v=function(){function e(){}return e.prototype.filter=function(t){var n=this,i=t.datasource&&t.datasource.execute(l.DataSource.Operation.IS_UPDATE_REQUIRED,t.hasData);return(!t.isLocalFilter&&(t.dataoptions||t.datasource&&t.datasource.execute(l.DataSource.Operation.IS_API_AWARE)&&t.searchKey&&i)?e.remoteDataProvider.filter(t):e.localDataProvider.filter(t)).then((function(e){return n.updateDataset=t.datasource&&!t.datasource.execute(l.DataSource.Operation.SUPPORTS_CRUD)&&i,n.hasMoreData=e.hasMoreData,n.isLastPage=e.isLastPage,n.page=e.page,n.isPaginatedData=e.isPaginatedData,e}))},e}();v.remoteDataProvider=new g,v.localDataProvider=new f;var y={widgetType:"wm-search",hostClass:"input-group"},b=function(e){function t(t,n,i,o){var a=e.call(this,t,y)||this;a.binddatavalue=i,a.binddataset=o,a.query="",a.page=1,a.allowempty=!1,a.app=n,l.addClass(a.nativeElement,"app-search",!0),a.typeaheadDataSource=r.Observable.create((function(e){a.listenQuery&&(a._defaultQueryInvoked=!1,a._loadingItems=!0,e.next(a.query)),a.lastSelectedIndex&&(a.typeahead._container=void 0)})).pipe(s.filter((function(){return a._loadingItems=!1,0===a.minchars||a.query&&a.query.length>=a.minchars})),s.mergeMap((function(e){return a.getDataSourceAsObservable(e)}))),a.dataProvider=new v;var c=a.datavalue$.subscribe((function(e){var t=_.isArray(e)?e[0]:e;if(null===t||""===t)return a._modelByValue="",a.query=a.queryModel="",void(a._lastResult=void 0);a._unsubscribeDv||(a._defaultQueryInvoked=!1,_.isObject(e)||a.prevDatavalue===e||(a._modelByKey=void 0,a.query=a.queryModel=""),a.updateByDatavalue(e)),a.showClosebtn=""!==a.query}));a.registerDestroyListener((function(){return c.unsubscribe()}));var p=a.dataset$.subscribe((function(){a.startIndex=a.datasetItems.length,a._lastResult=void 0;var e=a.datavalue||a.toBeProcessedDatavalue;l.isDefined(e)&&a.updateByDataset(e)}));return a.registerDestroyListener((function(){return p.unsubscribe()})),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"datasource",{get:function(){return this._datasource},set:function(e){this._datasource=e;var t=this.datavalue||this.toBeProcessedDatavalue;this.updateByDatavalue(t)},enumerable:!1,configurable:!0}),t.prototype.clearSearch=function(e,t){this.query="",this.onInputChange(e),this.dataProvider.isLastPage=!1,this.listenQuery=!1,t&&(this.listenQuery=!0,this._unsubscribeDv=!1,this.loadMoreData()),this.invokeEventCallback("clearsearch"),this._loadingItems=!1,e&&this.$element.find(".app-search-input").focus()},t.prototype.clearText=function(){this.query="",this.showClosebtn=!1},t.prototype.closeSearch=function(){this._loadingItems=!1,this.page=1,this.insertAtIndex(this.elIndex),this.elIndex=void 0,this.parentEl=void 0,this.$element.removeClass("full-screen"),this._domUpdated&&(this._domUpdated=!1),this.listenQuery=!1,this._unsubscribeDv=!0,this.typeahead.hide()},t.prototype.renderMobileAutoComplete=function(){l.isDefined(this.elIndex)||(this.parentEl=this.$element.parent(),this.elIndex=this.parentEl.children().index(this.$element)),this.$element.hasClass("full-screen")||(this._domUpdated=!0,this.$element.addClass("full-screen"),"inline"===this.position&&this.$element.addClass(this.position)),this.$element.hasClass("full-screen")&&this.$element.find(".app-search-input").focus()},t.prototype.getDataSourceAsObservable=function(e){if(this._lastQuery===e&&!_.get(this.dataoptions,"filterFields")&&l.isDefined(this._lastResult))return this._loadingItems=!1,r.of(this._lastResult);if("autocomplete"===this.type&&this.searchkey&&this.query&&this.datavalue){var t=[],n=_.split(this.searchkey,","),i=void 0;if(this.binddisplaylabel&&1===(t=_.split(this.binddisplaylabel,"+")).length)if(_.includes(t[0],"|"))i=!0;else{i=/\[(.*?)\]/.exec(t[0])[1]}if(t.length>1||i&&!_.includes(n,i)||this.displayexpression&&!_.includes(n,this.displayexpression))return this._loadingItems=!1,r.of([])}return this._lastQuery=this.query,r.from(this.getDataSource(e))},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","select","submit","change"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.highlight=function(e,t){if(this.typeaheadContainer)return e.value=e.item.label.toString(),this.typeaheadContainer.highlight(e,t)},t.prototype.insertAtIndex=function(e){0===e?this.parentEl.prepend(this.$element):this.parentEl.children().eq(e).length?this.$element.insertBefore(this.parentEl.children().eq(e)):this.$element.insertAfter(this.parentEl.children().eq(e-1))},t.prototype.isMobileAutoComplete=function(){return"autocomplete"===this.type&&l.isMobile()},t.prototype.isQueryEntered=function(){return this.showclear&&this.showClosebtn},t.prototype.loadMoreData=function(e){this.dataProvider.isLastPage||(this.page=e?this.page+1:this.page,this.isScrolled=!0,this._loadingItems=!0,e&&(this._lastQuery=void 0),this.typeahead.onInput({target:{value:_.trim(this.query)||"0"}}))},t.prototype.onFocusOut=function(){this._unsubscribeDv=!1,this._loadingItems=!1,this.page=1,!this._domUpdated&&this._isOpen&&(this.listenQuery=!1),this._isOpen=!1,this._domUpdated&&this.typeahead&&this.typeahead._container&&(this.typeahead._container.isFocused=!0)},t.prototype.onInputChange=function(e){this.result=[],this.page=1,this.listenQuery=this.isUpdateOnKeyPress(),this._modelByValue=void 0,""===this.query?(this.queryModel="",this._modelByValue="",this.updatePrevDatavalue(this._lastQuery),this.invokeOnChange(this._modelByValue,{},!0),this.invokeEventCallback("clear",{$event:e}),e&&9!==e.which&&this.invokeEventCallback("submit",{$event:e})):this.invokeEventCallback("change",{$event:e,newVal:this._modelByValue||this.query,oldVal:this.prevDatavalue}),this.showClosebtn=""!==this.query},t.prototype.handleEnterEvent=function(e){_.get(this.typeahead,"matches.length")||this.onSearchSelect(e)},t.prototype.onSearchSelect=function(e){var t,n,i,o=(null===(n=null===(t=this.typeaheadContainer)||void 0===t?void 0:t.active)||void 0===n?void 0:n.value)===this.query;if(this.typeaheadContainer&&this.typeaheadContainer.active&&o&&(i=this.typeaheadContainer.active.item),e=this.eventData(e,i||{}),!this.isUpdateOnKeyPress())return this.listenQuery=!0,void this.typeahead.onInput({target:{value:this.query}});this.typeaheadContainer&&this.liElements.length&&o?this.typeaheadContainer.selectActiveMatch():(this.queryModel=this.query,this.invokeEventCallback("submit",{$event:e}))},t.prototype.invokeOnBeforeServiceCall=function(e){this.invokeEventCallback("beforeservicecall",{inputData:e})},t.prototype.onDropdownOpen=function(){var e=this;if(this.clearData&&this.typeahead.hide(),_.debounce((function(){e._isOpen=!0,e.typeaheadContainer=e.typeahead._container||e.typeahead._typeahead.instance,e.typeaheadContainer.liElements=e.liElements,e.typeaheadContainer.ulElement=e.ulElement,l.adjustContainerPosition($("typeahead-container"),e.nativeElement,e.typeahead._typeahead,$("typeahead-container .dropdown-menu"))}))(),this.isMobileAutoComplete()){this.$element.hasClass("full-screen")||this.renderMobileAutoComplete();var t=this.dropdownEl.closest("typeahead-container");t.insertAfter(this.$element.find("input").first());var n=this.$element.closest(".app-content").height();t.css({position:"relative",top:0,height:n+"px"}),this.showClosebtn=this.query&&""!==this.query,_.isUndefined(this.dataProvider.isLastPage)||this.dataProvider.isLastPage||this.triggerSearch()}},t.prototype.selectNext=function(){var e=this.typeaheadContainer.matches;if(e){var t=e.indexOf(this.typeaheadContainer.active);!this._loadingItems&&!this.dataProvider.isLastPage&&t+1>e.length-1&&(this.lastSelectedIndex=t,this.loadMoreData(!0))}},t.prototype.setLastActiveMatchAsSelected=function(){this.lastSelectedIndex&&(this.typeaheadContainer._active=this.typeaheadContainer.matches[this.lastSelectedIndex],this.typeaheadContainer.nextActiveMatch(),this.lastSelectedIndex=void 0)},t.prototype.triggerSearch=function(){if(!this.dataProvider.isLastPage&&this.$element.hasClass("full-screen")){var e=this.dropdownEl,t=e.find("li").last();t.length&&e.length&&e.height()+e.position().top>t.height()+t.position().top&&this.loadMoreData(!0)}},t.prototype.isUpdateOnKeyPress=function(){return"typing"===this.searchon},t.prototype.debounceDefaultQuery=function(e){var t=this;this._defaultQueryInvoked=!0,this.getDataSource(e,!0).then((function(e){e.length?(t.queryModel=e,t._lastQuery=t.query=t.queryModel[0].label||"",t._modelByValue=t.queryModel[0].value,t._modelByKey=t.queryModel[0].key,t.showClosebtn=""!==t.query):(t._modelByValue=void 0,t.queryModel=void 0,t.query=""),t.clearData&&_.get(t.typeahead,"_typeahead.isShown")&&t.typeahead.hide()}))},t.prototype.updateByDatavalue=function(e){this.updateByDataset(e),this.updateByDataSource(e)},t.prototype.updateByDataSource=function(e){if(l.isDefined(e)&&!_.isObject(e)&&this.datasource&&!l.isDefined(this._modelByKey)&&this.datafield!==a.ALLFIELDS){if(l.isDefined(this.queryModel)&&!_.isEmpty(this.queryModel))return void this.updateDatavalueFromQueryModel();!this._defaultQueryInvoked&&this.datasource.execute(l.DataSource.Operation.SUPPORTS_CRUD)&&this.debounceDefaultQuery(e)}},t.prototype.updateDatavalueFromQueryModel=function(){l.isDefined(this.queryModel)&&(this._modelByValue=_.isArray(this.queryModel)?this.queryModel[0].value:this.queryModel,this._modelByKey=_.isArray(this.queryModel)?this.queryModel[0].key:this.queryModel,this.toBeProcessedDatavalue=void 0)},t.prototype.updateByDataset=function(e){if(!this._defaultQueryInvoked||!this.searchkey){var t=_.find(this.datasetItems,(function(t){return _.isObject(t.value)?_.isEqual(t.value,e):_.toString(t.value).toLowerCase()===_.toString(e).toLowerCase()}));if(t)this.queryModel=[t];else if(this.datafield===a.ALLFIELDS&&_.isObject(e))this.queryModel=this.getTransformedData(a.extractDataAsArray(e));else if(this.prevDatavalue!==e)return this.queryModel=void 0,void(this.query="");this.updateDatavalueFromQueryModel(),this._lastQuery=this.query=l.isDefined(this.queryModel)&&this.queryModel.length?_.get(this.queryModel[0],"label"):"",this.showClosebtn=""!==this.query}},t.prototype.handleFocus=function(e){"search"===this.type&&this.query===this._lastQuery&&this._lastResult&&this.typeahead.keyUpEventEmitter.emit(this.query)},t.prototype.notifySubscriber=function(){var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:!0,nativeEl:e})},t.prototype.getDataSource=function(e,t,n){var i=this;if(t&&this.datafield===a.ALLFIELDS)return this._loadingItems=!1,Promise.resolve([]);var o={dataset:this.dataset?a.convertDataToObject(this.dataset):void 0,binddataset:this.binddataset,datasource:this.datasource,datafield:this.datafield,hasData:this.dataset&&this.dataset.length,query:e,isLocalFilter:!this.searchkey,searchKey:t?this.datafield:this.searchkey,matchMode:t?"startignorecase":this.matchmode,casesensitive:this.casesensitive,isformfield:this.isformfield,orderby:this.orderby,limit:this.limit,pagesize:this.pagesize,page:this.page,onBeforeservicecall:this.invokeOnBeforeServiceCall.bind(this)};return this.dataoptions&&(o.dataoptions=this.dataoptions,o.viewParent=this.viewParent),this._loadingItems=!0,this.dataProvider.filter(o).then((function(e){e=e.data||e,l.isDefined(i.dataset)&&i.dataset.length||!i.dataProvider.updateDataset||(i.dataset=e),i.dataProvider.hasMoreData?i.formattedDataset=i.formattedDataset.concat(e):i.formattedDataset=e,i.formattedDataset.length>20&&!l.isDefined(i.limit)&&(i.typeahead.typeaheadOptionsLimit=i.formattedDataset.length),i._isOpen&&i.isMobileAutoComplete()&&!_.isUndefined(i.dataProvider.isLastPage)&&!i.dataProvider.isLastPage&&i.triggerSearch();var t=i.getTransformedData(i.formattedDataset,n);return i.result=_.map(t,"value"),t}),(function(e){return i._loadingItems=!1,[]})).then((function(t){return i.isScrolled&&(_.debounce((function(){i.setLastActiveMatchAsSelected()}),30)(),i.isScrolled=!1),t.length||(i._modelByValue=void 0,i.queryModel=e),i._unsubscribeDv&&(t=[]),i._loadingItems=!1,i._lastResult=t,t}))},t.prototype.getContext=function(e){return e&&_.get(e,"widget")?this.getContext(e.viewParent):e},t.prototype.getTransformedData=function(e,t,n){l.isDefined(t)&&t++;var i=a.transformFormData(this.getContext(this.viewParent),e,this.datafield,{displayField:this.displaylabel||this.displayfield,displayExpr:n?"":this.displayexpression,bindDisplayExpr:n?"":this.binddisplaylabel,bindDisplayImgSrc:this.binddisplayimagesrc,displayImgSrc:this.displayimagesrc},t,this);return a.getUniqObjsByDataField(i,this.datafield,this.displayfield||this.displaylabel,l.toBoolean(this.allowempty))},t.prototype.onScroll=function(e,t){var n=e.scrollHeight,i=e.clientHeight;!this._loadingItems&&!this.dataProvider.isLastPage&&e.scrollTop+i>=n&&this.loadMoreData(!0)},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),l.isDefined(this.minchars)||("autocomplete"===this.type?this.minchars=0:this.minchars=1),this.listenQuery=this.isUpdateOnKeyPress(),this.showsearchicon=l.isDefined(this.showsearchicon)?this.showsearchicon:"search"===this.type},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),a.styler(this.nativeElement,this),this.containerTarget=a.getContainerTargetClass(this.nativeElement)},t.prototype.eventData=function(e,t){return e&&(e.data={item:t.dataObject,model:t.value,label:t.label,query:this.query}),e},t.prototype.typeaheadOnSelect=function(e,t){var n=e.item;this.queryModel=n,n.selected=!0,this.query=n.label,this.showClosebtn=""!==this.query,t=t||this.$typeaheadEvent,this._modelByKey=n.key,this._modelByValue=n.value,t=this.eventData(t,n),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,t||{}),this.datavalue!==this.prevDatavalue&&this.updateBoundVariable(this.datavalue),this.$element.hasClass("full-screen")&&this.closeSearch(),this.invokeEventCallback("select",{$event:t,selectedValue:this.datavalue}),this.invokeEventCallback("submit",{$event:t}),this.updatePrevDatavalue(this.datavalue)},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("autocomplete"===this.type&&"displaylabel"===t&&this.displaylabel&&(!this.displayexpression||this.displayexpression&&!this.datasource)&&(this.displayexpression=this.displaylabel,this.displaylabel=void 0),"displaylabel"===t&&this.dataoptions&&null===this.binddisplaylabel&&(this.query=_.get(this._modelByValue,n)||this._modelByValue),"disabled"===t&&(!1===n?this.clearData=!1:(this.clearData=!0,_.get(this.typeahead,"_typeahead.isShown")&&this.typeahead.hide())),e.prototype.onPropertyChange.call(this,t,n,i))},t}(c.DatasetAwareFormComponent);b.initializeProps=m(),b.decorators=[{type:t.Component,args:[{selector:"[wmSearch]",template:'<ng-template #customItemTemplate let-model="item" let-index="index" let-query="query" let-match="match">\n \x3c!-- Default item template --\x3e\n <a *ngIf="!content">\n <img *ngIf="model.imgSrc" [src]="model.imgSrc" alt="Search" [style.width]="imagewidth">\n <span [title]="model.label" [innerHtml]="highlight(match, query) || model.label"></span>\n </a>\n \x3c!-- Custom partial template --\x3e\n <a *ngIf="content" [ngClass]="{customTemplate: content}" partialContainer [wmItemTemplate]="content" [userComponentParams]="match.item">\n <div partial-container-target></div>\n </a>\n</ng-template>\n\n<ng-template #customListTemplate let-matches="matches" let-itemTemplate="itemTemplate" let-query="query">\n <ul #ulElement class="app-search dropdown-menu" scrollable>\n <li #liElements *ngFor="let match of matches" [ngClass]="{active: typeaheadContainer && typeaheadContainer.isActive(match), \'list-group-header\': match && match.isHeader()}"\n (mouseenter)="typeaheadContainer.selectActive(match);"\n (click)="match && !match.isHeader() && typeaheadContainer.selectMatch(match, $event); $typeaheadEvent = $event; notifySubscriber();">\n \x3c!-- itemTemplate comes from the <input> --\x3e\n <h4 *ngIf="match.isHeader()" class="group-title">{{match.value}}</h4>\n <ng-container *ngIf="!match.isHeader()" [ngTemplateOutlet]="itemTemplate"\n [ngTemplateOutletContext]="{item: match.item, index: i, match: match, query: query}">\n </ng-container>\n </li>\n <div class="status" [hidden]="_loadingItems || !(datacompletemsg && dataProvider.isLastPage)">\n <span [textContent]="datacompletemsg"></span>\n </div>\n <div class="status" [hidden]="!_loadingItems">\n <i class="fa fa-circle-o-notch fa-spin"></i>\n <span [textContent]="loadingdatamsg"></span>\n </div>\n </ul>\n</ng-template>\n\n\x3c!--This template is for search inside mobile navbar.--\x3e\n<ng-container *ngIf="navsearchbar; else searchTemplate">\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n container="body"\n [disabled]="disabled"\n autocomplete="off"\n [(ngModel)]="query"\n [readonly]="readonly"\n [disabled]="disabled"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event)"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event);"\n (focusout)="onFocusOut()"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [adaptivePosition]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [dropup]="dropup"\n [tabindex]="tabindex"\n [attr.name]="name"\n [attr.aria-label]="hint || \'Search field\'"/>\n <i class="btn-close wi wi-cancel" [hidden]="!showClosebtn" (click)="clearSearch($event);"></i>\n</ng-container>\n\x3c!--This template is for both web and fullscreen mode in mobile.--\x3e\n<ng-template #searchTemplate>\n <span class="wi wi-arrow-left form-control-feedback back-btn" aria-hidden="true" (click)="closeSearch()"></span>\n <span class="sr-only">Back button</span>\n <input [title]="query || \'\'" type="text" class="app-textbox form-control list-of-objs app-search-input" [placeholder]="placeholder || \'\'"\n focus-target\n [container]="containerTarget || \'body\'"\n [disabled]="disabled"\n autocomplete="off"\n [(ngModel)]="query"\n [readonly]="readonly"\n [typeahead]="typeaheadDataSource"\n [typeaheadWaitMs]="debouncetime"\n [typeaheadItemTemplate]="customItemTemplate"\n [optionsListTemplate]="customListTemplate"\n (input)="onInputChange($event)"\n (keydown)="listenQuery = true"\n (keydown.enter)="$typeaheadEvent = $event;handleEnterEvent($event)"\n (keydown.arrowdown)="selectNext($event)"\n (blur)="invokeOnTouched($event); onFocusOut()"\n (click)="handleFocus($event);"\n (focus)="_unsubscribeDv = false; listenQuery = true; handleFocus($event); invokeOnFocus($event)"\n [typeaheadMinLength]="minchars"\n [typeaheadOptionsLimit]="limit"\n (typeaheadLoading)="_loadingItems"\n (typeaheadOnSelect)="typeaheadOnSelect($event)"\n typeaheadOptionField="label"\n [typeaheadGroupField]="groupby ? \'groupby\' : null"\n [typeaheadAsync]="true"\n [typeaheadScrollable]="true"\n [adaptivePosition]="true"\n [typeaheadOptionsInScrollableView]="optionslimitinscrollableview"\n [tabindex]="tabindex"\n [dropup]="dropup"\n [attr.name]="name"\n [attr.aria-label]="hint || \'Search field\'">\n <input class="model-holder" ng-model="proxyModel" ng-required="required" tabindex="-1" aria-hidden="true">\n <span *ngIf="_loadingItems" aria-hidden="true" class="fa fa-circle-o-notch fa-spin form-control-feedback"></span>\n <span class="wi wi-close form-control-feedback clear-btn" [ngClass]="{\'show-btn\': isQueryEntered()}" (click)="clearSearch($event, true)"></span>\n <span class="sr-only">Clear button</span>\n <span *ngIf="showsearchicon" class="input-group-addon" aria-label="search icon" [ngClass]="{\'disabled\': disabled}">\n <form>\n <button title="Search" [disabled]="disabled" class="app-search-button wm-sl-l sl-search" type="submit"\n (click)="onSearchSelect($event)"></button>\n </form>\n </span>\n</ng-template>\n',providers:[a.provideAs(b,i.NG_VALUE_ACCESSOR,!0),a.provideAs(b,i.NG_VALIDATORS,!0),a.provideAsWidgetRef(b)]}]}],b.ctorParameters=function(){return[{type:t.Injector},{type:l.App},{type:void 0,decorators:[{type:t.Attribute,args:["datavalue.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]}]},b.propDecorators={typeahead:[{type:t.ViewChild,args:[o.TypeaheadDirective]}],ulElement:[{type:t.ViewChild,args:["ulElement"]}],liElements:[{type:t.ViewChildren,args:["liElements"]}]};var w=function(){function e(e,n){this.searchRef=n,this.elementRef=e.get(t.ElementRef)}return e.prototype.ngAfterContentInit=function(){this.elementRef.nativeElement.addEventListener("scroll",this.notifyParent.bind(this)),this.searchRef.dropdownEl=$(this.elementRef.nativeElement),this.searchRef.onDropdownOpen()},e.prototype.ngAfterViewInit=function(){if(!this.searchRef.isMobileAutoComplete()){var e=this.searchRef.$element.find("input").first();this.searchRef.dropdownEl.width(e.outerWidth())}},e.prototype.notifyParent=function(e){this.searchRef.onScroll(this.elementRef.nativeElement,e)},e}();w.decorators=[{type:t.Directive,args:[{selector:"[scrollable]"}]}],w.ctorParameters=function(){return[{type:t.Injector},{type:b}]};var P=[b,w],O=function(){};O.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.FormsModule,o.TypeaheadModule,a.WmComponentsModule],declarations:u([],d(P)),exports:u([],d(P)),entryComponents:[]}]}],e.ScrollableDirective=w,e.SearchComponent=b,e.SearchModule=O,e["\u0275a"]=m,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/basic/tree",["exports","@angular/core","@angular/common","@wm/components/base","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.basic=e.wm.components.basic||{},e.wm.components.basic.tree={}),e.ng.core,e.ng.common,e.wm.components.base,e.wm.core)}(this,(function(e,t,n,i,o){"use strict";
|
|
114
114
|
/*! *****************************************************************************
|
|
115
115
|
Copyright (c) Microsoft Corporation.
|
|
116
116
|
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
195
195
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
196
196
|
PERFORMANCE OF THIS SOFTWARE.
|
|
197
|
-
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function f(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var g=function(){function e(e,n){this.inj=e,this.bsModalService=n,this.isDateOpen=!0,this.isTimeOpen=!1,this.mode="DATE_TIME",this.placement="MODAL",this.change=new t.EventEmitter,this._value=new Date,this.changedValue=null,this.appLocale=e.get(c.App).appLocale||{}}return Object.defineProperty(e.prototype,"value",{set:function(e){e=e||new Date,this._value=e,this.changedValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bsDatepickerConfig",{get:function(){return this._bsDatepickerConfig},set:function(e){this._bsDatepickerConfig=e,this._bsDatepickerConfig.showClearButton=!1,this._bsDatepickerConfig.showTodayButton=!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excludedDaysToDisable",{set:function(e){this._bsDatepickerConfig.daysDisabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){if(this._displayFormat)return this._displayFormat},set:function(e){e&&(this._displayFormat=e.replace(/y/g,"Y").replace(/d/g,"D").replace("a","A"))},enumerable:!1,configurable:!0}),e.prototype.validateSelectedDate=function(){var e,t,n,i,o;if(!this.changedValue)return!0;var a=moment(this.changedValue),r=null===(e=this._bsDatepickerConfig)||void 0===e?void 0:e.minDate,s=null===(t=this._bsDatepickerConfig)||void 0===t?void 0:t.maxDate;if(r&&("DATE"===this.mode&&moment(r).startOf("day").toDate()>this.changedValue||"DATE"!==this.mode&&r>this.changedValue))return!1;if(s&&("DATE"===this.mode&&moment(s).endOf("day").toDate()<this.changedValue||"DATE"!==this.mode&&s<this.changedValue))return!1;if((null===(i=null===(n=this._bsDatepickerConfig)||void 0===n?void 0:n.daysDisabled)||void 0===i?void 0:i.indexOf(a.day()))>=0)return!1;var l=a.startOf("day").toDate().getTime();return!(null===(o=this.excludedDatesToDisable)||void 0===o?void 0:o.find((function(e){return e.getTime()===l})))},e.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("body>modal-container .date-picker-modal span:contains("+e+")").not(".is-other-month,.current-date"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},e.prototype.hideOnClick=function(){var e=this;$("body>modal-container .date-picker-modal .app-datetime-picker").click((function(e){return e.stopPropagation()})),$("body>modal-container .date-picker-modal").click((function(){return e.onCancelClick()}))},e.prototype.getDateLabel=function(){return moment(this.changedValue).format(this.displayFormat)},e.prototype.openDatePicker=function(){this.isTimeOpen=!1,this.isDateOpen=!0},e.prototype.openTimePicker=function(){this.isTimeOpen=!0,this.isDateOpen=!1},e.prototype.onDateUpdate=function(e){var t=this.changedValue;"DATE"===this.mode?(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)):t&&e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds())),this.changedValue=e,"DATE"===this.mode&&t!==e&&this.validateSelectedDate()&&this.onOkClick()},e.prototype.onTimeUpdate=function(e){this.changedValue=e},e.prototype.show=function(){var e=this;this.reset(),this.modalRef=this.bsModalService.show(this.datetimepickerTemplate,{animated:!0,backdrop:"static",class:"date-picker-modal modal-dialog-centered"}),setTimeout((function(){e.hideOnClick()}),500)},e.prototype.clear=function(){this.changedValue=null,this.triggerChange(),this.hideModal()},e.prototype.setToday=function(){var e=moment().startOf("day").toDate();this.onDateUpdate(e)},e.prototype.reset=function(){this.changedValue=this._value},e.prototype.hideModal=function(){var e;(null===(e=this.modalRef)||void 0===e?void 0:e.id)&&this.bsModalService.hide(this.modalRef.id)},e.prototype.onCancelClick=function(){this.changedValue=this._value,this.hideModal()},e.prototype.onOkClick=function(){this.validateSelectedDate()&&this.triggerChange(),this.hideModal()},e.prototype.triggerChange=function(){this.value!==this.changedValue&&this.change.emit(this.changedValue)},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnDestroy=function(){this.hideModal()},e}();g.decorators=[{type:t.Component,args:[{selector:"wm-datetimepicker",template:'\n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n\n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '}]}],g.ctorParameters=function(){return[{type:t.Injector},{type:d.BsModalService}]},g.propDecorators={datetimepickerTemplate:[{type:t.ViewChild,args:["datetimepickerTemplate",{static:!0}]}],mode:[{type:t.Input}],placement:[{type:t.Input}],_bsDatepickerConfig:[{type:t.Input,args:["config"]}],minTime:[{type:t.Input}],maxTime:[{type:t.Input}],_displayFormat:[{type:t.Input}],change:[{type:t.Output}],excludedDatesToDisable:[{type:t.Input}],value:[{type:t.Input}],bsDatepickerConfig:[{type:t.Input,args:["config"]}],excludedDaysToDisable:[{type:t.Input}],displayFormat:[{type:t.Input}]};var v=function(){function e(e){this.inj=e,this.options={hour:[],minute:[],second:[],meridian:["AM","PM"]},this.value=new Date,this.min=null,this.max=null,this.change=new t.EventEmitter,this.options.hour=this.populateNumbers(0,23),this.options.minute=this.populateNumbers(0,59),this.options.second=this.populateNumbers(0,59)}return e.prototype.populateNumbers=function(e,t){for(var n=[],i=e;i<=t;i++)n.push({label:(i<10?"0":"")+i,value:i});return n},e.prototype.set=function(e,t){e.index;var n=e.value;"HOUR"===t?this.value=moment(this.value).hour(parseInt(n)).toDate():"MINUTE"===t?this.value=moment(this.value).minute(parseInt(n)).toDate():"SECOND"===t?this.value=moment(this.value).second(parseInt(n)).toDate():"MERIDIAN"===t&&(this.value=moment(this.value).minute(n).toDate()),this.min&&this.value<this.min&&(this.value=this.min),this.max&&this.value>this.max&&(this.value=this.max),this.change.emit(this.value)},Object.defineProperty(e.prototype,"hour",{get:function(){return moment(this.value).hour()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minute",{get:function(){return moment(this.value).minute()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"second",{get:function(){return moment(this.value).second()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"meridian",{get:function(){return"AM"},enumerable:!1,configurable:!0}),e.prototype.onDateUpdate=function(e){},e.prototype.ngAfterViewInit=function(){},e}();v.decorators=[{type:t.Component,args:[{selector:"wm-timepicker",template:'\n <wm-pickergroup>\n <wm-picker\n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n '}]}],v.ctorParameters=function(){return[{type:t.Injector}]},v.propDecorators={value:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],change:[{type:t.Output}]};var y="CURRENT_DATE",b=["January","February","March","April","May","June","July","August","September","October","November","December"],w="default",P="default";function O(e){return Object.assign(new r.TimepickerConfig,{meridians:n.getLocaleDayPeriods(e.getSelectedLocale(),n.FormStyle.Format,n.TranslationWidth.Abbreviated)})}var E=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.isReadOnly=!1,a.clicked=!1,a.formatsByLocale={timezone:""},a._dateOptions=new o.BsDatepickerConfig,a.i18nService=a.inj.get(c.AbstractI18nService),a.invokeEventCallback("beforeload"),a.datePipe=a.inj.get(s.ToDatePipe),a.selectedLocale=a.i18nService.getSelectedLocale(),a._dateOptions.todayPosition="left",a._dateOptions.clearPosition="right",a.meridians=n.getLocaleDayPeriods(a.selectedLocale,n.FormStyle.Format,n.TranslationWidth.Abbreviated),a.loadNativeDateInput=c.isMobile()&&!a.showcustompicker,a.cancelLocaleChangeSubscription=a.getAppInstance().subscribe("locale-changed",(function(e){a.datePipe.datePipe.locale=e.angular,a._dateOptions.todayButtonLabel=a.i18nService.getLocalizedMessage("LABEL_TODAY_DATE"),a._dateOptions.clearButtonLabel=a.i18nService.getLocalizedMessage("LABEL_CLEAR_DATE")})),a}return h(t,e),Object.defineProperty(t.prototype,"timeZone",{get:function(){return this.inj.get(c.AbstractI18nService).getTimezone(this)},enumerable:!1,configurable:!0}),t.prototype.isDropDownDisplayEnabledOnInput=function(e){return e===w},t.prototype.isDataEntryModeEnabledOnInput=function(e){return e===P},t.prototype.showValidation=function(e,t,n,i){if(n)return console.warn("min max date validation failed ",i),$(e.target).val(t)},t.prototype.resetDisplayInput=function(){$(this.nativeElement).find(".display-input").val("")},t.prototype.validate=function(e){return this.invalidDateTimeFormat?{invalidDateTimeFormat:{valid:!1}}:!_.isUndefined(this.dateNotInRange)&&this.dateNotInRange?{dateNotInRange:{valid:!1}}:!_.isUndefined(this.timeNotInRange)&&this.timeNotInRange?{timeNotInRange:{valid:!1}}:this.show&&this.required?e.value?null:{required:!0}:(this.validateType="",null)},t.prototype.formatValidation=function(e,t,n){var i=this.datepattern||this.timepattern,o=this.timeZone,a=c.getFormattedDate(this.datePipe,e,i,o,null,null,this);if(t=t.trim())if("timestamp"===i){if(!_.isNaN(t)&&_.parseInt(t)!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1}else if(n&&(t=c.getFormattedDate(this.datePipe,t,i,o)),t!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1;return!0},t.prototype.minDateMaxDateValidationOnInput=function(e,t,n,i){var o=this;if(e){var a=e;e=moment(e).startOf("day").toDate();var r=moment(c.getDateObj(this.mindate)).startOf("day").toDate(),s=moment(c.getDateObj(this.maxdate)).startOf("day").toDate();if(this.mindate&&e<r){var l=this.appLocale.LABEL_MINDATE_VALIDATION_MESSAGE+" "+this.mindate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,r,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="mindate",this.showValidation(t,n,i,l))}if(this.maxdate&&e>s){l=this.appLocale.LABEL_MAXDATE_VALIDATION_MESSAGE+" "+this.maxdate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,s,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="maxdate",this.showValidation(t,n,i,l))}if(this.excludedates){if((c.isString(this.excludedates)?_.split(this.excludedates,","):this.excludedates).map((function(e){return c.getFormattedDate(o.datePipe,e,o.datepattern,o.timeZone,null,null,o)})).indexOf(c.getFormattedDate(this.datePipe,a,this.datepattern,this.timeZone,null,null,this))>-1)return this.dateNotInRange=!0,this.validateType="excludedates",void this.invokeOnChange(this.datavalue,void 0,!1)}if(this.excludedays){var p=_.split(this.excludedays,","),d=_.get(a,"getDay")?a.getDay():a;if(p.indexOf(d.toString())>-1)return this.dateNotInRange=!0,this.validateType="excludedays",void this.invokeOnChange(this.datavalue,void 0,!1)}}i||(this.dateNotInRange=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("span:contains("+e+")").not(".is-other-month"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},t.prototype.isOtheryear=function(e){return 0===e.getMonth()&&11===this.activeDate.getMonth()||11===e.getMonth()&&0===this.activeDate.getMonth()},t.prototype.setActiveDateFocus=function(e,t){var n=this;this.setNextData(e);var i=this.activeDate.getMonth();t||(e.getMonth()<i?this.isOtheryear(e)?this.goToOtherMonthOryear("next","days"):this.goToOtherMonthOryear("previous","days"):e.getMonth()>i&&(this.isOtheryear(e)?this.goToOtherMonthOryear("previous","days"):this.goToOtherMonthOryear("next","days"))),setTimeout((function(){var t=e.getDate().toString();_.filter($("span:contains("+t+")").not(".is-other-month"),(function(i){$(i).text()===t&&($(i).hasClass("selected")&&$(i).parent().attr("aria-selected","true"),$(i).attr("aria-label",moment(e).format("dddd, MMMM Do YYYY")),$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","-1"),$(i).attr("tabindex","0"),$(i).focus(),n.activeDate=e)})),e.getMonth()===(new Date).getMonth()&&e.getFullYear()===(new Date).getFullYear()&&n.hightlightToday()}))},t.prototype.goToOtherMonthOryear=function(e,t){var n=$(".bs-datepicker-head ."+e);n.attr("disabled")||(n.trigger("click"),"days"===t?this.loadDays():"month"===t?this.loadMonths():"year"===t&&this.loadYears())},t.prototype.getMonth=function(e,t){var n=new Date(e),i=n.getMonth(),o=n.getFullYear(),a=new Date(o,i+=t),r=a.toLocaleString("en-US",{month:"long"});return{date:a,fullMonth:r}},t.prototype.addDatepickerMouseEvents=function(){var e=this,t=$(".bs-datepicker-head");t.find(".previous").click((function(t){e.next=e.getMonth(e.activeDate,0),e.prev=e.getMonth(e.activeDate,-2),e.clicked=!0,t.originalEvent&&e.setFocusForDate(-1);var n=e.getMonth(e.activeDate,-1);$(".bs-datepicker-head .previous").prepend('<p aria-hidden="false" class="sr-only">Changed to Previous Month, '+n.fullMonth+" and year "+n.date.getFullYear()+"</p>"),setTimeout((function(){$(".bs-datepicker-head .previous").focus()}))})),t.find(".next").click((function(t){e.next=e.getMonth(e.activeDate,2),e.prev=e.getMonth(e.activeDate,0),e.clicked=!0,t.originalEvent&&e.setFocusForDate(1);var n=e.getMonth(e.activeDate,1);$(".bs-datepicker-head .next").prepend('<p aria-hidden="false" class="sr-only">Changed to Next Month, '+n.fullMonth+" and year "+n.date.getFullYear()+"</p>"),setTimeout((function(){$(".bs-datepicker-head .next").focus()}))})),t.find(".current").click((function(t){t.originalEvent&&e.setFocusForCurrentMonthOryear()})),$(".bs-datepicker-body, .bs-datepicker-action-buttons").click((function(t){t.stopPropagation(),t.originalEvent&&e.setFocusForMonthOrDay()})),this.clicked||(t.find(".next").attr("aria-label","Next Month, "+this.next.fullMonth+" "+this.next.date.getFullYear()),t.find(".previous").attr("aria-label","Previous Month, "+this.prev.fullMonth+" "+this.prev.date.getFullYear()))},t.prototype.setFocusForMonthOrDay=function(){var e=$(".bs-datepicker-head .current").first().text(),t=$(".bs-datepicker-body");if(t.find("table.months").length>0){_.parseInt(e)!==this.activeDate.getFullYear()&&this.loadMonths();var n=new Date(_.parseInt(e),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.days").length>0){var i=b.indexOf(e);i!==this.activeDate.getMonth()&&this.loadDays();n=new Date(this.activeDate.getFullYear(),i,1);this.setActiveDateFocus(n,!0)}},t.prototype.setFocusForCurrentMonthOryear=function(){var e=$(".bs-datepicker-body");e.find("table.months").length>0?(this.loadMonths(),this.setActiveMonthFocus(this.activeDate,!0)):e.find("table.years").length>0&&(this.loadYears(),this.setActiveYearFocus(this.activeDate,!0))},t.prototype.setFocusForDate=function(e){var t=$(".bs-datepicker-body");if(t.find("table.months").length>0){this.loadMonths();var n=new Date(this.activeDate.getFullYear()+e,0,this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.years").length>0){this.loadYears();var i=t.find("table.years span").first().text();n=new Date(_.parseInt(i),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveYearFocus(n,!0)}else if(t.find("table.days").length>0){this.loadDays();n=new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+e,1);this.setActiveDateFocus(n,!0)}},t.prototype.addDatepickerKeyboardEvents=function(e,t){var n=this;this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e;var i=document.querySelector("."+e.dateContainerCls);c.setAttr(i,"tabindex","0"),i.onkeydown=function(e){if("escape"===n.keyEventPluginInstance.getEventFullKey(e)){n.elementScope.hideDatepickerDropdown();var t=n.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return t.focus()}))}},this.loadDays(),this.setActiveDateFocus(this.activeDate)},t.prototype.setNextData=function(e){this.next=this.getMonth(e,1),this.prev=this.getMonth(e,-1)},t.prototype.loadDays=function(){var e=this;setTimeout((function(){$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","0"),e.addKeyBoardEventsForDays(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForDays=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"days").toDate(),e.setActiveDateFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"days").toDate(),e.setActiveDateFocus(n);else if("pageup"===i)t.preventDefault(),n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveDateFocus(n);else if("pagedown"===i)t.preventDefault(),n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveDateFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate);else if("enter"===i){if($(document.activeElement).hasClass("disabled"))return;$(document.activeElement).click(),e.elementScope.hideDatepickerDropdown();var o=e.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return o.focus()}))}})),this.focusBlurDatePickerHeadButtons()},t.prototype.focusBlurDatePickerHeadButtons=function(){var e=$(".bs-datepicker-head button");e.on("focus",(function(){$(this).css("background-color","#9AA0A3")})),e.on("blur",(function(){$(this).css("background-color","")}))},t.prototype.loadMonths=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForMonths(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForMonths=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveMonthFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadYears(),e.setActiveYearFocus(e.activeDate);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadDays();var o=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth(),1);e.setActiveDateFocus(o)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.loadYears=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForYears(),e.addDatepickerMouseEvents()}))},t.prototype.setActiveMonthFocus=function(e,t){var n=this;this.setNextData(e);var i=b[e.getMonth()];t||(e.getFullYear()<this.activeDate.getFullYear()?this.goToOtherMonthOryear("previous","month"):e.getFullYear()>this.activeDate.getFullYear()&&this.goToOtherMonthOryear("next","month")),setTimeout((function(){$(".bs-datepicker-body table.months span").attr("tabindex","-1"),$(".bs-datepicker-body table.months span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.months span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.addKeyBoardEventsForYears=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"year").toDate(),e.setActiveYearFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"year").toDate(),e.setActiveYearFocus(n);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.setActiveYearFocus=function(e,t){var n=this,i=e.getFullYear(),o=$(".bs-datepicker-body table.years span"),a=o.first().text(),r=o.last().text();t||(e.getFullYear()<_.parseInt(a)?this.goToOtherMonthOryear("previous","year"):e.getFullYear()>_.parseInt(r)&&this.goToOtherMonthOryear("next","year")),setTimeout((function(){$(".bs-datepicker-body table.years span").attr("tabindex","-1"),$(".bs-datepicker-body table.years span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.years span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.focusTimePickerPopover=function(e){this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e,this.elementScope.ngZone.runOutsideAngular((function(){setTimeout((function(){$("timepicker .form-group").first().find("> input.form-control").focus()}))}))},t.prototype.bindTimePickerKeyboardEvents=function(){var e=this;setTimeout((function(){var t=$("body").find("> bs-dropdown-container timepicker");t.attr("tabindex",0),e.addEventsOnTimePicker(t)}))},t.prototype.focusOnInputEl=function(){var e=this;$(this.nativeElement).closest(".caption-floating").length>0&&setTimeout((function(){$(e.nativeElement).find(".app-textbox").focus()}),100)},t.prototype.isValidDate=function(e){return e&&e instanceof Date&&!isNaN(e.getTime())},t.prototype.timeFormatValidation=function(){var e=$(this.nativeElement).find("input").val(),t=c.getNativeDateObject(e,{meridians:this.meridians,pattern:this.datepattern});this.formatValidation(t,e)&&(this.invalidDateTimeFormat=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.updateTimeValue=function(e,t){var n=this;e.length<2?setTimeout((function(){"minutes"===t?n.bsTimePicker.updateMinutes("00"):n.bsTimePicker.updateSeconds("00")}),500):"minutes"===t?this.bsTimePicker.updateMinutes("00"):this.bsTimePicker.updateSeconds("00")},t.prototype.addEventsOnTimePicker=function(e){var t=this,n=e.find(".bs-timepicker-field");n.first().on("keyup",(function(e){var i=e.target.value;_.forEach(n,(function(n,o){if(e.target!==n&&""===n.value&&i.length){var a=1===o?"minutes":"seconds";t.updateTimeValue(i,a)}}))})),this.removeKeyupListener=function(){n.first().off("keyup")},e.on("keydown",(function(e){var n,i,o=$(e.target),a=o.parent(),r=t.elementScope,s=t.keyEventPluginInstance.getEventFullKey(e);if("escape"===s&&r.hideTimepickerDropdown(),o.hasClass("bs-timepicker-field")){if(a.is(":first-child")?"shift.tab"!==s&&"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):a.is(":last-child")||a.next().next().find("button.disabled").length?"tab"!==s&&"escape"!==s&&"enter"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0),n&&e.stopPropagation(),i&&e.preventDefault(),r.mintime&&r.maxtime&&!t.isValidDate(r.bsTimeValue)&&("arrowdown"===s?r.bsTimeValue=r.maxTime:"arrowup"===s&&(r.bsTimeValue=r.minTime)),"tab"===s){t.invalidDateTimeFormat=!1,t.invokeOnChange(t.datavalue,void 0,!1);var l=t.datepattern||t.timepattern;c.getFormattedDate(r.datePipe,r.bsTimeValue,l,t.timeZone,null,null,t)===r.displayValue&&$(t.nativeElement).find(".display-input").val(r.displayValue)}"arrowdown"!==s&&"arrowup"!==s||t.timeFormatValidation()}else o.hasClass("btn-default")&&("tab"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus()))})),e.find("a").on("click",(function(e){var n=t.elementScope,i=$(e.target);n.mintime&&n.maxtime&&!t.isValidDate(n.bsTimeValue)&&(i.find("span").hasClass("bs-chevron-down")?n.bsTimeValue=n.maxTime:i.find("span").hasClass("bs-chevron-up")&&(n.bsTimeValue=n.minTime)),t.timeFormatValidation()}))},t.prototype.updateFormat=function(e){"datepattern"===e?(this._dateOptions.dateInputFormat=this.datepattern,this.showseconds=_.includes(this.datepattern,"s"),this.ismeridian=_.includes(this.datepattern,"h")):"timepattern"===e&&(this.showseconds=_.includes(this.timepattern,"s"),this.ismeridian=_.includes(this.timepattern,"h"))},t.prototype.getMobileInput=function(){return this.nativeElement.querySelector(".mobile-input")},t.prototype.onDateTimeInputBlur=function(){var e=this.getMobileInput();if(e&&!c.hasCordova()){for(var t=this.nativeElement.children,n=0;n<t.length;n++)t[n].classList.remove("add-opacity");e.classList.remove("remove-opacity")}},t.prototype.onDateTimeInputFocus=function(e){if(void 0===e&&(e=!1),this.loadNativeDateInput){var t=this.getMobileInput();if(!e||c.hasCordova())t&&this._triggeredByUser&&(t.focus(),t.click());else{for(var n=this.nativeElement.children,i=0;i<n.length;i++)n[i].classList.add("add-opacity");t.classList.add("remove-opacity")}}},t.prototype.getCordovaPluginDatePickerApi=function(){if(c.isIos())return _.get(window,"cordova.wavemaker.datePicker.selectDate")},t.prototype.showDatePickerModal=function(){this.datetimepickerComponent.show()},t.prototype.blurDateInput=function(e){var t=this.nativeElement.querySelector(".display-input");e&&setTimeout((function(){return t.blur()}))},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"datepattern"===t?this.updateFormat(t):"showweeks"===t?this._dateOptions.showWeekNumbers=n:"mindate"===t?(this._dateOptions.minDate=n===y?this.mindate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"maxdate"===t?(this._dateOptions.maxDate=n===y?this.maxdate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"excludedates"===t||"excludedays"===t?(this.excludedays&&(this.excludedDaysToDisable=_.split(this.excludedays,",").map((function(e){return+e}))),this.excludedates&&(this.excludedDatesToDisable=this.excludedates,c.isString(this.excludedates)&&(this.excludedDatesToDisable=_.split(this.excludedates,",")),this.excludedDatesToDisable=this.excludedDatesToDisable.map((function(e){return c.getDateObj(e)}))),this.minDateMaxDateValidationOnInput(this.datavalue)):"selectfromothermonth"===t?this._dateOptions.selectFromOtherMonth=n:"todaybutton"===t?this._dateOptions.showTodayButton=n:"clearbutton"===t?this._dateOptions.showClearButton=n:"todaybuttonlabel"===t?this._dateOptions.todayButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"clearbuttonlabel"===t?this._dateOptions.clearButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"showcustompicker"===t?this.loadNativeDateInput=c.isMobile()&&!this.showcustompicker:"adaptiveposition"===t?this._dateOptions.adaptivePosition=n:e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),this.containerTarget=s.getContainerTargetClass(this.nativeElement),this.isReadOnly="undefined"!=this.dataentrymode&&!this.isDataEntryModeEnabledOnInput(this.dataentrymode);var t=this.getMobileInput();t&&setTimeout((function(){t.style.width="100%",t.style.height="100%"}))},t.prototype.ngOnDestroy=function(){this.dateOnShowSubscription&&this.dateOnShowSubscription.unsubscribe(),this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription(),e.prototype.ngOnDestroy.call(this)},t.prototype.ngOnDetach=function(){var e;null===(e=this.datetimepickerComponent)||void 0===e||e.hideModal()},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t}(p.BaseFormCustomComponent);E.decorators=[{type:t.Directive}],E.ctorParameters=function(){return[{type:t.Injector},null]},E.propDecorators={bsDropdown:[{type:t.ViewChild,args:[a.BsDropdownDirective]}],bsTimePicker:[{type:t.ViewChild,args:[r.TimepickerComponent]}],datetimepickerComponent:[{type:t.ViewChild,args:[g]}]};var R=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["name",s.PROP_STRING],["outputformat",Object.assign({value:"yyyy-MM-dd"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select Date"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",Object.assign({value:!0},s.PROP_BOOLEAN)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",Object.assign({value:!1},s.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!1},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),A=function(){s.register("wm-date",R),s.registerFormWidget(c.FormWidgetType.DATE,new Map(R))},T={widgetType:"wm-date",hostClass:"app-date input-group"},S=function(e){function t(t,n,i,o){var a=e.call(this,t,T)||this;return a.cdRef=n,a.appDefaults=i,a.isOpen=!1,a.isEnterPressedOnDateInput=!1,s.styler(a.nativeElement,a),a.keyEventPlugin=o[1],a.dateContainerCls="app-date-"+a.widgetId,a._dateOptions.containerClass="app-date "+a.dateContainerCls,a._dateOptions.showWeekNumbers=!1,a._bsDefaultLoadCheck=!0,a.datepattern=a.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),a.updateFormat("datepattern"),a}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsDataValue?this.bsDataValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-dd"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,"yyyy-MM-dd",this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.outputformat,this.timeZone,null,this.isCurrentDate,this)||""},set:function(e){var t=this;"CURRENT_DATE"===e?(setTimeout((function(){t.bsDataValue=t.timeZone?c.getMomentLocaleObject(t.timeZone):new Date}),50),this.isCurrentDate=!0):(this.bsDataValue=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.isCurrentDate=!1),this.invokeOnChange(this.datavalue,void 0,!0),this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.onDisplayDateChange=function(e,t){if(void 0===t&&(t=!1),this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=c.getDateObj(e.target.value,{pattern:this.datepattern,isNativePicker:t});this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||this.setDataValue(n))}},t.prototype.setDataValue=function(e){this.invalidDateTimeFormat=!1,this.minDateMaxDateValidationOnInput(e),c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue),this.bsDataValue=e||void 0,this.invokeOnChange(this.datavalue,{},!0)},t.prototype.onDatePickerOpen=function(){this.isOpen=!0,this.bsDataValue?this.activeDate=this.bsDataValue:this.activeDate=new Date,this.bsDataValue||this.hightlightToday(),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.addDatepickerKeyboardEvents(this,!1),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker),c.adjustContainerRightEdges($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.hideDatepickerDropdown=function(){var e;this.invokeOnTouched(),this.isOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.isEnterPressedOnDateInput=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.blurDateInput(this.isOpen)},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput&&(t||this.onDateTimeInputFocus()),"click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.isOpen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon))if(e.stopPropagation(),"enter"===this.keyEventPlugin.constructor.getEventFullKey(e)){var t=c.getDateObj(e.target.value,{pattern:this.datepattern});e.preventDefault();var n=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this),i=e.target.value.trim();i&&"timestamp"===this.datepattern?_.isNaN(i)||_.parseInt(i)===n||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):i&&i!==n?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=e.target.value?t:""),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown();else this.hideDatepickerDropdown()},t.prototype.onDateChange=function(e){this._bsDefaultLoadCheck?this._bsDefaultLoadCheck=!1:this.setDataValue(e)},t}(E);S.initializeProps=A(),S.decorators=[{type:t.Component,args:[{selector:"[wmDate]",template:' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date\' + displayValue : \'Choose Date\'"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(S,i.NG_VALUE_ACCESSOR,!0),s.provideAs(S,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(S)]}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},S.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var C=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"timestamp"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select date time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",s.PROP_BOOLEAN],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",s.PROP_BOOLEAN],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timestamp",s.PROP_STRING],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!1},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),I=function(){s.register("wm-datetime",C),s.registerFormWidget(c.FormWidgetType.DATETIME,new Map(C)),s.registerFormWidget(c.FormWidgetType.TIMESTAMP,new Map(C))},D={widgetType:"wm-datetime",hostClass:"app-datetime input-group"},x="CURRENT_DATE",N=O,k=function(e){function t(t,n,i,o,a,r){var l=e.call(this,t,D)||this;return l.ngZone=n,l.cdRef=i,l.appDefaults=o,l.isEnterPressedOnDateInput=!1,l.isTimeOpen=!1,l.isDateOpen=!1,l.isCurrentDate=!1,l._debouncedOnChange=_.debounce(l.invokeOnChange,10),l.registerDestroyListener((function(){return l.clearTimeInterval()})),s.styler(l.nativeElement,l),l.app=a,l.keyEventPlugin=r[1],l.dateContainerCls="app-date-"+l.widgetId,l._dateOptions.containerClass="app-date "+l.dateContainerCls,l._dateOptions.showWeekNumbers=!1,l.datepattern=l.appDefaults.dateTimeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATETIME),l.updateFormat("datepattern"),l}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.proxyModel?this.proxyModel.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-ddTHH:mm:ss"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,"yyyy-MM-ddTHH:mm:ss",this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentDate&&!this.proxyModel?x:c.getFormattedDate(this.datePipe,this.proxyModel,this.outputformat,this.timeZone,null,null,this)},set:function(e){e===x?(this.isCurrentDate=!0,this.setTimeInterval()):(this.proxyModel=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.clearTimeInterval(),this.isCurrentDate=!1),this.bsTimeValue=this.bsDateValue=this.proxyModel,this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;e.onModelUpdate(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.toggleTimePicker=function(e,t){this.loadNativeDateInput?this.onDateTimeInputFocus():(this.isTimeOpen=e,t&&"click"===t.type&&this.invokeEventCallback("click",{$event:t}),this.addTimepickerClickListener(this.isTimeOpen))},t.prototype.addTimepickerClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterTimepickeEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.toggleTimePicker(!1)}),0,!0)}),350)}},t.prototype.setIsTimeOpen=function(e){this.isTimeOpen=e},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.toggleTimePicker(!1),this.deregisterTimepickeEventListener&&this.deregisterTimepickeEventListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e})},t.prototype.onTimepickerOpen=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.bsDatePickerDirective.hide(),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu")),c.adjustContainerRightEdges($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.onDatePickerOpen=function(){this.isDateOpen=!this.isDateOpen,this.toggleTimePicker(!1),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.bsDateValue?this.activeDate=this.bsDateValue:this.activeDate=new Date,this.bsDateValue||this.hightlightToday(),this.addDatepickerKeyboardEvents(this,!0),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onModelUpdate=function(e,t){if("date"===t&&(this.invalidDateTimeFormat=!1,c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue)),this.minDateMaxDateValidationOnInput(e),!e)return this.bsDateValue&&this.bsTimePicker&&(""===this.bsTimePicker.hours||""===this.bsTimePicker.minutes||""===this.bsTimePicker.seconds)?this.bsDateValue=this.bsTimeValue=this.proxyModel=moment(this.bsDateValue).startOf("day").toDate():this.bsDateValue=this.bsTimeValue=this.proxyModel=void 0,void((e!==this.datavalue||!this.datavalue&&this.prevDatavalue)&&this._debouncedOnChange(this.datavalue,{},!0));"date"===t&&this.isDateOpen&&this.toggleTimePicker(!0),this.proxyModel=e,this.proxyModel&&(this.bsDateValue=this.bsTimeValue=e),this._debouncedOnChange(this.datavalue,{},!0),this.cdRef.detectChanges();var n=$(".bs-timepicker-field");if(this.timeZone&&"datetimestamp"===this.key&&n.length){var i=c.getFormattedDate(this.datePipe,e,this.getTimePattern(),this.timeZone,this.key,null,this);this.updateTimepickerFields(i,n)}},t.prototype.getTimePattern=function(){var e,t=this.datepattern.toLowerCase().indexOf("h"),n=this.datepattern.toLowerCase().indexOf(":ss");(n>-1||(n=this.datepattern.toLowerCase().indexOf(":mm"))>-1)&&(n+=3);var i=this.datepattern.toLowerCase().indexOf("a");return e=this.datepattern.substr(t,n),i>-1&&(e+=" a"),e},t.prototype.updateTimepickerFields=function(e,t){for(var n,i=$("timepicker button.text-center"),o=e.split(" "),a=o[0].split(":"),r=0;r<t.length;r++)t[r].value=a[r];(null===(n=null==i?void 0:i.html())||void 0===n?void 0:n.trim())!==o[1]&&i.text(o[1])},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation()},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen)))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterDatepickerEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.bsDatePickerDirective.hide()}),0,!0)}),350)}},t.prototype.hideDatepickerDropdown=function(){var e;this.isDateOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.invokeOnTouched(),this.bsDatePickerDirective.hide(),this.bsDateValue&&this.toggleTimePicker(!0),this.isEnterPressedOnDateInput=!1,this.deregisterDatepickerEventListener&&this.deregisterDatepickerEventListener();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t}),this.blurDateInput(this.isDateOpen)},t.prototype.onDateChange=function(e,t){if(this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=e.target.value.trim();n=n?c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput}):void 0,this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||(this.invalidDateTimeFormat=!1,this.onModelUpdate(n)))}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=e.target.value.trim(),n=this.keyEventPlugin.constructor.getEventFullKey(e);if("enter"===n||"arrowdown"===n){t=t?c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians}):void 0,e.preventDefault();var i=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this),o=e.target.value.trim();o&&"timestamp"===this.datepattern?_.isNaN(o)||_.parseInt(o)===i||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):o&&o!==i?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=t),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t}(E);k.initializeProps=I(),k.decorators=[{type:t.Component,args:[{selector:"[wmDateTime]",template:' <div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="hint"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(k,i.NG_VALUE_ACCESSOR,!0),s.provideAs(k,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(k),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:N}]}]}],k.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},k.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var M=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxtime",s.PROP_STRING],["mintime",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"HH:mm:ss"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timepattern",s.PROP_STRING],["timestamp",s.PROP_STRING]]),L=function(){s.register("wm-time",M),s.registerFormWidget(c.FormWidgetType.TIME,new Map(M))},F="CURRENT_TIME",j={widgetType:"wm-time",hostClass:"input-group app-timeinput"},B=O,G=function(e){function t(t,n,i,o,a){var r=e.call(this,t,j)||this;return r.ngZone=n,r.appDefaults=i,r.status={isopen:!1},r.keyEventPlugin=a[1],s.styler(r.nativeElement,r),r.registerDestroyListener((function(){return r.clearTimeInterval()})),r.timepattern=r.appDefaults.timeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.TIME),r.updateFormat("timepattern"),r.app=o,r}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsTimeValue?this.bsTimeValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentTime&&!this.bsTimeValue?F:c.getFormattedDate(this.datePipe,this.bsTimeValue,this.outputformat,this.timeZone,null,null,this)||""},set:function(e){e?e===F?(this.isCurrentTime=!0,this.setTimeInterval()):(this.clearTimeInterval(),this.bsTimeValue=c.getNativeDateObject(e,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.isCurrentTime=!1,this.mintimeMaxtimeValidation()):(this.bsTimeValue=void 0,this.clearTimeInterval(),this.isCurrentTime=!1),this.invokeOnChange(this.datavalue),c.$appDigest()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,this.timepattern,this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,"HH:mm:ss",this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("timepattern"===t&&this.updateFormat("timepattern"),"mintime"===t?(this.minTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):"maxtime"===t?(this.maxTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.setValidateType=function(e,t,n){this.timeNotInRange&&(n<e?this.validateType="mintime":n>t&&(this.validateType="maxtime"))},t.prototype.mintimeMaxtimeValidation=function(){this.timeNotInRange=this.minTime&&this.maxTime&&(this.bsTimeValue<this.minTime||this.bsTimeValue>this.maxTime),this.setValidateType(this.minTime,this.maxTime,this.bsTimeValue),this.invokeOnChange(this.datavalue,void 0,!1)},t.prototype.toggleDropdown=function(e,t){var n=this;void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)||(this.ngZone.run((function(){n.status.isopen=!n.status.isopen})),this.addBodyClickListener(this.status.isopen)))},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t})},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.status.isopen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=this.keyEventPlugin.constructor.getEventFullKey(e);"enter"===t||"arrowdown"===t?(e.preventDefault(),this.toggleDropdown(e)):this.hideTimepickerDropdown()}else this.hideTimepickerDropdown()},t.prototype.onDisplayTimeChange=function(e){var t=c.getNativeDateObject(e.target.value,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});this.formatValidation(t,e.target.value)&&(this.invalidDateTimeFormat=!1,this.onTimeChange(t))},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("bs-timepicker-field")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.onTimeChange=function(e,t){var n,i,o;t&&(e=c.getNativeDateObject(e.target.value,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput})),e?(this.bsTimeValue=e,this.timeNotInRange=this.minTime&&this.maxTime&&(e<this.minTime||e>this.maxTime),this.setValidateType(this.minTime,this.maxTime,e)):(this.bsTimePicker&&this.bsTimePicker.min&&this.bsTimePicker.max&&(o=moment(new Date(this.bsTimePicker.min)).format("A"),moment(new Date(this.bsTimePicker.max)).format("A"),n=this.bsTimePicker.hours+":"+(this.bsTimePicker.minutes||0)+":"+(this.bsTimePicker.seconds||0)+(this.bsTimePicker.showMeridian?" "+o:""),i=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.bsTimePicker.meridian=o,this.timeNotInRange=this.bsTimePicker.min>i||this.bsTimePicker.max<i,this.setValidateType(this.bsTimePicker.min,this.bsTimePicker.max,i)),this.bsTimeValue=i),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,{},!0)},t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;t.setSeconds(t.getSeconds()+1),e.datavalue=F,e.onTimeChange(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.setIsTimeOpen=function(e){this.status.isopen=e},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.status.isopen=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.removeKeyupListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e}),this.blurDateInput(!0)},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.onShown=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.assignModel=function(){this.displayInputElem||(this.displayInputElem=this.getMobileInput()),this.displayInputElem.value=_.get(this,"nativeDisplayValue")},t}(E);G.initializeProps=L(),G.decorators=[{type:t.Component,args:[{selector:"[wmTime]",template:' <div dropdown [isOpen]="status.isopen" (onShown)="onShown()" (onHidden)="hideTimepickerDropdown()" [container]="\'body\'" style="display: inherit">\n <input class="form-control app-textbox display-input" [attr.aria-label]="hint"\n focus-target\n [tabindex]="tabindex"\n [name]="name"\n type="text"\n role="timer"\n [value]="displayValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [autofocus]="autofocus"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-atomic]="isCurrentTime ? \'true\' : \'false\'"\n [required]="required"\n [readOnly]="isReadOnly"\n (click)="toggleDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDisplayTimeChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n <span class="input-group-btn dropdown-toggle">\n <button type="button" class="btn btn-default btn-date" [tabindex]="tabindex" [disabled]="disabled || readonly || isCurrentTime" aria-label="Select time" aria-haspopup="true" aria-expanded="false" (click)="toggleDropdown($event, false)"><i aria-hidden="true" class="app-icon wm-sl-l sl-time"></i></button>\n </span>\n <div *dropdownMenu class="dropdown-menu" (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="isDisabled"\n [(ngModel)]="bsTimeValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds" (ngModelChange)="onTimeChange($event)"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="TIME"\n [minTime]="minTime"\n [maxTime]="maxTime"\n [placement]="modal"\n [displayFormat]="timepattern"\n [value]="bsTimeValue"\n (change)="onTimeChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentTime) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(G,i.NG_VALUE_ACCESSOR,!0),s.provideAs(G,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(G),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:B}]}]}],G.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]};var V=function(){};V.decorators=[{type:t.Component,args:[{selector:"wm-pickergroup",template:'\n <div class="app-picker-group">\n <ng-content></ng-content>\n </div>\n '}]}];var W=function(){function e(e){this.inj=e,this.change=new t.EventEmitter,this._selectedIndex=0,this._options=[],this.noOfEmptyElements=2,this.$el=$(e.get(t.ElementRef).nativeElement)}return Object.defineProperty(e.prototype,"selectedValue",{get:function(){return this._selectedValue},set:function(e){this._selectedValue=e,this.reRender()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e.map((function(e){return{label:e.label,value:void 0!==e.value?e.value:e.label}})),this.reRender()},enumerable:!1,configurable:!0}),e.prototype.reRender=function(){var e,t=this;this._selectedIndex=this.options.findIndex((function(e){return e.value===t.selectedValue})),null===(e=this.pickerAnimator)||void 0===e||e.select(this._selectedIndex+this.noOfEmptyElements)},Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this._selectedIndex=e,this._selectedValue=this.options[e].value,this.change.emit(this.options[e])},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.pickerAnimator=new U(this)},e}();W.decorators=[{type:t.Component,args:[{selector:"wm-picker",template:'\n <div class="app-picker">\n <div class="app-picker-option-container">\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div *ngFor="let option of options; index as i;" class="app-picker-option">\n {{option.label}}\n </div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n </div>\n <div class="app-picker-ruler"></div>\n </div>\n '}]}],W.ctorParameters=function(){return[{type:t.Injector}]},W.propDecorators={change:[{type:t.Output}],selectedValue:[{type:t.Input}],options:[{type:t.Input}]};var U=function(){function e(e){var t=this;this.picker=e;var n=e.selectedIndex+e.noOfEmptyElements,i=function(e){return n+Math.floor(e/16)};this.select(n),this.getElement().swipey({direction:$.fn.swipey.DIRECTIONS.VERTICAL,threshold:10,target:e.$el,onSwipe:function(e,n){t.select(i(-1*n.length))},onSwipeEnd:function(o,a){var r=i(-1*a.length);t.select(r),n=e.selectedIndex+e.noOfEmptyElements}})}return e.prototype.getElement=function(){return this.picker.$el.find(".app-picker-option-container:first")},e.prototype.getOptionElements=function(){return this.getElement().find(".app-picker-option")},e.prototype.select=function(e){var t=this.getOptionElements();if(!(e<this.picker.noOfEmptyElements||e>=t.length-this.picker.noOfEmptyElements)){this.getElement().find(".app-picker-option.app-picker-option-selected").removeClass("app-picker-option-selected"),t.eq(e).addClass("app-picker-option-selected"),this.picker.selectedIndex=e-this.picker.noOfEmptyElements;var n=e-this.picker.noOfEmptyElements,i=e+this.picker.noOfEmptyElements;t.each((function(t,o){if(t>=n&&t<=i){var a=30*(t-e),r=1-.3*Math.abs(t-e);$(o).css({transform:"perspective(500px) rotateX("+a+"deg)",opacity:r}).show()}else $(o).hide()}))}},e}(),q=[S,k,G,g,v,W,V],z=function(){};z.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.BsDatepickerModule,a.BsDropdownModule,i.FormsModule,r.TimepickerModule,s.WmComponentsModule],declarations:f([],m(q)),exports:f([],m(q)),entryComponents:[]}]}],e.DateComponent=S,e.DatetimeComponent=k,e.EpochModule=z,e.TimeComponent=G,e["\u02750"]=N,e["\u0275a"]=O,e["\u0275b"]=E,e["\u0275c"]=g,e["\u0275d"]=v,e["\u0275e"]=A,e["\u0275f"]=I,e["\u0275g"]=L,e["\u0275h"]=V,e["\u0275i"]=W,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("rxjs"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/input/file-upload",["exports","@angular/core","@angular/common","@wm/components/base","rxjs","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.fileupload={}),e.ng.core,e.ng.common,e.wm.components.base,e.rxjs,e.wm.core)}(this,(function(e,t,n,i,o,a){"use strict";
|
|
197
|
+
***************************************************************************** */var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function f(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var g=function(){function e(e,n){this.inj=e,this.bsModalService=n,this.isDateOpen=!0,this.isTimeOpen=!1,this.mode="DATE_TIME",this.placement="MODAL",this.change=new t.EventEmitter,this._value=new Date,this.changedValue=null,this.appLocale=e.get(c.App).appLocale||{}}return Object.defineProperty(e.prototype,"value",{set:function(e){e=e||new Date,this._value=e,this.changedValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bsDatepickerConfig",{get:function(){return this._bsDatepickerConfig},set:function(e){this._bsDatepickerConfig=e,this._bsDatepickerConfig.showClearButton=!1,this._bsDatepickerConfig.showTodayButton=!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excludedDaysToDisable",{set:function(e){this._bsDatepickerConfig.daysDisabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayFormat",{get:function(){if(this._displayFormat)return this._displayFormat},set:function(e){e&&(this._displayFormat=e.replace(/y/g,"Y").replace(/d/g,"D").replace("a","A"))},enumerable:!1,configurable:!0}),e.prototype.validateSelectedDate=function(){var e,t,n,i,o;if(!this.changedValue)return!0;var a=moment(this.changedValue),r=null===(e=this._bsDatepickerConfig)||void 0===e?void 0:e.minDate,s=null===(t=this._bsDatepickerConfig)||void 0===t?void 0:t.maxDate;if(r&&("DATE"===this.mode&&moment(r).startOf("day").toDate()>this.changedValue||"DATE"!==this.mode&&r>this.changedValue))return!1;if(s&&("DATE"===this.mode&&moment(s).endOf("day").toDate()<this.changedValue||"DATE"!==this.mode&&s<this.changedValue))return!1;if((null===(i=null===(n=this._bsDatepickerConfig)||void 0===n?void 0:n.daysDisabled)||void 0===i?void 0:i.indexOf(a.day()))>=0)return!1;var l=a.startOf("day").toDate().getTime();return!(null===(o=this.excludedDatesToDisable)||void 0===o?void 0:o.find((function(e){return e.getTime()===l})))},e.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("body>modal-container .date-picker-modal span:contains("+e+")").not(".is-other-month,.current-date"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},e.prototype.hideOnClick=function(){var e=this;$("body>modal-container .date-picker-modal .app-datetime-picker").click((function(e){return e.stopPropagation()})),$("body>modal-container .date-picker-modal").click((function(){return e.onCancelClick()}))},e.prototype.getDateLabel=function(){return moment(this.changedValue).format(this.displayFormat)},e.prototype.openDatePicker=function(){this.isTimeOpen=!1,this.isDateOpen=!0},e.prototype.openTimePicker=function(){this.isTimeOpen=!0,this.isDateOpen=!1},e.prototype.onDateUpdate=function(e){var t=this.changedValue;"DATE"===this.mode?(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)):t&&e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds())),this.changedValue=e,"DATE"===this.mode&&t!==e&&this.validateSelectedDate()&&this.onOkClick()},e.prototype.onTimeUpdate=function(e){this.changedValue=e},e.prototype.show=function(){var e=this;this.reset(),this.modalRef=this.bsModalService.show(this.datetimepickerTemplate,{animated:!0,backdrop:"static",class:"date-picker-modal modal-dialog-centered"}),setTimeout((function(){e.hideOnClick()}),500)},e.prototype.clear=function(){this.changedValue=null,this.triggerChange(),this.hideModal()},e.prototype.setToday=function(){var e=moment().startOf("day").toDate();this.onDateUpdate(e)},e.prototype.reset=function(){this.changedValue=this._value},e.prototype.hideModal=function(){var e;(null===(e=this.modalRef)||void 0===e?void 0:e.id)&&this.bsModalService.hide(this.modalRef.id)},e.prototype.onCancelClick=function(){this.changedValue=this._value,this.hideModal()},e.prototype.onOkClick=function(){this.validateSelectedDate()&&this.triggerChange(),this.hideModal()},e.prototype.triggerChange=function(){this.value!==this.changedValue&&this.change.emit(this.changedValue)},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnDestroy=function(){this.hideModal()},e}();g.decorators=[{type:t.Component,args:[{selector:"wm-datetimepicker",template:'\n <ng-template #datetimepickerTemplate>\n <div class="app-datetime-picker">\n <div class="modal-body">\n <div class="mobile-datetime-picker-options">\n\n </div>\n <bs-datepicker-inline\n [bsConfig]="bsDatepickerConfig"\n [datesDisabled]="excludedDatesToDisable"\n bsDatepicker\n [bsValue]="changedValue"\n (bsValueChange)="onDateUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'">\n </bs-datepicker-inline>\n <wm-timepicker\n [value]="changedValue"\n [min]="minTime"\n [max]="maxTime"\n (change)="onTimeUpdate($event)"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"></wm-timepicker>\n <span class="text-primary date-picker-value">\n {{getDateLabel()}}\n </span>\n </div>\n <div class="modal-footer">\n <button\n *ngIf="mode === \'DATE_TIME\' || mode === \'DATE\'"\n class="btn btn-secondary today-btn"\n (click)="setToday()">{{appLocale.LABEL_TODAY_DATE || "Today" }}</button>\n <button\n class="btn btn-primary pull-right ok-btn"\n *ngIf="mode === \'DATE_TIME\' || mode === \'TIME\'"\n (click)="onOkClick()">{{appLocale.LABEL_OK || "Ok" }}</button>\n <button\n class="btn btn-secondary pull-right clear-btn"\n (click)="clear()">{{appLocale.LABEL_CLEAR_DATE || "Clear" }}</button>\n </div>\n </div>\n </ng-template>\n '}]}],g.ctorParameters=function(){return[{type:t.Injector},{type:d.BsModalService}]},g.propDecorators={datetimepickerTemplate:[{type:t.ViewChild,args:["datetimepickerTemplate",{static:!0}]}],mode:[{type:t.Input}],placement:[{type:t.Input}],_bsDatepickerConfig:[{type:t.Input,args:["config"]}],minTime:[{type:t.Input}],maxTime:[{type:t.Input}],_displayFormat:[{type:t.Input}],change:[{type:t.Output}],excludedDatesToDisable:[{type:t.Input}],value:[{type:t.Input}],bsDatepickerConfig:[{type:t.Input,args:["config"]}],excludedDaysToDisable:[{type:t.Input}],displayFormat:[{type:t.Input}]};var v=function(){function e(e){this.inj=e,this.options={hour:[],minute:[],second:[],meridian:["AM","PM"]},this.value=new Date,this.min=null,this.max=null,this.change=new t.EventEmitter,this.options.hour=this.populateNumbers(0,23),this.options.minute=this.populateNumbers(0,59),this.options.second=this.populateNumbers(0,59)}return e.prototype.populateNumbers=function(e,t){for(var n=[],i=e;i<=t;i++)n.push({label:(i<10?"0":"")+i,value:i});return n},e.prototype.set=function(e,t){e.index;var n=e.value;"HOUR"===t?this.value=moment(this.value).hour(parseInt(n)).toDate():"MINUTE"===t?this.value=moment(this.value).minute(parseInt(n)).toDate():"SECOND"===t?this.value=moment(this.value).second(parseInt(n)).toDate():"MERIDIAN"===t&&(this.value=moment(this.value).minute(n).toDate()),this.min&&this.value<this.min&&(this.value=this.min),this.max&&this.value>this.max&&(this.value=this.max),this.change.emit(this.value)},Object.defineProperty(e.prototype,"hour",{get:function(){return moment(this.value).hour()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minute",{get:function(){return moment(this.value).minute()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"second",{get:function(){return moment(this.value).second()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"meridian",{get:function(){return"AM"},enumerable:!1,configurable:!0}),e.prototype.onDateUpdate=function(e){},e.prototype.ngAfterViewInit=function(){},e}();v.decorators=[{type:t.Component,args:[{selector:"wm-timepicker",template:'\n <wm-pickergroup>\n <wm-picker\n [options]="options.hour"\n [selectedValue]="hour"\n (change)="set($event, \'HOUR\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="minute"\n (change)="set($event, \'MINUTE\')"></wm-picker>\n <span class="app-time-separator">:</span>\n <wm-picker\n [options]="options.minute"\n [selectedValue]="second"\n (change)="set($event, \'SECOND\')"></wm-picker>\n </wm-pickergroup>\n '}]}],v.ctorParameters=function(){return[{type:t.Injector}]},v.propDecorators={value:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],change:[{type:t.Output}]};var y="CURRENT_DATE",b=["January","February","March","April","May","June","July","August","September","October","November","December"],w="default",P="default";function O(e){return Object.assign(new r.TimepickerConfig,{meridians:n.getLocaleDayPeriods(e.getSelectedLocale(),n.FormStyle.Format,n.TranslationWidth.Abbreviated)})}var E=function(e){function t(t,i){var a=e.call(this,t,i)||this;return a.isReadOnly=!1,a.clicked=!1,a.formatsByLocale={timezone:""},a._dateOptions=new o.BsDatepickerConfig,a.i18nService=a.inj.get(c.AbstractI18nService),a.invokeEventCallback("beforeload"),a.datePipe=a.inj.get(s.ToDatePipe),a.selectedLocale=a.i18nService.getSelectedLocale(),a._dateOptions.todayPosition="left",a._dateOptions.clearPosition="right",a.meridians=n.getLocaleDayPeriods(a.selectedLocale,n.FormStyle.Format,n.TranslationWidth.Abbreviated),a.loadNativeDateInput=c.isMobile()&&!a.showcustompicker,a.cancelLocaleChangeSubscription=a.getAppInstance().subscribe("locale-changed",(function(e){a.datePipe.datePipe.locale=e.angular,a._dateOptions.todayButtonLabel=a.i18nService.getLocalizedMessage("LABEL_TODAY_DATE"),a._dateOptions.clearButtonLabel=a.i18nService.getLocalizedMessage("LABEL_CLEAR_DATE")})),a}return h(t,e),Object.defineProperty(t.prototype,"timeZone",{get:function(){return this.inj.get(c.AbstractI18nService).getTimezone(this)},enumerable:!1,configurable:!0}),t.prototype.isDropDownDisplayEnabledOnInput=function(e){return e===w},t.prototype.isDataEntryModeEnabledOnInput=function(e){return e===P},t.prototype.showValidation=function(e,t,n,i){if(n)return console.warn("min max date validation failed ",i),$(e.target).val(t)},t.prototype.resetDisplayInput=function(){$(this.nativeElement).find(".display-input").val("")},t.prototype.validate=function(e){return this.invalidDateTimeFormat?{invalidDateTimeFormat:{valid:!1}}:!_.isUndefined(this.dateNotInRange)&&this.dateNotInRange?{dateNotInRange:{valid:!1}}:!_.isUndefined(this.timeNotInRange)&&this.timeNotInRange?{timeNotInRange:{valid:!1}}:this.show&&this.required?e.value?null:{required:!0}:(this.validateType="",null)},t.prototype.formatValidation=function(e,t,n){var i=this.datepattern||this.timepattern,o=this.timeZone,a=c.getFormattedDate(this.datePipe,e,i,o,null,null,this);if(t=t.trim())if("timestamp"===i){if(!_.isNaN(t)&&_.parseInt(t)!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1}else if(n&&(t=c.getFormattedDate(this.datePipe,t,i,o)),t!==a)return this.invalidDateTimeFormat=!0,this.validateType="incorrectformat",this.invokeOnChange(this.datavalue,void 0,!1),!1;return!0},t.prototype.minDateMaxDateValidationOnInput=function(e,t,n,i){var o=this;if(e){var a=e;e=moment(e).startOf("day").toDate();var r=moment(c.getDateObj(this.mindate)).startOf("day").toDate(),s=moment(c.getDateObj(this.maxdate)).startOf("day").toDate();if(this.mindate&&e<r){var l=this.appLocale.LABEL_MINDATE_VALIDATION_MESSAGE+" "+this.mindate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,r,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="mindate",this.showValidation(t,n,i,l))}if(this.maxdate&&e>s){l=this.appLocale.LABEL_MAXDATE_VALIDATION_MESSAGE+" "+this.maxdate+".";return this.invokeOnChange(this.datavalue,void 0,!1),i&&c.getFormattedDate(this.datePipe,s,this.datepattern,this.timeZone,null,null,this)===n?$(t.target).val(n):(this.dateNotInRange=!0,this.validateType="maxdate",this.showValidation(t,n,i,l))}if(this.excludedates){if((c.isString(this.excludedates)?_.split(this.excludedates,","):this.excludedates).map((function(e){return c.getFormattedDate(o.datePipe,e,o.datepattern,o.timeZone,null,null,o)})).indexOf(c.getFormattedDate(this.datePipe,a,this.datepattern,this.timeZone,null,null,this))>-1)return this.dateNotInRange=!0,this.validateType="excludedates",void this.invokeOnChange(this.datavalue,void 0,!1)}if(this.excludedays){var p=_.split(this.excludedays,","),d=_.get(a,"getDay")?a.getDay():a;if(p.indexOf(d.toString())>-1)return this.dateNotInRange=!0,this.validateType="excludedays",void this.invokeOnChange(this.datavalue,void 0,!1)}}i||(this.dateNotInRange=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.hightlightToday=function(){var e=(new Date).getDate().toString();_.filter($("span:contains("+e+")").not(".is-other-month"),(function(t){$(t).text()===e&&$(t).addClass("current-date text-info")}))},t.prototype.isOtheryear=function(e){return 0===e.getMonth()&&11===this.activeDate.getMonth()||11===e.getMonth()&&0===this.activeDate.getMonth()},t.prototype.setActiveDateFocus=function(e,t){var n=this;this.setNextData(e);var i=this.activeDate.getMonth();t||(e.getMonth()<i?this.isOtheryear(e)?this.goToOtherMonthOryear("next","days"):this.goToOtherMonthOryear("previous","days"):e.getMonth()>i&&(this.isOtheryear(e)?this.goToOtherMonthOryear("previous","days"):this.goToOtherMonthOryear("next","days"))),setTimeout((function(){var t=e.getDate().toString();_.filter($("span:contains("+t+")").not(".is-other-month"),(function(i){$(i).text()===t&&($(i).hasClass("selected")&&$(i).parent().attr("aria-selected","true"),$(i).attr("aria-label",moment(e).format("dddd, MMMM Do YYYY")),$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","-1"),$(i).attr("tabindex","0"),$(i).focus(),n.activeDate=e)})),e.getMonth()===(new Date).getMonth()&&e.getFullYear()===(new Date).getFullYear()&&n.hightlightToday()}))},t.prototype.goToOtherMonthOryear=function(e,t){var n=$(".bs-datepicker-head ."+e);n.attr("disabled")||(n.trigger("click"),"days"===t?this.loadDays():"month"===t?this.loadMonths():"year"===t&&this.loadYears())},t.prototype.getMonth=function(e,t){var n=new Date(e),i=n.getMonth(),o=n.getFullYear(),a=new Date(o,i+=t),r=a.toLocaleString("en-US",{month:"long"});return{date:a,fullMonth:r}},t.prototype.addDatepickerMouseEvents=function(){var e=this,t=$(".bs-datepicker-head");t.find(".previous").click((function(t){e.next=e.getMonth(e.activeDate,0),e.prev=e.getMonth(e.activeDate,-2),e.clicked=!0,t.originalEvent&&e.setFocusForDate(-1);var n=e.getMonth(e.activeDate,-1);$(".bs-datepicker-head .previous").prepend('<p aria-hidden="false" class="sr-only">Changed to Previous Month, '+n.fullMonth+" and year "+n.date.getFullYear()+"</p>"),setTimeout((function(){$(".bs-datepicker-head .previous").focus()}))})),t.find(".next").click((function(t){e.next=e.getMonth(e.activeDate,2),e.prev=e.getMonth(e.activeDate,0),e.clicked=!0,t.originalEvent&&e.setFocusForDate(1);var n=e.getMonth(e.activeDate,1);$(".bs-datepicker-head .next").prepend('<p aria-hidden="false" class="sr-only">Changed to Next Month, '+n.fullMonth+" and year "+n.date.getFullYear()+"</p>"),setTimeout((function(){$(".bs-datepicker-head .next").focus()}))})),t.find(".current").click((function(t){t.originalEvent&&e.setFocusForCurrentMonthOryear()})),$(".bs-datepicker-body, .bs-datepicker-action-buttons").click((function(t){t.stopPropagation(),t.originalEvent&&e.setFocusForMonthOrDay()})),this.clicked||(t.find(".next").attr("aria-label","Next Month, "+this.next.fullMonth+" "+this.next.date.getFullYear()),t.find(".previous").attr("aria-label","Previous Month, "+this.prev.fullMonth+" "+this.prev.date.getFullYear()))},t.prototype.setFocusForMonthOrDay=function(){var e=$(".bs-datepicker-head .current").first().text(),t=$(".bs-datepicker-body");if(t.find("table.months").length>0){_.parseInt(e)!==this.activeDate.getFullYear()&&this.loadMonths();var n=new Date(_.parseInt(e),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.days").length>0){var i=b.indexOf(e);i!==this.activeDate.getMonth()&&this.loadDays();n=new Date(this.activeDate.getFullYear(),i,1);this.setActiveDateFocus(n,!0)}},t.prototype.setFocusForCurrentMonthOryear=function(){var e=$(".bs-datepicker-body");e.find("table.months").length>0?(this.loadMonths(),this.setActiveMonthFocus(this.activeDate,!0)):e.find("table.years").length>0&&(this.loadYears(),this.setActiveYearFocus(this.activeDate,!0))},t.prototype.setFocusForDate=function(e){var t=$(".bs-datepicker-body");if(t.find("table.months").length>0){this.loadMonths();var n=new Date(this.activeDate.getFullYear()+e,0,this.activeDate.getDate());this.setActiveMonthFocus(n,!0)}else if(t.find("table.years").length>0){this.loadYears();var i=t.find("table.years span").first().text();n=new Date(_.parseInt(i),this.activeDate.getMonth(),this.activeDate.getDate());this.setActiveYearFocus(n,!0)}else if(t.find("table.days").length>0){this.loadDays();n=new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+e,1);this.setActiveDateFocus(n,!0)}},t.prototype.addDatepickerKeyboardEvents=function(e,t){var n=this;this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e;var i=document.querySelector("."+e.dateContainerCls);c.setAttr(i,"tabindex","0"),i.onkeydown=function(e){if("escape"===n.keyEventPluginInstance.getEventFullKey(e)){n.elementScope.hideDatepickerDropdown();var t=n.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return t.focus()}))}},this.loadDays(),this.setActiveDateFocus(this.activeDate)},t.prototype.setNextData=function(e){this.next=this.getMonth(e,1),this.prev=this.getMonth(e,-1)},t.prototype.loadDays=function(){var e=this;setTimeout((function(){$("[bsdatepickerdaydecorator]").not(".is-other-month").attr("tabindex","0"),e.addKeyBoardEventsForDays(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForDays=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-7,"days").toDate(),e.setActiveDateFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"days").toDate(),e.setActiveDateFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"days").toDate(),e.setActiveDateFocus(n);else if("pageup"===i)t.preventDefault(),n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveDateFocus(n);else if("pagedown"===i)t.preventDefault(),n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveDateFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate);else if("enter"===i){if($(document.activeElement).hasClass("disabled"))return;$(document.activeElement).click(),e.elementScope.hideDatepickerDropdown();var o=e.elementScope.nativeElement.querySelector(".display-input");setTimeout((function(){return o.focus()}))}})),this.focusBlurDatePickerHeadButtons()},t.prototype.focusBlurDatePickerHeadButtons=function(){var e=$(".bs-datepicker-head button");e.on("focus",(function(){$(this).css("background-color","#9AA0A3")})),e.on("blur",(function(){$(this).css("background-color","")}))},t.prototype.loadMonths=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForMonths(),e.addDatepickerMouseEvents()}))},t.prototype.addKeyBoardEventsForMonths=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-3,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"month").toDate(),e.setActiveMonthFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"month").toDate(),e.setActiveMonthFocus(n);else if("control.arrowup"===i)$(".bs-datepicker-head .current").first().click(),e.loadYears(),e.setActiveYearFocus(e.activeDate);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadDays();var o=new Date(e.activeDate.getFullYear(),e.activeDate.getMonth(),1);e.setActiveDateFocus(o)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.loadYears=function(){var e=this;setTimeout((function(){e.addKeyBoardEventsForYears(),e.addDatepickerMouseEvents()}))},t.prototype.setActiveMonthFocus=function(e,t){var n=this;this.setNextData(e);var i=b[e.getMonth()];t||(e.getFullYear()<this.activeDate.getFullYear()?this.goToOtherMonthOryear("previous","month"):e.getFullYear()>this.activeDate.getFullYear()&&this.goToOtherMonthOryear("next","month")),setTimeout((function(){$(".bs-datepicker-body table.months span").attr("tabindex","-1"),$(".bs-datepicker-body table.months span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.months span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.addKeyBoardEventsForYears=function(){var e=this;$(".bs-datepicker-body").keydown((function(t){var n,i=e.keyEventPluginInstance.getEventFullKey(t);if("arrowdown"===i)t.preventDefault(),n=moment(e.activeDate).add(4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowup"===i)t.preventDefault(),n=moment(e.activeDate).add(-4,"year").toDate(),e.setActiveYearFocus(n);else if("arrowleft"===i)n=moment(e.activeDate).add(-1,"year").toDate(),e.setActiveYearFocus(n);else if("arrowright"===i)n=moment(e.activeDate).add(1,"year").toDate(),e.setActiveYearFocus(n);else if("control.arrowdown"===i||"enter"===i){if($(document.activeElement).parent().hasClass("disabled"))return;$(document.activeElement).click(),e.loadMonths(),e.setActiveMonthFocus(e.activeDate)}})),this.focusBlurDatePickerHeadButtons()},t.prototype.setActiveYearFocus=function(e,t){var n=this,i=e.getFullYear(),o=$(".bs-datepicker-body table.years span"),a=o.first().text(),r=o.last().text();t||(e.getFullYear()<_.parseInt(a)?this.goToOtherMonthOryear("previous","year"):e.getFullYear()>_.parseInt(r)&&this.goToOtherMonthOryear("next","year")),setTimeout((function(){$(".bs-datepicker-body table.years span").attr("tabindex","-1"),$(".bs-datepicker-body table.years span:contains("+i+")").attr("tabindex","0"),$(".bs-datepicker-body table.years span:contains("+i+")").focus(),n.activeDate=e}))},t.prototype.focusTimePickerPopover=function(e){this.keyEventPluginInstance=e.keyEventPlugin.constructor,this.elementScope=e,this.elementScope.ngZone.runOutsideAngular((function(){setTimeout((function(){$("timepicker .form-group").first().find("> input.form-control").focus()}))}))},t.prototype.bindTimePickerKeyboardEvents=function(){var e=this;setTimeout((function(){var t=$("body").find("> bs-dropdown-container timepicker");t.attr("tabindex",0),e.addEventsOnTimePicker(t)}))},t.prototype.focusOnInputEl=function(){var e=this;$(this.nativeElement).closest(".caption-floating").length>0&&setTimeout((function(){$(e.nativeElement).find(".app-textbox").focus()}),100)},t.prototype.isValidDate=function(e){return e&&e instanceof Date&&!isNaN(e.getTime())},t.prototype.timeFormatValidation=function(){var e=$(this.nativeElement).find("input").val(),t=c.getNativeDateObject(e,{meridians:this.meridians,pattern:this.datepattern});this.formatValidation(t,e)&&(this.invalidDateTimeFormat=!1,this.invokeOnChange(this.datavalue,void 0,!1))},t.prototype.updateTimeValue=function(e,t){var n=this;e.length<2?setTimeout((function(){"minutes"===t?n.bsTimePicker.updateMinutes("00"):n.bsTimePicker.updateSeconds("00")}),500):"minutes"===t?this.bsTimePicker.updateMinutes("00"):this.bsTimePicker.updateSeconds("00")},t.prototype.addEventsOnTimePicker=function(e){var t=this,n=e.find(".bs-timepicker-field");n.first().on("keyup",(function(e){var i=e.target.value;_.forEach(n,(function(n,o){if(e.target!==n&&""===n.value&&i.length){var a=1===o?"minutes":"seconds";t.updateTimeValue(i,a)}}))})),this.removeKeyupListener=function(){n.first().off("keyup")},e.on("keydown",(function(e){var n,i,o=$(e.target),a=o.parent(),r=t.elementScope,s=t.keyEventPluginInstance.getEventFullKey(e);if("escape"===s&&r.hideTimepickerDropdown(),o.hasClass("bs-timepicker-field")){if(a.is(":first-child")?"shift.tab"!==s&&"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):a.is(":last-child")||a.next().next().find("button.disabled").length?"tab"!==s&&"escape"!==s&&"enter"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0):"enter"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus(),n=!0,i=!0),n&&e.stopPropagation(),i&&e.preventDefault(),r.mintime&&r.maxtime&&!t.isValidDate(r.bsTimeValue)&&("arrowdown"===s?r.bsTimeValue=r.maxTime:"arrowup"===s&&(r.bsTimeValue=r.minTime)),"tab"===s){t.invalidDateTimeFormat=!1,t.invokeOnChange(t.datavalue,void 0,!1);var l=t.datepattern||t.timepattern;c.getFormattedDate(r.datePipe,r.bsTimeValue,l,t.timeZone,null,null,t)===r.displayValue&&$(t.nativeElement).find(".display-input").val(r.displayValue)}"arrowdown"!==s&&"arrowup"!==s||t.timeFormatValidation()}else o.hasClass("btn-default")&&("tab"!==s&&"escape"!==s||(r.setIsTimeOpen(!1),t.focus()))})),e.find("a").on("click",(function(e){var n=t.elementScope,i=$(e.target);n.mintime&&n.maxtime&&!t.isValidDate(n.bsTimeValue)&&(i.find("span").hasClass("bs-chevron-down")?n.bsTimeValue=n.maxTime:i.find("span").hasClass("bs-chevron-up")&&(n.bsTimeValue=n.minTime)),t.timeFormatValidation()}))},t.prototype.updateFormat=function(e){"datepattern"===e?(this._dateOptions.dateInputFormat=this.datepattern,this.showseconds=_.includes(this.datepattern,"s"),this.ismeridian=_.includes(this.datepattern,"h")):"timepattern"===e&&(this.showseconds=_.includes(this.timepattern,"s"),this.ismeridian=_.includes(this.timepattern,"h"))},t.prototype.getMobileInput=function(){return this.nativeElement.querySelector(".mobile-input")},t.prototype.onDateTimeInputBlur=function(){var e=this.getMobileInput();if(e&&!c.hasCordova()){for(var t=this.nativeElement.children,n=0;n<t.length;n++)t[n].classList.remove("add-opacity");e.classList.remove("remove-opacity")}},t.prototype.onDateTimeInputFocus=function(e){if(void 0===e&&(e=!1),this.loadNativeDateInput){var t=this.getMobileInput();if(!e||c.hasCordova())t&&this._triggeredByUser&&(t.focus(),t.click());else{for(var n=this.nativeElement.children,i=0;i<n.length;i++)n[i].classList.add("add-opacity");t.classList.add("remove-opacity")}}},t.prototype.getCordovaPluginDatePickerApi=function(){if(c.isIos())return _.get(window,"cordova.wavemaker.datePicker.selectDate")},t.prototype.showDatePickerModal=function(){this.datetimepickerComponent.show()},t.prototype.blurDateInput=function(e){var t=this.nativeElement.querySelector(".display-input");e&&setTimeout((function(){return t.blur()}))},t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("required"!==t?"datepattern"===t?this.updateFormat(t):"showweeks"===t?this._dateOptions.showWeekNumbers=n:"mindate"===t?(this._dateOptions.minDate=n===y?this.mindate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"maxdate"===t?(this._dateOptions.maxDate=n===y?this.maxdate=new Date:c.getDateObj(n),this.minDateMaxDateValidationOnInput(this.datavalue)):"excludedates"===t||"excludedays"===t?(this.excludedays&&(this.excludedDaysToDisable=_.split(this.excludedays,",").map((function(e){return+e}))),this.excludedates&&(this.excludedDatesToDisable=this.excludedates,c.isString(this.excludedates)&&(this.excludedDatesToDisable=_.split(this.excludedates,",")),this.excludedDatesToDisable=this.excludedDatesToDisable.map((function(e){return c.getDateObj(e)}))),this.minDateMaxDateValidationOnInput(this.datavalue)):"selectfromothermonth"===t?this._dateOptions.selectFromOtherMonth=n:"todaybutton"===t?this._dateOptions.showTodayButton=n:"clearbutton"===t?this._dateOptions.showClearButton=n:"todaybuttonlabel"===t?this._dateOptions.todayButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"clearbuttonlabel"===t?this._dateOptions.clearButtonLabel=this.i18nService.getLocalizedMessage(n)||n:"showcustompicker"===t?this.loadNativeDateInput=c.isMobile()&&!this.showcustompicker:"adaptiveposition"===t?this._dateOptions.adaptivePosition=n:e.prototype.onPropertyChange.call(this,t,n,i):this._onChange(this.datavalue))},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),this.containerTarget=s.getContainerTargetClass(this.nativeElement),this.isReadOnly="undefined"!=this.dataentrymode&&!this.isDataEntryModeEnabledOnInput(this.dataentrymode);var t=this.getMobileInput();t&&setTimeout((function(){t.style.width="100%",t.style.height="100%"}))},t.prototype.ngOnDestroy=function(){this.dateOnShowSubscription&&this.dateOnShowSubscription.unsubscribe(),this.cancelLocaleChangeSubscription&&this.cancelLocaleChangeSubscription(),e.prototype.ngOnDestroy.call(this)},t.prototype.ngOnDetach=function(){var e;null===(e=this.datetimepickerComponent)||void 0===e||e.hideModal()},t.prototype.setTimezone=function(e){this.i18nService.setTimezone(e,this)},t}(p.BaseFormCustomComponent);E.decorators=[{type:t.Directive}],E.ctorParameters=function(){return[{type:t.Injector},null]},E.propDecorators={bsDropdown:[{type:t.ViewChild,args:[a.BsDropdownDirective]}],bsTimePicker:[{type:t.ViewChild,args:[r.TimepickerComponent]}],datetimepickerComponent:[{type:t.ViewChild,args:[g]}]};var R=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["name",s.PROP_STRING],["outputformat",Object.assign({value:"yyyy-MM-dd"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select Date"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",Object.assign({value:!0},s.PROP_BOOLEAN)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",Object.assign({value:!1},s.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),A=function(){s.register("wm-date",R),s.registerFormWidget(c.FormWidgetType.DATE,new Map(R))},T={widgetType:"wm-date",hostClass:"app-date input-group"},S=function(e){function t(t,n,i,o){var a=e.call(this,t,T)||this;return a.cdRef=n,a.appDefaults=i,a.isOpen=!1,a.isEnterPressedOnDateInput=!1,s.styler(a.nativeElement,a),a.keyEventPlugin=o[1],a.dateContainerCls="app-date-"+a.widgetId,a._dateOptions.containerClass="app-date "+a.dateContainerCls,a._dateOptions.showWeekNumbers=!1,a._bsDefaultLoadCheck=!0,a.datepattern=a.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),a.updateFormat("datepattern"),a}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsDataValue?this.bsDataValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-dd"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,"yyyy-MM-dd",this.timeZone,null,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsDataValue,this.outputformat,this.timeZone,null,this.isCurrentDate,this)||""},set:function(e){var t=this;"CURRENT_DATE"===e?(setTimeout((function(){t.bsDataValue=t.timeZone?c.getMomentLocaleObject(t.timeZone):new Date}),50),this.isCurrentDate=!0):(this.bsDataValue=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.isCurrentDate=!1),this.invokeOnChange(this.datavalue,void 0,!0),this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.onDisplayDateChange=function(e,t){if(void 0===t&&(t=!1),this.datepattern=this.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),this.updateFormat("datepattern"),this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=c.getDateObj(e.target.value,{pattern:this.datepattern,isNativePicker:t});this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||this.setDataValue(n))}},t.prototype.setDataValue=function(e){this.invalidDateTimeFormat=!1,this.minDateMaxDateValidationOnInput(e),c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue),this.bsDataValue=e||void 0,this.invokeOnChange(this.datavalue,{},!0)},t.prototype.onDatePickerOpen=function(){this.isOpen=!0,this.bsDataValue?this.activeDate=this.bsDataValue:this.activeDate=new Date,this.bsDataValue||this.hightlightToday(),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.addDatepickerKeyboardEvents(this,!1),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker),c.adjustContainerRightEdges($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.hideDatepickerDropdown=function(){var e;this.invokeOnTouched(),this.isOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.isEnterPressedOnDateInput=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.blurDateInput(this.isOpen)},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput&&(t||this.onDateTimeInputFocus()),"click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.isOpen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.datepattern=this.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),this.updateFormat("datepattern"),this.isDropDownDisplayEnabledOnInput(this.showdropdownon))if(e.stopPropagation(),"enter"===this.keyEventPlugin.constructor.getEventFullKey(e)){var t=c.getDateObj(e.target.value,{pattern:this.datepattern});e.preventDefault();var n=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,null,this.isCurrentDate,this),i=e.target.value.trim();i&&"timestamp"===this.datepattern?_.isNaN(i)||_.parseInt(i)===n||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):i&&i!==n?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=e.target.value?t:""),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown();else this.hideDatepickerDropdown()},t.prototype.onDateChange=function(e){this.datepattern=this.appDefaults.dateFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATE),this.updateFormat("datepattern"),this._bsDefaultLoadCheck?this._bsDefaultLoadCheck=!1:this.setDataValue(e)},t}(E);S.initializeProps=A(),S.decorators=[{type:t.Component,args:[{selector:"[wmDate]",template:' <input class="form-control app-textbox app-dateinput display-input"\n focus-target\n type="text"\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n [disabled]="disabled || readonly"\n [autofocus]="autofocus"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-label]="hint"\n (change)="onDisplayDateChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event);">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isOpen"\n #datepicker="bsDatepicker"\n bsDatepicker\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n placement="bottom right"\n [isDisabled]="disabled || readonly"\n [bsValue]="bsDataValue"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n (bsValueChange)="onDateChange($event)">\n</div>\n\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="DATE"\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDataValue"\n (change)="onDateChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event);"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n [attr.aria-label]="displayValue ? \'Change Date\' + displayValue : \'Choose Date\'"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(S,i.NG_VALUE_ACCESSOR,!0),s.provideAs(S,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(S)]}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},S.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var C=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["datepattern",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["excludedays",s.PROP_STRING],["excludedates",s.PROP_STRING],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxdate",s.PROP_STRING],["mindate",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"timestamp"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select date time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showbuttonbar",s.PROP_BOOLEAN],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["showindevice",Object.assign({displayType:"inline-block",value:"all"},s.PROP_STRING)],["showweeks",s.PROP_BOOLEAN],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timestamp",s.PROP_STRING],["selectfromothermonth",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["clearbutton",Object.assign({value:!0},s.PROP_BOOLEAN)],["adaptiveposition",Object.assign({value:!0},s.PROP_BOOLEAN)],["todaybuttonlabel",Object.assign({value:"LABEL_TODAY_DATE"},s.PROP_STRING)],["clearbuttonlabel",Object.assign({value:"LABEL_CLEAR_DATE"},s.PROP_STRING)]]),I=function(){s.register("wm-datetime",C),s.registerFormWidget(c.FormWidgetType.DATETIME,new Map(C)),s.registerFormWidget(c.FormWidgetType.TIMESTAMP,new Map(C))},D={widgetType:"wm-datetime",hostClass:"app-datetime input-group"},x="CURRENT_DATE",N=O,k=function(e){function t(t,n,i,o,a,r){var l=e.call(this,t,D)||this;return l.ngZone=n,l.cdRef=i,l.appDefaults=o,l.isEnterPressedOnDateInput=!1,l.isTimeOpen=!1,l.isDateOpen=!1,l.isCurrentDate=!1,l._debouncedOnChange=_.debounce(l.invokeOnChange,10),l.registerDestroyListener((function(){return l.clearTimeInterval()})),s.styler(l.nativeElement,l),l.app=a,l.keyEventPlugin=r[1],l.dateContainerCls="app-date-"+l.widgetId,l._dateOptions.containerClass="app-date "+l.dateContainerCls,l._dateOptions.showWeekNumbers=!1,l.datepattern=l.appDefaults.dateTimeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.DATETIME),l.updateFormat("datepattern"),l}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.proxyModel?this.proxyModel.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dateInputFormat",{get:function(){return this._dateOptions.dateInputFormat||"yyyy-MM-ddTHH:mm:ss"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.proxyModel,"yyyy-MM-ddTHH:mm:ss",this.timeZone,this.key,this.isCurrentDate,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentDate&&!this.proxyModel?x:c.getFormattedDate(this.datePipe,this.proxyModel,this.outputformat,this.timeZone,null,null,this)},set:function(e){e===x?(this.isCurrentDate=!0,this.setTimeInterval()):(this.proxyModel=e?c.getDateObj(e,{isNativePicker:this.loadNativeDateInput},this.timeZone):void 0,this.clearTimeInterval(),this.isCurrentDate=!1),this.bsTimeValue=this.bsDateValue=this.proxyModel,this.cdRef.detectChanges()},enumerable:!1,configurable:!0}),t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;e.onModelUpdate(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.toggleTimePicker=function(e,t){this.loadNativeDateInput?this.onDateTimeInputFocus():(this.isTimeOpen=e,t&&"click"===t.type&&this.invokeEventCallback("click",{$event:t}),this.addTimepickerClickListener(this.isTimeOpen))},t.prototype.addTimepickerClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterTimepickeEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.toggleTimePicker(!1)}),0,!0)}),350)}},t.prototype.setIsTimeOpen=function(e){this.isTimeOpen=e},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.toggleTimePicker(!1),this.deregisterTimepickeEventListener&&this.deregisterTimepickeEventListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e})},t.prototype.onTimepickerOpen=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.bsDatePickerDirective.hide(),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu")),c.adjustContainerRightEdges($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.onDatePickerOpen=function(){this.isDateOpen=!this.isDateOpen,this.toggleTimePicker(!1),this.$element.find(".model-holder").width("1px"),$("bs-datepicker-container").attr("aria-label","Use Arrow keys to navigate dates, Choose Date from datepicker"),$(".bs-calendar-container").removeAttr("role");var e=$(".bs-datepicker-container")[0];this.focusTrap=s.setFocusTrap(e,!0),this.focusTrap.activate(),this.bsDateValue?this.activeDate=this.bsDateValue:this.activeDate=new Date,this.bsDateValue||this.hightlightToday(),this.addDatepickerKeyboardEvents(this,!0),c.adjustContainerPosition($("bs-datepicker-container"),this.nativeElement,this.bsDatePickerDirective._datepicker)},t.prototype.onModelUpdate=function(e,t){if("date"===t&&(this.invalidDateTimeFormat=!1,c.getFormattedDate(this.datePipe,e,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this)===this.displayValue&&$(this.nativeElement).find(".display-input").val(this.displayValue)),this.minDateMaxDateValidationOnInput(e),!e)return this.bsDateValue&&this.bsTimePicker&&(""===this.bsTimePicker.hours||""===this.bsTimePicker.minutes||""===this.bsTimePicker.seconds)?this.bsDateValue=this.bsTimeValue=this.proxyModel=moment(this.bsDateValue).startOf("day").toDate():this.bsDateValue=this.bsTimeValue=this.proxyModel=void 0,void((e!==this.datavalue||!this.datavalue&&this.prevDatavalue)&&this._debouncedOnChange(this.datavalue,{},!0));"date"===t&&this.isDateOpen&&this.toggleTimePicker(!0),this.proxyModel=e,this.proxyModel&&(this.bsDateValue=this.bsTimeValue=e),this._debouncedOnChange(this.datavalue,{},!0),this.cdRef.detectChanges();var n=$(".bs-timepicker-field");if(this.timeZone&&"datetimestamp"===this.key&&n.length){var i=c.getFormattedDate(this.datePipe,e,this.getTimePattern(),this.timeZone,this.key,null,this);this.updateTimepickerFields(i,n)}},t.prototype.getTimePattern=function(){var e,t=this.datepattern.toLowerCase().indexOf("h"),n=this.datepattern.toLowerCase().indexOf(":ss");(n>-1||(n=this.datepattern.toLowerCase().indexOf(":mm"))>-1)&&(n+=3);var i=this.datepattern.toLowerCase().indexOf("a");return e=this.datepattern.substr(t,n),i>-1&&(e+=" a"),e},t.prototype.updateTimepickerFields=function(e,t){for(var n,i=$("timepicker button.text-center"),o=e.split(" "),a=o[0].split(":"),r=0;r<t.length;r++)t[r].value=a[r];(null===(n=null==i?void 0:i.html())||void 0===n?void 0:n.trim())!==o[1]&&i.text(o[1])},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation()},t.prototype.toggleDpDropdown=function(e,t){void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)?e.stopPropagation():(this.bsDatePickerDirective.toggle(),this.addBodyClickListener(this.bsDatePickerDirective.isOpen)))},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=n.querySelector("."+t.dateContainerCls);t.deregisterDatepickerEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.bsDatePickerDirective.hide()}),0,!0)}),350)}},t.prototype.hideDatepickerDropdown=function(){var e;this.isDateOpen=!1,null===(e=this.focusTrap)||void 0===e||e.deactivate(),this.invokeOnTouched(),this.bsDatePickerDirective.hide(),this.bsDateValue&&this.toggleTimePicker(!0),this.isEnterPressedOnDateInput=!1,this.deregisterDatepickerEventListener&&this.deregisterDatepickerEventListener();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t}),this.blurDateInput(this.isDateOpen)},t.prototype.onDateChange=function(e,t){if(this.isEnterPressedOnDateInput)this.isEnterPressedOnDateInput=!1;else{var n=e.target.value.trim();n=n?c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput}):void 0,this.formatValidation(n,e.target.value,t)&&(t&&this.minDateMaxDateValidationOnInput(n,e,this.displayValue,t)||(this.invalidDateTimeFormat=!1,this.onModelUpdate(n)))}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=e.target.value.trim(),n=this.keyEventPlugin.constructor.getEventFullKey(e);if("enter"===n||"arrowdown"===n){t=t?c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians}):void 0,e.preventDefault();var i=c.getFormattedDate(this.datePipe,t,this.dateInputFormat,this.timeZone,this.key,this.isCurrentDate,this),o=e.target.value.trim();o&&"timestamp"===this.datepattern?_.isNaN(o)||_.parseInt(o)===i||(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):o&&o!==i?(this.invalidDateTimeFormat=!0,this.invokeOnChange(this.datavalue,e,!1)):(this.invalidDateTimeFormat=!1,this.isEnterPressedOnDateInput=!0,this.bsDatePickerDirective.bsValue=t),this.toggleDpDropdown(e)}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()}else this.hideDatepickerDropdown(),this.hideTimepickerDropdown()},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{pattern:this.loadNativeDateInput?this.outputformat:this.datepattern,meridians:this.meridians,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("current-date")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t}(E);k.initializeProps=I(),k.decorators=[{type:t.Component,args:[{selector:"[wmDateTime]",template:' <div dropdown\n [isOpen]="isTimeOpen"\n autoClose="false"\n [container]="\'body\'"\n (onShown)="onTimepickerOpen()"\n style="display: inherit;">\n <input class="form-control app-textbox display-input"\n [attr.aria-label]="hint"\n focus-target\n [name]="name"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n type="text"\n [value]="displayValue"\n (click)="toggleDpDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDateChange($event)"\n [autofocus]="autofocus"\n [disabled]="disabled || readonly || isCurrentDate"\n [required]="required"\n [readOnly]="isReadOnly"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n\n <span class="input-group-btn">\n <button type="button"\n class="btn btn-default btn-date"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n [attr.aria-label]="displayValue ? \'Change Date \' + displayValue : \'Choose date by pressing enter\'"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleDpDropdown($event, false)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-calendar"></i>\n </button>\n <button type="button"\n class="btn btn-default btn-time"\n [tabindex]="loadNativeDateInput ? \'-1\' : tabindex"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [disabled]="disabled || readonly || isCurrentDate"\n aria-label="Select time"\n aria-haspopup="true"\n aria-expanded="false"\n (click)="toggleTimePicker(!isTimeOpen, $event)">\n <i aria-hidden="true"\n class="app-icon wm-sl-l sl-time"></i>\n </button>\n </span>\n <div style="width: 0;display: inline-block;">\n <input class="model-holder"\n aria-label="datepicker dropdownmenu"\n aria-controls="date"\n focus-target\n [tabindex]="-1"\n [attr.aria-hidden]="!!loadNativeDateInput"\n [container]="containerTarget || \'body\'"\n [bsConfig]="_dateOptions"\n [isOpen]="isDateOpen"\n placement="bottom right"\n (onShown)="onDatePickerOpen()"\n (onHidden)="hideDatepickerDropdown()"\n [daysDisabled]="excludedDaysToDisable"\n [datesDisabled]="excludedDatesToDisable"\n #datepicker=bsDatepicker\n bsDatepicker\n [isDisabled]="disabled || readonly || isCurrentDate"\n [bsValue]="bsDateValue"\n (bsValueChange)="onModelUpdate($event, \'date\')">\n </div>\n <div *dropdownMenu\n class="dropdown-menu"\n aria-label="timepicker dropdown"\n aria-controls="time"\n (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="disabled || readonly || isCurrentDate"\n [(ngModel)]="bsTimeValue"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds"\n (ngModelChange)="onModelUpdate($event, \'time\')"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n [config]="_dateOptions"\n [placement]="modal"\n [excludedDaysToDisable]="excludedDaysToDisable"\n [excludedDatesToDisable]="excludedDatesToDisable"\n [displayFormat]="dateInputFormat"\n [value]="bsDateValue"\n (change)="onModelUpdate($event, \'date\')">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n [tabindex]="tabindex || 0"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event)"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentDate) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(k,i.NG_VALUE_ACCESSOR,!0),s.provideAs(k,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(k),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:N}]}]}],k.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:t.ChangeDetectorRef},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]},k.propDecorators={bsDatePickerDirective:[{type:t.ViewChild,args:[o.BsDatepickerDirective]}]};var M=new Map([["autofocus",s.PROP_BOOLEAN],["class",s.PROP_STRING],["dataentrymode",Object.assign({value:"default"},s.PROP_STRING)],["datavaluesource",s.PROP_ANY],["datavalue",s.PROP_STRING],["disabled",s.PROP_BOOLEAN],["hint",s.PROP_STRING],["hourstep",Object.assign({value:1},s.PROP_NUMBER)],["maxtime",s.PROP_STRING],["mintime",s.PROP_STRING],["minutestep",Object.assign({value:15},s.PROP_NUMBER)],["name",s.PROP_STRING],["outputformat",Object.assign({value:"HH:mm:ss"},s.PROP_STRING)],["placeholder",Object.assign({value:"Select time"},s.PROP_STRING)],["readonly",s.PROP_BOOLEAN],["required",s.PROP_BOOLEAN],["shortcutkey",s.PROP_STRING],["show",Object.assign({value:!0},s.PROP_BOOLEAN)],["showdropdownon",Object.assign({value:"default"},s.PROP_STRING)],["showcustompicker",Object.assign({value:!1},s.PROP_BOOLEAN)],["secondsstep",Object.assign({value:1},s.PROP_NUMBER)],["tabindex",Object.assign({value:0},s.PROP_NUMBER)],["timepattern",s.PROP_STRING],["timestamp",s.PROP_STRING]]),L=function(){s.register("wm-time",M),s.registerFormWidget(c.FormWidgetType.TIME,new Map(M))},F="CURRENT_TIME",j={widgetType:"wm-time",hostClass:"input-group app-timeinput"},B=O,G=function(e){function t(t,n,i,o,a){var r=e.call(this,t,j)||this;return r.ngZone=n,r.appDefaults=i,r.status={isopen:!1},r.keyEventPlugin=a[1],s.styler(r.nativeElement,r),r.registerDestroyListener((function(){return r.clearTimeInterval()})),r.timepattern=r.appDefaults.timeFormat||c.getDisplayDateTimeFormat(c.FormWidgetType.TIME),r.updateFormat("timepattern"),r.app=o,r}return h(t,e),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this.bsTimeValue?this.bsTimeValue.valueOf():void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datavalue",{get:function(){return this.isCurrentTime&&!this.bsTimeValue?F:c.getFormattedDate(this.datePipe,this.bsTimeValue,this.outputformat,this.timeZone,null,null,this)||""},set:function(e){e?e===F?(this.isCurrentTime=!0,this.setTimeInterval()):(this.clearTimeInterval(),this.bsTimeValue=c.getNativeDateObject(e,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.isCurrentTime=!1,this.mintimeMaxtimeValidation()):(this.bsTimeValue=void 0,this.clearTimeInterval(),this.isCurrentTime=!1),this.invokeOnChange(this.datavalue),c.$appDigest()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,this.timepattern,this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nativeDisplayValue",{get:function(){return c.getFormattedDate(this.datePipe,this.bsTimeValue,"HH:mm:ss",this.timeZone,null,null,this)||""},enumerable:!1,configurable:!0}),t.prototype.onPropertyChange=function(t,n,i){"tabindex"!==t&&("timepattern"===t&&this.updateFormat("timepattern"),"mintime"===t?(this.minTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):"maxtime"===t?(this.maxTime=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.mintimeMaxtimeValidation()):e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.setValidateType=function(e,t,n){this.timeNotInRange&&(n<e?this.validateType="mintime":n>t&&(this.validateType="maxtime"))},t.prototype.mintimeMaxtimeValidation=function(){this.timeNotInRange=this.minTime&&this.maxTime&&(this.bsTimeValue<this.minTime||this.bsTimeValue>this.maxTime),this.setValidateType(this.minTime,this.maxTime,this.bsTimeValue),this.invokeOnChange(this.datavalue,void 0,!1)},t.prototype.toggleDropdown=function(e,t){var n=this;void 0===t&&(t=!1),this.loadNativeDateInput?t||this.onDateTimeInputFocus():("click"===e.type&&this.invokeEventCallback("click",{$event:e}),e.target&&$(e.target).is("input")&&!this.isDropDownDisplayEnabledOnInput(this.showdropdownon)||(this.ngZone.run((function(){n.status.isopen=!n.status.isopen})),this.addBodyClickListener(this.status.isopen)))},t.prototype.preventTpClose=function(e){e.stopImmediatePropagation();var t=$(this.nativeElement).closest(".app-composite-widget.caption-floating");t.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:t})},t.prototype.addBodyClickListener=function(e){var t=this;if(e){var n=document.querySelector("body");setTimeout((function(){var e=$(n).find(">bs-dropdown-container .dropdown-menu").get(0);t.deregisterEventListener=c.addEventListenerOnElement(n,e,t.nativeElement,"click",t.isDropDownDisplayEnabledOnInput(t.showdropdownon),(function(){t.status.isopen=!1}),0,!0)}),350)}},t.prototype.onDisplayKeydown=function(e){if(this.isDropDownDisplayEnabledOnInput(this.showdropdownon)){e.stopPropagation();var t=this.keyEventPlugin.constructor.getEventFullKey(e);"enter"===t||"arrowdown"===t?(e.preventDefault(),this.toggleDropdown(e)):this.hideTimepickerDropdown()}else this.hideTimepickerDropdown()},t.prototype.onDisplayTimeChange=function(e){var t=c.getNativeDateObject(e.target.value,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});this.formatValidation(t,e.target.value)&&(this.invalidDateTimeFormat=!1,this.onTimeChange(t))},t.prototype.onInputBlur=function(e){$(e.relatedTarget).hasClass("bs-timepicker-field")||(this.invokeOnTouched(),this.invokeEventCallback("blur",{$event:e}))},t.prototype.onTimeChange=function(e,t){var n,i,o;t&&(e=c.getNativeDateObject(e.target.value,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput})),e?(this.bsTimeValue=e,this.timeNotInRange=this.minTime&&this.maxTime&&(e<this.minTime||e>this.maxTime),this.setValidateType(this.minTime,this.maxTime,e)):(this.bsTimePicker&&this.bsTimePicker.min&&this.bsTimePicker.max&&(o=moment(new Date(this.bsTimePicker.min)).format("A"),moment(new Date(this.bsTimePicker.max)).format("A"),n=this.bsTimePicker.hours+":"+(this.bsTimePicker.minutes||0)+":"+(this.bsTimePicker.seconds||0)+(this.bsTimePicker.showMeridian?" "+o:""),i=c.getNativeDateObject(n,{pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput}),this.bsTimePicker.meridian=o,this.timeNotInRange=this.bsTimePicker.min>i||this.bsTimePicker.max<i,this.setValidateType(this.bsTimePicker.min,this.bsTimePicker.max,i)),this.bsTimeValue=i),this.invokeOnTouched(),this.invokeOnChange(this.datavalue,{},!0)},t.prototype.setTimeInterval=function(){var e=this;this.timeinterval||(this.timeinterval=setInterval((function(){var t=e.timeZone?c.getMomentLocaleObject(e.timeZone):new Date;t.setSeconds(t.getSeconds()+1),e.datavalue=F,e.onTimeChange(t)}),1e3))},t.prototype.clearTimeInterval=function(){this.timeinterval&&(clearInterval(this.timeinterval),this.timeinterval=null)},t.prototype.setIsTimeOpen=function(e){this.status.isopen=e},t.prototype.handleEvent=function(t,n,i,o){_.includes(["blur","focus","change","click"],n)||e.prototype.handleEvent.call(this,t,n,i,o)},t.prototype.hideTimepickerDropdown=function(){this.invokeOnTouched(),this.status.isopen=!1,this.deregisterEventListener&&this.deregisterEventListener(),this.removeKeyupListener();var e=$(this.nativeElement).closest(".app-composite-widget.caption-floating");e.length>0&&this.app.notify("captionPositionAnimate",{displayVal:this.displayValue,nativeEl:e}),this.blurDateInput(!0)},t.prototype.isValid=function(e){if(!e){var t=$(this.nativeElement).find("input").val(),n=c.getNativeDateObject(t,{meridians:this.meridians,pattern:this.loadNativeDateInput?this.outputformat:void 0,isNativePicker:this.loadNativeDateInput});if(!this.formatValidation(n,t))return}},t.prototype.onShown=function(){var e=document.querySelectorAll("timepicker");_.forEach(e,(function(e){c.addClass(e.parentElement,"app-datetime",!0)})),this.focusTimePickerPopover(this),this.bindTimePickerKeyboardEvents(),c.adjustContainerPosition($("bs-dropdown-container"),this.nativeElement,this.bsDropdown._dropdown,$("bs-dropdown-container .dropdown-menu"))},t.prototype.assignModel=function(){this.displayInputElem||(this.displayInputElem=this.getMobileInput()),this.displayInputElem.value=_.get(this,"nativeDisplayValue")},t}(E);G.initializeProps=L(),G.decorators=[{type:t.Component,args:[{selector:"[wmTime]",template:' <div dropdown [isOpen]="status.isopen" (onShown)="onShown()" (onHidden)="hideTimepickerDropdown()" [container]="\'body\'" style="display: inherit">\n <input class="form-control app-textbox display-input" [attr.aria-label]="hint"\n focus-target\n [tabindex]="tabindex"\n [name]="name"\n type="text"\n role="timer"\n [value]="displayValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [autofocus]="autofocus"\n [attr.placeholder]="placeholder"\n [attr.accesskey]="shortcutkey"\n [attr.aria-atomic]="isCurrentTime ? \'true\' : \'false\'"\n [required]="required"\n [readOnly]="isReadOnly"\n (click)="toggleDropdown($event, true)"\n (focus)="onDateTimeInputFocus(); invokeOnFocus($event);"\n (blur)="onInputBlur($event)"\n (change)="onDisplayTimeChange($event)"\n (keydown)="this._triggeredByUser = true; onDisplayKeydown($event)">\n <span class="input-group-btn dropdown-toggle">\n <button type="button" class="btn btn-default btn-date" [tabindex]="tabindex" [disabled]="disabled || readonly || isCurrentTime" aria-label="Select time" aria-haspopup="true" aria-expanded="false" (click)="toggleDropdown($event, false)"><i aria-hidden="true" class="app-icon wm-sl-l sl-time"></i></button>\n </span>\n <div *dropdownMenu class="dropdown-menu" (click)="preventTpClose($event)">\n <timepicker class="model-holder"\n [showMeridian]="ismeridian"\n [readonlyInput]="isDisabled"\n [(ngModel)]="bsTimeValue"\n [disabled]="disabled || readonly || isCurrentTime"\n [min]="minTime"\n [max]="maxTime"\n [hourStep]="hourstep"\n [minuteStep]="minutestep"\n [secondsStep]="secondsstep"\n [mousewheel]="true"\n [arrowkeys]="true"\n (isValid)="isValid($event)"\n [showSeconds]="showseconds" (ngModelChange)="onTimeChange($event)"></timepicker>\n </div>\n </div>\n<ng-template [ngIf]="loadNativeDateInput">\n <wm-datetimepicker\n dateTimePicker\n mode="TIME"\n [minTime]="minTime"\n [maxTime]="maxTime"\n [placement]="modal"\n [displayFormat]="timepattern"\n [value]="bsTimeValue"\n (change)="onTimeChange($event)">\n </wm-datetimepicker>\n <div class="mobile-input mobile-datepicker-container"\n tabindex="1000000"\n (focus)="onDateTimeInputFocus(true); invokeOnFocus($event); assignModel()"\n (blur)="onDateTimeInputBlur(); invokeOnTouched($event)"\n (click)="!(disabled || readonly || isCurrentTime) && showDatePickerModal()">\n </div>\n</ng-template>\n',providers:[s.provideAs(G,i.NG_VALUE_ACCESSOR,!0),s.provideAs(G,i.NG_VALIDATORS,!0),s.provideAsWidgetRef(G),{provide:r.TimepickerConfig,deps:[c.AbstractI18nService],useFactory:B}]}]}],G.ctorParameters=function(){return[{type:t.Injector},{type:t.NgZone},{type:c.AppDefaults},{type:c.App},{type:void 0,decorators:[{type:t.Inject,args:[l.EVENT_MANAGER_PLUGINS]}]}]};var V=function(){};V.decorators=[{type:t.Component,args:[{selector:"wm-pickergroup",template:'\n <div class="app-picker-group">\n <ng-content></ng-content>\n </div>\n '}]}];var W=function(){function e(e){this.inj=e,this.change=new t.EventEmitter,this._selectedIndex=0,this._options=[],this.noOfEmptyElements=2,this.$el=$(e.get(t.ElementRef).nativeElement)}return Object.defineProperty(e.prototype,"selectedValue",{get:function(){return this._selectedValue},set:function(e){this._selectedValue=e,this.reRender()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=e.map((function(e){return{label:e.label,value:void 0!==e.value?e.value:e.label}})),this.reRender()},enumerable:!1,configurable:!0}),e.prototype.reRender=function(){var e,t=this;this._selectedIndex=this.options.findIndex((function(e){return e.value===t.selectedValue})),null===(e=this.pickerAnimator)||void 0===e||e.select(this._selectedIndex+this.noOfEmptyElements)},Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this._selectedIndex=e,this._selectedValue=this.options[e].value,this.change.emit(this.options[e])},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.pickerAnimator=new U(this)},e}();W.decorators=[{type:t.Component,args:[{selector:"wm-picker",template:'\n <div class="app-picker">\n <div class="app-picker-option-container">\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div *ngFor="let option of options; index as i;" class="app-picker-option">\n {{option.label}}\n </div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n <div class="app-picker-option app-picker-empty-option">E</div>\n </div>\n <div class="app-picker-ruler"></div>\n </div>\n '}]}],W.ctorParameters=function(){return[{type:t.Injector}]},W.propDecorators={change:[{type:t.Output}],selectedValue:[{type:t.Input}],options:[{type:t.Input}]};var U=function(){function e(e){var t=this;this.picker=e;var n=e.selectedIndex+e.noOfEmptyElements,i=function(e){return n+Math.floor(e/16)};this.select(n),this.getElement().swipey({direction:$.fn.swipey.DIRECTIONS.VERTICAL,threshold:10,target:e.$el,onSwipe:function(e,n){t.select(i(-1*n.length))},onSwipeEnd:function(o,a){var r=i(-1*a.length);t.select(r),n=e.selectedIndex+e.noOfEmptyElements}})}return e.prototype.getElement=function(){return this.picker.$el.find(".app-picker-option-container:first")},e.prototype.getOptionElements=function(){return this.getElement().find(".app-picker-option")},e.prototype.select=function(e){var t=this.getOptionElements();if(!(e<this.picker.noOfEmptyElements||e>=t.length-this.picker.noOfEmptyElements)){this.getElement().find(".app-picker-option.app-picker-option-selected").removeClass("app-picker-option-selected"),t.eq(e).addClass("app-picker-option-selected"),this.picker.selectedIndex=e-this.picker.noOfEmptyElements;var n=e-this.picker.noOfEmptyElements,i=e+this.picker.noOfEmptyElements;t.each((function(t,o){if(t>=n&&t<=i){var a=30*(t-e),r=1-.3*Math.abs(t-e);$(o).css({transform:"perspective(500px) rotateX("+a+"deg)",opacity:r}).show()}else $(o).hide()}))}},e}(),q=[S,k,G,g,v,W,V],z=function(){};z.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.BsDatepickerModule,a.BsDropdownModule,i.FormsModule,r.TimepickerModule,s.WmComponentsModule],declarations:f([],m(q)),exports:f([],m(q)),entryComponents:[]}]}],e.DateComponent=S,e.DatetimeComponent=k,e.EpochModule=z,e.TimeComponent=G,e["\u02750"]=N,e["\u0275a"]=O,e["\u0275b"]=E,e["\u0275c"]=g,e["\u0275d"]=v,e["\u0275e"]=A,e["\u0275f"]=I,e["\u0275g"]=L,e["\u0275h"]=V,e["\u0275i"]=W,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("rxjs"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/input/file-upload",["exports","@angular/core","@angular/common","@wm/components/base","rxjs","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.fileupload={}),e.ng.core,e.ng.common,e.wm.components.base,e.rxjs,e.wm.core)}(this,(function(e,t,n,i,o,a){"use strict";
|
|
198
198
|
/*! *****************************************************************************
|
|
199
199
|
Copyright (c) Microsoft Corporation.
|
|
200
200
|
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
307
307
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
308
308
|
PERFORMANCE OF THIS SOFTWARE.
|
|
309
|
-
***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function p(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var d,u=function(){o.register("wm-popover",new Map([["autoclose",Object.assign({value:"outsideClick"},o.PROP_STRING)],["badgevalue",o.PROP_STRING],["caption",Object.assign({value:"Link"},o.PROP_STRING)],["class",o.PROP_STRING],["conditionalclass",o.PROP_ANY],["content",o.PROP_STRING],["contentanimation",o.PROP_STRING],["contentsource",Object.assign({value:"partial"},o.PROP_STRING)],["encodeurl",o.PROP_BOOLEAN],["hint",o.PROP_STRING],["hyperlink",o.PROP_STRING],["iconclass",o.PROP_STRING],["iconheight",o.PROP_STRING],["iconmargin",o.PROP_STRING],["iconposition",o.PROP_STRING],["iconurl",o.PROP_STRING],["iconwidth",o.PROP_STRING],["interaction",Object.assign({value:"click"},o.PROP_STRING)],["name",o.PROP_STRING],["popoverarrow",Object.assign({value:!0},o.PROP_BOOLEAN)],["popoverheight",o.PROP_STRING],["popoverplacement",Object.assign({value:"bottom"},o.PROP_STRING)],["popoverwidth",o.PROP_STRING],["shortcutkey",o.PROP_STRING],["show",Object.assign({value:!0},o.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},o.PROP_NUMBER)],["title",o.PROP_STRING],["adaptiveposition",Object.assign({value:!0},o.PROP_BOOLEAN)]]))},h={widgetType:"wm-popover",hostClass:"app-popover-wrapper"},m={click:"click",hover:"mouseenter:click",default:"click mouseenter"},f=function(e){function t(t,n,i){var o=e.call(this,t,h)||this;return o.app=n,o.isOpen=!1,o.canPopoverOpen=!0,o.keyEventPlugin=i[1],o.popoverContainerCls="app-popover-"+o.widgetId,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.open=function(){this.showPopover()},t.prototype.close=function(){this.isOpen=!1},t.prototype.onHidden=function(){this.invokeEventCallback("hide",{$event:{type:"hide"}}),this.isOpen=!1},t.prototype.setFocusToPopoverLink=function(){var e=this;setTimeout((function(){return e.anchorRef.nativeElement.focus()}),10)},t.prototype.adjustPopoverArrowPosition=function(e,t){this.bsPopoverDirective._popover._ngZone.onStable.subscribe((function(){e.find(".popover-arrow").css("left",t+"px")}))},t.prototype.calculatePopoverPostion=function(e){var t=this,n=$(e),i=n.offset().left,o=n[0].offsetWidth,a=$(window).width(),r=this.anchorRef.nativeElement.getBoundingClientRect();if(i<0){s.adjustContainerPosition(n,this.nativeElement,this.bsPopoverDirective._popover);var l=r.left+r.width/2-4;this.adjustPopoverArrowPosition(n,l)}i+o>a&&(s.adjustContainerRightEdges(n,this.nativeElement,this.bsPopoverDirective._popover),setTimeout((function(){var e,s=(i=n.offset().left)-(i+o-a);e=i<=100?r.left+r.width/2-i:r.left+r.width/2-s,a>500&&(e+=30),t.adjustPopoverArrowPosition(n,e)})))},t.prototype.onShown=function(){var e=this,t=s.findRootContainer(this.$element);t&&$("body > popover-container").wrap("<"+t+"/>"),d&&d.isOpen&&(d.isOpen=!1),(d=this).isOpen=!0;var n=document.querySelector("."+this.popoverContainerCls);s.setCSSFromObj(n,{height:this.popoverheight,minWidth:this.popoverwidth,width:this.popoverwidth}),this.popoverarrow||s.addClass(n.querySelector(".arrow"),"hidden"),"hover"!==this.interaction&&"default"!==this.interaction||(n.onmouseenter=function(){return clearTimeout(e.closePopoverTimeout)},n.onmouseleave=function(){return e.hidePopover()},this.anchorRef.nativeElement.onmouseenter=function(){return clearTimeout(e.closePopoverTimeout)},this.anchorRef.nativeElement.onmouseleave=function(){return e.hidePopover()}),setTimeout((function(){e.anchorRef.nativeElement.removeAttribute("aria-describedby")}));var i=this.eventManager.addEventListener(n,"keydown.esc",(function(){e.isOpen=!1,e.setFocusToPopoverLink(),i()})),a=n.querySelector(".popover-start"),r=n.querySelector(".popover-end");a.onkeydown=function(t){"shift.tab"===e.keyEventPlugin.constructor.getEventFullKey(t)&&(e.bsPopoverDirective.hide(),t.preventDefault(),e.setFocusToPopoverLink(),e.isOpen=!1)},r.onkeydown=function(t){"tab"===e.keyEventPlugin.constructor.getEventFullKey(t)&&(e.bsPopoverDirective.hide(),t.preventDefault(),e.setFocusToPopoverLink(),e.isOpen=!1)},this.autoclose===o.AUTOCLOSE_TYPE.ALWAYS&&(n.onclick=function(){return e.close()}),setTimeout((function(){return a.focus()}),50),setTimeout((function(){e.adaptiveposition||e.calculatePopoverPostion(n),e.triggerPopoverEvents()}))},t.prototype.triggerPopoverEvents=function(){var e=this;if("partial"===this.contentsource)var t=this.app.subscribe("partialLoaded",(function(n){var i,o=e.partialRef.nativeElement;o&&(i=o.widget,e.Widgets=i.Widgets,e.Variables=i.Variables,e.Actions=i.Actions,e.invokeEventCallback("load"),e.invokeEventCallback("show",{$event:{type:"show"}})),t()}));else this.Widgets=this.viewParent.Widgets,this.Variables=this.viewParent.Variables,this.Actions=this.viewParent.Actions,this.invokeEventCallback("show",{$event:{type:"show"}})},t.prototype.hidePopover=function(){var e=this;this.closePopoverTimeout=setTimeout((function(){return e.isOpen=!1}),500)},t.prototype.showPopover=function(){this.bsPopoverDirective.show()},t.prototype.onPopoverAnchorKeydown=function(e){this.canPopoverOpen&&("enter"===this.keyEventPlugin.constructor.getEventFullKey(event)&&(e.stopPropagation(),this.showPopover()))},t.prototype.onPropertyChange=function(t,n,i){"class"!==t&&"tabindex"!==t&&("contentsource"===t&&("partial"!==this.contentsource||this.content||(this.canPopoverOpen=!1)),"content"===t&&n&&(this.canPopoverOpen=!0),"autoclose"===t&&(this.outsideclick=n===o.AUTOCLOSE_TYPE.OUTSIDECLICK||n===o.AUTOCLOSE_TYPE.ALWAYS),e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.event=m[this.interaction]},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),o.styler(this.anchorRef.nativeElement,this),this.containerTarget=o.getContainerTargetClass(this.nativeElement);var t=$(this.nativeElement).parents();(t.closest("[wmTable]").length||t.closest("[wmtabs]").length||t.closest("modal-container").length)&&(this.adaptiveposition=!1)},t.prototype.ngOnDetach=function(){this.bsPopoverDirective.hide()},t}(o.StylableComponent);f.initializeProps=u(),f.decorators=[{type:t.Component,args:[{selector:"wm-popover",template:'<a [popover]="popoverTemplate"\n [popoverContext]="context"\n [popoverTitle]="title"\n [placement]="popoverplacement"\n [outsideClick]="outsideclick"\n [triggers]="event"\n (onShown)="onShown()"\n (onHidden)="onHidden()"\n containerClass="app-popover animated {{contentanimation}} {{popoverContainerCls}}"\n [container]="containerTarget || \'body\'"\n [isOpen]="isOpen"\n [tabindex]="tabindex"\n [name]="name"\n [class]="class"\n [ngClass]="{\'disable-popover\': !canPopoverOpen}"\n [adaptivePosition]="adaptiveposition"\n [attr.aria-label]="hint || \'Popover menu\'"\n [attr.aria-expanded]="isOpen"\n role="button"\n #anchor\n name.bind="name"\n wmAnchor\n animation.bind="animation"\n badgevalue.bind="badgevalue"\n caption.bind="caption"\n encodeurl.bind="encodeurl"\n hint.bind="hint"\n hyperlink.bind="hyperlink"\n iconurl.bind="iconurl"\n iconwidth.bind="iconwidth"\n iconheight.bind="iconheight"\n iconmargin.bind="iconmargin"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n (keydown)="onPopoverAnchorKeydown($event)">\n</a>\n',providers:[o.provideAsWidgetRef(f)]}]}],f.ctorParameters=function(){return[{type:t.Injector},{type:s.App},{type:void 0,decorators:[{type:t.Inject,args:[r.EVENT_MANAGER_PLUGINS]}]}]},f.propDecorators={bsPopoverDirective:[{type:t.ViewChild,args:[i.PopoverDirective]}],anchorRef:[{type:t.ViewChild,args:["anchor",{static:!0}]}],popoverTemplate:[{type:t.ContentChild,args:[t.TemplateRef]}],partialRef:[{type:t.ContentChild,args:["partial"]}]};var g=[f],v=function(){};v.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,a.BasicModule,i.PopoverModule,o.WmComponentsModule],declarations:p([],c(g)),exports:p([],c(g)),entryComponents:[]}]}],e.PopoverComponent=f,e.PopoverModule=v,e["\u0275a"]=u,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("ngx-bootstrap/modal"),require("@wm/core"),require("@wm/components/base"),require("@angular/router"),require("@wavemaker/focus-trap/dist/focus-trap"),require("@angular/common")):"function"==typeof define&&define.amd?define("@wm/components/dialogs",["exports","@angular/core","ngx-bootstrap/modal","@wm/core","@wm/components/base","@angular/router","@wavemaker/focus-trap/dist/focus-trap","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs={}),e.ng.core,e["ngx-bootstrap"].modal,e.wm.core,e.wm.components.base,e.ng.router,e.focusTrap,e.ng.common)}(this,(function(e,t,n,i,o,a,r,s){"use strict";var l=function(e,t,n,o){var a=this;this.dialogRef=t,this.renderer=o,i.addClass(e.nativeElement,"app-dialog-body modal-body");var r=n.onShown.subscribe((function(){var t=$(e.nativeElement).closest(".app-dialog")[0],n=$("body.wm-app")[0];if(!n){var o=$("body > .modal-backdrop")[0],s=$("body > modal-container")[0];(n=$(".wm-app")[0])&&s&&(o&&a.renderer.appendChild(n,o),a.renderer.appendChild(n,s))}var l=a.dialogRef.width,c=a.dialogRef.height;c&&setTimeout((function(t){i.setCSS($(e.nativeElement)[0],"height",c)})),t&&(l&&i.setCSS(t,"width",l),i.setAttr(t,"tabindex",a.dialogRef.tabindex),i.setAttr(t,"name",a.dialogRef.name)),r.unsubscribe()}))};l.decorators=[{type:t.Directive,args:[{selector:"div[wmDialogBody]"}]}],l.ctorParameters=function(){return[{type:t.ElementRef},{type:void 0,decorators:[{type:t.Inject,args:[o.DialogRef]}]},{type:n.BsModalService},{type:t.Renderer2}]},l.propDecorators={height:[{type:t.HostBinding,args:["style.height"]}]};
|
|
309
|
+
***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function p(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var d,u=function(){o.register("wm-popover",new Map([["autoclose",Object.assign({value:"outsideClick"},o.PROP_STRING)],["badgevalue",o.PROP_STRING],["caption",Object.assign({value:"Link"},o.PROP_STRING)],["class",o.PROP_STRING],["conditionalclass",o.PROP_ANY],["content",o.PROP_STRING],["contentanimation",o.PROP_STRING],["contentsource",Object.assign({value:"partial"},o.PROP_STRING)],["encodeurl",o.PROP_BOOLEAN],["hint",o.PROP_STRING],["hyperlink",{value:"javascript:void(0)",PROP_STRING:o.PROP_STRING}],["iconclass",o.PROP_STRING],["iconheight",o.PROP_STRING],["iconmargin",o.PROP_STRING],["iconposition",o.PROP_STRING],["iconurl",o.PROP_STRING],["iconwidth",o.PROP_STRING],["interaction",Object.assign({value:"click"},o.PROP_STRING)],["name",o.PROP_STRING],["popoverarrow",Object.assign({value:!0},o.PROP_BOOLEAN)],["popoverheight",o.PROP_STRING],["popoverplacement",Object.assign({value:"bottom"},o.PROP_STRING)],["popoverwidth",o.PROP_STRING],["shortcutkey",o.PROP_STRING],["show",Object.assign({value:!0},o.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},o.PROP_NUMBER)],["title",o.PROP_STRING],["adaptiveposition",Object.assign({value:!0},o.PROP_BOOLEAN)]]))},h={widgetType:"wm-popover",hostClass:"app-popover-wrapper"},m={click:"click",hover:"mouseenter:click",default:"click mouseenter"},f=function(e){function t(t,n,i){var o=e.call(this,t,h)||this;return o.app=n,o.isOpen=!1,o.canPopoverOpen=!0,o.keyEventPlugin=i[1],o.popoverContainerCls="app-popover-"+o.widgetId,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.open=function(){this.showPopover()},t.prototype.close=function(){this.isOpen=!1},t.prototype.onHidden=function(){this.invokeEventCallback("hide",{$event:{type:"hide"}}),this.isOpen=!1},t.prototype.setFocusToPopoverLink=function(){var e=this;setTimeout((function(){return e.anchorRef.nativeElement.focus()}),10)},t.prototype.adjustPopoverArrowPosition=function(e,t){this.bsPopoverDirective._popover._ngZone.onStable.subscribe((function(){e.find(".popover-arrow").css("left",t+"px")}))},t.prototype.calculatePopoverPostion=function(e){var t=this,n=$(e),i=n.offset().left,o=n[0].offsetWidth,a=$(window).width(),r=this.anchorRef.nativeElement.getBoundingClientRect();if(i<0){s.adjustContainerPosition(n,this.nativeElement,this.bsPopoverDirective._popover);var l=r.left+r.width/2-4;this.adjustPopoverArrowPosition(n,l)}i+o>a&&(s.adjustContainerRightEdges(n,this.nativeElement,this.bsPopoverDirective._popover),setTimeout((function(){var e,s=(i=n.offset().left)-(i+o-a);e=i<=100?r.left+r.width/2-i:r.left+r.width/2-s,a>500&&(e+=30),t.adjustPopoverArrowPosition(n,e)})))},t.prototype.onShown=function(){var e=this,t=s.findRootContainer(this.$element);t&&$("body > popover-container").wrap("<"+t+"/>"),d&&d.isOpen&&(d.isOpen=!1),(d=this).isOpen=!0;var n=document.querySelector("."+this.popoverContainerCls);s.setCSSFromObj(n,{height:this.popoverheight,minWidth:this.popoverwidth,width:this.popoverwidth}),this.popoverarrow||s.addClass(n.querySelector(".arrow"),"hidden"),"hover"!==this.interaction&&"default"!==this.interaction||(n.onmouseenter=function(){return clearTimeout(e.closePopoverTimeout)},n.onmouseleave=function(){return e.hidePopover()},this.anchorRef.nativeElement.onmouseenter=function(){return clearTimeout(e.closePopoverTimeout)},this.anchorRef.nativeElement.onmouseleave=function(){return e.hidePopover()}),setTimeout((function(){e.anchorRef.nativeElement.removeAttribute("aria-describedby")}));var i=this.eventManager.addEventListener(n,"keydown.esc",(function(){e.isOpen=!1,e.setFocusToPopoverLink(),i()})),a=n.querySelector(".popover-start"),r=n.querySelector(".popover-end");a.onkeydown=function(t){"shift.tab"===e.keyEventPlugin.constructor.getEventFullKey(t)&&(e.bsPopoverDirective.hide(),t.preventDefault(),e.setFocusToPopoverLink(),e.isOpen=!1)},r.onkeydown=function(t){"tab"===e.keyEventPlugin.constructor.getEventFullKey(t)&&(e.bsPopoverDirective.hide(),t.preventDefault(),e.setFocusToPopoverLink(),e.isOpen=!1)},this.autoclose===o.AUTOCLOSE_TYPE.ALWAYS&&(n.onclick=function(){return e.close()}),setTimeout((function(){return a.focus()}),50),setTimeout((function(){e.adaptiveposition||e.calculatePopoverPostion(n),e.triggerPopoverEvents()}))},t.prototype.triggerPopoverEvents=function(){var e=this;if("partial"===this.contentsource)var t=this.app.subscribe("partialLoaded",(function(n){var i,o=e.partialRef.nativeElement;o&&(i=o.widget,e.Widgets=i.Widgets,e.Variables=i.Variables,e.Actions=i.Actions,e.invokeEventCallback("load"),e.invokeEventCallback("show",{$event:{type:"show"}})),t()}));else this.Widgets=this.viewParent.Widgets,this.Variables=this.viewParent.Variables,this.Actions=this.viewParent.Actions,this.invokeEventCallback("show",{$event:{type:"show"}})},t.prototype.hidePopover=function(){var e=this;this.closePopoverTimeout=setTimeout((function(){return e.isOpen=!1}),500)},t.prototype.showPopover=function(){this.bsPopoverDirective.show()},t.prototype.onPopoverAnchorKeydown=function(e){this.canPopoverOpen&&("enter"===this.keyEventPlugin.constructor.getEventFullKey(event)&&(e.stopPropagation(),this.showPopover()))},t.prototype.onPropertyChange=function(t,n,i){"class"!==t&&"tabindex"!==t&&("contentsource"===t&&("partial"!==this.contentsource||this.content||(this.canPopoverOpen=!1)),"content"===t&&n&&(this.canPopoverOpen=!0),"autoclose"===t&&(this.outsideclick=n===o.AUTOCLOSE_TYPE.OUTSIDECLICK||n===o.AUTOCLOSE_TYPE.ALWAYS),e.prototype.onPropertyChange.call(this,t,n,i))},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.event=m[this.interaction]},t.prototype.ngAfterViewInit=function(){e.prototype.ngAfterViewInit.call(this),o.styler(this.anchorRef.nativeElement,this),this.containerTarget=o.getContainerTargetClass(this.nativeElement);var t=$(this.nativeElement).parents();(t.closest("[wmTable]").length||t.closest("[wmtabs]").length||t.closest("modal-container").length)&&(this.adaptiveposition=!1)},t.prototype.ngOnDetach=function(){this.bsPopoverDirective.hide()},t}(o.StylableComponent);f.initializeProps=u(),f.decorators=[{type:t.Component,args:[{selector:"wm-popover",template:'<a [popover]="popoverTemplate"\n [popoverContext]="context"\n [popoverTitle]="title"\n [placement]="popoverplacement"\n [outsideClick]="outsideclick"\n [triggers]="event"\n (onShown)="onShown()"\n (onHidden)="onHidden()"\n containerClass="app-popover animated {{contentanimation}} {{popoverContainerCls}}"\n [container]="containerTarget || \'body\'"\n [isOpen]="isOpen"\n [tabindex]="tabindex"\n [name]="name"\n [class]="class"\n [ngClass]="{\'disable-popover\': !canPopoverOpen}"\n [adaptivePosition]="adaptiveposition"\n [attr.aria-label]="hint || \'Popover menu\'"\n [attr.aria-expanded]="isOpen"\n role="button"\n #anchor\n name.bind="name"\n wmAnchor\n animation.bind="animation"\n badgevalue.bind="badgevalue"\n caption.bind="caption"\n encodeurl.bind="encodeurl"\n hint.bind="hint"\n hyperlink.bind="hyperlink"\n iconurl.bind="iconurl"\n iconwidth.bind="iconwidth"\n iconheight.bind="iconheight"\n iconmargin.bind="iconmargin"\n iconclass.bind="iconclass"\n iconposition.bind="iconposition"\n shortcutkey.bind="shortcutkey"\n tabindex.bind="tabindex"\n (keydown)="onPopoverAnchorKeydown($event)">\n</a>\n',providers:[o.provideAsWidgetRef(f)]}]}],f.ctorParameters=function(){return[{type:t.Injector},{type:s.App},{type:void 0,decorators:[{type:t.Inject,args:[r.EVENT_MANAGER_PLUGINS]}]}]},f.propDecorators={bsPopoverDirective:[{type:t.ViewChild,args:[i.PopoverDirective]}],anchorRef:[{type:t.ViewChild,args:["anchor",{static:!0}]}],popoverTemplate:[{type:t.ContentChild,args:[t.TemplateRef]}],partialRef:[{type:t.ContentChild,args:["partial"]}]};var g=[f],v=function(){};v.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,a.BasicModule,i.PopoverModule,o.WmComponentsModule],declarations:p([],c(g)),exports:p([],c(g)),entryComponents:[]}]}],e.PopoverComponent=f,e.PopoverModule=v,e["\u0275a"]=u,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("ngx-bootstrap/modal"),require("@wm/core"),require("@wm/components/base"),require("@angular/router"),require("@wavemaker/focus-trap/dist/focus-trap"),require("@angular/common")):"function"==typeof define&&define.amd?define("@wm/components/dialogs",["exports","@angular/core","ngx-bootstrap/modal","@wm/core","@wm/components/base","@angular/router","@wavemaker/focus-trap/dist/focus-trap","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs={}),e.ng.core,e["ngx-bootstrap"].modal,e.wm.core,e.wm.components.base,e.ng.router,e.focusTrap,e.ng.common)}(this,(function(e,t,n,i,o,a,r,s){"use strict";var l=function(e,t,n,o){var a=this;this.dialogRef=t,this.renderer=o,i.addClass(e.nativeElement,"app-dialog-body modal-body");var r=n.onShown.subscribe((function(){var t=$(e.nativeElement).closest(".app-dialog")[0],n=$("body.wm-app")[0];if(!n){var o=$("body > .modal-backdrop")[0],s=$("body > modal-container")[0];(n=$(".wm-app")[0])&&s&&(o&&a.renderer.appendChild(n,o),a.renderer.appendChild(n,s))}var l=a.dialogRef.width,c=a.dialogRef.height;c&&setTimeout((function(t){i.setCSS($(e.nativeElement)[0],"height",c)})),t&&(l&&i.setCSS(t,"width",l),i.setAttr(t,"tabindex",a.dialogRef.tabindex),i.setAttr(t,"name",a.dialogRef.name)),r.unsubscribe()}))};l.decorators=[{type:t.Directive,args:[{selector:"div[wmDialogBody]"}]}],l.ctorParameters=function(){return[{type:t.ElementRef},{type:void 0,decorators:[{type:t.Inject,args:[o.DialogRef]}]},{type:n.BsModalService},{type:t.Renderer2}]},l.propDecorators={height:[{type:t.HostBinding,args:["style.height"]}]};
|
|
310
310
|
/*! *****************************************************************************
|
|
311
311
|
Copyright (c) Microsoft Corporation.
|
|
312
312
|
|
|
@@ -335,7 +335,7 @@ var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
335
335
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
336
336
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
337
337
|
PERFORMANCE OF THIS SOFTWARE.
|
|
338
|
-
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var p=function(){i.register("wm-alertdialog",new Map([["alerttype",Object.assign({value:"error"},i.PROP_STRING)],["animation",i.PROP_STRING],["class",i.PROP_STRING],["closable",{value:!0,PROP_BOOLEAN:i.PROP_BOOLEAN}],["iconclass",{value:"wi wi-warning",PROP_STRING:i.PROP_STRING}],["iconheight",i.PROP_STRING],["iconmargin",i.PROP_STRING],["iconurl",i.PROP_STRING],["iconwidth",i.PROP_STRING],["message",Object.assign({value:"Am an alert box!"},i.PROP_STRING)],["modal",Object.assign({value:!1},i.PROP_BOOLEAN)],["name",i.PROP_STRING],["oktext",Object.assign({value:"OK"},i.PROP_STRING)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["title",Object.assign({value:"Alert"},i.PROP_STRING)]]))},d={widgetType:"wm-alertdialog"},u=function(e){function t(t,n,i,o){null==i&&(i=!1),null==o&&(o=!0);var a=!r.toBoolean(i)||"static";return e.call(this,t,d,{class:"app-dialog modal-dialog app-alert-dialog "+(n||""),backdrop:a,keyboard:!r.toBoolean(i)})||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.getTemplateRef=function(){return this.dialogTemplate},t.prototype.onOk=function(e){this.invokeEventCallback("ok",{$event:e})},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.register(this.viewParent)},t}(o.BaseDialog);u.initializeProps=p(),u.decorators=[{type:t.Component,args:[{selector:"div[wmAlertDialog]",template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [titleid]="titleId"></div>\n <div wmDialogBody>\n <p class="app-dialog-message text-{{alerttype}}" [
|
|
338
|
+
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var p=function(){i.register("wm-alertdialog",new Map([["alerttype",Object.assign({value:"error"},i.PROP_STRING)],["animation",i.PROP_STRING],["class",i.PROP_STRING],["closable",{value:!0,PROP_BOOLEAN:i.PROP_BOOLEAN}],["iconclass",{value:"wi wi-warning",PROP_STRING:i.PROP_STRING}],["iconheight",i.PROP_STRING],["iconmargin",i.PROP_STRING],["iconurl",i.PROP_STRING],["iconwidth",i.PROP_STRING],["message",Object.assign({value:"Am an alert box!"},i.PROP_STRING)],["modal",Object.assign({value:!1},i.PROP_BOOLEAN)],["name",i.PROP_STRING],["oktext",Object.assign({value:"OK"},i.PROP_STRING)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["title",Object.assign({value:"Alert"},i.PROP_STRING)]]))},d={widgetType:"wm-alertdialog"},u=function(e){function t(t,n,i,o){null==i&&(i=!1),null==o&&(o=!0);var a=!r.toBoolean(i)||"static";return e.call(this,t,d,{class:"app-dialog modal-dialog app-alert-dialog "+(n||""),backdrop:a,keyboard:!r.toBoolean(i)})||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.getTemplateRef=function(){return this.dialogTemplate},t.prototype.onOk=function(e){this.invokeEventCallback("ok",{$event:e})},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.register(this.viewParent)},t}(o.BaseDialog);u.initializeProps=p(),u.decorators=[{type:t.Component,args:[{selector:"div[wmAlertDialog]",template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n [titleid]="titleId"></div>\n <div wmDialogBody>\n <p class="app-dialog-message text-{{alerttype}}" [textContent]="message"></p>\n </div>\n <div wmDialogFooter>\n <button wmButton class="btn-primary ok-action" caption.bind="oktext" aria-label="Submit button" (click)="onOk($event)"></button>\n </div>\n</ng-template>\n',providers:[i.provideAsWidgetRef(u),i.provideAsDialogRef(u)]}]}],u.ctorParameters=function(){return[{type:t.Injector},{type:String,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]}]},u.propDecorators={dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0}]}]};var h=[u],m=function(){};m.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.DialogModule,a.InputModule,i.WmComponentsModule],declarations:c([],l(h)),exports:c([],l(h)),entryComponents:[]}]}],e.AlertDialogComponent=u,e.AlertDialogModule=m,e["\u0275a"]=p,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("@wm/components/dialogs"),require("@wm/components/input"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/dialogs/confirm-dialog",["exports","@angular/core","@angular/common","@wm/components/base","@wm/components/dialogs","@wm/components/input","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.dialogs=e.wm.components.dialogs||{},e.wm.components.dialogs.confirmdialog={}),e.ng.core,e.ng.common,e.wm.components.base,e.wm.components.dialogs,e.wm.components.input,e.wm.core)}(this,(function(e,t,n,i,o,a,r){"use strict";
|
|
339
339
|
/*! *****************************************************************************
|
|
340
340
|
Copyright (c) Microsoft Corporation.
|
|
341
341
|
|
|
@@ -363,7 +363,7 @@ var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
363
363
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
364
364
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
365
365
|
PERFORMANCE OF THIS SOFTWARE.
|
|
366
|
-
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var p=function(){i.register("wm-dialog",new Map([["animation",i.PROP_STRING],["class",i.PROP_STRING],["closable",{value:!0,
|
|
366
|
+
***************************************************************************** */var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function c(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var p=function(){i.register("wm-dialog",new Map([["animation",i.PROP_STRING],["class",i.PROP_STRING],["closable",Object.assign({value:!0},i.PROP_BOOLEAN)],["iconclass",{value:"wi wi-file-text",PROP_STRING:i.PROP_STRING}],["iconheight",i.PROP_STRING],["iconmargin",i.PROP_STRING],["iconurl",i.PROP_STRING],["iconwidth",i.PROP_STRING],["modal",Object.assign({value:!0},i.PROP_BOOLEAN)],["name",i.PROP_STRING],["showheader",Object.assign({value:!0},i.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["title",Object.assign({value:"Information"},i.PROP_STRING)],["eventsource",i.PROP_ANY]]))},d={widgetType:"wm-dialog"},u={},h=function(e){function t(t,n,i,o,a){var s=this;null==i&&(i=!0),null==o&&(o=!0),a[0].closeDialog=function(){return s.close()};var l=!r.toBoolean(i)||"static";return s=e.call(this,t,d,{class:"app-dialog modal-dialog "+(n||""),backdrop:l,keyboard:!!r.toBoolean(o)||!r.toBoolean(i)})||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.getTemplateRef=function(){return this.dialogTemplate},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.register(this.viewParent)},t}(o.BaseDialog);h.initializeProps=p(),h.decorators=[{type:t.Component,args:[{selector:"div[wmDialog]",template:'<ng-template #dialogTemplate>\n <div wmDialogHeader [closable]="closable"\n [iconclass]="iconclass"\n [iconurl]="iconurl"\n [iconwidth]="iconwidth"\n [iconheight]="iconheight"\n [iconmargin]="iconmargin"\n [heading]="title"\n *ngIf="showheader"\n [titleid]="titleId"\n ></div>\n <div wmDialogBody>\n <ng-container *ngTemplateOutlet="dialogBody"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="dialogFooter"></ng-container>\n</ng-template>\n',providers:[i.provideAsWidgetRef(h),i.provideAsDialogRef(h),{provide:i.Context,useValue:u,multi:!0}]}]}],h.ctorParameters=function(){return[{type:t.Injector},{type:String,decorators:[{type:t.Attribute,args:["class"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["modal"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["closable"]}]},{type:Array,decorators:[{type:t.Self},{type:t.Inject,args:[i.Context]}]}]},h.propDecorators={dialogTemplate:[{type:t.ViewChild,args:["dialogTemplate",{static:!0,read:t.TemplateRef}]}],dialogBody:[{type:t.ContentChild,args:["dialogBody",{read:t.TemplateRef}]}],dialogFooter:[{type:t.ContentChild,args:["dialogFooter",{read:t.TemplateRef}]}]};var m=[h],f=function(){};f.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.DialogModule,a.InputModule,i.WmComponentsModule],declarations:c([],l(m)),exports:c([],l(m)),entryComponents:[]}]}],e.DesignDialogModule=f,e.DialogComponent=h,e["\u02750"]=u,e["\u0275a"]=p,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("@angular/platform-browser"),require("@wm/core")):"function"==typeof define&&define.amd?define("@wm/components/page",["exports","@angular/core","@angular/common","@wm/components/base","@angular/platform-browser","@wm/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.page={}),e.ng.core,e.ng.common,e.wm.components.base,e.ng.platformBrowser,e.wm.core)}(this,(function(e,t,n,i,o,a){"use strict";
|
|
367
367
|
/*! *****************************************************************************
|
|
368
368
|
Copyright (c) Microsoft Corporation.
|
|
369
369
|
|
|
@@ -517,7 +517,7 @@ var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
517
517
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
518
518
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
519
519
|
PERFORMANCE OF THIS SOFTWARE.
|
|
520
|
-
***************************************************************************** */var f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function y(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function w(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var P=function(){r.register("wm-table",new Map([["boundarylinks",Object.assign({value:!1},r.PROP_BOOLEAN)],["class",r.PROP_STRING],["confirmdelete",Object.assign({value:"Are you sure you want to delete this?"},r.PROP_STRING)],["datasource",r.PROP_STRING],["dataset",r.PROP_ANY],["deletecanceltext",r.PROP_STRING],["deleteoktext",r.PROP_STRING],["deletemessage",Object.assign({value:"Record deleted successfully"},r.PROP_STRING)],["directionlinks",Object.assign({value:!0},r.PROP_BOOLEAN)],["editmode",r.PROP_STRING],["errorstyle",Object.assign({value:"hover"},r.PROP_STRING)],["enablecolumnselection",Object.assign({value:!1},r.PROP_BOOLEAN)],["enablesort",Object.assign({value:!0},r.PROP_BOOLEAN)],["errormessage",r.PROP_STRING],["exportformat",r.PROP_STRING],["exportdatasize",Object.assign({value:100},r.PROP_NUMBER)],["filtermode",r.PROP_STRING],["filternullrecords",Object.assign({value:!0},r.PROP_BOOLEAN)],["forceellipses",Object.assign({value:!0},r.PROP_BOOLEAN)],["formposition",r.PROP_STRING],["gridclass",Object.assign({value:"table-hover"},r.PROP_STRING)],["gridfirstrowselect",r.PROP_BOOLEAN],["iconclass",r.PROP_STRING],["insertmessage",Object.assign({value:"Record added successfully"},r.PROP_STRING)],["isdynamictable",r.PROP_BOOLEAN],["isrowexpansionenabled",r.PROP_BOOLEAN],["loadingdatamsg",Object.assign({value:"Loading..."},r.PROP_STRING)],["loadingicon",Object.assign({value:"fa fa-circle-o-notch fa-spin"},r.PROP_STRING)],["maxsize",Object.assign({value:5},r.PROP_NUMBER)],["multiselect",r.PROP_BOOLEAN],["name",r.PROP_STRING],["navigation",Object.assign({value:"Basic"},r.PROP_STRING)],["navigationalign",Object.assign({value:"left"},r.PROP_STRING)],["nodatamessage",Object.assign({value:"No data found."},r.PROP_STRING)],["ondemandmessage",Object.assign({value:"Load More"},r.PROP_STRING)],["showviewlessbutton",Object.assign({value:!1},r.PROP_BOOLEAN)],["viewlessmessage",Object.assign({value:"View Less"},r.PROP_STRING)],["pagesize",r.PROP_NUMBER],["radioselect",r.PROP_BOOLEAN],["rowclass",r.PROP_STRING],["rowngclass",r.PROP_STRING],["searchlabel",Object.assign({value:"Search"},r.PROP_STRING)],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["showheader",Object.assign({value:!0},r.PROP_BOOLEAN)],["shownewrow",Object.assign({value:!0},r.PROP_BOOLEAN)],["showrecordcount",r.PROP_BOOLEAN],["showrowindex",r.PROP_BOOLEAN],["spacing",Object.assign({value:"normal"},r.PROP_STRING)],["statehandler",Object.assign({value:"none"},r.PROP_STRING)],["subheading",r.PROP_STRING],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["title",r.PROP_STRING],["updatemessage",Object.assign({value:"Record updated successfully"},r.PROP_STRING)]]))},O={widgetType:"wm-table",hostClass:"app-grid app-panel panel"},E={EXCEL:"fa fa-file-excel-o",CSV:"fa fa-file-text-o"},R="rowOperations",A=function(){},T=function(e){var t=!1;[".dropdown-menu",".uib-typeahead-match",".modal-dialog",".toast"].forEach((function(n){if(e.closest(n).length)return t=!0,!1}));return t||["bsdatepickerdaydecorator"].forEach((function(n){if(e[0].hasAttribute(n))return t=!0,!1})),t},S=function(e){function t(t,n,i,o,a,s,l,c,p,d,f,g,v){var y=e.call(this,t,O)||this;return y.inj=t,y.fb=n,y.app=i,y.dynamicComponentProvider=o,y.statePersistence=a,y.paginationService=s,y.viewport=l,y.parentList=c,y.binddataset=p,y.binddatasource=d,y.readonlygrid=f,y.ngZone=g,y.trustAsPipe=v,y.rowActionsCompiledTl={},y.rowFilterCompliedTl={},y.inlineCompliedTl={},y.inlineNewCompliedTl={},y.customExprCompiledTl={},y.customExprCompiledSummaryTl={},y.rowDefInstances={},y.rowDefMap={},y.rowExpansionActionTl={},y.columns={},y.formfields={},y.enablesort=!0,y.showviewlessbutton=!1,y.primaryKey=[],y.selectedItems=[],y.selectedItemChange=new h.Subject,y.selectedItemChange$=y.selectedItemChange.asObservable(),y.actions=[],y._actions={header:[],footer:[]},y.exportOptions=[],y.headerConfig=[],y.items=[],y.rowActions=[],y.shownavigation=!1,y.documentClickBind=A,y.prevFilterExpression=[],y.fieldDefs=[],y.rowDef={},y.rowInstance={},y.fullFieldDefs=[],y.variableInflight=!0,y.applyProps=new Map,y.redraw=_.debounce(y._redraw,150),y.debouncedHandleLoading=_.debounce(y.handleLoading,350),y.rowFilter={},y._searchSortHandler=A,y.searchSortHandler=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];y._searchSortHandler.apply(y,e)},y.onRowFilterChange=A,y.onFilterConditionSelect=A,y.showClearIcon=A,y.clearRowFilter=A,y.adjustContainer=A,y._pageLoad=!0,y.gridOptions={data:[],colDefs:[],startRowIndex:1,mode:"",sortInfo:{field:"",direction:""},filtermode:"",searchLabel:"",rowActions:[],headerConfig:[],rowClass:"",editmode:"",formPosition:"",isMobile:!1,rowExpansionEnabled:!1,rowDef:{position:"0"},name:"",messages:{selectField:"Select Field"},securityUtils:{pipeTransform:{}},navigation:"",isdynamictable:"",deletedRowIndex:-1,lastActionPerformed:"scroll",isSearchTrigerred:!1,isDatasetUpdated:!1,isDataUpdatedByUser:!1,showviewlessbutton:!1,ondemandmessage:"",viewlessmessage:"",loadingdatamsg:"",isNextPageData:void 0,ACTIONS:{DELETE:"delete",EDIT:"edit",SEARCH_OR_SORT:"search_or_sort",DEFAULT:"scroll",FILTER_CRITERIA:"filter",DATASET_UPDATE:"dataset_update"},actionRowIndex:void 0,actionRowPage:void 0,isLastPage:!1,getCurrentPage:function(){return _.get(y.dataNavigator,"dn.currentPage")||1},setCurrentPage:function(e){_.set(y.dataNavigator,"dn.currentPage",e||1)},getDataSource:function(){return y.datasource},getPageSize:function(){return y.pagesize},getPageCount:function(){return y.dataNavigator.pageCount},enableNavigation:function(){y.dataNavigator.widget.isDisableNext=!1,y.dataNavigator.widget.isDisableLast=!1,y.gridOptions.mode="viewless"},setDeletedRowIndex:function(e){y.setDataGridOption("deletedRowIndex",e)},setLastActionPerformed:function(e){y.setDataGridOption("lastActionPerformed",e||y.gridOptions.lastActionPerformed)},isNavTypeScrollOrOndemand:function(){return"Scroll"===y.gridOptions.navigation||"On-Demand"===y.gridOptions.navigation},setIsSearchTrigerred:function(e){y.setDataGridOption("isSearchTrigerred",e)},setIsDatasetUpdated:function(e){y.setDataGridOption("isDatasetUpdated",e)},setIsNextPageData:function(e){y.setDataGridOption("isNextPageData",e)},setIsDataUpdatedByUser:function(e){y.setDataGridOption("isDataUpdatedByUser",e)},onDataRender:function(){y.ngZone.run((function(){y.gridData.length&&y.invokeEventCallback("datarender",{$data:y.gridData,data:y.gridData}),y.multiselect||(y.items.length=0),y.callDataGridMethod("selectRows",y.items),y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.selectedItems.length&&y.selectedItemChange.next(y.selectedItems),y._isPageSearch&&y.filterInfo&&y.searchSortHandler(y.filterInfo,void 0,"search")}))},onRowSelect:function(e,t){y.ngZone.run((function(){y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.selectedItems.length&&y.selectedItemChange.next(y.selectedItems);var n=y.addRowIndex(e);if(y.selectedItems.length&&n.$index&&"none"!==y.getConfiguredState()&&y.dataNavigator&&r.unsupportedStatePersistenceTypes.indexOf(y.navigation)<0){var i={page:y.dataNavigator.dn.currentPage,index:n.$index-1},o=y.statePersistence.getWidgetState(y);_.get(o,"selectedItem")&&y.multiselect?(_.some(o.selectedItem,i)||o.selectedItem.push(i),y.statePersistence.setWidgetState(y,{selectedItem:o.selectedItem})):y.statePersistence.setWidgetState(y,{selectedItem:[i]})}else console.warn("Retain State handling on Widget "+y.name+" is not supported for current pagination type.");y.invokeEventCallback("rowselect",{$data:n,$event:t,row:n})}))},assignSelectedItems:function(e,t){y.ngZone.run((function(){y.multiselect?-1===_.findIndex(y.items,e)&&y.items.push(e):(y.items.length=0,y.items.push(e))}))},onRowDblClick:function(e,t){var n=y.addRowIndex(e);y.invokeEventCallback("rowdblclick",{$data:n,$event:t,row:n})},onRowDeselect:function(e,t){y.multiselect&&y.ngZone.run((function(){y.items=_.pullAllWith(y.items,[e],_.isEqual),y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.invokeEventCallback("rowdeselect",{$data:e,$event:t,row:e});var n=y.addRowIndex(e);if("none"!==y.getConfiguredState()&&r.unsupportedStatePersistenceTypes.indexOf(y.navigation)<0){var i={page:y.dataNavigator.dn.currentPage,index:n.$index-1},o=y.statePersistence.getWidgetState(y);_.get(o,"selectedItem")&&(_.remove(o.selectedItem,(function(e){return _.isEqual(e,i)})),y.statePersistence.removeWidgetState(y,"selectedItem"),o.selectedItem.length>0&&y.statePersistence.setWidgetState(y,{selectedItem:o.selectedItem}))}else console.warn("Retain State handling on Widget "+y.name+" is not supported for current pagination type.")}))},callOnRowDeselectEvent:function(e,t){y.items=y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.invokeEventCallback("rowdeselect",{$data:e,$event:t,row:e})},callOnRowClickEvent:function(e,t){y.ngZone.run((function(){if(t&&t.hasOwnProperty("originalEvent")){var n=y.addRowIndex(e);y.invokeEventCallback("rowclick",{$data:n,$event:t,row:n})}}))},closePopover:u.closePopover,onColumnSelect:function(e,t){y.selectedColumns=y.callDataGridMethod("getSelectedColumns"),y.invokeEventCallback("columnselect",{$data:e,$event:t})},onColumnDeselect:function(e,t){y.selectedColumns=y.callDataGridMethod("getSelectedColumns"),y.invokeEventCallback("columndeselect",{$data:e,$event:t})},onHeaderClick:function(e,t){y.invokeEventCallback("headerclick",{$event:t,$data:e,column:e})},onRowDelete:function(e,t,n,i,o){y.ngZone.run((function(){y.deleteRecord(_.extend({},o,{row:e,cancelRowDeleteCallback:t,evt:n,callBack:i}))}))},onRowInsert:function(e,t,n,i){y.insertRecord(_.extend({},i,{row:e,event:t,callBack:n}))},beforeRowUpdate:function(e,t){y._liveTableParent&&y._liveTableParent.updateRow(e,t),y.prevData=u.getClonedObject(e)},afterRowUpdate:function(e,t,n,i){y.updateRecord(_.extend({},i,{row:e,prevData:y.prevData,event:t,callBack:n}))},onBeforeRowUpdate:function(e,t,n){return y.invokeEventCallback("beforerowupdate",{$event:t,$data:e,row:e,options:n})},onBeforeRowInsert:function(e,t,n){return y.invokeEventCallback("beforerowinsert",{$event:t,$data:e,row:e,options:n})},onBeforeRowDelete:function(e,t,n){var i=y.addRowIndex(e);return y.invokeEventCallback("beforerowdelete",{$event:t,row:i,options:n})},onFormRender:function(e,t,n,i){var o=i?"inlineInstanceNew":"inlineInstance";setTimeout((function(){y.formWidgets={},y.fieldDefs.forEach((function(e){e[o]&&(y.formWidgets[e.field]=e[o],e[o].context&&(e[o].context.formWidgets=y.formWidgets),y.setDisabledOnField(n,e,o))})),y.invokeEventCallback("formrender",{$event:t,formWidgets:y.formWidgets,$operation:n})}),250)},onBeforeFormRender:function(e,t,n){return y.invokeEventCallback("beforeformrender",{$event:t,row:e,$operation:n})},registerRowNgClassWatcher:function(e,t){if(y.rowngclass){var n=y.getClonedRowObject(e),i=y.widgetId+"_rowNgClass_"+t;u.$unwatch(i),y.registerDestroyListener(u.$watch(y.rowngclass,y.viewParent,{row:n},(function(e,n){y.callDataGridMethod("applyRowNgClass",r.getConditionalClasses(e,n),t)}),i))}},registerColNgClassWatcher:function(e,t,n,i){if(t["col-ng-class"]){var o=y.getClonedRowObject(e),a=y.widgetId+"_colNgClass_"+n+"_"+i;u.$unwatch(a),y.registerDestroyListener(u.$watch(t["col-ng-class"],y.viewParent,{row:o},(function(e,t){y.callDataGridMethod("applyColNgClass",r.getConditionalClasses(e,t),n,i)}),a))}},clearCustomExpression:function(){y.customExprViewRef.clear(),y.customExprCompiledTl={},y.customExprCompiledSummaryTl={}},clearRowDetailExpression:function(){y.rowDetailViewRef.clear(),y.rowDefMap={},y.rowDefInstances={}},generateCustomExpressions:function(e,t,n){var i=y.getClonedRowObject(e),o=function(e){if(e){var o={},a={row:i,colDef:o};y.addEventsToContext(a);var r=y.customExprViewRef.createEmbeddedView(e,a).rootNodes[0],s=r.getAttribute("data-col-identifier");_.extend(o,y.columns[s]),n?y.customExprCompiledSummaryTl[s+t]=r:y.customExprCompiledTl[s+t]=r}};y.isdynamictable?y.fieldDefs.forEach((function(e){o(e.customExprTmpl)})):y.customExprTmpl.forEach(o.bind(y))},generateRowExpansionCell:function(e,t){var n=y.getClonedRowObject(e);y.rowExpansionActionTmpl.forEach((function(e){y.rowExpansionActionTl[t]=y.rowExpansionActionViewRef.createEmbeddedView(e,{row:n}).rootNodes}))},getRowExpansionAction:function(e){return y.rowExpansionActionTl[e]},generateRowDetailView:function(e,t,n,i,o,a){var r=y.getClonedRowObject(t),s=u.getClonedObject(y.rowDef);if(!1!==y.rowInstance.invokeEventCallback("beforerowexpand",{$event:e,$data:s,row:r})&&s.content)if(a(),y.rowDefMap[n]&&y.rowDefMap[n].content===s.content)y.rowInstance.invokeEventCallback("rowexpand",{$event:e,row:r,$data:y.rowDefInstances[n]});else{y.rowDefMap[n]=s,i.empty(),i.hide(),o.show();var l={row:r,rowDef:s,containerLoad:function(t){setTimeout((function(){o.hide(),i.show(),y.rowDefInstances[n]=t,y.rowInstance.invokeEventCallback("rowexpand",{$event:e,row:r,$data:t})}),500)}},c=y.rowDetailViewRef.createEmbeddedView(y.rowExpansionTmpl,l).rootNodes[0];i[0].appendChild(c),u.$appDigest()}},onBeforeRowCollapse:function(e,t,n){return y.rowInstance.invokeEventCallback("beforerowcollapse",{$event:e,row:t,$data:y.rowDefInstances[n]})},onRowCollapse:function(e,t){y.rowInstance.invokeEventCallback("rowcollapse",{$event:e,row:t})},getCustomExpression:function(e,t,n){return(n?y.customExprCompiledSummaryTl[e+t]:y.customExprCompiledTl[e+t])||""},clearRowActions:function(){y.rowActionsViewRef.clear(),y.rowActionsCompiledTl={},y.rowExpansionActionViewRef.clear(),y.rowExpansionActionTl={}},generateRowActions:function(e,t){var n=y.getClonedRowObject(e);y.rowActionsCompiledTl[t]=[],y.rowActionTmpl.forEach((function(e){var i;(i=y.rowActionsCompiledTl[t]).push.apply(i,w([],b(y.rowActionsViewRef.createEmbeddedView(e,{row:n}).rootNodes)))}))},getRowAction:function(e){return y.rowActionsCompiledTl[e]},generateInlineEditRow:function(e,t){var n=y.getClonedRowObject(e);if(t)return y.inlineEditNewViewRef.clear(),y.inlineNewCompliedTl={},y.inlineWidgetNewTmpl.forEach((function(e){var t,i={row:n,getControl:function(){return y.ngform.controls[t+"_new"]||{}},getValidationMessage:function(){return y.columns[t]&&y.columns[t].validationmessage},getPendingSpinnerStatusNew:function(){return y.columns[t]&&y.columns[t].showPendingSpinnerNew}},o=y.inlineEditNewViewRef.createEmbeddedView(e,i).rootNodes[0];t=o.getAttribute("data-col-identifier"),y.inlineNewCompliedTl[t]=o})),void y.clearForm(!0);y.inlineEditViewRef.clear(),y.inlineCompliedTl={},y.clearForm(),y.inlineWidgetTmpl.forEach((function(e){var t,i={row:n,getControl:function(){return y.ngform.controls[t]||{}},getValidationMessage:function(){return y.columns[t]&&y.columns[t].validationmessage},getPendingSpinnerStatus:function(){return y.columns[t]&&y.columns[t].showPendingSpinner}},o=y.inlineEditViewRef.createEmbeddedView(e,i).rootNodes[0];t=o.getAttribute("data-col-identifier"),y.inlineCompliedTl[t]=o}))},getInlineEditWidget:function(e,t,n){return n?(y.gridOptions.setFieldValue(e+"_new",t),y.inlineNewCompliedTl[e]):(y.gridOptions.setFieldValue(e,t),y.inlineCompliedTl[e])},setFieldValue:function(e,t){var n=y.ngform.controls&&y.ngform.controls[e];n&&n.setValue(t)},getFieldValue:function(e){var t=y.ngform.controls&&y.ngform.controls[e];return t&&t.value},addLoadMoreBtn:function(){y.callDataGridMethod("addLoadMoreBtn",y.ondemandmessage,y.loadingdatamsg,(function(e){y.gridOptions.setIsNextPageData(!0),y.gridOptions.setIsDataUpdatedByUser(!1),"viewless"===y.gridOptions.mode?(y.dataNavigator.navigatePage("first",e,!0),y.gridOptions.mode=""):(y.dataNavigator.navigatePage("next",e),y.isDataLoading=!0)}),y.infScroll)},bindScrollEvt:function(){y._gridData&&y._gridData.length&&y.infScroll&&setTimeout((function(){y.paginationService.bindScrollEvt(y,"tbody",r.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME)}),0)},generateFilterRow:function(){y.filterViewRef.clear(),y.rowFilterCompliedTl={},y.filterTmpl.forEach((function(e){var t=y.filterViewRef.createEmbeddedView(e,{changeFn:y.onRowFilterChange.bind(y),isDisabled:function(e){return y.emptyMatchModes.indexOf(y.rowFilter[e]&&y.rowFilter[e].matchMode)>-1}}).rootNodes[0];y.rowFilterCompliedTl[t.getAttribute("data-col-identifier")]=t}))},getFilterWidget:function(e){return y.rowFilterCompliedTl[e]},setGridEditMode:function(e){y.ngZone.run((function(){y.isGridEditMode=e,u.$appDigest()}))},setGridState:function(e){y.isLoading="loading"===e},setActionRowIndex:function(e){y.gridOptions.isNavTypeScrollOrOndemand()&&(y.actionRowIndex=parseInt(e),y.setDataGridOption("actionRowIndex",y.actionRowIndex),_.isNaN(y.actionRowIndex)||(y.actionRowPage=Math.floor(y.actionRowIndex/y.pagesize)+1,y.setDataGridOption("actionRowPage",y.actionRowPage||y.gridOptions.actionRowPage)))},clearActionRowIndex:function(){y.isRowDeleted||!y.infScroll&&!y.onDemandLoad||y.clearActionRowVars()},noChangesDetected:function(){y.toggleMessage(!0,"info","No Changes Detected","")},redrawWidgets:function(){y.fieldDefs.forEach((function(e){u.triggerFn(e.inlineInstance&&e.inlineInstance.redraw),u.triggerFn(e.inlineInstanceNew&&e.inlineInstanceNew.redraw),u.triggerFn(e.filterInstance&&e.filterInstance.redraw)}))},searchHandler:y.searchSortHandler.bind(y),sortHandler:y.searchSortHandler.bind(y),timeoutCall:function(e,t){setTimeout(e,t)},runInNgZone:function(e){y.ngZone.run(e)},safeApply:function(){u.$appDigest()},setTouched:function(e){var t=y.ngform.controls[e];t&&t.markAsTouched()},clearForm:y.clearForm.bind(y),callLoadInlineWidgetData:function(){y.fullFieldDefs.forEach((function(e){_.isUndefined(e.isDataSetBound)&&u.triggerFn(e.loadInlineWidgetData&&e.loadInlineWidgetData.bind(e))}))},applyValidations:function(e,t){t?u.triggerFn(e.applyNewRowValidations&&e.applyNewRowValidations.bind(e)):u.triggerFn(e.applyValidations&&e.applyValidations.bind(e))},removeValidations:function(e){y.fullFieldDefs.forEach((function(t){t.readonly||"rowOperations"===t.binding||(e?u.triggerFn(t.removeNewRowValidations&&t.removeNewRowValidations.bind(t)):u.triggerFn(t.removeValidations&&t.removeValidations.bind(t)))}))}},y._selectedItemsExist=!1,y._onChange=function(){},y._onTouched=function(){},r.styler(y.nativeElement,y),y.ngform=n.group({}),y.addEventsToContext(y.context),[y.app.subscribe("check-state-persistence-options",(function(e){var t=_.get(y.datasource,"name");if(t||(t=r.extractDataSourceName(y.binddatasource)),_.get(e,"variable.name")===t&&y._pageLoad&&"none"!==y.getConfiguredState()){y._pageLoad=!1;var n=y.statePersistence.getWidgetState(y);n?e=y.handleStateParams(n,e):y.setDataGridOption("selectFirstRow",y.gridfirstrowselect)}})),y.app.subscribe("toggle-variable-state",(function(e){if(y.datasource&&y.datasource.execute(u.DataSource.Operation.IS_API_AWARE)&&u.isDataSourceEqual(e.variable,y.datasource)){if(y._pageLoad&&"none"!==y.getConfiguredState()){y._pageLoad=!1;var t=y.statePersistence.getWidgetState(y);t?e=y.handleStateParams(t,e):y.setDataGridOption("selectFirstRow",y.gridfirstrowselect)}u.isDefined(y.variableInflight)?y.debouncedHandleLoading(e):y.handleLoading(e)}})),y.app.subscribe("setup-cud-listener",(function(e){y.name===e&&(y._isDependent=!0,y.selectedItemChange$.pipe(m.debounceTime(250)).subscribe(y.triggerWMEvent.bind(y)))}))].forEach((function(e){return y.registerDestroyListener(e)})),y.deleteoktext=y.appLocale.LABEL_OK,y.deletecanceltext=y.appLocale.LABEL_CANCEL,y}return g(t,e),Object.defineProperty(t.prototype,"gridData",{get:function(){return this._gridData||[]},set:function(e){var t;if(this.isDataLoading=!1,!this.variableInflight||!_.isEmpty(e)){if(this.variableInflight=!1,e&&0===e.length?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready"),this.gridOptions.isNavTypeScrollOrOndemand()){if(t=b(this.paginationService.updateFieldsOnPagination(this,e),2),this._gridData=t[0],this.currentPage=t[1],this.gridOptions.lastActionPerformed===this.gridOptions.ACTIONS.EDIT){var n=_.floor(this.actionRowIndex%this.pagesize);this._gridData.splice(this.actionRowIndex,1,e[n])}this.setDataGridOption("isLastPage",!!this.dataNavigator.isDisableNext),this.$element.find(".on-demand-datagrid").length||this.dataNavigator.isDisableNext||!this.onDemandLoad?this._gridData&&this._gridData.length&&(this.dataNavigator.isDisableNext||!this.isDataLoading)&&this.callDataGridMethod("hideLoadingIndicator",this.dataNavigator.isDisableNext,this.infScroll):this.gridOptions.addLoadMoreBtn()}else this._gridData=e;var i,o=0;if(this._onChange(this._gridData),this._onTouched(),u.isDefined(e)){if(this.gridOptions.bindScrollEvt(),this.isNavigationEnabled()&&this.dataNavigator.dn.currentPage&&(o=(this.dataNavigator.dn.currentPage-1)*(this.dataNavigator.maxResults||1)+1,this.setDataGridOption("startRowIndex",o)),!(i=this.callDataGridMethod("getOptions")))return;!i.colDefs.length&&this.fieldDefs.length&&this.setDataGridOption("colDefs",u.getClonedObject(this.fieldDefs)),this.isdynamictable||_.isEmpty(e)||!i.colDefs.length||this.invokeEventCallback("beforedatarender",{$data:this._gridData,$columns:this.columns,data:this._gridData,columns:this.columns}),this.setDataGridOption("data",u.getClonedObject(this._gridData))}}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selecteditem",{get:function(){return this.multiselect?u.getClonedObject(this.items):_.isEmpty(this.items)?{}:u.getClonedObject(this.items[0])},set:function(e){this.items.length=0,this.callDataGridMethod("selectRows",e)},enumerable:!1,configurable:!0}),t.prototype.onKeyPress=function(e){13===e.which&&this.invokeEventCallback("enterkeypress",{$event:e,$data:this.gridData})},t.prototype.ngAfterContentInit=function(){var t=this;e.prototype.ngAfterContentInit.call(this),this.headerConfig=this.headerConfig.filter(this.filterEmptyValues.bind(this)),_.remove(this.fieldDefs,(function(e){return void 0===e}));this._liveTableParent&&(this.isPartOfLiveGrid=!0),!this.readonlygrid&&this.editmode||("true"===this.readonlygrid?this.editmode="":this.isPartOfLiveGrid?this.editmode="inline"===this.isPartOfLiveGrid.formlayout?r.EDIT_MODE.FORM:r.EDIT_MODE.DIALOG:this.editmode=this.readonlygrid?r.EDIT_MODE.INLINE:""),this.gridOptions.colDefs=this.fullFieldDefs,this.gridOptions.rowActions=this.rowActions,this.gridOptions.headerConfig=this.headerConfig,this.gridOptions.rowClass=this.rowclass,this.gridOptions.editmode=this.editmode,this.gridOptions.formPosition=this.formposition,this.gridOptions.filtermode=this.filtermode,this.gridOptions.searchLabel=this.searchlabel,this.gridOptions.isMobile=u.isMobile(),this.gridOptions.name=this.name,this.gridOptions.securityUtils.pipeTransform=this.trustAsPipe,this.gridOptions.navigation=this.navigation,this.gridOptions.isdynamictable=this.isdynamictable,this.gridOptions.showviewlessbutton=this.showviewlessbutton,this.gridOptions.ondemandmessage=this.ondemandmessage,this.gridOptions.viewlessmessage=this.viewlessmessage,this.gridOptions.loadingdatamsg=this.loadingdatamsg,_.isEmpty(this.gridData)||(this.gridOptions.data=u.getClonedObject(this.gridData)),this.gridOptions.messages={selectField:this.appLocale.MESSAGE_SELECT_FIELD},this.datagridElement=$(this._tableElement.nativeElement),this.gridElement=this.$element,this.$element.css({position:"relative"}),_.forEach({showrowindex:"showRowIndex",multiselect:"multiselect",radioselect:"showRadioColumn",filternullrecords:"filterNullRecords",enablesort:"enableSort",showheader:"showHeader",enablecolumnselection:"enableColumnSelection",shownewrow:"showNewRow",gridfirstrowselect:"selectFirstRow"},(function(e,n){u.isDefined(t[n])&&(t.gridOptions[e]="true"===t[n]||!0===t[n])})),"none"!==this.statehandler&&(this.gridOptions.selectFirstRow=!1),this.renderOperationColumns(),this.gridOptions.colDefs=this.fieldDefs,this.datagridElement.datatable(this.gridOptions),this.callDataGridMethod("setStatus","loading",this.loadingdatamsg),this.applyProps.forEach((function(e){return t.callDataGridMethod.apply(t,w([],b(e)))})),this.editmode===r.EDIT_MODE.QUICK_EDIT&&(this.documentClickBind=this._documentClickBind.bind(this),document.addEventListener("click",this.documentClickBind))},t.prototype.getConfiguredState=function(){var e=this.statePersistence.computeMode(this.statehandler);return e&&e.toLowerCase()},t.prototype.handleStateParams=function(e,t){var n=this;return _.get(e,"selectedItem")&&(this._selectedItemsExist=!0),t.options=t.options||{},_.get(e,"pagination")?(t.options.page=e.pagination,_.get(e,"sort")&&(this.sortStateHandler(e),t.options.orderBy=_.get(e,"sort.field")+" "+_.get(e,"sort.direction")),_.get(e,"search")&&(setTimeout((function(){n.searchStateHandler(e)}),500),t.options.filterFields=this.getFilterFields(e.search))):(t.options.page=1,_.get(e,"search")&&(setTimeout((function(){n.searchStateHandler(e)}),500),t.options.filterFields=this.getFilterFields(e.search)),_.get(e,"sort")&&(this.sortStateHandler(e),t.options.orderBy=_.get(e,"sort.field")+" "+_.get(e,"sort.direction"))),t},t.prototype.triggerWMEvent=function(e){"dialog"!==this.editmode&&(u.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:"selectedItemChange",widgetName:this.name,row:e,table:this}))},t.prototype.sortStateHandler=function(e){var t=this.datagridElement.find('th[data-col-field="'+_.get(e,"sort.field")+'"] .sort-icon');"asc"===_.get(e,"sort.direction")&&t.length?t.addClass("asc wi wi-long-arrow-up"):"desc"===_.get(e,"sort.direction")&&t.length&&t.addClass("desc wi wi-long-arrow-down")},t.prototype.searchStateHandler=function(e){var t=this;if(_.isArray(e.search))_.forEach(e.search,(function(e){if(t.rowFilter[e.field]&&(t.rowFilter[e.field].value=e.value,t.rowFilter[e.field].matchMode=e.matchMode,t.rowFilter[e.field].type=e.type,$(t.rowFilterCompliedTl[e.field]).length)){"integer"===e.type?parseInt(e.value):e.value;$(t.rowFilterCompliedTl[e.field]).find("input").val(e.value)}}));else{var n=this.datagridElement;n.find('[data-element="dgSearchText"]').val(e.search.value),n.find('[data-element="dgFilterValue"]').val(e.search.field)}},t.prototype.filterEmptyValues=function(e){return e.columns&&(e.columns=e.columns.filter(this.filterEmptyValues.bind(this))),void 0!==e},t.prototype.compareFilterExpressions=function(e,t){return!(e.length!==t.length||!_.isEqual(e,t))},t.prototype.setLastActionToFilterCriteria=function(){this.prevFilterExpression=_.get(this.datasource,"filterExpressions.rules")?u.getClonedObject(this.datasource.filterExpressions.rules):u.getClonedObject([].concat(this.datasource.dataBinding)),this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.FILTER_CRITERIA),this.gridOptions.setIsSearchTrigerred(!0)},t.prototype.setLastActionToDatasetUpdate=function(){this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.DATASET_UPDATE),this.gridOptions.setCurrentPage(1),this.gridOptions.setIsDatasetUpdated(!0)},t.prototype.checkIfVarFiltersApplied=function(){if(!_.isEmpty(_.get(this.datasource,"filterExpressions.rules"))||!_.isEmpty(_.get(this.datasource,"dataBinding"))){var e=_.get(this.datasource,"filterExpressions.rules")?this.datasource.filterExpressions.rules:[].concat(this.datasource.dataBinding);this.compareFilterExpressions(this.prevFilterExpression,e)||this.setLastActionToFilterCriteria()}},t.prototype.watchVariableDataSet=function(e){var t;if(this.gridOptions.isNavTypeScrollOrOndemand()&&this.checkIfVarFiltersApplied(),"wm.Variable"===_.get(this.datasource,"category")&&this._pageLoad&&"none"!==this.getConfiguredState()){var n=this.statePersistence.getWidgetState(this);this._pageLoad=!1,_.get(n,"selectedItem")?this._selectedItemsExist=!0:this.setDataGridOption("selectFirstRow",this.gridfirstrowselect),_.get(n,"search")&&(this.searchStateHandler(n),this.searchSortHandler(n.search,void 0,"search",!0)),_.get(n,"sort")&&(this.searchSortHandler(n.sort,void 0,"sort",!0),this.sortStateHandler(n)),_.get(n,"pagination")&&this.dataNavigator.pageChanged({page:n.pagination},!0)}if(!(this.dataNavigatorWatched&&_.isUndefined(e)&&this.__fullData)){this.variableInflight&&!this.infScroll&&this.callDataGridMethod("setStatus","loading",this.loadingdatamsg),(t=u.getValidJSON(e))&&(e=t);var i=this.getSortExpr(),o=i.split(" ");if(i&&o.length&&(this.sortInfo={direction:o[1],field:o[0]}),this.isDataValid()){if(e){if(this.shownavigation&&!this.dataNavigatorWatched)return void this.enablePageNavigation()}else this.resetPageNavigation(),this.variableInflight||this.callDataGridMethod("setStatus","nodata",this.nodatamessage),this.setDataGridOption("selectFirstRow",this.gridfirstrowselect);!this.isNavigationEnabled()&&e&&this.checkFiltersApplied(this.getSortExpr()),!_.isObject(e)||""===e||e&&""===e.dataValue?this.variableInflight||this.setGridData([]):e&&this.populateGridData(e)}}},t.prototype.ngOnDestroy=function(){document.removeEventListener("click",this.documentClickBind),this.navigatorResultWatch&&this.navigatorResultWatch.unsubscribe(),this.navigatorMaxResultWatch&&this.navigatorMaxResultWatch.unsubscribe(),e.prototype.ngOnDestroy.call(this)},t.prototype.addRowIndex=function(e){var t=u.getClonedObject(e),n=_.indexOf(this.gridOptions.data,e);return n<0?e:(t.$index=n+1,t.$isFirst=1===t.$index,t.$isLast=this.gridData.length===t.$index,t)},t.prototype.addEventsToContext=function(e){var t=this;e.addNewRow=function(){return t.addNewRow()},e.deleteRow=function(){return t.deleteRow()},e.editRow=function(){return t.editRow()}},t.prototype.execute=function(e,t){return![u.DataSource.Operation.IS_API_AWARE,u.DataSource.Operation.IS_PAGEABLE,u.DataSource.Operation.SUPPORTS_SERVER_FILTER].includes(e)&&(this.datasource?this.datasource.execute(e,t):{})},t.prototype.isNavigationEnabled=function(){return this.shownavigation&&this.dataNavigator&&this.dataNavigatorWatched},t.prototype.getClonedRowObject=function(e){var t=u.getClonedObject(e);return t.getProperty=function(e){return _.get(t,e)},t.$isFirst=1===t.$index,t.$isLast=this.gridData.length===t.$index,delete t.$$index,delete t.$$pk,t},t.prototype.handleLoading=function(e){this.variableInflight=e.active,e.active?this.callDataGridMethod("setStatus","loading",this.loadingdatamsg):!this.isGridEditMode&&_.isEmpty(this.dataset)?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready")},t.prototype.setDisabledOnField=function(e,t,n){"new"===e||!t["primary-key"]||"assigned"!==t.generator||t["related-entity-name"]||t.period||(t[n].disabled=!0)},t.prototype.resetFormControl=function(e){e.markAsUntouched(),e.markAsPristine()},t.prototype.clearForm=function(e){var t=this,n=this.ngform.controls;_.keys(this.ngform.controls).forEach((function(i){!i.endsWith("_filter")&&(i.endsWith("_new")&&e||!i.endsWith("_new")&&!e)&&(n[i].setValue(""),t.resetFormControl(n[i]))}))},t.prototype.showFieldBasedOnScreenType=function(e){return u.isMobile()&&this.viewport.isMobileType?e.mobileDisplay:this.viewport.isTabletType?e.tabletDisplay:e.pcDisplay},t.prototype.isEmptyRecord=function(e){var t,n=this;return Object.keys(e).every((function(i,o){return t=e[i],!(n.fieldDefs.length&&u.isDefined(n.fieldDefs[o])&&n.showFieldBasedOnScreenType(n.fieldDefs[o])||!0)||(null==t||""===t)}))},t.prototype.removeEmptyRecords=function(e){var t=this,n=e,i=[];return n&&n.length&&(i=n.filter((function(e){return e&&!t.isEmptyRecord(e)}))),i},t.prototype.setGridData=function(e){var t=this.filternullrecords?this.removeEmptyRecords(e):e;"wm.Variable"===_.get(this.datasource,"category")&&(this.variableInflight=!1),this.variableInflight||(t&&0===t.length?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready")),this.gridData=t},t.prototype.setDataGridOption=function(e,t,n){if(void 0===n&&(n=!1),this.datagridElement&&this.datagridElement.datatable&&this.datagridElement.datatable("instance")){var i={};!u.isDefined||_.isEqual(t,this.gridOptions[e])&&!n||(i[e]=t,this.datagridElement.datatable("option",i),this.gridOptions[e]=t)}},t.prototype.callDataGridMethod=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.datagridElement&&this.datagridElement.datatable("instance"))return this.datagridElement.datatable.apply(this.datagridElement,e);this.applyProps.set(e[1],e)},t.prototype.renderOperationColumns=function(){var e,t,n=r.getRowOperationsColumn(),i={name:n.field,field:n.field,isPredefined:!0};this.fieldDefs.length&&(e=_.find(this.fullFieldDefs,{field:R,type:"custom"}),_.remove(this.fieldDefs,{type:"custom",field:R}),_.remove(this.headerConfig,{field:n.field}),this.rowActions.length&&(e?(t=e.rowactionsposition?_.toNumber(e.rowactionsposition):this.fieldDefs.length,this.fieldDefs.splice(t,0,e),0===t?this.headerConfig.unshift(i):this.headerConfig.push(i)):(this.fieldDefs.push(n),this.headerConfig.push(i))),this.setDataGridOption("headerConfig",this.headerConfig))},t.prototype.enablePageNavigation=function(){var e=this;this.dataset&&this.binddataset&&this.dataNavigator&&(this.dataNavigatorWatched=!0,this.navigatorResultWatch&&this.navigatorResultWatch.unsubscribe(),this.navigatorResultWatch=this.dataNavigator.resultEmitter.subscribe((function(t){u.isDefined(t)?_.isEqual(e.dataset,t)?e.watchVariableDataSet(t):_.isArray(t)?e.widget.dataset=[].concat(t):_.isObject(t)?e.widget.dataset=_.extend({},t):e.widget.dataset=t:e.widget.dataset=void 0}),!0),this.navigatorMaxResultWatch&&this.navigatorMaxResultWatch.unsubscribe(),this.navigatorMaxResultWatch=this.dataNavigator.maxResultsEmitter.subscribe((function(t){e.pagesize=t})),this.__fullData=this.dataset,this.dataNavigator.widget.maxResults=this.pagesize||5,this.dataNavigator.options={maxResults:this.pagesize||5},this.removePropertyBinding("dataset"),this.dataNavigator.setBindDataSet(this.binddataset,this.viewParent,this.datasource,this.dataset,this.binddatasource,void 0,this.statehandler))},t.prototype.resetPageNavigation=function(){this.dataNavigator&&this.dataNavigator.resetPageNavigation()},t.prototype.isDataValid=function(){var e,t=this.dataset||{};return t.error&&(e=t.error),t.data&&t.data.error&&t.data.errorMessage&&(e=t.data.errorMessage),!e||(this.setGridData([]),this.callDataGridMethod("setStatus","error",e),!1)},t.prototype.populateGridData=function(e){var t,n=this;if(e=r.transformData(e,this.name),!this.isNavigationEnabled()&&this._isClientSearch?(t=u.getClonedObject(e),t=this.getSearchResult(t,this.filterInfo),t=this.getSortResult(t,this.sortInfo),this.serverData=t):this.serverData=e,this.isdynamictable?this.createGridColumns(this.serverData):this.setGridData(this.serverData),"none"!==this.getConfiguredState()&&this._selectedItemsExist&&e.length){var i=this.statePersistence.getWidgetState(this),o=void 0;_.get(i,"selectedItem")&&(o=i.selectedItem.filter((function(e){return e.page===n.dataNavigator.dn.currentPage})),this._selectedItemsExist=!1,o.length&&this.selecteditem.length!==i.selectedItem.length&&(_.isArray(this.selecteditem)?o.forEach((function(e){n.selectItem(e.index,void 0)})):this.selecteditem=o.map((function(e){return e.index}))))}},t.prototype.generateDynamicColumns=function(e){return v(this,void 0,void 0,(function(){var t,n,i,o=this;return y(this,(function(a){switch(a.label){case 0:return this.fieldDefs=[],this.filterTmpl._results=[],_.isEmpty(e)?[2]:(t="",e.forEach((function(e){var n="",i="";_.forEach(e,(function(e,t){_.isUndefined(e)||""===e||("customExpression"===t?i=e:n+=" "+t+'="'+e+'"')})),t+="<wm-table-column "+n+' tableName="'+o.name+o.$attrs.get("table_reference")+'">'+i+"</wm-table-column>"})),this.dynamicTableRef.clear(),this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext[this.getAttr("wmTable")]=this),this.noOfColumns=e.length,[4,this.dynamicComponentProvider.getComponentFactoryRef("app-table-dynamic-"+this.widgetId,t,{noCache:!0,transpile:!0})]);case 1:return n=a.sent(),i=this.dynamicTableRef.createComponent(n,0,this.inj),u.extendProto(i.instance,this._dynamicContext),this.$element.find(".dynamic-table-container")[0].appendChild(i.location.nativeElement),[2]}}))}))},t.prototype.prepareColDefs=function(e){var t,n,i=this,o=0,a=0;this.fieldDefs=[],this.headerConfig=[],this.columns={},n=e,t=r.prepareFieldDefs(n),_.forEach(t,(function(e){e.binding=e.field,e.caption=e.displayName,e.pcDisplay=!0,e.mobileDisplay=!0,e.tabletDisplay=!0,e.searchable=!0,e.showinfilter=!0,e.type="string",e.index=o,e.headerIndex=a,o++,a++})),t.forEach((function(e){i.columns[e.field]=e})),this.invokeEventCallback("beforedatarender",{$data:e,$columns:this.columns,data:e,columns:this.columns}),t=[],_.forEach(this.columns,(function(e){t.push(e)})),this.generateDynamicColumns(t)},t.prototype.createGridColumns=function(e){var t=e&&!e.error;t&&!_.isArray(e)&&(e=[e]),_.isEmpty(e)?this.setGridData(e):t&&(this.prepareColDefs(e),this.serverData=e,this.setGridData(this.serverData))},t.prototype.getSortExpr=function(){var e,t;return this.datasource&&this.datasource.execute(u.DataSource.Operation.IS_PAGEABLE)&&(t=this.datasource.execute(u.DataSource.Operation.GET_PAGING_OPTIONS),e=_.isEmpty(t)?"":r.getOrderByExpr(t.sort)),e||""},t.prototype.onPropertyChange=function(t,n,i){var o,a=this;switch(t){case"datasource":!1===n.startUpdate&&(this.variableInflight=!1,this.callDataGridMethod("setStatus","nodata",this.nodatamessage)),this.watchVariableDataSet(this.dataset),this.onDataSourceChange();break;case"dataset":if(this.gridOptions.isNavTypeScrollOrOndemand()&&1===this.gridOptions.getCurrentPage()&&this.gridOptions.setIsNextPageData(!1),this.binddatasource&&!this.datasource)return;this.parentList&&!this.datasource&&_.startsWith(this.binddataset,"item")&&(this.datasource=u.getDatasourceFromExpr(this.widget.$attrs.get("datasetboundexpr"),this)),this.gridOptions.isNavTypeScrollOrOndemand()&&(this.gridOptions.isNextPageData?this.gridOptions.setIsDataUpdatedByUser(!1):(this.gridOptions.setIsDataUpdatedByUser(!0),this.setLastActionToDatasetUpdate(),this.gridOptions.setIsNextPageData(!1))),"wm.Variable"===_.get(this.datasource,"category")&&this._pageLoad&&"none"!==this.getConfiguredState()||this.watchVariableDataSet(n);break;case"filtermode":this.setDataGridOption("filtermode",n);break;case"searchlabel":this.setDataGridOption("searchLabel",n);break;case"navigation":if("Advanced"===n)return void(this.navigation="Classic");"None"!==n&&(this.shownavigation=!0),this.setDataGridOption("navigation",this.navigation),this.onDemandLoad=n===r.NAVIGATION_TYPE.ONDEMAND,this.infScroll=n===r.NAVIGATION_TYPE.SCROLL,this.navControls=n;break;case"gridfirstrowselect":this.setDataGridOption("selectFirstRow",n);break;case"gridclass":this.callDataGridMethod("option","cssClassNames.grid",n);break;case"nodatamessage":this.callDataGridMethod("option","dataStates.nodata",n);break;case"loadingdatamsg":this.callDataGridMethod("option","dataStates.loading",n);break;case"loadingicon":this.callDataGridMethod("option","loadingicon",n);break;case"spacing":this.callDataGridMethod("option","spacing",n),this.navigationSize="condensed"===n?"small":"";break;case"exportformat":this.exportOptions=[],n&&_.forEach(_.split(n,","),(function(e){a.exportOptions.push({label:e,icon:E[e]})}));break;case"shownewrow":o=n||_.some(this.actions,(function(e){return _.includes(e.action,"addNewRow()")})),this.callDataGridMethod("option","actionsEnabled.new",o);break;case"pagesize":this.dataNavigator.options={maxResults:n},this.dataNavigator.widget.maxResults=n,this.dataNavigator.maxResults=n;break;case"ondemandmessage":n&&this.$element.find(".on-demand-datagrid > a").text(n),this.gridOptions.ondemandmessage=n;break;case"viewlessmessage":this.gridOptions.viewlessmessage=n;break;case"show":n?this.invokeEventCallback("show"):this.invokeEventCallback("hide");default:e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.onDataSourceChange=function(){this.fieldDefs.forEach((function(e){u.triggerFn(e.onDataSourceChange&&e.onDataSourceChange.bind(e))}))},t.prototype.clearActionRowVars=function(){this.actionRowIndex=void 0,this.actionRowPage=void 0,this.setDataGridOption("actionRowIndex",void 0),this.setDataGridOption("actionRowPage",void 0)},t.prototype.onStyleChange=function(t,n,i){switch(t){case"width":this.callDataGridMethod("setGridDimensions","width",n);break;case"height":this.callDataGridMethod("setGridDimensions","height",n)}e.prototype.onStyleChange.call(this,t,n,i)},t.prototype.populateActions=function(){var e=this;this._actions.header=[],this._actions.footer=[],_.forEach(this.actions,(function(t){_.includes(t.position,"header")&&e._actions.header.push(t),_.includes(t.position,"footer")&&e._actions.footer.push(t)}))},t.prototype.renderDynamicFilterColumn=function(e){this.isdynamictable&&this.filterTmpl._results.push(e)},t.prototype.registerColumns=function(e,t){var n=this;if(u.isMobile()&&this.viewport.isMobileType){if(!e.mobileDisplay)return}else if(this.viewport.isTabletType){if(!e.tabletDisplay)return}else if(!e.pcDisplay)return;e["primary-key"]&&this.primaryKey.push(e.field),this.fieldDefs[t]=e;var i=this.fieldDefs.length;this.fullFieldDefs.push(e),this.rowFilter[e.field]={value:void 0},this.fieldDefs.forEach((function(e){n.columns[e.field]=e})),this.isdynamictable&&i===this.noOfColumns&&(this.renderOperationColumns(),this.setDataGridOption("colDefs",this.fieldDefs))},t.prototype.registerFormField=function(e,t){this.formfields[e]=t},t.prototype.registerActions=function(e){this.actions.push(e),this.populateActions()},t.prototype.registerRow=function(e,t){this.rowDef=e,this.rowInstance=t,this.callDataGridMethod("option","cssClassNames.rowExpandIcon",this.rowDef.expandicon),this.callDataGridMethod("option","cssClassNames.rowCollapseIcon",this.rowDef.collapseicon),this.gridOptions.rowExpansionEnabled=!0,this.gridOptions.rowDef=this.rowDef},t.prototype.registerRowActions=function(e){this.rowActions.push(e)},t.prototype.selectItem=function(e,t){t&&(this.serverData=t),_.isObject(e)&&(e=_.omitBy(e,(function(e){return _.isArray(e)&&_.isEmpty(e)}))),this.callDataGridMethod("selectRow",e,!0)},t.prototype.deselectItem=function(e){this.callDataGridMethod("deselectRow",e)},t.prototype.onDataNavigatorDataSetChange=function(e){var t;return this.__fullData=e,this.checkFiltersApplied(this.getSortExpr()),this._isClientSearch?(t=u.getClonedObject(this.__fullData),_.isObject(t)&&!_.isArray(t)&&(t=[t]),t=this.getSearchResult(t,this.filterInfo),t=this.getSortResult(t,this.sortInfo)):e},t.prototype.toggleMessage=function(e,t,n,i){e&&n&&this.app.notifyApp(n,t,i)},t.prototype.export=function(e){var t,n=_.isEmpty(this.sortInfo)?"":this.sortInfo.field+" "+this.sortInfo.direction,i={};this.fieldDefs.forEach((function(e){if(e.field!==R&&e.show){var t={header:e.displayName};e.exportexpression?t.expression=e.exportexpression:t.field=e.field,i[e.field]=t}})),t={matchMode:"anywhereignorecase",filterFields:this.getFilterFields(this.filterInfo),orderBy:n,exportType:e.label,logicalOp:"AND",exportSize:this.exportdatasize,columns:i},!1!==this.invokeEventCallback("beforeexport",{$data:t})&&(t.fields=_.values(t.columns),this.datasource.execute(u.DataSource.Operation.DOWNLOAD,{data:t}))},t.prototype.expandRow=function(e){this.callDataGridMethod("expandRow",e)},t.prototype.collapseRow=function(e){this.callDataGridMethod("collapseRow",e)},t.prototype._documentClickBind=function(e){var t=e.target;this.$element[0].contains(t)||e.target.doctype||T($(t))||this.callDataGridMethod("saveRow")},t.prototype._redraw=function(e){var t=this;e?this.datagridElement.datatable(this.gridOptions):setTimeout((function(){t.callDataGridMethod("setColGroupWidths"),t.callDataGridMethod("addOrRemoveScroll")}))},t.prototype.invokeActionEvent=function(e,t){u.$parseEvent(t)(this.viewParent,Object.assign(this.context,{$event:e}))},t.prototype.handleEvent=function(t,n,i,o){"select"!==n&&e.prototype.handleEvent.call(this,this.nativeElement,n,i,o)},t.prototype.triggerUploadEvent=function(e,t,n,i){var o={$event:e,row:i};this.columns[n]&&("change"===t&&(o.newVal=e.target.files,o.oldVal=this.columns[n]._oldUploadVal,this.columns[n]._oldUploadVal=o.newVal),this.columns[n].invokeEventCallback(t,o))},t.prototype.registerFormWidget=function(){},t.prototype.writeValue=function(){},t.prototype.registerOnChange=function(e){this._onChange=e},t.prototype.registerOnTouched=function(e){this._onTouched=e},t.prototype.ngOnDetach=function(){e.prototype.ngOnDetach.call(this),"wm.Variable"===_.get(this.datasource,"category")&&"none"!==this.getConfiguredState()?this._pageLoad=!1:this._pageLoad=!0},t}(r.StylableComponent);S.initializeProps=P(),S.decorators=[{type:t.Component,args:[{selector:"[wmTable]",template:'<div class="panel-heading" *ngIf="title || subheading || iconclass || exportOptions.length || _actions.header.length">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" *ngIf="iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n <div class="panel-actions app-datagrid-actions" *ngIf="exportOptions.length || _actions.header.length">\n <ng-container *ngFor="let btn of _actions.header"\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n <div wmMenu dropdown caption.bind="appLocale.LABEL_EXPORT" *ngIf="exportOptions.length" autoclose="always" attr.name="{{name}}-export"\n dataset.bind="exportOptions" select.event="export($item)" menuposition="down,left"></div>\n </div>\n </h3>\n</div>\n<div class="app-datagrid" #datagridElement></div>\n\n<div class="panel-footer clearfix" [hidden]="!_actions.footer.length && (!shownavigation || (onDemandLoad && dataNavigator.isDisableNext) || dataNavigator?.dataSize <= pagesize)">\n <div class="app-datagrid-paginator" [hidden]="(!dataNavigator?.dataSize && !dataNavigator.datasource?.pagination?.next) || !shownavigation || (onDemandLoad && dataNavigator.isDisableNext) || dataNavigator?.dataSize <= pagesize">\n <nav wmPagination show.bind="shownavigation" navigationalign.bind="navigationalign"\n navigationsize.bind="navigationSize"\n navigation.bind="navControls" showrecordcount.bind="showrecordcount" maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses" directionlinks.bind="directionlinks"></nav>\n </div>\n <div class="app-datagrid-actions" *ngIf="_actions.footer.length">\n <ng-container *ngFor="let btn of _actions.footer"\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n </div>\n</div>\n\n<ng-template #buttonRef let-btn="btn">\n <button wmButton caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n type="button" shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title" [attr.aria-label]="btn.displayName" disabled.bind="btn.disabled" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></button>\n</ng-template>\n\n<ng-template #anchorRef let-btn="btn">\n <a wmAnchor caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title"\n hyperlink.bind="btn.hyperlink" target.bind="btn.target" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></a>\n</ng-template>\n\n<div hidden>\n <ng-container #multiColumnFilterView></ng-container>\n\n <ng-container #inlineEditView></ng-container>\n\n <ng-container #inlineEditNewView></ng-container>\n\n <ng-container #rowActionsView></ng-container>\n\n <ng-container #rowExpansionActionView></ng-container>\n\n <ng-container #customExprView></ng-container>\n\n <ng-container #dynamicTable></ng-container>\n\n <ng-container #rowDetailView></ng-container>\n\n <div class="dynamic-table-container"></div>\n</div>\n',providers:[r.provideAs(S,i.NG_VALUE_ACCESSOR,!0),r.provideAsWidgetRef(S)]}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:i.FormBuilder},{type:u.App},{type:u.DynamicComponentRefProvider},{type:u.StatePersistence},{type:u.PaginationService},{type:u.Viewport},{type:p.ListComponent,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["datasource.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["readonlygrid"]}]},{type:t.NgZone},{type:r.TrustAsPipe}]},S.propDecorators={dataNavigator:[{type:t.ViewChild,args:[d.PaginationComponent,{static:!0}]}],_tableElement:[{type:t.ViewChild,args:["datagridElement",{static:!0}]}],rowActionTmpl:[{type:t.ContentChildren,args:["rowActionTmpl"]}],rowActionsViewRef:[{type:t.ViewChild,args:["rowActionsView",{static:!0,read:t.ViewContainerRef}]}],filterTmpl:[{type:t.ContentChildren,args:["filterTmpl",{descendants:!0}]}],filterViewRef:[{type:t.ViewChild,args:["multiColumnFilterView",{static:!0,read:t.ViewContainerRef}]}],inlineWidgetTmpl:[{type:t.ContentChildren,args:["inlineWidgetTmpl",{descendants:!0}]}],inlineEditViewRef:[{type:t.ViewChild,args:["inlineEditView",{static:!0,read:t.ViewContainerRef}]}],inlineWidgetNewTmpl:[{type:t.ContentChildren,args:["inlineWidgetTmplNew",{descendants:!0}]}],inlineEditNewViewRef:[{type:t.ViewChild,args:["inlineEditNewView",{static:!0,read:t.ViewContainerRef}]}],customExprTmpl:[{type:t.ContentChildren,args:["customExprTmpl",{descendants:!0}]}],customExprViewRef:[{type:t.ViewChild,args:["customExprView",{static:!0,read:t.ViewContainerRef}]}],rowExpansionActionTmpl:[{type:t.ContentChildren,args:["rowExpansionActionTmpl"]}],rowExpansionTmpl:[{type:t.ContentChild,args:["rowExpansionTmpl"]}],rowDetailViewRef:[{type:t.ViewChild,args:["rowDetailView",{static:!0,read:t.ViewContainerRef}]}],rowExpansionActionViewRef:[{type:t.ViewChild,args:["rowExpansionActionView",{static:!0,read:t.ViewContainerRef}]}],dynamicTableRef:[{type:t.ViewChild,args:["dynamicTable",{static:!0,read:t.ViewContainerRef}]}],onKeyPress:[{type:t.HostListener,args:["keypress",["$event"]]}]};var C="new",I="edit",D="delete",x=function(){function e(e,t,n){this.table=e,this.dialogService=t,this.app=n,e.initiateSelectItem=this.initiateSelectItem.bind(this),e.updateVariable=this.updateVariable.bind(this),e.updateRecord=this.updateRecord.bind(this),e.deleteRecord=this.deleteRecord.bind(this),e.insertRecord=this.insertRecord.bind(this),e.editRow=this.editRow.bind(this),e.addNewRow=this.addNewRow.bind(this),e.addRow=this.addNewRow.bind(this),e.deleteRow=this.deleteRow.bind(this),e.onRecordDelete=this.onRecordDelete.bind(this),e.hideEditRow=this.hideEditRow.bind(this),e.saveRow=this.saveRow.bind(this),e.cancelRow=this.cancelRow.bind(this)}return e.prototype.selectItemOnSuccess=function(e,t,n){var i=this;setTimeout((function(){t||i.table.selectItem(e,i.table.dataset),u.triggerFn(n)}),250)},e.prototype.initiateSelectItem=function(e,t,n,i,o){var a=this;this.table.gridOptions.isNavTypeScrollOrOndemand()&&!this.table.dataNavigator.isDisableNext&&this.table.isNewRowInserted?this.table.isNewRowInserted=!1:("last"===e&&(i||(this.table.dataNavigator.dataSize+=1),this.table.isNavigationEnabled()||(e="current")),this.table.dataNavigator.calculatePagingValues(),this.table.dataNavigator.__fullData=this.table.__fullData,this.table.dataNavigator.navigatePage(e,null,!0,(function(){(a.table.isNavigationEnabled()||i)&&a.selectItemOnSuccess(t,n,o),"quickedit"!==a.table.editmode||n||a.table.callDataGridMethod("setActiveRow",t)})))},e.prototype.updateVariable=function(e,t){var n=this,i=this.table.datasource;if(i&&(i.execute(u.DataSource.Operation.FETCH_DISTINCT_VALUES),!this.table.isNavigationEnabled())){var o=this.table.sortInfo,a=o&&o.direction?o.field+" "+o.direction:"";r.refreshDataSource(i,{page:1,filterFields:this.table.getFilterFields(this.table.filterInfo),orderBy:a,matchMode:"anywhereignorecase"}).then((function(){u.$appDigest(),n.selectItemOnSuccess(e,!0,t)}))}},e.prototype.insertSuccessHandler=function(e,t){if(e.error)this.table.invokeEventCallback("error",{$event:t.event,$operation:C,$data:e.error}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||e.error),u.triggerFn(t.error,e);else{if(this.table.gridOptions.isNavTypeScrollOrOndemand()&&(this.table.isNewRowInserted=!0),t.event){var n=$(t.event.target).closest("tr");this.table.callDataGridMethod("hideRowEditMode",n)}this.table.onRowinsert||this.table.toggleMessage(!0,"success",this.table.insertmessage),this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_CRUD)?(this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),e,void 0,!1,t.callBack),this.updateVariable(e,t.callBack)):this.table.datasource.execute(u.DataSource.Operation.IS_API_AWARE)||this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),e,void 0,!1,t.callBack),u.triggerFn(t.success,e),this.table.invokeEventCallback("rowinsert",{$event:t.event,$data:e,row:e})}},e.prototype.generatePath=function(e){var t,n,i=this.table.widget.$attrs.get("datasetboundexpr");if(_.startsWith(e,"item")&&i){_.startsWith(i,"Widgets.")&&(i=u.extractCurrentItemExpr(i,this.table));for(var o=this.table.$element.parents(".app-list-item"),a=_.map(o,(function(e){return _.parseInt($(e).attr("listitemindex"))})),r=a.length-1;r>=0;r--)i=i.replace("$i",a[r]);n=_.last(a),t=i.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g,"")}else{/^Variables\..*\.dataSet([\[][0-9]])/g.test(e)&&(n=_.parseInt(e.replace(/^Variables\..*\.dataSet([\[])/g,""))),t=e.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g,"")}return{path:t,index:n}},e.prototype.insertRecord=function(e){var t=this,n=this.table.datasource;if(n){var i=n.pagination&&n.pagination.number+1,o={row:e.row,skipNotification:!0,period:e.period};if(n.execute(u.DataSource.Operation.SUPPORTS_CRUD)||!n.execute(u.DataSource.Operation.IS_API_AWARE)||"wm.CrudVariable"===n.category){if(!n.execute(u.DataSource.Operation.IS_API_AWARE)){var a=this.generatePath(this.table.binddataset);return n.execute(u.DataSource.Operation.ADD_ITEM,{item:e.row,path:a.path,parentIndex:a.index}),void this.insertSuccessHandler(e.row,e)}n.execute(u.DataSource.Operation.INSERT_RECORD,o).then((function(o){t.insertSuccessHandler(o,e),"wm.CrudVariable"===n.category&&n.execute(u.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:i})}),(function(n){t.table.invokeEventCallback("error",{$event:e.event,$operation:C,$data:n}),t.table.onError||t.table.toggleMessage(!0,"error",t.table.errormessage||n),u.triggerFn(e.error,n),u.triggerFn(e.callBack,void 0,!0)}))}else this.table.invokeEventCallback("rowinsert",{$event:e.event,row:e.row})}},e.prototype.updateSuccessHandler=function(e,t){if(e.error)this.table.invokeEventCallback("error",{$event:t.event,$operation:I,$data:e.error}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||e.error),u.triggerFn(t.error,e);else{if(t.event){var n=$(t.event.target).closest("tr");this.table.callDataGridMethod("hideRowEditMode",n)}this.table.onRowupdate||this.table.toggleMessage(!0,"success",this.table.updatemessage),this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_CRUD)?(this.table.initiateSelectItem("current",e,void 0,!1,t.callBack),this.updateVariable(e,t.callBack)):this.table.datasource.execute(u.DataSource.Operation.IS_API_AWARE)||this.table.initiateSelectItem("current",e,void 0,!1,t.callBack),u.triggerFn(t.success,e),this.table.invokeEventCallback("rowupdate",{$event:t.event,$data:e,row:e})}},e.prototype.updateRecord=function(e){var t=this,n=this.table.datasource;if(n){var i=n.pagination&&n.pagination.number+1,o={row:e.row,prevData:e.prevData,skipNotification:!0,period:e.period};if(n.execute(u.DataSource.Operation.SUPPORTS_CRUD)||!n.execute(u.DataSource.Operation.IS_API_AWARE)||"wm.CrudVariable"===n.category){if(!n.execute(u.DataSource.Operation.IS_API_AWARE)){var a=this.generatePath(this.table.binddataset);return n.execute(u.DataSource.Operation.SET_ITEM,{prevItem:e.prevData,item:e.row,path:a.path,parentIndex:a.index}),void this.updateSuccessHandler(e.row,e)}n.execute(u.DataSource.Operation.UPDATE_RECORD,o).then((function(o){t.updateSuccessHandler(o,e),"wm.CrudVariable"===n.category&&n.execute(u.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:i})}),(function(n){t.table.invokeEventCallback("error",{$event:e.event,$operation:I,$data:n}),t.table.onError||t.table.toggleMessage(!0,"error",t.table.errormessage||n),u.triggerFn(e.error,n),u.triggerFn(e.callBack,void 0,!0)}))}else this.table.invokeEventCallback("rowupdate",{$event:e.event,row:e.row})}},e.prototype.onRecordDelete=function(e){var t;this.table.dataNavigator&&(this.table.dataNavigator.dataSize-=1,this.table.dataNavigator.calculatePagingValues(),t=this.table.dataNavigator.pageCount<this.table.dataNavigator.dn.currentPage?"prev":void 0,this.table.dataNavigator.__fullData=this.table.__fullData,this.table.dataNavigator.navigatePage(t,null,!0,(function(){setTimeout((function(){u.triggerFn(e)}),void 0,!1)})))},e.prototype.deleteSuccessHandler=function(e,t,n,i){t&&t.error?this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||t.error):(this.onRecordDelete(i),this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_CRUD)&&this.updateVariable(e,i),this.table.onRowdelete||this.table.toggleMessage(!0,"success",this.table.deletemessage),this.table.invokeEventCallback("rowdelete",{$event:n,$data:e,row:e}),this.table.invokeEventCallback("rowdeleted",{$event:n,$data:e,row:e}))},e.prototype.deleteFn=function(e){var t,n,i=this,o=this.table.datasource;if(o){if((this.table.onDemandLoad||this.table.infScroll)&&(this.table.isRowDeleted=!0),"wm.CrudVariable"===o.category&&(this.triggerWMEvent("resetEditMode"),o.pagination&&(t=o.pagination.last&&1===o.pagination.numberOfElements,n=t?o.pagination.number:o.pagination.number+1)),o.execute(u.DataSource.Operation.SUPPORTS_CRUD)||!o.execute(u.DataSource.Operation.IS_API_AWARE)||this.table._isDependent||"wm.CrudVariable"===o.category){if(!o.execute(u.DataSource.Operation.IS_API_AWARE)){var a=this.generatePath(this.table.binddataset);return o.execute(u.DataSource.Operation.REMOVE_ITEM,{item:e.row,path:a.path,parentIndex:a.index}),void this.deleteSuccessHandler(e.row,void 0,e.evt,e.callBack)}o.execute(u.DataSource.Operation.DELETE_RECORD,{row:e.row,skipNotification:!0,period:e.period}).then((function(t){i.deleteSuccessHandler(t,e.row,e.evt,e.callBack),"wm.CrudVariable"===o.category&&o.execute(u.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:n})}),(function(t){i.table.isRowDeleted&&(i.table.isRowDeleted=!1),u.triggerFn(e.callBack,void 0,!0),i.table.invokeEventCallback("error",{$event:e.evt,$operation:D,$data:t}),i.table.onError||i.table.toggleMessage(!0,"error",i.table.errormessage||t)}))}else this.table.invokeEventCallback("rowdelete",{$event:e.evt,row:e.row});u.triggerFn(e.cancelRowDeleteCallback)}},e.prototype.deleteRecord=function(e){var t=this;if(!this.table.confirmdelete)return this.deleteFn(e),void u.triggerFn(e.cancelRowDeleteCallback);this.dialogService.showAppConfirmDialog({title:this.app.appLocale.MESSAGE_DELETE_RECORD||"Delete Record",iconclass:"wi wi-delete fa-lg",message:this.table.confirmdelete,oktext:this.table.deleteoktext,canceltext:this.table.deletecanceltext,onOk:function(){t.deleteFn(e),t.dialogService.closeAppConfirmDialog()},onCancel:function(){u.triggerFn(e.cancelRowDeleteCallback),t.dialogService.closeAppConfirmDialog()},onOpen:function(){$(".cancel-action").focus()},onEscape:function(){u.triggerFn(e.cancelRowDeleteCallback)}})},e.prototype.editRow=function(e){var t,n=this;this.table._isDependent?this.triggerWMEvent("update"):(e&&e.target?this.table.callDataGridMethod("toggleEditRow",e,{selectRow:!0,action:"edit"}):"form"===this.table.editmode||"dialog"===this.table.editmode?(t=e||this.table.selectedItems[0],this.table.gridOptions.beforeRowUpdate(t)):setTimeout((function(){(t=n.table.datagridElement.find("tr.active")).length&&n.table.callDataGridMethod("toggleEditRow",void 0,{$row:t,action:"edit"})})),this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1))},e.prototype.addNewRow=function(){this.table.isGridEditMode||(this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1),this.table.callDataGridMethod("addNewRow"),this.table._liveTableParent?this.table._liveTableParent.addNewRow():this.table._isDependent&&this.triggerWMEvent("insert"))},e.prototype.triggerWMEvent=function(e,t){u.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:e,widgetName:this.table.name,row:this.table.selecteditem,dataSource:t})},e.prototype.deleteRow=function(e){var t,n=this;e&&e.target?this.table.callDataGridMethod("deleteRowAndUpdateSelectAll",e):setTimeout((function(){t=e||n.table.selectedItems[0],n.deleteRecord({row:t})})),this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1)},e.prototype.hideEditRow=function(){var e=this.table.datagridElement.find("tr.row-editing");e.length&&this.table.callDataGridMethod("hideRowEditMode",e)},e.prototype.saveRow=function(){this.table.callDataGridMethod("saveRow")},e.prototype.cancelRow=function(){var e=this.table.datagridElement.find("tr.row-editing");e.length&&this.table.callDataGridMethod("cancelEdit",e)},e}();x.decorators=[{type:t.Directive,args:[{selector:"[wmTableCUD]"}]}],x.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[S]}]},{type:u.AbstractDialogService},{type:u.App}]};var N=["null","empty","nullorempty","isnotnull","isnotempty"],k=function(e,t){if(u.isDefined(e)&&""!==e)return u.isNumberType(t)?_.toNumber(e):t===u.DataType.DATETIME?moment(e).valueOf():_.toString(e).toLowerCase()},M=function(e,t,n){void 0===n&&(n=[]);var i,o=k(t.value,t.type);return!u.isDefined(o)&&!_.includes(N,t.matchMode)||u.isNumberType(t.type)&&_.isNull(t.value)?e:e=e.filter((function(e){var a;switch(t.field?i=k(_.get(e,t.field),t.type):(i=[],_.forEach(e,(function(t,o){if(_.includes(n,o))i.push(t);else{var a=_.filter(_.range(n.length),(function(e){return n[e].includes(o)}));_.forEach(a,(function(t){var o=_.get(e,n[t]);i.indexOf(o)<0&&i.push(o)}))}})),i=i.join(" ").toLowerCase()),t.matchMode){case"start":a=_.startsWith(i,o);break;case"end":a=_.endsWith(i,o);break;case"exact":a=_.isEqual(i,o);break;case"notequals":a=!_.isEqual(i,o);break;case"null":a=_.isNull(i);break;case"isnotnull":a=!_.isNull(i);break;case"empty":a=_.isEmpty(i);break;case"isnotempty":a=!_.isEmpty(i);break;case"nullorempty":a=_.isNull(i)||_.isEmpty(i);break;case"lessthan":a=i<o;break;case"lessthanequal":a=i<=o;break;case"greaterthan":a=i>o;break;case"greaterthanequal":a=i>=o;break;default:a=u.isNumberType(t.type)?_.isEqual(i,o):_.includes(i,o)}return a}))},L=function(e,t,n){n.forEach((function(n){e[n]={value:t.value,type:t.value.type,logicalOp:"OR"},t.matchMode&&(e[n].matchMode=t.matchMode)}))},F=function(e,t,n){void 0===n&&(n=[]);var i=t&&t.field;i?(e[i]={value:t.value,logicalOp:"AND"},t.matchMode&&(e[i].matchMode=t.matchMode)):L(e,t,n)},j=function(e,t){t.field&&(e[t.field]={value:t.value,matchMode:t.matchMode,type:t.type})},B=function(e,t){e.push({field:t.key?t.key:"",matchMode:t.matchMode,type:t.type,value:t.value})},G=function(){function e(e){this.table=e,e._searchSortHandler=this.searchSortHandler.bind(this),e.getSearchResult=this.getSearchResult.bind(this),e.getSortResult=this.getSortResult.bind(this),e.checkFiltersApplied=this.checkFiltersApplied.bind(this),e.getFilterFields=this.getFilterFields.bind(this),e.onRowFilterChange=this.onRowFilterChange.bind(this),e.onFilterConditionSelect=this.onFilterConditionSelect.bind(this),e.showClearIcon=this.showClearIcon.bind(this),e.clearRowFilter=this.clearRowFilter.bind(this),e.matchModeTypesMap=r.getMatchModeTypesMap(),e.matchModeMsgs=r.getMatchModeMsgs(e.appLocale),e.emptyMatchModes=N,e.getNavigationTargetBySortInfo=this.getNavigationTargetBySortInfo.bind(this),e.refreshData=this.refreshData.bind(this),e.clearFilter=this.clearFilter.bind(this),e.adjustContainer=this.adjustContainer.bind(this)}return e.prototype.adjustContainer=function(e){var t=this;setTimeout((function(){u.adjustContainerRightEdges($("bs-dropdown-container"),t.table.rowFilterCompliedTl[e],t.table,$("bs-dropdown-container .dropdown-menu"))}))},e.prototype.getNavigationTargetBySortInfo=function(){return this.table.sortInfo&&"desc"===this.table.sortInfo.direction&&_.includes(this.table.primaryKey,this.table.sortInfo.field)?"first":"last"},e.prototype.getTableVisibleCols=function(){var e=[];return _.forEach(this.table.columns,(function(t,n){"true"===_.toLower(_.toString(t.showinfilter))&&"rowOperations"!==n&&t.searchable&&e.push(n)})),e},e.prototype.invokeSetFilterfieldBasedOnFieldval=function(e,t){if(e.field)F(t,e);else if(!_.isEmpty(e)){var n=this.getTableVisibleCols();F(t,e,n)}},e.prototype.getFilterFields=function(e){var t=this;e=e||{};var n={};return _.isArray(e)?_.forEach(e,(function(e){t.invokeSetFilterfieldBasedOnFieldval(e,n)})):this.invokeSetFilterfieldBasedOnFieldval(e,n),n},e.prototype.getLogicalOperator=function(e){var t="";for(var n in e){t=e[n].logicalOp||"";break}return t},e.prototype.resetSortStatus=function(e){var t;!_.isEmpty(this.table.sortInfo)&&this.table.datasource&&(t=this.table.sortInfo.field+" "+this.table.sortInfo.direction,(e=this.table.datasource.execute(u.DataSource.Operation.GET_OPTIONS).orderBy||e)&&(e=_.head(_.split(e,","))),t!==e&&(this.table.callDataGridMethod("resetSortIcons"),this.table.sortInfo={},this.table.setDataGridOption("sortInfo",{})))},e.prototype.clearFilter=function(e){var t;this.table.filterInfo={},"multicolumn"===this.table.filtermode?(this.table.fieldDefs.forEach((function(e){e.resetFilter&&e.resetFilter()})),e||this.table.onRowFilterChange()):"search"===this.table.filtermode&&((t=this.table.datagridElement).find('[data-element="dgSearchText"]').val(""),t.find('[data-element="dgFilterValue"]').val(""),e||t.find(".app-search-button").trigger("click"))},e.prototype.checkFiltersApplied=function(e){if(this.table.datasource)return this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_SERVER_FILTER)?(_.isEmpty(this.table.datasource.execute(u.DataSource.Operation.GET_OPTIONS).filterFields)&&this.clearFilter(!0),void this.resetSortStatus(e)):void(this.table.datasource.execute(u.DataSource.Operation.IS_PAGEABLE)&&this.resetSortStatus(e))},e.prototype.getSearchResult=function(e,t){var n=this.getTableVisibleCols();return t?(_.isArray(t)?t.forEach((function(t){e=M(e,t,n)})):e=M(e,t,n),e):e},e.prototype.getSortResult=function(e,t){return t&&t.direction&&(e=_.orderBy(e,t.field,t.direction)),e},e.prototype.handleClientSideSortSearch=function(e,t,n){var i;this.table._isClientSearch=!0,i=this.table.isNavigationEnabled()?u.getClonedObject(this.table.__fullData):u.getClonedObject(this.table.dataset),"search"===n?this.table.filterInfo=e:this.table.sortInfo=e,_.isObject(i)&&!_.isArray(i)&&(i=[i]),i=this.getSearchResult(i,this.table.filterInfo),i=this.getSortResult(i,this.table.sortInfo),this.table.serverData=i,"sort"===n&&this.table.invokeEventCallback("sort",{$event:t,$data:{data:this.table.serverData,sortDirection:this.table.sortInfo.direction,colDef:this.table.columns[this.table.sortInfo.field]}}),this.table.isNavigationEnabled()?(this.table.dataNavigator.dn.currentPage=1,this.table.dataNavigator.setPagingValues(i)):this.table.setGridData(this.table.serverData)},e.prototype.handleSinglePageSearch=function(e){this.table._isPageSearch=!0;var t=u.getClonedObject(this.table.gridData),n=this.table.datagridElement.find("tbody tr.app-datagrid-row");this.table.filterInfo=e,t=this.getSearchResult(t,e),_.forEach(this.table.gridData,(function(e,i){var o=$(n[i]);_.find(t,(function(t){return _.isEqual(t,e)}))?o.show():o.hide()})),t&&t.length?(this.table.callDataGridMethod("setStatus","ready"),this.table.gridfirstrowselect&&!this.table.multiselect&&this.table.callDataGridMethod("selectFirstRow",!0,!0)):(this.table.callDataGridMethod("setStatus","nodata",this.table.nodatamessage),this.table.selecteditem=void 0),this.table.callDataGridMethod("updateSelectAllCheckboxState")},e.prototype.handleServerSideSearch=function(e){var t=this;if(this.table.filterInfo=e,this.table.datasource){var n=this.table.sortInfo,i=n&&n.direction?n.field+" "+n.direction:"",o=this.getFilterFields(e),a=this.getLogicalOperator(o);r.refreshDataSource(this.table.datasource,{page:1,filterFields:o,orderBy:i,condition:a}).then((function(){u.$appDigest()}),(function(){t.table.toggleMessage(!0,"error",t.table.nodatamessage)}))}},e.prototype.handleSeverSideSort=function(e,t,n){var i=this;this.table.gridOptions.sortInfo.field=e.field,this.table.gridOptions.sortInfo.direction=e.direction,this.table.sortInfo=u.getClonedObject(e);var o=e&&e.direction?e.field+" "+e.direction:"",a=this.getFilterFields(this.table.filterInfo),s=this.getLogicalOperator(a);n||"none"===this.table.getConfiguredState()||this.table.statePersistence.removeWidgetState(this.table,"pagination"),r.refreshDataSource(this.table.datasource,{page:1,filterFields:a,orderBy:o,condition:s}).then((function(n){u.$appDigest();var o=n&&n.data?n.data:n;i.table.invokeEventCallback("sort",{$event:t,$data:{data:o,sortDirection:e.direction,colDef:i.table.columns[e.field]}})}))},e.prototype.searchHandler=function(e,t,n,i){var o;o=_.isArray(e)?e.filter((function(e){return void 0!==e.matchMode&&void 0!==e.value||void 0!==e.value&&""===e.field})):{field:e.field,value:e.value,type:e.type},"none"!==this.table.getConfiguredState()&&r.unsupportedStatePersistenceTypes.indexOf(this.table.navigation)<0?(_.isArray(e)&&o.length||e.value?(this.table.statePersistence.removeWidgetState(this.table,"search"),this.table.statePersistence.setWidgetState(this.table,{search:o})):this.table.statePersistence.removeWidgetState(this.table,"search"),i||(this.table.statePersistence.removeWidgetState(this.table,"pagination"),this.table.statePersistence.removeWidgetState(this.table,"selectedItem"))):console.warn("Retain State handling on Widget "+this.table.name+" is not supported for current pagination type.");var a=u.getClonedObject(e),s=this.table.datasource;if(s||this.table.dataset){var l={};_.isArray(a)?a.forEach((function(e){j(l,e)})):j(l,a),!1!==this.table.invokeEventCallback("beforefilter",{$event:t,$data:l,columns:l})&&(a=[],_.isEmpty(l)&&!_.isEmpty(o)?_.isArray(o)?_.forEach(o,(function(e){B(a,e)})):B(a,o):_.forEach(l,(function(e,t){a.push({field:t,matchMode:e.matchMode,type:e.type,value:e.value})})),s&&s.execute(u.DataSource.Operation.SUPPORTS_SERVER_FILTER)?this.handleServerSideSearch(a):s&&s.execute(u.DataSource.Operation.IS_API_AWARE)&&s.execute(u.DataSource.Operation.IS_PAGEABLE)?this.handleSinglePageSearch(a):this.handleClientSideSortSearch(a,t,n))}},e.prototype.sortHandler=function(e,t,n,i){var o=this.table.datasource;if(o||this.table.dataset){if(!i&&"none"!==this.table.getConfiguredState()&&r.unsupportedStatePersistenceTypes.indexOf(this.table.navigation)<0){var a={direction:e.direction,field:e.field};e.direction?this.table.statePersistence.setWidgetState(this.table,{sort:a}):this.table.statePersistence.removeWidgetState(this.table,"sort"),this.table.statePersistence.removeWidgetState(this.table,"selectedItem")}else console.warn("Retain State handling on Widget "+this.table.name+" is not supported for current pagination type.");o&&o.execute(u.DataSource.Operation.IS_SORTABLE)?this.handleSeverSideSort(e,t,i):this.handleClientSideSortSearch(e,t,n)}},e.prototype.setLastActionPerformedToSearchSort=function(){this.table.gridOptions.setLastActionPerformed(this.table.gridOptions.ACTIONS.SEARCH_OR_SORT),this.table.gridOptions.setIsSearchTrigerred(!0)},e.prototype.searchSortHandler=function(e,t,n,i){"change"===(t?t.type:"")&&"multicolumn"!==this.table.filtermode?t.stopPropagation():(this.setLastActionPerformedToSearchSort(),"search"===n?this.searchHandler(e,t,n,i):this.sortHandler(e,t,n,i))},e.prototype.showClearIcon=function(e){var t=this.table.rowFilter[e]&&this.table.rowFilter[e].value;return u.isDefined(t)&&""!==t&&null!==t},e.prototype.clearRowFilter=function(e){this.table.rowFilter&&this.table.rowFilter[e]&&(this.table.columns[e].resetFilter(),this.onRowFilterChange(e))},e.prototype.onFilterConditionSelect=function(e,t){var n=this;this.table.rowFilter[e]=this.table.rowFilter[e]||{},this.table.rowFilter[e].matchMode=t,_.includes(this.table.emptyMatchModes,t)?(this.table.columns[e].resetFilter(),this.table.onRowFilterChange()):u.isDefined(this.table.rowFilter[e].value)&&""!==this.table.rowFilter[e].value?this.table.onRowFilterChange():setTimeout((function(){n.table.columns[e].filterInstance.focus()}))},e.prototype.getFilterOnFieldValues=function(e){var t=this;if(this.table.datasource&&this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_DISTINCT_API)){var n=e.field,i=this.table.fullFieldDefs,o=_.filter(i,{filteronfilter:n}),a=_.get(this.table.rowFilter,[n,"value"]);_.forEach(o,(function(e){var n=e.filteronfilter,i=e.field,o={},s=e.filterwidget;r.isDataSetWidget(s)&&n!==i&&!e.isFilterDataSetBound&&(o[n]=u.isDefined(a)&&""!==a&&null!==a?{value:a}:{},s===u.FormWidgetType.AUTOCOMPLETE&&e.filterInstance.dataoptions?e.filterInstance.dataoptions.filterFields=o:t.table.datasource.execute(u.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:i,filterFields:o}).then((function(t){e.filterdataset=t.data})))}))}},e.prototype.onRowFilterChange=function(e){var t=this,n=[],i=_.find(this.table.fullFieldDefs,{field:e});_.forEach(this.table.rowFilter,(function(e,o){(u.isDefined(e.value)&&""!==e.value||_.includes(t.table.emptyMatchModes,e.matchMode))&&(i&&o===i.field&&(e.type=e.type||i.type,e.matchMode=e.matchMode||_.get(t.table.matchModeTypesMap[e.type],0)),n.push({field:o,value:e.value,matchMode:e.matchMode,type:e.type}))})),this.table.gridOptions.searchHandler(n,void 0,"search"),i&&this.getFilterOnFieldValues(i)},e.prototype.refreshData=function(e){if(this.table.datasource){var t=e?this.table.dataNavigator.dn.currentPage:1,n=this.table.sortInfo,i=n&&n.direction?n.field+" "+n.direction:"",o=this.getFilterFields(this.table.filterInfo),a=this.getLogicalOperator(o);r.refreshDataSource(this.table.datasource,{page:t,filterFields:o,orderBy:i,condition:a})}},e}();G.decorators=[{type:t.Directive,args:[{selector:"[wmTableFilterSort]"}]}],G.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[S]}]}]};var V=function(){r.register("wm-table-action",new Map([["accessroles",r.PROP_STRING],["action",r.PROP_STRING],["caption",r.PROP_STRING],["class",r.PROP_STRING],["conditionalclass",r.PROP_ANY],["conditionalstyle",r.PROP_ANY],["disabled",Object.assign({value:!1},r.PROP_BOOLEAN)],["display-name",r.PROP_STRING],["hyperlink",r.PROP_STRING],["icon",r.PROP_STRING],["iconclass",r.PROP_STRING],["key",r.PROP_STRING],["position",Object.assign({value:"footer"},r.PROP_STRING)],["shortcutkey",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["title",r.PROP_STRING],["target",r.PROP_STRING],["widget-type",Object.assign({value:"button"},r.PROP_STRING)]]))},W={widgetType:"wm-table-action",hostClass:""},U=function(e){function t(t,n){var i=e.call(this,t,W)||this;return i.table=n,i}return g(t,e),t.prototype.populateAction=function(){this.buttonDef={key:this.key,displayName:this["display-name"]||this.caption||"",show:this.show,class:this.class||"",iconclass:this.iconclass||"",title:_.isUndefined(this.title)?this["display-name"]||"":this.title,action:this.action,accessroles:this.accessroles,shortcutkey:this.shortcutkey,disabled:this.disabled,tabindex:this.tabindex,icon:this.icon,position:this.position,widgetType:this["widget-type"],hyperlink:this.hyperlink,target:this.target||"",conditionalclass:this.conditionalclass||"",conditionalstyle:this.conditionalstyle||{}},this._propsInitialized=!0},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateAction(),this.table.registerActions(this.buttonDef)},t.prototype.onPropertyChange=function(e,t){this._propsInitialized&&("display-name"===e?this.buttonDef.displayName=t:this.buttonDef[e]=t)},t}(r.BaseComponent);U.initializeProps=V(),U.decorators=[{type:t.Directive,args:[{selector:"[wmTableAction]",providers:[r.provideAsWidgetRef(U)]}]}],U.ctorParameters=function(){return[{type:t.Injector},{type:S,decorators:[{type:t.Optional}]}]};var q=function(){r.register("wm-table-column",new Map([["accessroles",r.PROP_STRING],["autoclose",Object.assign({value:"outsideClick"},r.PROP_STRING)],["backgroundcolor",r.PROP_STRING],["binding",r.PROP_STRING],["caption",r.PROP_STRING],["checkedvalue",r.PROP_STRING],["col-class",r.PROP_STRING],["collapsible",r.PROP_BOOLEAN],["col-ng-class",r.PROP_STRING],["currencypattern",r.PROP_STRING],["customExpression",r.PROP_BOOLEAN],["dataentrymode",Object.assign({value:"default"},r.PROP_STRING)],["datafield",r.PROP_STRING],["dataoptions",r.PROP_ANY],["dataset",r.PROP_ANY],["datasource",r.PROP_STRING],["dateformat",r.PROP_STRING],["datepattern",r.PROP_STRING],["debouncetime",Object.assign({value:250},r.PROP_NUMBER)],["defaultvalue",r.PROP_STRING],["disabled",r.PROP_BOOLEAN],["displayfield",r.PROP_STRING],["displaylabel",r.PROP_STRING],["editdatepattern",r.PROP_STRING],["outputformat",r.PROP_STRING],["edit-widget-type",r.PROP_STRING],["editinputtype",r.PROP_STRING],["exportexpression",r.PROP_STRING],["filterdataset",r.PROP_STRING],["filterdatafield",r.PROP_STRING],["filterdisplayfield",r.PROP_STRING],["filterdisplaylabel",r.PROP_STRING],["filterexpressions",Object.assign({value:"{}"},r.PROP_STRING)],["filtersearchkey",r.PROP_STRING],["filter-on",r.PROP_STRING],["filteronfilter",r.PROP_STRING],["filterplaceholder",r.PROP_STRING],["filterwidget",r.PROP_STRING],["filterinputtype",r.PROP_STRING],["formatpattern",r.PROP_STRING],["custompipeformat",r.PROP_STRING],["fractionsize",r.PROP_STRING],["generator",r.PROP_STRING],["groupby",r.PROP_STRING],["limit",r.PROP_NUMBER],["match",r.PROP_STRING],["matchmode",r.PROP_STRING],["maxchars",r.PROP_NUMBER],["maxvalue",r.PROP_NUMBER],["step",r.PROP_NUMBER],["mobiledisplay",Object.assign({value:!0},r.PROP_BOOLEAN)],["minvalue",r.PROP_NUMBER],["maxdate",r.PROP_STRING],["mindate",r.PROP_STRING],["excludedays",r.PROP_STRING],["excludedates",r.PROP_STRING],["maxtime",r.PROP_STRING],["mintime",r.PROP_STRING],["pcdisplay",Object.assign({value:!0},r.PROP_BOOLEAN)],["period",r.PROP_BOOLEAN],["placeholder",r.PROP_STRING],["prefix",r.PROP_STRING],["primary-key",r.PROP_BOOLEAN],["readonly",r.PROP_BOOLEAN],["regexp",r.PROP_ANY],["related-entity-name",r.PROP_STRING],["required",r.PROP_BOOLEAN],["rowactionsposition",r.PROP_STRING],["searchkey",r.PROP_STRING],["searchable",Object.assign({value:!0},r.PROP_BOOLEAN)],["showinfilter",Object.assign({value:!1},r.PROP_BOOLEAN)],["suffix",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["showcount",r.PROP_BOOLEAN],["showdropdownon",Object.assign({value:"default"},r.PROP_STRING)],["sortable",Object.assign({value:!0},r.PROP_BOOLEAN)],["tabletdisplay",Object.assign({value:!0},r.PROP_BOOLEAN)],["textalignment",Object.assign({value:"left"},r.PROP_STRING)],["textcolor",r.PROP_STRING],["type",Object.assign({value:"string"},r.PROP_STRING)],["uncheckedvalue",r.PROP_STRING],["validationmessage",r.PROP_STRING],["widget-type",r.PROP_STRING],["width",r.PROP_STRING]]))},z=function(){r.register("wm-table-column-group",new Map([["backgroundcolor",r.PROP_STRING],["caption",r.PROP_STRING],["col-class",r.PROP_STRING],["name",r.PROP_STRING],["textalignment",Object.assign({value:"center"},r.PROP_STRING)]]))},H={widgetType:"wm-table-column-group",hostClass:""},Y=function(e){function t(t,n,i){var o=e.call(this,t,H)||this;return o.group=n,o.table=i,o.config={},o}return g(t,e),t.prototype.populateConfig=function(){this.config={field:this.name,displayName:this.caption||"",columns:[],isGroup:!0,accessroles:this.accessroles,textAlignment:this.textalignment||"center",backgroundColor:this.backgroundcolor,class:this["col-class"]}},t.prototype.onPropertyChange=function(t,n,i){"caption"===t?(this.config.displayName=n||"",this.table.callDataGridMethod("setColumnProp",this.config.field,"displayName",n,!0)):e.prototype.onPropertyChange.call(this,t,n,i)},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateConfig();var t=parseInt(this.getAttr("headerIndex"),10),n=parseInt(this.getAttr("index"),10),i=this.group&&this.group.name;r.setHeaderConfigForTable(this.table.headerConfig,this.config,i,i?n:t)},t}(r.BaseComponent);Y.initializeProps=z(),Y.decorators=[{type:t.Directive,args:[{selector:"[wmTableColumnGroup]",providers:[r.provideAsWidgetRef(Y)]}]}],Y.ctorParameters=function(){return[{type:t.Injector},{type:Y,decorators:[{type:t.SkipSelf},{type:t.Optional}]},{type:S,decorators:[{type:t.Optional}]}]};var K={widgetType:"wm-table-column",hostClass:""},Q=["datafield","displayfield","placeholder","searchkey","matchmode","displaylabel","groupby","match","dateformat","showcount","collapsible","checkedvalue","uncheckedvalue","showdropdownon","dataentrymode","autoclose","dataset","outputformat"];Q=w(w([],b(Q)),b(["maxchars","regexp","minvalue","maxvalue","step","required","mindate","maxdate","excludedates","excludedays","mintime","maxtime"]));var Z=function(){function e(e){this.widget=e}return e.prototype.focus=function(){this.widget.focus()},e.prototype.setProperty=function(e,t){e="value"===e?"datavalue":e,this.widget[e]=t},e.prototype.getProperty=function(e){return e="value"===e?"datavalue":e,this.widget[e]},e}(),J=function(e){function t(t,n,i,o,a,r){var s=e.call(this,t,K)||this;return s.appDefaults=n,s.table=i,s.group=o,s.bindfilterdataset=a,s.binddataset=r,s.syncValidators=[],s.asyncValidators=[],s.observeOnFields=[],s.aggregate={sum:function(){return _.sum(s._getColumnData())},average:function(e){return void 0===e&&(e=2),_.round(_.mean(s._getColumnData()),e)},count:function(){return s._getColumnData().length},minimum:function(){return _.min(s._getColumnData())},maximum:function(){return _.max(s._getColumnData())},percent:function(e,t){return void 0===t&&(t=2),_.round(_.sum(s._getColumnData())/e*100,t)}},s.notifyForFields=[],s}return g(t,e),Object.defineProperty(t.prototype,"dataoptions",{get:function(){return this._dataoptions},set:function(e){this._dataoptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datasource",{get:function(){return this._datasource},set:function(e){this._datasource=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this.populateFieldDef();var n=parseInt(this.getAttr("index"),10),i=parseInt(this.getAttr("headerIndex"),10),o=this.group&&this.group.name;if(r.setHeaderConfigForTable(this.table.headerConfig,{field:this.field,displayName:this.displayName},o,o?n:i),this.table.registerColumns(this.widget,n),this._isRowFilter="multicolumn"===this.table.filtermode&&this.searchable,this._isInlineEditable=!this.readonly&&this.table.editmode!==r.EDIT_MODE.DIALOG&&this.table.editmode!==r.EDIT_MODE.FORM,this._isNewEditableRow=this._isInlineEditable&&this.table.editmode===r.EDIT_MODE.QUICK_EDIT&&this.table.shownewrow,this.setUpControls(),this._propsInitialized=!0,this.getFormControl()){var a=this.getFormControl().statusChanges.pipe(m.debounceTime(100)).subscribe((function(e){return t.onStatusChange(e,"inlineInstance")}));this.registerDestroyListener((function(){return a.unsubscribe()})),this.fieldValidations=new r.BaseFieldValidations(this,this.inlineInstance,this.editWidgetType,this.getFormControl(),this.table,"inlineInstance")}if(this._checkNewEditableRowControl()){var s=this.getFormControl("_new").statusChanges.pipe(m.debounceTime(100)).subscribe((function(e){return t.onStatusChange(e,"inlineInstanceNew")}));this.registerDestroyListener((function(){return s.unsubscribe()})),this.fieldValidations_new=new r.BaseFieldValidations(this,this.inlineInstanceNew,this.editWidgetType,this.getFormControl("_new"),this.table,"inlineInstanceNew")}},t.prototype.ngAfterContentInit=function(){var t=this;if(this._isRowFilter){var n=this._filterInstances.changes.subscribe((function(e){t.filterInstance=e.first&&e.first.widget,t.setUpFilterWidget()}));this.registerDestroyListener((function(){return n.unsubscribe()}))}if(this._isInlineEditable){var i=this._inlineInstances.changes.subscribe((function(e){t.inlineInstance=e.first&&e.first.widget,t.fieldValidations.formwidget=e.first,t.table.registerFormField(t.binding,new Z(t.inlineInstance)),t.setUpInlineWidget("inlineInstance")}));if(this.registerDestroyListener((function(){return i.unsubscribe()})),this._isNewEditableRow){var o=this._inlineInstancesNew.changes.subscribe((function(e){t.inlineInstanceNew=e.first&&e.first.widget,t.fieldValidations_new.formwidget=e.first,t.setUpInlineWidget("inlineInstanceNew")}));this.registerDestroyListener((function(){return o.unsubscribe()}))}}this.registerReadyStateListener((function(){t.key=t.field||t.binding})),e.prototype.ngAfterContentInit.call(this),this.table.isdynamictable&&this.table.inlineWidgetTmpl._results.push(this.inlineWidthTempRef)},t.prototype.ngAfterViewInit=function(){this.filterTemplateRef&&this.table.renderDynamicFilterColumn(this.filterTemplateRef)},t.prototype.applyValidations=function(){this.getFormControl()&&(this.syncValidators.length>0&&this.fieldValidations.setValidators(this.syncValidators),this.fieldValidations.setUpValidators(),this.asyncValidators.length>0&&this.fieldValidations.setAsyncValidators(this.asyncValidators),this.observeOnFields.length>0&&this.fieldValidations.observeOn(this.observeOnFields,"columns"))},t.prototype.removeValidations=function(){this.table.ngform.markAsUntouched();var e=this.getFormControl();e&&(e.clearValidators(),e.clearAsyncValidators(),e.updateValueAndValidity())},t.prototype.applyNewRowValidations=function(){this._checkNewEditableRowControl()&&(this.syncValidators.length>0&&this.fieldValidations_new.setValidators(this.syncValidators),this.fieldValidations_new.setUpValidators(),this.asyncValidators.length>0&&this.fieldValidations_new.setAsyncValidators(this.asyncValidators),this.observeOnFields.length>0&&this.fieldValidations_new.observeOn(this.observeOnFields,"columns"))},t.prototype.removeNewRowValidations=function(){if(this.table.ngform.markAsUntouched(),this._checkNewEditableRowControl()){var e=this.getFormControl("_new");e.clearValidators(),e.clearAsyncValidators(),e.updateValueAndValidity()}},t.prototype.addFormControl=function(e){var t=e?this.binding+e:this.binding;this.table.ngform.addControl(t,this.table.fb.control(""))},t.prototype.getFormControl=function(e){var t=e?this.binding+e:this.binding;return this.table.ngform.controls[t]},t.prototype._checkNewEditableRowControl=function(){return this._isNewEditableRow&&this.getFormControl("_new")},t.prototype.setUpControls=function(){var e=this;if(this._isInlineEditable){if(this.editWidgetType===u.FormWidgetType.UPLOAD)return;this.addFormControl();var t=this.getFormControl();if(t){var n=t.valueChanges.pipe(m.debounceTime(200)).subscribe((function(t){return e.onValueChange(t,"inlineInstance")}));this.registerDestroyListener((function(){return n.unsubscribe()}))}if(this._isNewEditableRow){this.addFormControl("_new");var i=this.getFormControl("_new");if(i){var o=i.valueChanges.pipe(m.debounceTime(200)).subscribe((function(t){return e.onValueChange(t,"inlineInstanceNew")}));this.registerDestroyListener((function(){return o.unsubscribe()}))}}}if(this._isRowFilter&&(this.addFormControl("_filter"),this.filterControl=this.getFormControl("_filter"),this.filterControl)){var a=this.filterControl.valueChanges.subscribe(this.onFilterValueChange.bind(this));this.registerDestroyListener((function(){return a.unsubscribe()}))}},t.prototype.resetFilter=function(){this.filterControl&&this.filterControl.setValue(""),this.filterwidget===u.FormWidgetType.AUTOCOMPLETE&&(this.filterInstance.query="",this.filterInstance.queryModel="")},t.prototype.onFilterValueChange=function(e){this.table.rowFilter[this.field].value=e},Object.defineProperty(t.prototype,"datavalue",{get:function(){return this[this.activeControlType]&&this[this.activeControlType].datavalue},set:function(e){var t=this.getFormControl("inlineInstanceNew"===this.activeControlType?"_new":void 0);t&&t&&this.editWidgetType!==u.FormWidgetType.UPLOAD&&t.setValue(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.datavalue},set:function(e){this.datavalue=e},enumerable:!1,configurable:!0}),t.prototype.onValueChange=function(e,t){null!==e&&r.applyFilterOnField(this.table.datasource,this.widget,this.table.fieldDefs,e,{widget:"edit-widget-type"}),this.table.ngform.touched&&(this.activeControlType=t,"inlineInstance"===t?(this.notifyChanges(),this.fieldValidations.setCustomValidationMessage()):this._isNewEditableRow&&(this.notifyChanges("_new"),this.fieldValidations_new.setCustomValidationMessage()))},t.prototype.loadFilterData=function(){var e=this;this._isRowFilter&&r.isDataSetWidget(this.filterwidget)&&!this.bindfilterdataset&&(this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_DISTINCT_API)?(this.relatedEntityName&&(this.widget["is-related"]=!0,this.widget["lookup-type"]=this.relatedEntityName,this.widget["lookup-field"]=_.last(_.split(this.field,"."))),this.filterwidget===u.FormWidgetType.AUTOCOMPLETE?(this.filterInstance.dataoptions=r.getDistinctFieldProperties(this.table.datasource,this),this.filterInstance.datasource=this.table.datasource):r.getDistinctValues(this.table.datasource,this.widget,"filterwidget").then((function(t){e._filterDataSet=t.data,e.setFilterWidgetDataSet()}))):this.registerDestroyListener(u.$watch(this.table.binddataset,this.viewParent,{},(function(t){return e.widget.filterdataset=t}),r.getWatchIdentifier(this.widgetId,"filterdataset"))))},t.prototype.loadInlineWidgetData=function(){if(r.isDataSetWidget(this["edit-widget-type"])&&!this.binddataset&&!this.readonly){var e=this.table.datasource;if(this["related-entity-name"]&&this["primary-key"]){this.isDataSetBound=!0;var t=_.split(this.binding,".");this.showPendingSpinner=!0,r.fetchRelatedFieldData(e,this.widget,{relatedField:_.head(t),datafield:_.last(t),widget:"edit-widget-type"})}else e.execute(u.DataSource.Operation.SUPPORTS_DISTINCT_API)&&r.getDistinctValuesForField(e,this.widget,{widget:"edit-widget-type"})}},t.prototype.onDataSourceChange=function(){this.loadFilterData(),this.table.editmode===r.EDIT_MODE.QUICK_EDIT&&this.loadInlineWidgetData()},t.prototype.setFilterWidgetDataSet=function(){this.filterInstance&&(this.filterInstance.dataset=this._filterDataSet)},t.prototype.setUpFilterWidget=function(){var e=this;this.filterInstance.registerReadyStateListener((function(){if(r.isDataSetWidget(e.filterwidget)){var t=_.last(e.binding.split("."));e.filterInstance.dataset=e._filterDataSet,e.filterInstance.datafield=e.filterdatafield||t,e.filterInstance.displayfield=e.filterdisplayfield||t,e.filterwidget===u.FormWidgetType.AUTOCOMPLETE&&(e.filterInstance.displaylabel=e.filterdisplaylabel||t,e.filterInstance.searchkey=e.filtersearchkey||t)}e.filterwidget===u.FormWidgetType.TIME&&(e.filterInstance.timepattern=e.appDefaults.timeFormat||"hh:mm:ss a"),e.filterInstance.placeholder=e.filterplaceholder||""}))},t.prototype.notifyChanges=function(e){var t=this;_.forEach(this.notifyForFields,(function(n){e&&t._isNewEditableRow?n.fieldValidations_new.validate():n.fieldValidations.validate()}))},t.prototype.observeOn=function(e){this.observeOnFields=_.cloneDeep(e)},t.prototype.setUpValidators=function(){this.fieldValidations.setUpValidators(),this._checkNewEditableRowControl()&&this.fieldValidations_new.setUpValidators()},t.prototype.setAsyncValidators=function(e){this.asyncValidators=_.cloneDeep(e)},t.prototype.setValidators=function(e){this.syncValidators=_.cloneDeep(e)},t.prototype.boundFn=function(e){return e()},t.prototype.onStatusChange=function(e,t){this["showPendingSpinner"+("inlineInstance"===t?"":"New")]="PENDING"===e},t.prototype.setSummaryRowData=function(e){var t=e instanceof Array?e:[e];this._invokeSummaryRowData(t)},t.prototype._invokeSummaryRowData=function(e){var t=this;_.forEach(e,(function(e,n){var i=e;if(i instanceof Promise)i.then((function(e){t.table.callDataGridMethod("setSummaryRowDef",t.key,e,n,!0)}));else if(i.value&&i.value instanceof Promise){var o=i;i.value.then((function(e){o.value=e,t.table.callDataGridMethod("setSummaryRowDef",t.key,o,n,!0)}))}t.table.callDataGridMethod("setSummaryRowDef",t.key,i,n)}))},t.prototype._getColumnData=function(){return _.map(this.table.dataset,this.binding)},t.prototype.setInlineWidgetProp=function(e,t,n){"datepattern"===t&&this.editWidgetType===u.FormWidgetType.TIME&&(t="timepattern"),this[e]&&u.isDefined(n)&&(this[e][t]=n)},t.prototype.setUpInlineWidget=function(e){var t=this;this[e].registerReadyStateListener((function(){r.isDataSetWidget(t["edit-widget-type"])&&(t[e].dataset=t.dataset),Q.forEach((function(n){t.setInlineWidgetProp(e,n,t[n])})),t[e].datasource=t._datasource,t[e].dataoptions=t._dataoptions,t.setInlineWidgetProp(e,"datepattern",t.editdatepattern)}))},t.prototype.getStyleDef=function(){return"width: "+(this.width||"")+"; background-color: "+(this.backgroundcolor||"")+"; color: "+(this.textcolor||"")+";"},t.prototype.populateFieldDef=function(){if(this.width="px"===this.width?"":this.width||"",this.field=this.binding,this.displayName=this.caption||"",this.pcDisplay=this.pcdisplay,this.mobileDisplay=this.mobiledisplay,this.tabletDisplay=this.tabletdisplay,this.textAlignment=this.textalignment,this.backgroundColor=this.backgroundcolor,this.textColor=this.textcolor,this.primaryKey=this["primary-key"],this.relatedEntityName=this["related-entity-name"],this.style=this.getStyleDef(),this.class=this["col-class"],this.ngclass=this["col-ng-class"],this.formatpattern="toNumber"===this.formatpattern?"numberToString":this.formatpattern,this.searchable="blob"!==this.type&&"clob"!==this.type&&this.searchable,this.showinfilter=!this.nativeElement.hasAttribute("showinfilter")||this.table&&this.table.isdynamictable?this.show:this.nativeElement.getAttribute("showinfilter"),this.limit=this.limit?+this.limit:void 0,this.editWidgetType=this["edit-widget-type"]=this["edit-widget-type"]||r.getEditModeWidget(this),this.filterOn=this["filter-on"],this.readonly=u.isDefined(this.getAttr("readonly"))?"true"===this.getAttr("readonly"):this["related-entity-name"]?!this["primary-key"]:_.includes(["identity","uniqueid","sequence"],this.generator),this.filterwidget=this.filterwidget||r.getDataTableFilterWidget(this.type||"string"),this.isFilterDataSetBound=!!this.bindfilterdataset,this.defaultvalue=r.getDefaultValue(this.defaultvalue,this.type,this.editWidgetType),u.isDateTimeType(this.type)&&"toDate"===this.formatpattern&&!this.datepattern){var e=u.getDisplayDateTimeFormat(this.type);this.type===u.DataType.DATE?this.datepattern=this.appDefaults.dateFormat||e:this.type===u.DataType.TIME?this.datepattern=this.appDefaults.timeFormat||e:this.type!==u.DataType.TIMESTAMP&&this.type!==u.DataType.DATETIME||(this.datepattern=this.appDefaults.dateTimeFormat||e)}},t.prototype.onPropertyChange=function(t,n,i){if(this._propsInitialized){switch(t){case"caption":this.displayName=n||"",this.setProperty("displayName",this.displayName);break;case"defaultvalue":this.defaultvalue=r.getDefaultValue(this.defaultvalue,this.type,this.editWidgetType);break;case"show":this.table.redraw(!0),this.showinfilter=this.nativeElement.hasAttribute("showinfilter")?this.nativeElement.getAttribute("showinfilter"):n;break;case"filterdataset":this._filterDataSet=n,this.setFilterWidgetDataSet();break;case"editdatepattern":this.setInlineWidgetProp("inlineInstance","datepattern",n),this.setInlineWidgetProp("inlineInstanceNew","datepattern",n);break;case"showinfilter":this.showinfilter=n;break;default:Q.includes(t)&&(this.setInlineWidgetProp("inlineInstance",t,n),this.setInlineWidgetProp("inlineInstanceNew",t,n))}e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.setProperty=function(e,t){switch(this[e]=t,e){case"displayName":this.table.callDataGridMethod("setColumnProp",this.field,e,t);break;default:this.table.redraw(!0)}},t}(r.BaseComponent);J.initializeProps=q(),J.decorators=[{type:t.Directive,args:[{selector:"[wmTableColumn]",providers:[r.provideAsWidgetRef(J)]}]}],J.ctorParameters=function(){return[{type:t.Injector},{type:u.AppDefaults},{type:S,decorators:[{type:t.Optional}]},{type:Y,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["filterdataset.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]}]},J.propDecorators={_filterInstances:[{type:t.ContentChildren,args:["filterWidget"]}],_inlineInstances:[{type:t.ContentChildren,args:["inlineWidget"]}],_inlineInstancesNew:[{type:t.ContentChildren,args:["inlineWidgetNew"]}],customExprTmpl:[{type:t.ContentChild,args:["customExprTmpl"]}],inlineWidthTempRef:[{type:t.ContentChild,args:["inlineWidgetTmpl"]}],filterTemplateRef:[{type:t.ContentChild,args:["filterTmpl"]}]};var X=function(){r.register("wm-table-row",new Map([["class",r.PROP_STRING],["closeothers",Object.assign({value:!0},r.PROP_BOOLEAN)],["content",r.PROP_STRING],["columnwidth",Object.assign({value:"30px"},r.PROP_STRING)],["collapseicon",r.PROP_STRING],["expandicon",r.PROP_STRING],["height",r.PROP_STRING],["position",Object.assign({value:"0"},r.PROP_STRING)]]))},ee={widgetType:"wm-table-row",hostClass:""},te=function(e){function t(t,n){var i=e.call(this,t,ee)||this;return i.table=n,i}return g(t,e),t.prototype.populateConfig=function(){this.config={closeothers:this.closeothers,content:this.content,columnwidth:this.columnwidth,expandicon:this.expandicon,collapseicon:this.collapseicon,height:this.height,position:this.position}},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateConfig(),this.table.registerRow(this.config,this)},t.prototype.onPropertyChange=function(e,t){"content"===e&&this.config&&(this.config.content=this.content)},t}(r.BaseComponent);te.initializeProps=X(),te.decorators=[{type:t.Directive,args:[{selector:"[wmTableRow]",providers:[r.provideAsWidgetRef(te)]}]}],te.ctorParameters=function(){return[{type:t.Injector},{type:S,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]};var ne=function(){r.register("wm-table-row-action",new Map([["accessroles",r.PROP_STRING],["action",r.PROP_STRING],["caption",r.PROP_STRING],["class ",Object.assign({value:"btn-secondary"},r.PROP_STRING)],["disabled",Object.assign({value:!1},r.PROP_BOOLEAN)],["display-name",r.PROP_STRING],["hyperlink",r.PROP_STRING],["iconclass",r.PROP_STRING],["key",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["target",r.PROP_STRING],["title",r.PROP_STRING],["widget-type",Object.assign({value:"button"},r.PROP_STRING)]]))},ie={widgetType:"wm-table-row-action",hostClass:""},oe=function(e){function t(t,n,i){var o=e.call(this,t,ie)||this;return o.table=n,i[0].editRow=function(e){return o.table.editRow(e)},i[0].deleteRow=function(e){return o.table.deleteRow(e)},i[0].addNewRow=function(e){return o.table.addNewRow(e)},o}return g(t,e),t.prototype.getTitle=function(){return _.isUndefined(this.title)?this["display-name"]||"":this.title},t.prototype.populateAction=function(){this.buttonDef={key:this.key,displayName:this["display-name"]||this.caption||"",show:this.show,class:this.class||"",iconclass:this.iconclass||"",title:this.getTitle(),action:this.action,accessroles:this.accessroles,disabled:this.disabled,tabindex:this.tabindex?+this.tabindex:void 0,widgetType:this["widget-type"]||"button",hyperlink:this.hyperlink,target:this.target||"",conditionalclass:this.conditionalclass||"",conditionalstyle:this.conditionalstyle||{}}},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateAction(),this.table.registerRowActions(this.buttonDef)},t}(r.BaseComponent);oe.initializeProps=ne(),oe.decorators=[{type:t.Directive,args:[{selector:"[wmTableRowAction]",providers:[r.provideAsWidgetRef(oe),{provide:r.Context,useValue:{},multi:!0}]}]}],oe.ctorParameters=function(){return[{type:t.Injector},{type:S,decorators:[{type:t.Optional}]},{type:Array,decorators:[{type:t.Self},{type:t.Inject,args:[r.Context]}]}]};var ae=[S,x,G,U,J,Y,te,oe],re=function(){};re.decorators=[{type:t.NgModule,args:[{imports:[s.BasicModule,a.BsDropdownModule,n.CommonModule,i.FormsModule,i.ReactiveFormsModule,l.InputModule,p.ListModule,c.MenuModule,d.PaginationModule,o.TooltipModule,r.WmComponentsModule],declarations:w([],b(ae)),exports:w([],b(ae)),entryComponents:[]}]}],e.TableActionDirective=U,e.TableCUDDirective=x,e.TableColumnDirective=J,e.TableColumnGroupDirective=Y,e.TableComponent=S,e.TableFilterSortDirective=G,e.TableModule=re,e.TableRowActionDirective=oe,e.TableRowDirective=te,e["\u0275a"]=P,e["\u0275b"]=V,e["\u0275c"]=z,e["\u0275d"]=q,e["\u0275e"]=X,e["\u0275f"]=ne,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("rxjs/operators"),require("@wm/core"),require("@wm/components/data/table")):"function"==typeof define&&define.amd?define("@wm/components/data/live-table",["exports","@angular/core","@angular/common","@wm/components/base","rxjs/operators","@wm/core","@wm/components/data/table"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.livetable={}),e.ng.core,e.ng.common,e.wm.components.base,e.rxjs.operators,e.wm.core,e.wm.components.data.table)}(this,(function(e,t,n,i,o,a,r){"use strict";
|
|
520
|
+
***************************************************************************** */var f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,t,n,i){return new(n||(n=Promise))((function(o,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,s)}l((i=i.apply(e,t||[])).next())}))}function y(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function w(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var P=function(){r.register("wm-table",new Map([["boundarylinks",Object.assign({value:!1},r.PROP_BOOLEAN)],["class",r.PROP_STRING],["confirmdelete",Object.assign({value:"Are you sure you want to delete this?"},r.PROP_STRING)],["datasource",r.PROP_STRING],["dataset",r.PROP_ANY],["deletecanceltext",r.PROP_STRING],["deleteoktext",r.PROP_STRING],["deletemessage",Object.assign({value:"Record deleted successfully"},r.PROP_STRING)],["directionlinks",Object.assign({value:!0},r.PROP_BOOLEAN)],["editmode",r.PROP_STRING],["errorstyle",Object.assign({value:"hover"},r.PROP_STRING)],["enablecolumnselection",Object.assign({value:!1},r.PROP_BOOLEAN)],["enablesort",Object.assign({value:!0},r.PROP_BOOLEAN)],["errormessage",r.PROP_STRING],["exportformat",r.PROP_STRING],["exportdatasize",Object.assign({value:100},r.PROP_NUMBER)],["filtermode",r.PROP_STRING],["filternullrecords",Object.assign({value:!0},r.PROP_BOOLEAN)],["forceellipses",Object.assign({value:!0},r.PROP_BOOLEAN)],["formposition",r.PROP_STRING],["gridclass",Object.assign({value:"table-hover"},r.PROP_STRING)],["gridfirstrowselect",r.PROP_BOOLEAN],["iconclass",r.PROP_STRING],["insertmessage",Object.assign({value:"Record added successfully"},r.PROP_STRING)],["isdynamictable",r.PROP_BOOLEAN],["isrowexpansionenabled",r.PROP_BOOLEAN],["loadingdatamsg",Object.assign({value:"Loading..."},r.PROP_STRING)],["loadingicon",Object.assign({value:"fa fa-circle-o-notch fa-spin"},r.PROP_STRING)],["maxsize",Object.assign({value:5},r.PROP_NUMBER)],["multiselect",r.PROP_BOOLEAN],["name",r.PROP_STRING],["navigation",Object.assign({value:"Basic"},r.PROP_STRING)],["navigationalign",Object.assign({value:"left"},r.PROP_STRING)],["nodatamessage",Object.assign({value:"No data found."},r.PROP_STRING)],["ondemandmessage",Object.assign({value:"Load More"},r.PROP_STRING)],["showviewlessbutton",Object.assign({value:!1},r.PROP_BOOLEAN)],["viewlessmessage",Object.assign({value:"View Less"},r.PROP_STRING)],["pagesize",r.PROP_NUMBER],["radioselect",r.PROP_BOOLEAN],["rowclass",r.PROP_STRING],["rowngclass",r.PROP_STRING],["searchlabel",Object.assign({value:"Search"},r.PROP_STRING)],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["showheader",Object.assign({value:!0},r.PROP_BOOLEAN)],["shownewrow",Object.assign({value:!0},r.PROP_BOOLEAN)],["showrecordcount",r.PROP_BOOLEAN],["showrowindex",r.PROP_BOOLEAN],["spacing",Object.assign({value:"normal"},r.PROP_STRING)],["statehandler",Object.assign({value:"none"},r.PROP_STRING)],["subheading",r.PROP_STRING],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["title",r.PROP_STRING],["updatemessage",Object.assign({value:"Record updated successfully"},r.PROP_STRING)]]))},O={widgetType:"wm-table",hostClass:"app-grid app-panel panel"},E={EXCEL:"fa fa-file-excel-o",CSV:"fa fa-file-text-o"},R="rowOperations",A=function(){},T=function(e){var t=!1;[".dropdown-menu",".uib-typeahead-match",".modal-dialog",".toast"].forEach((function(n){if(e.closest(n).length)return t=!0,!1}));return t||["bsdatepickerdaydecorator"].forEach((function(n){if(e[0].hasAttribute(n))return t=!0,!1})),t},S=function(e){function t(t,n,i,o,a,s,l,c,p,d,f,g,v){var y=e.call(this,t,O)||this;return y.inj=t,y.fb=n,y.app=i,y.dynamicComponentProvider=o,y.statePersistence=a,y.paginationService=s,y.viewport=l,y.parentList=c,y.binddataset=p,y.binddatasource=d,y.readonlygrid=f,y.ngZone=g,y.trustAsPipe=v,y.rowActionsCompiledTl={},y.rowFilterCompliedTl={},y.inlineCompliedTl={},y.inlineNewCompliedTl={},y.customExprCompiledTl={},y.customExprCompiledSummaryTl={},y.rowDefInstances={},y.rowDefMap={},y.rowExpansionActionTl={},y.columns={},y.formfields={},y.enablesort=!0,y.showviewlessbutton=!1,y.primaryKey=[],y.selectedItems=[],y.selectedItemChange=new h.Subject,y.selectedItemChange$=y.selectedItemChange.asObservable(),y.actions=[],y._actions={header:[],footer:[]},y.exportOptions=[],y.headerConfig=[],y.items=[],y.rowActions=[],y.shownavigation=!1,y.documentClickBind=A,y.prevFilterExpression=[],y.fieldDefs=[],y.rowDef={},y.rowInstance={},y.fullFieldDefs=[],y.variableInflight=!0,y.applyProps=new Map,y.redraw=_.debounce(y._redraw,150),y.debouncedHandleLoading=_.debounce(y.handleLoading,350),y.rowFilter={},y._searchSortHandler=A,y.searchSortHandler=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];y._searchSortHandler.apply(y,e)},y.onRowFilterChange=A,y.onFilterConditionSelect=A,y.showClearIcon=A,y.clearRowFilter=A,y.adjustContainer=A,y._pageLoad=!0,y.gridOptions={data:[],colDefs:[],startRowIndex:1,mode:"",sortInfo:{field:"",direction:""},filtermode:"",searchLabel:"",rowActions:[],headerConfig:[],rowClass:"",editmode:"",formPosition:"",isMobile:!1,rowExpansionEnabled:!1,rowDef:{position:"0"},name:"",messages:{selectField:"Select Field"},securityUtils:{pipeTransform:{}},navigation:"",isdynamictable:"",deletedRowIndex:-1,lastActionPerformed:"scroll",isSearchTrigerred:!1,isDatasetUpdated:!1,isDataUpdatedByUser:!1,showviewlessbutton:!1,ondemandmessage:"",viewlessmessage:"",loadingdatamsg:"",isNextPageData:void 0,ACTIONS:{DELETE:"delete",EDIT:"edit",SEARCH_OR_SORT:"search_or_sort",DEFAULT:"scroll",FILTER_CRITERIA:"filter",DATASET_UPDATE:"dataset_update"},actionRowIndex:void 0,actionRowPage:void 0,isLastPage:!1,getCurrentPage:function(){return _.get(y.dataNavigator,"dn.currentPage")||1},setCurrentPage:function(e){_.set(y.dataNavigator,"dn.currentPage",e||1)},getDataSource:function(){return y.datasource},getPageSize:function(){return y.pagesize},getPageCount:function(){return y.dataNavigator.pageCount},enableNavigation:function(){y.dataNavigator.widget.isDisableNext=!1,y.dataNavigator.widget.isDisableLast=!1,y.gridOptions.mode="viewless"},setDeletedRowIndex:function(e){y.setDataGridOption("deletedRowIndex",e)},setLastActionPerformed:function(e){y.setDataGridOption("lastActionPerformed",e||y.gridOptions.lastActionPerformed)},isNavTypeScrollOrOndemand:function(){return"Scroll"===y.gridOptions.navigation||"On-Demand"===y.gridOptions.navigation},setIsSearchTrigerred:function(e){y.setDataGridOption("isSearchTrigerred",e)},setIsDatasetUpdated:function(e){y.setDataGridOption("isDatasetUpdated",e)},setIsNextPageData:function(e){y.setDataGridOption("isNextPageData",e)},setIsDataUpdatedByUser:function(e){y.setDataGridOption("isDataUpdatedByUser",e)},onDataRender:function(){y.ngZone.run((function(){y.gridData.length&&y.invokeEventCallback("datarender",{$data:y.gridData,data:y.gridData}),y.multiselect||(y.items.length=0),y.callDataGridMethod("selectRows",y.items),y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.selectedItems.length&&y.selectedItemChange.next(y.selectedItems),y._isPageSearch&&y.filterInfo&&y.searchSortHandler(y.filterInfo,void 0,"search")}))},onRowSelect:function(e,t){y.ngZone.run((function(){y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.selectedItems.length&&y.selectedItemChange.next(y.selectedItems);var n=y.addRowIndex(e);if(y.selectedItems.length&&n.$index&&"none"!==y.getConfiguredState()&&y.dataNavigator&&r.unsupportedStatePersistenceTypes.indexOf(y.navigation)<0){var i={page:y.dataNavigator.dn.currentPage,index:n.$index-1},o=y.statePersistence.getWidgetState(y);_.get(o,"selectedItem")&&y.multiselect?(_.some(o.selectedItem,i)||o.selectedItem.push(i),y.statePersistence.setWidgetState(y,{selectedItem:o.selectedItem})):y.statePersistence.setWidgetState(y,{selectedItem:[i]})}else console.warn("Retain State handling on Widget "+y.name+" is not supported for current pagination type.");y.invokeEventCallback("rowselect",{$data:n,$event:t,row:n})}))},assignSelectedItems:function(e,t){y.ngZone.run((function(){y.multiselect?-1===_.findIndex(y.items,e)&&y.items.push(e):(y.items.length=0,y.items.push(e))}))},onRowDblClick:function(e,t){var n=y.addRowIndex(e);y.invokeEventCallback("rowdblclick",{$data:n,$event:t,row:n})},onRowDeselect:function(e,t){y.multiselect&&y.ngZone.run((function(){y.items=_.pullAllWith(y.items,[e],_.isEqual),y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.invokeEventCallback("rowdeselect",{$data:e,$event:t,row:e});var n=y.addRowIndex(e);if("none"!==y.getConfiguredState()&&r.unsupportedStatePersistenceTypes.indexOf(y.navigation)<0){var i={page:y.dataNavigator.dn.currentPage,index:n.$index-1},o=y.statePersistence.getWidgetState(y);_.get(o,"selectedItem")&&(_.remove(o.selectedItem,(function(e){return _.isEqual(e,i)})),y.statePersistence.removeWidgetState(y,"selectedItem"),o.selectedItem.length>0&&y.statePersistence.setWidgetState(y,{selectedItem:o.selectedItem}))}else console.warn("Retain State handling on Widget "+y.name+" is not supported for current pagination type.")}))},callOnRowDeselectEvent:function(e,t){y.items=y.selectedItems=y.callDataGridMethod("getSelectedRows"),y.invokeEventCallback("rowdeselect",{$data:e,$event:t,row:e})},callOnRowClickEvent:function(e,t){y.ngZone.run((function(){if(t&&t.hasOwnProperty("originalEvent")){var n=y.addRowIndex(e);y.invokeEventCallback("rowclick",{$data:n,$event:t,row:n})}}))},closePopover:u.closePopover,onColumnSelect:function(e,t){y.selectedColumns=y.callDataGridMethod("getSelectedColumns"),y.invokeEventCallback("columnselect",{$data:e,$event:t})},onColumnDeselect:function(e,t){y.selectedColumns=y.callDataGridMethod("getSelectedColumns"),y.invokeEventCallback("columndeselect",{$data:e,$event:t})},onHeaderClick:function(e,t){y.invokeEventCallback("headerclick",{$event:t,$data:e,column:e})},onRowDelete:function(e,t,n,i,o){y.ngZone.run((function(){y.deleteRecord(_.extend({},o,{row:e,cancelRowDeleteCallback:t,evt:n,callBack:i}))}))},onRowInsert:function(e,t,n,i){y.insertRecord(_.extend({},i,{row:e,event:t,callBack:n}))},beforeRowUpdate:function(e,t){y._liveTableParent&&y._liveTableParent.updateRow(e,t),y.prevData=u.getClonedObject(e)},afterRowUpdate:function(e,t,n,i){y.updateRecord(_.extend({},i,{row:e,prevData:y.prevData,event:t,callBack:n}))},onBeforeRowUpdate:function(e,t,n){return y.invokeEventCallback("beforerowupdate",{$event:t,$data:e,row:e,options:n})},onBeforeRowInsert:function(e,t,n){return y.invokeEventCallback("beforerowinsert",{$event:t,$data:e,row:e,options:n})},onBeforeRowDelete:function(e,t,n){var i=y.addRowIndex(e);return y.invokeEventCallback("beforerowdelete",{$event:t,row:i,options:n})},onFormRender:function(e,t,n,i){var o=i?"inlineInstanceNew":"inlineInstance";setTimeout((function(){y.formWidgets={},y.fieldDefs.forEach((function(e){e[o]&&(y.formWidgets[e.field]=e[o],e[o].context&&(e[o].context.formWidgets=y.formWidgets),y.setDisabledOnField(n,e,o))})),y.invokeEventCallback("formrender",{$event:t,formWidgets:y.formWidgets,$operation:n})}),250)},onBeforeFormRender:function(e,t,n){return y.invokeEventCallback("beforeformrender",{$event:t,row:e,$operation:n})},registerRowNgClassWatcher:function(e,t){if(y.rowngclass){var n=y.getClonedRowObject(e),i=y.widgetId+"_rowNgClass_"+t;u.$unwatch(i),y.registerDestroyListener(u.$watch(y.rowngclass,y.viewParent,{row:n},(function(e,n){y.callDataGridMethod("applyRowNgClass",r.getConditionalClasses(e,n),t)}),i))}},registerColNgClassWatcher:function(e,t,n,i){if(t["col-ng-class"]){var o=y.getClonedRowObject(e),a=y.widgetId+"_colNgClass_"+n+"_"+i;u.$unwatch(a),y.registerDestroyListener(u.$watch(t["col-ng-class"],y.viewParent,{row:o},(function(e,t){y.callDataGridMethod("applyColNgClass",r.getConditionalClasses(e,t),n,i)}),a))}},clearCustomExpression:function(){y.customExprViewRef.clear(),y.customExprCompiledTl={},y.customExprCompiledSummaryTl={}},clearRowDetailExpression:function(){y.rowDetailViewRef.clear(),y.rowDefMap={},y.rowDefInstances={}},generateCustomExpressions:function(e,t,n){var i=y.getClonedRowObject(e),o=function(e){if(e){var o={},a={row:i,colDef:o};y.addEventsToContext(a);var r=y.customExprViewRef.createEmbeddedView(e,a).rootNodes[0],s=r.getAttribute("data-col-identifier");_.extend(o,y.columns[s]),n?y.customExprCompiledSummaryTl[s+t]=r:y.customExprCompiledTl[s+t]=r}};y.isdynamictable?y.fieldDefs.forEach((function(e){o(e.customExprTmpl)})):y.customExprTmpl.forEach(o.bind(y))},generateRowExpansionCell:function(e,t){var n=y.getClonedRowObject(e);y.rowExpansionActionTmpl.forEach((function(e){y.rowExpansionActionTl[t]=y.rowExpansionActionViewRef.createEmbeddedView(e,{row:n}).rootNodes}))},getRowExpansionAction:function(e){return y.rowExpansionActionTl[e]},generateRowDetailView:function(e,t,n,i,o,a){var r=y.getClonedRowObject(t),s=u.getClonedObject(y.rowDef);if(!1!==y.rowInstance.invokeEventCallback("beforerowexpand",{$event:e,$data:s,row:r})&&s.content)if(a(),y.rowDefMap[n]&&y.rowDefMap[n].content===s.content)y.rowInstance.invokeEventCallback("rowexpand",{$event:e,row:r,$data:y.rowDefInstances[n]});else{y.rowDefMap[n]=s,i.empty(),i.hide(),o.show();var l={row:r,rowDef:s,containerLoad:function(t){setTimeout((function(){o.hide(),i.show(),y.rowDefInstances[n]=t,y.rowInstance.invokeEventCallback("rowexpand",{$event:e,row:r,$data:t})}),500)}},c=y.rowDetailViewRef.createEmbeddedView(y.rowExpansionTmpl,l).rootNodes[0];i[0].appendChild(c),u.$appDigest()}},onBeforeRowCollapse:function(e,t,n){return y.rowInstance.invokeEventCallback("beforerowcollapse",{$event:e,row:t,$data:y.rowDefInstances[n]})},onRowCollapse:function(e,t){y.rowInstance.invokeEventCallback("rowcollapse",{$event:e,row:t})},getCustomExpression:function(e,t,n){return(n?y.customExprCompiledSummaryTl[e+t]:y.customExprCompiledTl[e+t])||""},clearRowActions:function(){y.rowActionsViewRef.clear(),y.rowActionsCompiledTl={},y.rowExpansionActionViewRef.clear(),y.rowExpansionActionTl={}},generateRowActions:function(e,t){var n=y.getClonedRowObject(e);y.rowActionsCompiledTl[t]=[],y.rowActionTmpl.forEach((function(e){var i;(i=y.rowActionsCompiledTl[t]).push.apply(i,w([],b(y.rowActionsViewRef.createEmbeddedView(e,{row:n}).rootNodes)))}))},getRowAction:function(e){return y.rowActionsCompiledTl[e]},generateInlineEditRow:function(e,t){var n=y.getClonedRowObject(e);if(t)return y.inlineEditNewViewRef.clear(),y.inlineNewCompliedTl={},y.inlineWidgetNewTmpl.forEach((function(e){var t,i={row:n,getControl:function(){return y.ngform.controls[t+"_new"]||{}},getValidationMessage:function(){return y.columns[t]&&y.columns[t].validationmessage},getPendingSpinnerStatusNew:function(){return y.columns[t]&&y.columns[t].showPendingSpinnerNew}},o=y.inlineEditNewViewRef.createEmbeddedView(e,i).rootNodes[0];t=o.getAttribute("data-col-identifier"),y.inlineNewCompliedTl[t]=o})),void y.clearForm(!0);y.inlineEditViewRef.clear(),y.inlineCompliedTl={},y.clearForm(),y.inlineWidgetTmpl.forEach((function(e){var t,i={row:n,getControl:function(){return y.ngform.controls[t]||{}},getValidationMessage:function(){return y.columns[t]&&y.columns[t].validationmessage},getPendingSpinnerStatus:function(){return y.columns[t]&&y.columns[t].showPendingSpinner}},o=y.inlineEditViewRef.createEmbeddedView(e,i).rootNodes[0];t=o.getAttribute("data-col-identifier"),y.inlineCompliedTl[t]=o}))},getInlineEditWidget:function(e,t,n){return n?(y.gridOptions.setFieldValue(e+"_new",t),y.inlineNewCompliedTl[e]):(y.gridOptions.setFieldValue(e,t),y.inlineCompliedTl[e])},setFieldValue:function(e,t){var n=y.ngform.controls&&y.ngform.controls[e];n&&n.setValue(t)},getFieldValue:function(e){var t=y.ngform.controls&&y.ngform.controls[e];return t&&t.value},addLoadMoreBtn:function(){y.callDataGridMethod("addLoadMoreBtn",y.ondemandmessage,y.loadingdatamsg,(function(e){y.gridOptions.setIsNextPageData(!0),y.gridOptions.setIsDataUpdatedByUser(!1),"viewless"===y.gridOptions.mode?(y.dataNavigator.navigatePage("first",e,!0),y.gridOptions.mode=""):(y.dataNavigator.navigatePage("next",e),y.isDataLoading=!0)}),y.infScroll)},bindScrollEvt:function(){y._gridData&&y._gridData.length&&y.infScroll&&setTimeout((function(){y.paginationService.bindScrollEvt(y,"tbody",r.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME)}),0)},generateFilterRow:function(){y.filterViewRef.clear(),y.rowFilterCompliedTl={},y.filterTmpl.forEach((function(e){var t=y.filterViewRef.createEmbeddedView(e,{changeFn:y.onRowFilterChange.bind(y),isDisabled:function(e){return y.emptyMatchModes.indexOf(y.rowFilter[e]&&y.rowFilter[e].matchMode)>-1}}).rootNodes[0];y.rowFilterCompliedTl[t.getAttribute("data-col-identifier")]=t}))},getFilterWidget:function(e){return y.rowFilterCompliedTl[e]},setGridEditMode:function(e){y.ngZone.run((function(){y.isGridEditMode=e,u.$appDigest()}))},setGridState:function(e){y.isLoading="loading"===e},setActionRowIndex:function(e){y.gridOptions.isNavTypeScrollOrOndemand()&&(y.actionRowIndex=parseInt(e),y.setDataGridOption("actionRowIndex",y.actionRowIndex),_.isNaN(y.actionRowIndex)||(y.actionRowPage=Math.floor(y.actionRowIndex/y.pagesize)+1,y.setDataGridOption("actionRowPage",y.actionRowPage||y.gridOptions.actionRowPage)))},clearActionRowIndex:function(){y.isRowDeleted||!y.infScroll&&!y.onDemandLoad||y.clearActionRowVars()},noChangesDetected:function(){y.toggleMessage(!0,"info","No Changes Detected","")},redrawWidgets:function(){y.fieldDefs.forEach((function(e){u.triggerFn(e.inlineInstance&&e.inlineInstance.redraw),u.triggerFn(e.inlineInstanceNew&&e.inlineInstanceNew.redraw),u.triggerFn(e.filterInstance&&e.filterInstance.redraw)}))},searchHandler:y.searchSortHandler.bind(y),sortHandler:y.searchSortHandler.bind(y),timeoutCall:function(e,t){setTimeout(e,t)},runInNgZone:function(e){y.ngZone.run(e)},safeApply:function(){u.$appDigest()},setTouched:function(e){var t=y.ngform.controls[e];t&&t.markAsTouched()},clearForm:y.clearForm.bind(y),callLoadInlineWidgetData:function(){y.fullFieldDefs.forEach((function(e){_.isUndefined(e.isDataSetBound)&&u.triggerFn(e.loadInlineWidgetData&&e.loadInlineWidgetData.bind(e))}))},applyValidations:function(e,t){t?u.triggerFn(e.applyNewRowValidations&&e.applyNewRowValidations.bind(e)):u.triggerFn(e.applyValidations&&e.applyValidations.bind(e))},removeValidations:function(e){y.fullFieldDefs.forEach((function(t){t.readonly||"rowOperations"===t.binding||(e?u.triggerFn(t.removeNewRowValidations&&t.removeNewRowValidations.bind(t)):u.triggerFn(t.removeValidations&&t.removeValidations.bind(t)))}))}},y._selectedItemsExist=!1,y._onChange=function(){},y._onTouched=function(){},r.styler(y.nativeElement,y),y.ngform=n.group({}),y.addEventsToContext(y.context),[y.app.subscribe("check-state-persistence-options",(function(e){var t=_.get(y.datasource,"name");if(t||(t=r.extractDataSourceName(y.binddatasource)),_.get(e,"variable.name")===t&&y._pageLoad&&"none"!==y.getConfiguredState()){y._pageLoad=!1;var n=y.statePersistence.getWidgetState(y);n?e=y.handleStateParams(n,e):y.setDataGridOption("selectFirstRow",y.gridfirstrowselect)}})),y.app.subscribe("toggle-variable-state",(function(e){if(y.datasource&&y.datasource.execute(u.DataSource.Operation.IS_API_AWARE)&&u.isDataSourceEqual(e.variable,y.datasource)){if(y._pageLoad&&"none"!==y.getConfiguredState()){y._pageLoad=!1;var t=y.statePersistence.getWidgetState(y);t?e=y.handleStateParams(t,e):y.setDataGridOption("selectFirstRow",y.gridfirstrowselect)}u.isDefined(y.variableInflight)?y.debouncedHandleLoading(e):y.handleLoading(e)}})),y.app.subscribe("setup-cud-listener",(function(e){y.name===e&&(y._isDependent=!0,y.selectedItemChange$.pipe(m.debounceTime(250)).subscribe(y.triggerWMEvent.bind(y)))}))].forEach((function(e){return y.registerDestroyListener(e)})),y.deleteoktext=y.appLocale.LABEL_OK,y.deletecanceltext=y.appLocale.LABEL_CANCEL,y}return g(t,e),Object.defineProperty(t.prototype,"gridData",{get:function(){return this._gridData||[]},set:function(e){var t;if(this.isDataLoading=!1,!this.variableInflight||!_.isEmpty(e)){if(this.variableInflight=!1,e&&0===e.length?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready"),this.gridOptions.isNavTypeScrollOrOndemand()){if(t=b(this.paginationService.updateFieldsOnPagination(this,e),2),this._gridData=t[0],this.currentPage=t[1],this.gridOptions.lastActionPerformed===this.gridOptions.ACTIONS.EDIT){var n=_.floor(this.actionRowIndex%this.pagesize);this._gridData.splice(this.actionRowIndex,1,e[n])}this.setDataGridOption("isLastPage",!!this.dataNavigator.isDisableNext),this.$element.find(".on-demand-datagrid").length||this.dataNavigator.isDisableNext||!this.onDemandLoad?this._gridData&&this._gridData.length&&(this.dataNavigator.isDisableNext||!this.isDataLoading)&&this.callDataGridMethod("hideLoadingIndicator",this.dataNavigator.isDisableNext,this.infScroll):this.gridOptions.addLoadMoreBtn()}else this._gridData=e;var i,o=0;if(this._onChange(this._gridData),this._onTouched(),u.isDefined(e)){if(this.gridOptions.bindScrollEvt(),this.isNavigationEnabled()&&this.dataNavigator.dn.currentPage&&(o=(this.dataNavigator.dn.currentPage-1)*(this.dataNavigator.maxResults||1)+1,this.setDataGridOption("startRowIndex",o)),!(i=this.callDataGridMethod("getOptions")))return;!i.colDefs.length&&this.fieldDefs.length&&this.setDataGridOption("colDefs",u.getClonedObject(this.fieldDefs)),this.isdynamictable||_.isEmpty(e)||!i.colDefs.length||this.invokeEventCallback("beforedatarender",{$data:this._gridData,$columns:this.columns,data:this._gridData,columns:this.columns}),this.setDataGridOption("data",u.getClonedObject(this._gridData))}}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selecteditem",{get:function(){return this.multiselect?u.getClonedObject(this.items):_.isEmpty(this.items)?{}:u.getClonedObject(this.items[0])},set:function(e){this.items.length=0,this.callDataGridMethod("selectRows",e)},enumerable:!1,configurable:!0}),t.prototype.onKeyPress=function(e){13===e.which&&this.invokeEventCallback("enterkeypress",{$event:e,$data:this.gridData})},t.prototype.ngAfterContentInit=function(){var t=this;e.prototype.ngAfterContentInit.call(this),this.headerConfig=this.headerConfig.filter(this.filterEmptyValues.bind(this)),_.remove(this.fieldDefs,(function(e){return void 0===e}));this._liveTableParent&&(this.isPartOfLiveGrid=!0),!this.readonlygrid&&this.editmode||("true"===this.readonlygrid?this.editmode="":this.isPartOfLiveGrid?this.editmode="inline"===this.isPartOfLiveGrid.formlayout?r.EDIT_MODE.FORM:r.EDIT_MODE.DIALOG:this.editmode=this.readonlygrid?r.EDIT_MODE.INLINE:""),this.gridOptions.colDefs=this.fullFieldDefs,this.gridOptions.rowActions=this.rowActions,this.gridOptions.headerConfig=this.headerConfig,this.gridOptions.rowClass=this.rowclass,this.gridOptions.editmode=this.editmode,this.gridOptions.formPosition=this.formposition,this.gridOptions.filtermode=this.filtermode,this.gridOptions.searchLabel=this.searchlabel,this.gridOptions.isMobile=u.isMobile(),this.gridOptions.name=this.name,this.gridOptions.securityUtils.pipeTransform=this.trustAsPipe,this.gridOptions.navigation=this.navigation,this.gridOptions.isdynamictable=this.isdynamictable,this.gridOptions.showviewlessbutton=this.showviewlessbutton,this.gridOptions.ondemandmessage=this.ondemandmessage,this.gridOptions.viewlessmessage=this.viewlessmessage,this.gridOptions.loadingdatamsg=this.loadingdatamsg,_.isEmpty(this.gridData)||(this.gridOptions.data=u.getClonedObject(this.gridData)),this.gridOptions.messages={selectField:this.appLocale.MESSAGE_SELECT_FIELD},this.datagridElement=$(this._tableElement.nativeElement),this.gridElement=this.$element,this.$element.css({position:"relative"}),_.forEach({showrowindex:"showRowIndex",multiselect:"multiselect",radioselect:"showRadioColumn",filternullrecords:"filterNullRecords",enablesort:"enableSort",showheader:"showHeader",enablecolumnselection:"enableColumnSelection",shownewrow:"showNewRow",gridfirstrowselect:"selectFirstRow"},(function(e,n){u.isDefined(t[n])&&(t.gridOptions[e]="true"===t[n]||!0===t[n])})),"none"!==this.statehandler&&(this.gridOptions.selectFirstRow=!1),this.renderOperationColumns(),this.gridOptions.colDefs=this.fieldDefs,this.datagridElement.datatable(this.gridOptions),this.callDataGridMethod("setStatus","loading",this.loadingdatamsg),this.applyProps.forEach((function(e){return t.callDataGridMethod.apply(t,w([],b(e)))})),this.editmode===r.EDIT_MODE.QUICK_EDIT&&(this.documentClickBind=this._documentClickBind.bind(this),document.addEventListener("click",this.documentClickBind))},t.prototype.getConfiguredState=function(){var e=this.statePersistence.computeMode(this.statehandler);return e&&e.toLowerCase()},t.prototype.handleStateParams=function(e,t){var n=this;return _.get(e,"selectedItem")&&(this._selectedItemsExist=!0),t.options=t.options||{},_.get(e,"pagination")?(t.options.page=e.pagination,_.get(e,"sort")&&(this.sortStateHandler(e),t.options.orderBy=_.get(e,"sort.field")+" "+_.get(e,"sort.direction")),_.get(e,"search")&&(setTimeout((function(){n.searchStateHandler(e)}),500),t.options.filterFields=this.getFilterFields(e.search))):(t.options.page=1,_.get(e,"search")&&(setTimeout((function(){n.searchStateHandler(e)}),500),t.options.filterFields=this.getFilterFields(e.search)),_.get(e,"sort")&&(this.sortStateHandler(e),t.options.orderBy=_.get(e,"sort.field")+" "+_.get(e,"sort.direction"))),t},t.prototype.triggerWMEvent=function(e){"dialog"!==this.editmode&&(u.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:"selectedItemChange",widgetName:this.name,row:e,table:this}))},t.prototype.sortStateHandler=function(e){var t=this.datagridElement.find('th[data-col-field="'+_.get(e,"sort.field")+'"] .sort-icon');"asc"===_.get(e,"sort.direction")&&t.length?t.addClass("asc wi wi-long-arrow-up"):"desc"===_.get(e,"sort.direction")&&t.length&&t.addClass("desc wi wi-long-arrow-down")},t.prototype.searchStateHandler=function(e){var t=this;if(_.isArray(e.search))_.forEach(e.search,(function(e){if(t.rowFilter[e.field]&&(t.rowFilter[e.field].value=e.value,t.rowFilter[e.field].matchMode=e.matchMode,t.rowFilter[e.field].type=e.type,$(t.rowFilterCompliedTl[e.field]).length)){"integer"===e.type?parseInt(e.value):e.value;$(t.rowFilterCompliedTl[e.field]).find("input").val(e.value)}}));else{var n=this.datagridElement;n.find('[data-element="dgSearchText"]').val(e.search.value),n.find('[data-element="dgFilterValue"]').val(e.search.field)}},t.prototype.filterEmptyValues=function(e){return e.columns&&(e.columns=e.columns.filter(this.filterEmptyValues.bind(this))),void 0!==e},t.prototype.compareFilterExpressions=function(e,t){return!(e.length!==t.length||!_.isEqual(e,t))},t.prototype.setLastActionToFilterCriteria=function(){this.prevFilterExpression=_.get(this.datasource,"filterExpressions.rules")?u.getClonedObject(this.datasource.filterExpressions.rules):u.getClonedObject([].concat(this.datasource.dataBinding)),this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.FILTER_CRITERIA),this.gridOptions.setIsSearchTrigerred(!0)},t.prototype.setLastActionToDatasetUpdate=function(){this.gridOptions.setLastActionPerformed(this.gridOptions.ACTIONS.DATASET_UPDATE),this.gridOptions.setCurrentPage(1),this.gridOptions.setIsDatasetUpdated(!0)},t.prototype.checkIfVarFiltersApplied=function(){if(!_.isEmpty(_.get(this.datasource,"filterExpressions.rules"))||!_.isEmpty(_.get(this.datasource,"dataBinding"))){var e=_.get(this.datasource,"filterExpressions.rules")?this.datasource.filterExpressions.rules:[].concat(this.datasource.dataBinding);this.compareFilterExpressions(this.prevFilterExpression,e)||this.setLastActionToFilterCriteria()}},t.prototype.watchVariableDataSet=function(e){var t;if(this.gridOptions.isNavTypeScrollOrOndemand()&&this.checkIfVarFiltersApplied(),"wm.Variable"===_.get(this.datasource,"category")&&this._pageLoad&&"none"!==this.getConfiguredState()){var n=this.statePersistence.getWidgetState(this);this._pageLoad=!1,_.get(n,"selectedItem")?this._selectedItemsExist=!0:this.setDataGridOption("selectFirstRow",this.gridfirstrowselect),_.get(n,"search")&&(this.searchStateHandler(n),this.searchSortHandler(n.search,void 0,"search",!0)),_.get(n,"sort")&&(this.searchSortHandler(n.sort,void 0,"sort",!0),this.sortStateHandler(n)),_.get(n,"pagination")&&this.dataNavigator.pageChanged({page:n.pagination},!0)}if(!(this.dataNavigatorWatched&&_.isUndefined(e)&&this.__fullData)){this.variableInflight&&!this.infScroll&&this.callDataGridMethod("setStatus","loading",this.loadingdatamsg),(t=u.getValidJSON(e))&&(e=t);var i=this.getSortExpr(),o=i.split(" ");if(i&&o.length&&(this.sortInfo={direction:o[1],field:o[0]}),this.isDataValid()){if(e){if(this.shownavigation&&!this.dataNavigatorWatched)return void this.enablePageNavigation()}else this.resetPageNavigation(),""!==e&&void 0!==e&&"wm.Variable"!==_.get(this.datasource,"category")||(this.variableInflight=!1),this.variableInflight||this.callDataGridMethod("setStatus","nodata",this.nodatamessage),this.setDataGridOption("selectFirstRow",this.gridfirstrowselect);!this.isNavigationEnabled()&&e&&this.checkFiltersApplied(this.getSortExpr()),!_.isObject(e)||""===e||e&&""===e.dataValue?this.variableInflight||this.setGridData([]):e&&this.populateGridData(e)}}},t.prototype.ngOnDestroy=function(){document.removeEventListener("click",this.documentClickBind),this.navigatorResultWatch&&this.navigatorResultWatch.unsubscribe(),this.navigatorMaxResultWatch&&this.navigatorMaxResultWatch.unsubscribe(),e.prototype.ngOnDestroy.call(this)},t.prototype.addRowIndex=function(e){var t=u.getClonedObject(e),n=_.indexOf(this.gridOptions.data,e);return n<0?e:(t.$index=n+1,t.$isFirst=1===t.$index,t.$isLast=this.gridData.length===t.$index,t)},t.prototype.addEventsToContext=function(e){var t=this;e.addNewRow=function(){return t.addNewRow()},e.deleteRow=function(){return t.deleteRow()},e.editRow=function(){return t.editRow()}},t.prototype.execute=function(e,t){return![u.DataSource.Operation.IS_API_AWARE,u.DataSource.Operation.IS_PAGEABLE,u.DataSource.Operation.SUPPORTS_SERVER_FILTER].includes(e)&&(this.datasource?this.datasource.execute(e,t):{})},t.prototype.isNavigationEnabled=function(){return this.shownavigation&&this.dataNavigator&&this.dataNavigatorWatched},t.prototype.getClonedRowObject=function(e){var t=u.getClonedObject(e);return t.getProperty=function(e){return _.get(t,e)},t.$isFirst=1===t.$index,t.$isLast=this.gridData.length===t.$index,delete t.$$index,delete t.$$pk,t},t.prototype.handleLoading=function(e){this.variableInflight=e.active,e.active?this.callDataGridMethod("setStatus","loading",this.loadingdatamsg):!this.isGridEditMode&&_.isEmpty(this.dataset)?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready")},t.prototype.setDisabledOnField=function(e,t,n){"new"===e||!t["primary-key"]||"assigned"!==t.generator||t["related-entity-name"]||t.period||(t[n].disabled=!0)},t.prototype.resetFormControl=function(e){e.markAsUntouched(),e.markAsPristine()},t.prototype.clearForm=function(e){var t=this,n=this.ngform.controls;_.keys(this.ngform.controls).forEach((function(i){!i.endsWith("_filter")&&(i.endsWith("_new")&&e||!i.endsWith("_new")&&!e)&&(n[i].setValue(""),t.resetFormControl(n[i]))}))},t.prototype.showFieldBasedOnScreenType=function(e){return u.isMobile()&&this.viewport.isMobileType?e.mobileDisplay:this.viewport.isTabletType?e.tabletDisplay:e.pcDisplay},t.prototype.isEmptyRecord=function(e){var t,n=this;return Object.keys(e).every((function(i,o){return t=e[i],!(n.fieldDefs.length&&u.isDefined(n.fieldDefs[o])&&n.showFieldBasedOnScreenType(n.fieldDefs[o])||!0)||(null==t||""===t)}))},t.prototype.removeEmptyRecords=function(e){var t=this,n=e,i=[];return n&&n.length&&(i=n.filter((function(e){return e&&!t.isEmptyRecord(e)}))),i},t.prototype.setGridData=function(e){var t=this.filternullrecords?this.removeEmptyRecords(e):e;"wm.Variable"!==_.get(this.datasource,"category")&&void 0!==_.get(this.datasource,"category")||(this.variableInflight=!1),this.variableInflight||(t&&0===t.length?this.callDataGridMethod("setStatus","nodata",this.nodatamessage):this.callDataGridMethod("setStatus","ready")),this.gridData=t},t.prototype.setDataGridOption=function(e,t,n){if(void 0===n&&(n=!1),this.datagridElement&&this.datagridElement.datatable&&this.datagridElement.datatable("instance")){var i={};!u.isDefined||_.isEqual(t,this.gridOptions[e])&&!n||(i[e]=t,this.datagridElement.datatable("option",i),this.gridOptions[e]=t)}},t.prototype.callDataGridMethod=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.datagridElement&&this.datagridElement.datatable("instance"))return this.datagridElement.datatable.apply(this.datagridElement,e);this.applyProps.set(e[1],e)},t.prototype.renderOperationColumns=function(){var e,t,n=r.getRowOperationsColumn(),i={name:n.field,field:n.field,isPredefined:!0};this.fieldDefs.length&&(e=_.find(this.fullFieldDefs,{field:R,type:"custom"}),_.remove(this.fieldDefs,{type:"custom",field:R}),_.remove(this.headerConfig,{field:n.field}),this.rowActions.length&&(e?(t=e.rowactionsposition?_.toNumber(e.rowactionsposition):this.fieldDefs.length,this.fieldDefs.splice(t,0,e),0===t?this.headerConfig.unshift(i):this.headerConfig.push(i)):(this.fieldDefs.push(n),this.headerConfig.push(i))),this.setDataGridOption("headerConfig",this.headerConfig))},t.prototype.enablePageNavigation=function(){var e=this;this.dataset&&this.binddataset&&this.dataNavigator&&(this.dataNavigatorWatched=!0,this.navigatorResultWatch&&this.navigatorResultWatch.unsubscribe(),this.navigatorResultWatch=this.dataNavigator.resultEmitter.subscribe((function(t){u.isDefined(t)?_.isEqual(e.dataset,t)?e.watchVariableDataSet(t):_.isArray(t)?e.widget.dataset=[].concat(t):_.isObject(t)?e.widget.dataset=_.extend({},t):e.widget.dataset=t:e.widget.dataset=void 0}),!0),this.navigatorMaxResultWatch&&this.navigatorMaxResultWatch.unsubscribe(),this.navigatorMaxResultWatch=this.dataNavigator.maxResultsEmitter.subscribe((function(t){e.pagesize=t})),this.__fullData=this.dataset,this.dataNavigator.widget.maxResults=this.pagesize||5,this.dataNavigator.options={maxResults:this.pagesize||5},this.removePropertyBinding("dataset"),this.dataNavigator.setBindDataSet(this.binddataset,this.viewParent,this.datasource,this.dataset,this.binddatasource,void 0,this.statehandler))},t.prototype.resetPageNavigation=function(){this.dataNavigator&&this.dataNavigator.resetPageNavigation()},t.prototype.isDataValid=function(){var e,t=this.dataset||{};return t.error&&(e=t.error),t.data&&t.data.error&&t.data.errorMessage&&(e=t.data.errorMessage),!e||(this.setGridData([]),this.callDataGridMethod("setStatus","error",e),!1)},t.prototype.populateGridData=function(e){var t,n=this;if(e=r.transformData(e,this.name),!this.isNavigationEnabled()&&this._isClientSearch?(t=u.getClonedObject(e),t=this.getSearchResult(t,this.filterInfo),t=this.getSortResult(t,this.sortInfo),this.serverData=t):this.serverData=e,this.isdynamictable?this.createGridColumns(this.serverData):this.setGridData(this.serverData),"none"!==this.getConfiguredState()&&this._selectedItemsExist&&e.length){var i=this.statePersistence.getWidgetState(this),o=void 0;_.get(i,"selectedItem")&&(o=i.selectedItem.filter((function(e){return e.page===n.dataNavigator.dn.currentPage})),this._selectedItemsExist=!1,o.length&&this.selecteditem.length!==i.selectedItem.length&&(_.isArray(this.selecteditem)?o.forEach((function(e){n.selectItem(e.index,void 0)})):this.selecteditem=o.map((function(e){return e.index}))))}},t.prototype.generateDynamicColumns=function(e){return v(this,void 0,void 0,(function(){var t,n,i,o=this;return y(this,(function(a){switch(a.label){case 0:return this.fieldDefs=[],this.filterTmpl._results=[],_.isEmpty(e)?[2]:(t="",e.forEach((function(e){var n="",i="";_.forEach(e,(function(e,t){_.isUndefined(e)||""===e||("customExpression"===t?i=e:n+=" "+t+'="'+e+'"')})),t+="<wm-table-column "+n+' tableName="'+o.name+o.$attrs.get("table_reference")+'">'+i+"</wm-table-column>"})),this.dynamicTableRef.clear(),this._dynamicContext||(this._dynamicContext=Object.create(this.viewParent),this._dynamicContext[this.getAttr("wmTable")]=this),this.noOfColumns=e.length,[4,this.dynamicComponentProvider.getComponentFactoryRef("app-table-dynamic-"+this.widgetId,t,{noCache:!0,transpile:!0})]);case 1:return n=a.sent(),i=this.dynamicTableRef.createComponent(n,0,this.inj),u.extendProto(i.instance,this._dynamicContext),this.$element.find(".dynamic-table-container")[0].appendChild(i.location.nativeElement),[2]}}))}))},t.prototype.prepareColDefs=function(e){var t,n,i=this,o=0,a=0;this.fieldDefs=[],this.headerConfig=[],this.columns={},n=e,t=r.prepareFieldDefs(n),_.forEach(t,(function(e){e.binding=e.field,e.caption=e.displayName,e.pcDisplay=!0,e.mobileDisplay=!0,e.tabletDisplay=!0,e.searchable=!0,e.showinfilter=!0,e.type="string",e.index=o,e.headerIndex=a,o++,a++})),t.forEach((function(e){i.columns[e.field]=e})),this.invokeEventCallback("beforedatarender",{$data:e,$columns:this.columns,data:e,columns:this.columns}),t=[],_.forEach(this.columns,(function(e){t.push(e)})),this.generateDynamicColumns(t)},t.prototype.createGridColumns=function(e){var t=e&&!e.error;t&&!_.isArray(e)&&(e=[e]),_.isEmpty(e)?this.setGridData(e):t&&(this.prepareColDefs(e),this.serverData=e,this.setGridData(this.serverData))},t.prototype.getSortExpr=function(){var e,t;return this.datasource&&this.datasource.execute(u.DataSource.Operation.IS_PAGEABLE)&&(t=this.datasource.execute(u.DataSource.Operation.GET_PAGING_OPTIONS),e=_.isEmpty(t)?"":r.getOrderByExpr(t.sort)),e||""},t.prototype.onPropertyChange=function(t,n,i){var o,a=this;switch(t){case"datasource":!1===n.startUpdate&&(this.variableInflight=!1,this.callDataGridMethod("setStatus","nodata",this.nodatamessage)),this.watchVariableDataSet(this.dataset),this.onDataSourceChange();break;case"dataset":if(this.gridOptions.isNavTypeScrollOrOndemand()&&1===this.gridOptions.getCurrentPage()&&this.gridOptions.setIsNextPageData(!1),this.binddatasource&&!this.datasource)return;this.parentList&&!this.datasource&&_.startsWith(this.binddataset,"item")&&(this.datasource=u.getDatasourceFromExpr(this.widget.$attrs.get("datasetboundexpr"),this)),this.gridOptions.isNavTypeScrollOrOndemand()&&(this.gridOptions.isNextPageData?this.gridOptions.setIsDataUpdatedByUser(!1):(this.gridOptions.setIsDataUpdatedByUser(!0),this.setLastActionToDatasetUpdate(),this.gridOptions.setIsNextPageData(!1))),"wm.Variable"===_.get(this.datasource,"category")&&this._pageLoad&&"none"!==this.getConfiguredState()||this.watchVariableDataSet(n);break;case"filtermode":this.setDataGridOption("filtermode",n);break;case"searchlabel":this.setDataGridOption("searchLabel",n);break;case"navigation":if("Advanced"===n)return void(this.navigation="Classic");"None"!==n&&(this.shownavigation=!0),this.setDataGridOption("navigation",this.navigation),this.onDemandLoad=n===r.NAVIGATION_TYPE.ONDEMAND,this.infScroll=n===r.NAVIGATION_TYPE.SCROLL,this.navControls=n;break;case"gridfirstrowselect":this.setDataGridOption("selectFirstRow",n);break;case"gridclass":this.callDataGridMethod("option","cssClassNames.grid",n);break;case"nodatamessage":this.callDataGridMethod("option","dataStates.nodata",n);break;case"loadingdatamsg":this.callDataGridMethod("option","dataStates.loading",n);break;case"loadingicon":this.callDataGridMethod("option","loadingicon",n);break;case"spacing":this.callDataGridMethod("option","spacing",n),this.navigationSize="condensed"===n?"small":"";break;case"exportformat":this.exportOptions=[],n&&_.forEach(_.split(n,","),(function(e){a.exportOptions.push({label:e,icon:E[e]})}));break;case"shownewrow":o=n||_.some(this.actions,(function(e){return _.includes(e.action,"addNewRow()")})),this.callDataGridMethod("option","actionsEnabled.new",o);break;case"pagesize":this.dataNavigator.options={maxResults:n},this.dataNavigator.widget.maxResults=n,this.dataNavigator.maxResults=n;break;case"ondemandmessage":n&&this.$element.find(".on-demand-datagrid > a").text(n),this.gridOptions.ondemandmessage=n;break;case"viewlessmessage":this.gridOptions.viewlessmessage=n;break;case"show":n?this.invokeEventCallback("show"):this.invokeEventCallback("hide");default:e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.onDataSourceChange=function(){this.fieldDefs.forEach((function(e){u.triggerFn(e.onDataSourceChange&&e.onDataSourceChange.bind(e))}))},t.prototype.clearActionRowVars=function(){this.actionRowIndex=void 0,this.actionRowPage=void 0,this.setDataGridOption("actionRowIndex",void 0),this.setDataGridOption("actionRowPage",void 0)},t.prototype.onStyleChange=function(t,n,i){switch(t){case"width":this.callDataGridMethod("setGridDimensions","width",n);break;case"height":this.callDataGridMethod("setGridDimensions","height",n)}e.prototype.onStyleChange.call(this,t,n,i)},t.prototype.populateActions=function(){var e=this;this._actions.header=[],this._actions.footer=[],_.forEach(this.actions,(function(t){_.includes(t.position,"header")&&e._actions.header.push(t),_.includes(t.position,"footer")&&e._actions.footer.push(t)}))},t.prototype.renderDynamicFilterColumn=function(e){this.isdynamictable&&this.filterTmpl._results.push(e)},t.prototype.registerColumns=function(e,t){var n=this;if(u.isMobile()&&this.viewport.isMobileType){if(!e.mobileDisplay)return}else if(this.viewport.isTabletType){if(!e.tabletDisplay)return}else if(!e.pcDisplay)return;e["primary-key"]&&this.primaryKey.push(e.field),this.fieldDefs[t]=e;var i=this.fieldDefs.length;this.fullFieldDefs.push(e),this.rowFilter[e.field]={value:void 0},this.fieldDefs.forEach((function(e){n.columns[e.field]=e})),this.isdynamictable&&i===this.noOfColumns&&(this.renderOperationColumns(),this.setDataGridOption("colDefs",this.fieldDefs))},t.prototype.registerFormField=function(e,t){this.formfields[e]=t},t.prototype.registerActions=function(e){this.actions.push(e),this.populateActions()},t.prototype.registerRow=function(e,t){this.rowDef=e,this.rowInstance=t,this.callDataGridMethod("option","cssClassNames.rowExpandIcon",this.rowDef.expandicon),this.callDataGridMethod("option","cssClassNames.rowCollapseIcon",this.rowDef.collapseicon),this.gridOptions.rowExpansionEnabled=!0,this.gridOptions.rowDef=this.rowDef},t.prototype.registerRowActions=function(e){this.rowActions.push(e)},t.prototype.selectItem=function(e,t){t&&(this.serverData=t),_.isObject(e)&&(e=_.omitBy(e,(function(e){return _.isArray(e)&&_.isEmpty(e)}))),this.callDataGridMethod("selectRow",e,!0)},t.prototype.deselectItem=function(e){this.callDataGridMethod("deselectRow",e)},t.prototype.onDataNavigatorDataSetChange=function(e){var t;return this.__fullData=e,this.checkFiltersApplied(this.getSortExpr()),this._isClientSearch?(t=u.getClonedObject(this.__fullData),_.isObject(t)&&!_.isArray(t)&&(t=[t]),t=this.getSearchResult(t,this.filterInfo),t=this.getSortResult(t,this.sortInfo)):e},t.prototype.toggleMessage=function(e,t,n,i){e&&n&&this.app.notifyApp(n,t,i)},t.prototype.export=function(e){var t,n=_.isEmpty(this.sortInfo)?"":this.sortInfo.field+" "+this.sortInfo.direction,i={};this.fieldDefs.forEach((function(e){if(e.field!==R&&e.show){var t={header:e.displayName};e.exportexpression?t.expression=e.exportexpression:t.field=e.field,i[e.field]=t}})),t={matchMode:"anywhereignorecase",filterFields:this.getFilterFields(this.filterInfo),orderBy:n,exportType:e.label,logicalOp:"AND",exportSize:this.exportdatasize,columns:i},!1!==this.invokeEventCallback("beforeexport",{$data:t})&&(t.fields=_.values(t.columns),this.datasource.execute(u.DataSource.Operation.DOWNLOAD,{data:t}))},t.prototype.expandRow=function(e){this.callDataGridMethod("expandRow",e)},t.prototype.collapseRow=function(e){this.callDataGridMethod("collapseRow",e)},t.prototype._documentClickBind=function(e){var t=e.target;this.$element[0].contains(t)||e.target.doctype||T($(t))||this.callDataGridMethod("saveRow")},t.prototype._redraw=function(e){var t=this;e?this.datagridElement.datatable(this.gridOptions):setTimeout((function(){t.callDataGridMethod("setColGroupWidths"),t.callDataGridMethod("addOrRemoveScroll")}))},t.prototype.invokeActionEvent=function(e,t){u.$parseEvent(t)(this.viewParent,Object.assign(this.context,{$event:e}))},t.prototype.handleEvent=function(t,n,i,o){"select"!==n&&e.prototype.handleEvent.call(this,this.nativeElement,n,i,o)},t.prototype.triggerUploadEvent=function(e,t,n,i){var o={$event:e,row:i};this.columns[n]&&("change"===t&&(o.newVal=e.target.files,o.oldVal=this.columns[n]._oldUploadVal,this.columns[n]._oldUploadVal=o.newVal),this.columns[n].invokeEventCallback(t,o))},t.prototype.registerFormWidget=function(){},t.prototype.writeValue=function(){},t.prototype.registerOnChange=function(e){this._onChange=e},t.prototype.registerOnTouched=function(e){this._onTouched=e},t.prototype.ngOnDetach=function(){e.prototype.ngOnDetach.call(this),"wm.Variable"===_.get(this.datasource,"category")&&"none"!==this.getConfiguredState()?this._pageLoad=!1:this._pageLoad=!0},t}(r.StylableComponent);S.initializeProps=P(),S.decorators=[{type:t.Component,args:[{selector:"[wmTable]",template:'<div class="panel-heading" *ngIf="title || subheading || iconclass || exportOptions.length || _actions.header.length">\n <h3 class="panel-title">\n <div class="pull-left">\n <i class="app-icon panel-icon {{iconclass}}" *ngIf="iconclass"></i>\n </div>\n <div class="pull-left">\n <div class="heading" [innerHTML]="title"></div>\n <div class="description" [innerHTML]="subheading"></div>\n </div>\n <div class="panel-actions app-datagrid-actions" *ngIf="exportOptions.length || _actions.header.length">\n <ng-container *ngFor="let btn of _actions.header"\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n <div wmMenu dropdown caption.bind="appLocale.LABEL_EXPORT" *ngIf="exportOptions.length" autoclose="always" attr.name="{{name}}-export"\n dataset.bind="exportOptions" select.event="export($item)" menuposition="down,left"></div>\n </div>\n </h3>\n</div>\n<div class="app-datagrid" #datagridElement></div>\n\n<div class="panel-footer clearfix" [hidden]="!_actions.footer.length && (!shownavigation || (onDemandLoad && dataNavigator.isDisableNext) || dataNavigator?.dataSize <= pagesize)">\n <div class="app-datagrid-paginator" [hidden]="(!dataNavigator?.dataSize && !dataNavigator.datasource?.pagination?.next) || !shownavigation || (onDemandLoad && dataNavigator.isDisableNext) || dataNavigator?.dataSize <= pagesize">\n <nav wmPagination show.bind="shownavigation" navigationalign.bind="navigationalign"\n navigationsize.bind="navigationSize"\n navigation.bind="navControls" showrecordcount.bind="showrecordcount" maxsize.bind="maxsize"\n boundarylinks.bind="boundarylinks"\n forceellipses.bind="forceellipses" directionlinks.bind="directionlinks"></nav>\n </div>\n <div class="app-datagrid-actions" *ngIf="_actions.footer.length">\n <ng-container *ngFor="let btn of _actions.footer"\n [ngTemplateOutlet]="btn.widgetType === \'button\' ? buttonRef : anchorRef" [ngTemplateOutletContext]="{btn:btn}">\n </ng-container>\n </div>\n</div>\n\n<ng-template #buttonRef let-btn="btn">\n <button wmButton caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n type="button" shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title" [attr.aria-label]="btn.displayName" disabled.bind="btn.disabled" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></button>\n</ng-template>\n\n<ng-template #anchorRef let-btn="btn">\n <a wmAnchor caption.bind="btn.displayName" show.bind="btn.show" class.bind="btn.class" iconclass.bind="btn.iconclass" (click)="invokeActionEvent($event, btn.action)"\n [ngClass]="{\'btn-sm\': spacing === \'condensed\', \'disabled-new\': btn.key === \'addNewRow\' && (isGridEditMode || isLoading)}"\n shortcutkey.bind="btn.shortcutkey" tabindex.bind="btn.tabindex" hint.bind="btn.title"\n hyperlink.bind="btn.hyperlink" target.bind="btn.target" conditionalclass.bind="btn.conditionalclass" conditionalstyle.bind="btn.conditionalstyle"></a>\n</ng-template>\n\n<div hidden>\n <ng-container #multiColumnFilterView></ng-container>\n\n <ng-container #inlineEditView></ng-container>\n\n <ng-container #inlineEditNewView></ng-container>\n\n <ng-container #rowActionsView></ng-container>\n\n <ng-container #rowExpansionActionView></ng-container>\n\n <ng-container #customExprView></ng-container>\n\n <ng-container #dynamicTable></ng-container>\n\n <ng-container #rowDetailView></ng-container>\n\n <div class="dynamic-table-container"></div>\n</div>\n',providers:[r.provideAs(S,i.NG_VALUE_ACCESSOR,!0),r.provideAsWidgetRef(S)]}]}],S.ctorParameters=function(){return[{type:t.Injector},{type:i.FormBuilder},{type:u.App},{type:u.DynamicComponentRefProvider},{type:u.StatePersistence},{type:u.PaginationService},{type:u.Viewport},{type:p.ListComponent,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["datasource.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["readonlygrid"]}]},{type:t.NgZone},{type:r.TrustAsPipe}]},S.propDecorators={dataNavigator:[{type:t.ViewChild,args:[d.PaginationComponent,{static:!0}]}],_tableElement:[{type:t.ViewChild,args:["datagridElement",{static:!0}]}],rowActionTmpl:[{type:t.ContentChildren,args:["rowActionTmpl"]}],rowActionsViewRef:[{type:t.ViewChild,args:["rowActionsView",{static:!0,read:t.ViewContainerRef}]}],filterTmpl:[{type:t.ContentChildren,args:["filterTmpl",{descendants:!0}]}],filterViewRef:[{type:t.ViewChild,args:["multiColumnFilterView",{static:!0,read:t.ViewContainerRef}]}],inlineWidgetTmpl:[{type:t.ContentChildren,args:["inlineWidgetTmpl",{descendants:!0}]}],inlineEditViewRef:[{type:t.ViewChild,args:["inlineEditView",{static:!0,read:t.ViewContainerRef}]}],inlineWidgetNewTmpl:[{type:t.ContentChildren,args:["inlineWidgetTmplNew",{descendants:!0}]}],inlineEditNewViewRef:[{type:t.ViewChild,args:["inlineEditNewView",{static:!0,read:t.ViewContainerRef}]}],customExprTmpl:[{type:t.ContentChildren,args:["customExprTmpl",{descendants:!0}]}],customExprViewRef:[{type:t.ViewChild,args:["customExprView",{static:!0,read:t.ViewContainerRef}]}],rowExpansionActionTmpl:[{type:t.ContentChildren,args:["rowExpansionActionTmpl"]}],rowExpansionTmpl:[{type:t.ContentChild,args:["rowExpansionTmpl"]}],rowDetailViewRef:[{type:t.ViewChild,args:["rowDetailView",{static:!0,read:t.ViewContainerRef}]}],rowExpansionActionViewRef:[{type:t.ViewChild,args:["rowExpansionActionView",{static:!0,read:t.ViewContainerRef}]}],dynamicTableRef:[{type:t.ViewChild,args:["dynamicTable",{static:!0,read:t.ViewContainerRef}]}],onKeyPress:[{type:t.HostListener,args:["keypress",["$event"]]}]};var C="new",I="edit",D="delete",x=function(){function e(e,t,n){this.table=e,this.dialogService=t,this.app=n,e.initiateSelectItem=this.initiateSelectItem.bind(this),e.updateVariable=this.updateVariable.bind(this),e.updateRecord=this.updateRecord.bind(this),e.deleteRecord=this.deleteRecord.bind(this),e.insertRecord=this.insertRecord.bind(this),e.editRow=this.editRow.bind(this),e.addNewRow=this.addNewRow.bind(this),e.addRow=this.addNewRow.bind(this),e.deleteRow=this.deleteRow.bind(this),e.onRecordDelete=this.onRecordDelete.bind(this),e.hideEditRow=this.hideEditRow.bind(this),e.saveRow=this.saveRow.bind(this),e.cancelRow=this.cancelRow.bind(this)}return e.prototype.selectItemOnSuccess=function(e,t,n){var i=this;setTimeout((function(){t||i.table.selectItem(e,i.table.dataset),u.triggerFn(n)}),250)},e.prototype.initiateSelectItem=function(e,t,n,i,o){var a=this;this.table.gridOptions.isNavTypeScrollOrOndemand()&&!this.table.dataNavigator.isDisableNext&&this.table.isNewRowInserted?this.table.isNewRowInserted=!1:("last"===e&&(i||(this.table.dataNavigator.dataSize+=1),this.table.isNavigationEnabled()||(e="current")),this.table.dataNavigator.calculatePagingValues(),this.table.dataNavigator.__fullData=this.table.__fullData,this.table.dataNavigator.navigatePage(e,null,!0,(function(){(a.table.isNavigationEnabled()||i)&&a.selectItemOnSuccess(t,n,o),"quickedit"!==a.table.editmode||n||a.table.callDataGridMethod("setActiveRow",t)})))},e.prototype.updateVariable=function(e,t){var n=this,i=this.table.datasource;if(i&&(i.execute(u.DataSource.Operation.FETCH_DISTINCT_VALUES),!this.table.isNavigationEnabled())){var o=this.table.sortInfo,a=o&&o.direction?o.field+" "+o.direction:"";r.refreshDataSource(i,{page:1,filterFields:this.table.getFilterFields(this.table.filterInfo),orderBy:a,matchMode:"anywhereignorecase"}).then((function(){u.$appDigest(),n.selectItemOnSuccess(e,!0,t)}))}},e.prototype.insertSuccessHandler=function(e,t){if(e.error)this.table.invokeEventCallback("error",{$event:t.event,$operation:C,$data:e.error}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||e.error),u.triggerFn(t.error,e);else{if(this.table.gridOptions.isNavTypeScrollOrOndemand()&&(this.table.isNewRowInserted=!0),t.event){var n=$(t.event.target).closest("tr");this.table.callDataGridMethod("hideRowEditMode",n)}this.table.onRowinsert||this.table.toggleMessage(!0,"success",this.table.insertmessage),this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_CRUD)?(this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),e,void 0,!1,t.callBack),this.updateVariable(e,t.callBack)):this.table.datasource.execute(u.DataSource.Operation.IS_API_AWARE)||this.table.initiateSelectItem(this.table.getNavigationTargetBySortInfo(),e,void 0,!1,t.callBack),u.triggerFn(t.success,e),this.table.invokeEventCallback("rowinsert",{$event:t.event,$data:e,row:e})}},e.prototype.generatePath=function(e){var t,n,i=this.table.widget.$attrs.get("datasetboundexpr");if(_.startsWith(e,"item")&&i){_.startsWith(i,"Widgets.")&&(i=u.extractCurrentItemExpr(i,this.table));for(var o=this.table.$element.parents(".app-list-item"),a=_.map(o,(function(e){return _.parseInt($(e).attr("listitemindex"))})),r=a.length-1;r>=0;r--)i=i.replace("$i",a[r]);n=_.last(a),t=i.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g,"")}else{/^Variables\..*\.dataSet([\[][0-9]])/g.test(e)&&(n=_.parseInt(e.replace(/^Variables\..*\.dataSet([\[])/g,""))),t=e.replace(/^Variables\..*\.dataSet([^.])*(\.|$)/g,"")}return{path:t,index:n}},e.prototype.insertRecord=function(e){var t=this,n=this.table.datasource;if(n){var i=n.pagination&&n.pagination.number+1,o={row:e.row,skipNotification:!0,period:e.period};if(n.execute(u.DataSource.Operation.SUPPORTS_CRUD)||!n.execute(u.DataSource.Operation.IS_API_AWARE)||"wm.CrudVariable"===n.category){if(!n.execute(u.DataSource.Operation.IS_API_AWARE)){var a=this.generatePath(this.table.binddataset);return n.execute(u.DataSource.Operation.ADD_ITEM,{item:e.row,path:a.path,parentIndex:a.index}),void this.insertSuccessHandler(e.row,e)}n.execute(u.DataSource.Operation.INSERT_RECORD,o).then((function(o){t.insertSuccessHandler(o,e),"wm.CrudVariable"===n.category&&n.execute(u.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:i})}),(function(n){t.table.invokeEventCallback("error",{$event:e.event,$operation:C,$data:n}),t.table.onError||t.table.toggleMessage(!0,"error",t.table.errormessage||n),u.triggerFn(e.error,n),u.triggerFn(e.callBack,void 0,!0)}))}else this.table.invokeEventCallback("rowinsert",{$event:e.event,row:e.row})}},e.prototype.updateSuccessHandler=function(e,t){if(e.error)this.table.invokeEventCallback("error",{$event:t.event,$operation:I,$data:e.error}),this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||e.error),u.triggerFn(t.error,e);else{if(t.event){var n=$(t.event.target).closest("tr");this.table.callDataGridMethod("hideRowEditMode",n)}this.table.onRowupdate||this.table.toggleMessage(!0,"success",this.table.updatemessage),this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_CRUD)?(this.table.initiateSelectItem("current",e,void 0,!1,t.callBack),this.updateVariable(e,t.callBack)):this.table.datasource.execute(u.DataSource.Operation.IS_API_AWARE)||this.table.initiateSelectItem("current",e,void 0,!1,t.callBack),u.triggerFn(t.success,e),this.table.invokeEventCallback("rowupdate",{$event:t.event,$data:e,row:e})}},e.prototype.updateRecord=function(e){var t=this,n=this.table.datasource;if(n){var i=n.pagination&&n.pagination.number+1,o={row:e.row,prevData:e.prevData,skipNotification:!0,period:e.period};if(n.execute(u.DataSource.Operation.SUPPORTS_CRUD)||!n.execute(u.DataSource.Operation.IS_API_AWARE)||"wm.CrudVariable"===n.category){if(!n.execute(u.DataSource.Operation.IS_API_AWARE)){var a=this.generatePath(this.table.binddataset);return n.execute(u.DataSource.Operation.SET_ITEM,{prevItem:e.prevData,item:e.row,path:a.path,parentIndex:a.index}),void this.updateSuccessHandler(e.row,e)}n.execute(u.DataSource.Operation.UPDATE_RECORD,o).then((function(o){t.updateSuccessHandler(o,e),"wm.CrudVariable"===n.category&&n.execute(u.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:i})}),(function(n){t.table.invokeEventCallback("error",{$event:e.event,$operation:I,$data:n}),t.table.onError||t.table.toggleMessage(!0,"error",t.table.errormessage||n),u.triggerFn(e.error,n),u.triggerFn(e.callBack,void 0,!0)}))}else this.table.invokeEventCallback("rowupdate",{$event:e.event,row:e.row})}},e.prototype.onRecordDelete=function(e){var t;this.table.dataNavigator&&(this.table.dataNavigator.dataSize-=1,this.table.dataNavigator.calculatePagingValues(),t=this.table.dataNavigator.pageCount<this.table.dataNavigator.dn.currentPage?"prev":void 0,this.table.dataNavigator.__fullData=this.table.__fullData,this.table.dataNavigator.navigatePage(t,null,!0,(function(){setTimeout((function(){u.triggerFn(e)}),void 0,!1)})))},e.prototype.deleteSuccessHandler=function(e,t,n,i){t&&t.error?this.table.onError||this.table.toggleMessage(!0,"error",this.table.errormessage||t.error):(this.onRecordDelete(i),this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_CRUD)&&this.updateVariable(e,i),this.table.onRowdelete||this.table.toggleMessage(!0,"success",this.table.deletemessage),this.table.invokeEventCallback("rowdelete",{$event:n,$data:e,row:e}),this.table.invokeEventCallback("rowdeleted",{$event:n,$data:e,row:e}))},e.prototype.deleteFn=function(e){var t,n,i=this,o=this.table.datasource;if(o){if((this.table.onDemandLoad||this.table.infScroll)&&(this.table.isRowDeleted=!0),"wm.CrudVariable"===o.category&&(this.triggerWMEvent("resetEditMode"),o.pagination&&(t=o.pagination.last&&1===o.pagination.numberOfElements,n=t?o.pagination.number:o.pagination.number+1)),o.execute(u.DataSource.Operation.SUPPORTS_CRUD)||!o.execute(u.DataSource.Operation.IS_API_AWARE)||this.table._isDependent||"wm.CrudVariable"===o.category){if(!o.execute(u.DataSource.Operation.IS_API_AWARE)){var a=this.generatePath(this.table.binddataset);return o.execute(u.DataSource.Operation.REMOVE_ITEM,{item:e.row,path:a.path,parentIndex:a.index}),void this.deleteSuccessHandler(e.row,void 0,e.evt,e.callBack)}o.execute(u.DataSource.Operation.DELETE_RECORD,{row:e.row,skipNotification:!0,period:e.period}).then((function(t){i.deleteSuccessHandler(t,e.row,e.evt,e.callBack),"wm.CrudVariable"===o.category&&o.execute(u.DataSource.Operation.LIST_RECORDS,{skipToggleState:!0,operation:"list",page:n})}),(function(t){i.table.isRowDeleted&&(i.table.isRowDeleted=!1),u.triggerFn(e.callBack,void 0,!0),i.table.invokeEventCallback("error",{$event:e.evt,$operation:D,$data:t}),i.table.onError||i.table.toggleMessage(!0,"error",i.table.errormessage||t)}))}else this.table.invokeEventCallback("rowdelete",{$event:e.evt,row:e.row});u.triggerFn(e.cancelRowDeleteCallback)}},e.prototype.deleteRecord=function(e){var t=this;if(!this.table.confirmdelete)return this.deleteFn(e),void u.triggerFn(e.cancelRowDeleteCallback);this.dialogService.showAppConfirmDialog({title:this.app.appLocale.MESSAGE_DELETE_RECORD||"Delete Record",iconclass:"wi wi-delete fa-lg",message:this.table.confirmdelete,oktext:this.table.deleteoktext,canceltext:this.table.deletecanceltext,onOk:function(){t.deleteFn(e),t.dialogService.closeAppConfirmDialog()},onCancel:function(){u.triggerFn(e.cancelRowDeleteCallback),t.dialogService.closeAppConfirmDialog()},onOpen:function(){$(".cancel-action").focus()},onEscape:function(){u.triggerFn(e.cancelRowDeleteCallback)}})},e.prototype.editRow=function(e){var t,n=this;this.table._isDependent?this.triggerWMEvent("update"):(e&&e.target?this.table.callDataGridMethod("toggleEditRow",e,{selectRow:!0,action:"edit"}):"form"===this.table.editmode||"dialog"===this.table.editmode?(t=e||this.table.selectedItems[0],this.table.gridOptions.beforeRowUpdate(t)):setTimeout((function(){(t=n.table.datagridElement.find("tr.active")).length&&n.table.callDataGridMethod("toggleEditRow",void 0,{$row:t,action:"edit"})})),this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1))},e.prototype.addNewRow=function(){this.table.isGridEditMode||(this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1),this.table.callDataGridMethod("addNewRow"),this.table._liveTableParent?this.table._liveTableParent.addNewRow():this.table._isDependent&&this.triggerWMEvent("insert"))},e.prototype.triggerWMEvent=function(e,t){u.$invokeWatchers(!0),this.app.notify("wm-event",{eventName:e,widgetName:this.table.name,row:this.table.selecteditem,dataSource:t})},e.prototype.deleteRow=function(e){var t,n=this;e&&e.target?this.table.callDataGridMethod("deleteRowAndUpdateSelectAll",e):setTimeout((function(){t=e||n.table.selectedItems[0],n.deleteRecord({row:t})})),this.table._triggeredByUser=!0,this.table.gridOptions.setIsDataUpdatedByUser(!1)},e.prototype.hideEditRow=function(){var e=this.table.datagridElement.find("tr.row-editing");e.length&&this.table.callDataGridMethod("hideRowEditMode",e)},e.prototype.saveRow=function(){this.table.callDataGridMethod("saveRow")},e.prototype.cancelRow=function(){var e=this.table.datagridElement.find("tr.row-editing");e.length&&this.table.callDataGridMethod("cancelEdit",e)},e}();x.decorators=[{type:t.Directive,args:[{selector:"[wmTableCUD]"}]}],x.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[S]}]},{type:u.AbstractDialogService},{type:u.App}]};var N=["null","empty","nullorempty","isnotnull","isnotempty"],k=function(e,t){if(u.isDefined(e)&&""!==e)return u.isNumberType(t)?_.toNumber(e):t===u.DataType.DATETIME?moment(e).valueOf():_.toString(e).toLowerCase()},M=function(e,t,n){void 0===n&&(n=[]);var i,o=k(t.value,t.type);return!u.isDefined(o)&&!_.includes(N,t.matchMode)||u.isNumberType(t.type)&&_.isNull(t.value)?e:e=e.filter((function(e){var a;switch(t.field?i=k(_.get(e,t.field),t.type):(i=[],_.forEach(e,(function(t,o){if(_.includes(n,o))i.push(t);else{var a=_.filter(_.range(n.length),(function(e){return n[e].includes(o)}));_.forEach(a,(function(t){var o=_.get(e,n[t]);i.indexOf(o)<0&&i.push(o)}))}})),i=i.join(" ").toLowerCase()),t.matchMode){case"start":a=_.startsWith(i,o);break;case"end":a=_.endsWith(i,o);break;case"exact":a=_.isEqual(i,o);break;case"notequals":a=!_.isEqual(i,o);break;case"null":a=_.isNull(i);break;case"isnotnull":a=!_.isNull(i);break;case"empty":a=_.isEmpty(i);break;case"isnotempty":a=!_.isEmpty(i);break;case"nullorempty":a=_.isNull(i)||_.isEmpty(i);break;case"lessthan":a=i<o;break;case"lessthanequal":a=i<=o;break;case"greaterthan":a=i>o;break;case"greaterthanequal":a=i>=o;break;default:a=u.isNumberType(t.type)?_.isEqual(i,o):_.includes(i,o)}return a}))},L=function(e,t,n){n.forEach((function(n){e[n]={value:t.value,type:t.value.type,logicalOp:"OR"},t.matchMode&&(e[n].matchMode=t.matchMode)}))},F=function(e,t,n){void 0===n&&(n=[]);var i=t&&t.field;i?(e[i]={value:t.value,logicalOp:"AND"},t.matchMode&&(e[i].matchMode=t.matchMode)):L(e,t,n)},j=function(e,t){t.field&&(e[t.field]={value:t.value,matchMode:t.matchMode,type:t.type})},B=function(e,t){e.push({field:t.key?t.key:"",matchMode:t.matchMode,type:t.type,value:t.value})},G=function(){function e(e){this.table=e,e._searchSortHandler=this.searchSortHandler.bind(this),e.getSearchResult=this.getSearchResult.bind(this),e.getSortResult=this.getSortResult.bind(this),e.checkFiltersApplied=this.checkFiltersApplied.bind(this),e.getFilterFields=this.getFilterFields.bind(this),e.onRowFilterChange=this.onRowFilterChange.bind(this),e.onFilterConditionSelect=this.onFilterConditionSelect.bind(this),e.showClearIcon=this.showClearIcon.bind(this),e.clearRowFilter=this.clearRowFilter.bind(this),e.matchModeTypesMap=r.getMatchModeTypesMap(),e.matchModeMsgs=r.getMatchModeMsgs(e.appLocale),e.emptyMatchModes=N,e.getNavigationTargetBySortInfo=this.getNavigationTargetBySortInfo.bind(this),e.refreshData=this.refreshData.bind(this),e.clearFilter=this.clearFilter.bind(this),e.adjustContainer=this.adjustContainer.bind(this)}return e.prototype.adjustContainer=function(e){var t=this;setTimeout((function(){u.adjustContainerRightEdges($("bs-dropdown-container"),t.table.rowFilterCompliedTl[e],t.table,$("bs-dropdown-container .dropdown-menu"))}))},e.prototype.getNavigationTargetBySortInfo=function(){return this.table.sortInfo&&"desc"===this.table.sortInfo.direction&&_.includes(this.table.primaryKey,this.table.sortInfo.field)?"first":"last"},e.prototype.getTableVisibleCols=function(){var e=[];return _.forEach(this.table.columns,(function(t,n){"true"===_.toLower(_.toString(t.showinfilter))&&"rowOperations"!==n&&t.searchable&&e.push(n)})),e},e.prototype.invokeSetFilterfieldBasedOnFieldval=function(e,t){if(e.field)F(t,e);else if(!_.isEmpty(e)){var n=this.getTableVisibleCols();F(t,e,n)}},e.prototype.getFilterFields=function(e){var t=this;e=e||{};var n={};return _.isArray(e)?_.forEach(e,(function(e){t.invokeSetFilterfieldBasedOnFieldval(e,n)})):this.invokeSetFilterfieldBasedOnFieldval(e,n),n},e.prototype.getLogicalOperator=function(e){var t="";for(var n in e){t=e[n].logicalOp||"";break}return t},e.prototype.resetSortStatus=function(e){var t;!_.isEmpty(this.table.sortInfo)&&this.table.datasource&&(t=this.table.sortInfo.field+" "+this.table.sortInfo.direction,(e=this.table.datasource.execute(u.DataSource.Operation.GET_OPTIONS).orderBy||e)&&(e=_.head(_.split(e,","))),t!==e&&(this.table.callDataGridMethod("resetSortIcons"),this.table.sortInfo={},this.table.setDataGridOption("sortInfo",{})))},e.prototype.clearFilter=function(e){var t;this.table.filterInfo={},"multicolumn"===this.table.filtermode?(this.table.fieldDefs.forEach((function(e){e.resetFilter&&e.resetFilter()})),e||this.table.onRowFilterChange()):"search"===this.table.filtermode&&((t=this.table.datagridElement).find('[data-element="dgSearchText"]').val(""),t.find('[data-element="dgFilterValue"]').val(""),e||t.find(".app-search-button").trigger("click"))},e.prototype.checkFiltersApplied=function(e){if(this.table.datasource)return this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_SERVER_FILTER)?(_.isEmpty(this.table.datasource.execute(u.DataSource.Operation.GET_OPTIONS).filterFields)&&this.clearFilter(!0),void this.resetSortStatus(e)):void(this.table.datasource.execute(u.DataSource.Operation.IS_PAGEABLE)&&this.resetSortStatus(e))},e.prototype.getSearchResult=function(e,t){var n=this.getTableVisibleCols();return t?(_.isArray(t)?t.forEach((function(t){e=M(e,t,n)})):e=M(e,t,n),e):e},e.prototype.getSortResult=function(e,t){return t&&t.direction&&(e=_.orderBy(e,t.field,t.direction)),e},e.prototype.handleClientSideSortSearch=function(e,t,n){var i;this.table._isClientSearch=!0,i=this.table.isNavigationEnabled()?u.getClonedObject(this.table.__fullData):u.getClonedObject(this.table.dataset),"search"===n?this.table.filterInfo=e:this.table.sortInfo=e,_.isObject(i)&&!_.isArray(i)&&(i=[i]),i=this.getSearchResult(i,this.table.filterInfo),i=this.getSortResult(i,this.table.sortInfo),this.table.serverData=i,"sort"===n&&this.table.invokeEventCallback("sort",{$event:t,$data:{data:this.table.serverData,sortDirection:this.table.sortInfo.direction,colDef:this.table.columns[this.table.sortInfo.field]}}),this.table.isNavigationEnabled()?(this.table.dataNavigator.dn.currentPage=1,this.table.dataNavigator.setPagingValues(i)):this.table.setGridData(this.table.serverData)},e.prototype.handleSinglePageSearch=function(e){this.table._isPageSearch=!0;var t=u.getClonedObject(this.table.gridData),n=this.table.datagridElement.find("tbody tr.app-datagrid-row");this.table.filterInfo=e,t=this.getSearchResult(t,e),_.forEach(this.table.gridData,(function(e,i){var o=$(n[i]);_.find(t,(function(t){return _.isEqual(t,e)}))?o.show():o.hide()})),t&&t.length?(this.table.callDataGridMethod("setStatus","ready"),this.table.gridfirstrowselect&&!this.table.multiselect&&this.table.callDataGridMethod("selectFirstRow",!0,!0)):(this.table.callDataGridMethod("setStatus","nodata",this.table.nodatamessage),this.table.selecteditem=void 0),this.table.callDataGridMethod("updateSelectAllCheckboxState")},e.prototype.handleServerSideSearch=function(e){var t=this;if(this.table.filterInfo=e,this.table.datasource){var n=this.table.sortInfo,i=n&&n.direction?n.field+" "+n.direction:"",o=this.getFilterFields(e),a=this.getLogicalOperator(o);r.refreshDataSource(this.table.datasource,{page:1,filterFields:o,orderBy:i,condition:a}).then((function(){u.$appDigest()}),(function(){t.table.toggleMessage(!0,"error",t.table.nodatamessage)}))}},e.prototype.handleSeverSideSort=function(e,t,n){var i=this;this.table.gridOptions.sortInfo.field=e.field,this.table.gridOptions.sortInfo.direction=e.direction,this.table.sortInfo=u.getClonedObject(e);var o=e&&e.direction?e.field+" "+e.direction:"",a=this.getFilterFields(this.table.filterInfo),s=this.getLogicalOperator(a);n||"none"===this.table.getConfiguredState()||this.table.statePersistence.removeWidgetState(this.table,"pagination"),r.refreshDataSource(this.table.datasource,{page:1,filterFields:a,orderBy:o,condition:s}).then((function(n){u.$appDigest();var o=n&&n.data?n.data:n;i.table.invokeEventCallback("sort",{$event:t,$data:{data:o,sortDirection:e.direction,colDef:i.table.columns[e.field]}})}))},e.prototype.searchHandler=function(e,t,n,i){var o;o=_.isArray(e)?e.filter((function(e){return void 0!==e.matchMode&&void 0!==e.value||void 0!==e.value&&""===e.field})):{field:e.field,value:e.value,type:e.type},"none"!==this.table.getConfiguredState()&&r.unsupportedStatePersistenceTypes.indexOf(this.table.navigation)<0?(_.isArray(e)&&o.length||e.value?(this.table.statePersistence.removeWidgetState(this.table,"search"),this.table.statePersistence.setWidgetState(this.table,{search:o})):this.table.statePersistence.removeWidgetState(this.table,"search"),i||(this.table.statePersistence.removeWidgetState(this.table,"pagination"),this.table.statePersistence.removeWidgetState(this.table,"selectedItem"))):console.warn("Retain State handling on Widget "+this.table.name+" is not supported for current pagination type.");var a=u.getClonedObject(e),s=this.table.datasource;if(s||this.table.dataset){var l={};_.isArray(a)?a.forEach((function(e){j(l,e)})):j(l,a),!1!==this.table.invokeEventCallback("beforefilter",{$event:t,$data:l,columns:l})&&(a=[],_.isEmpty(l)&&!_.isEmpty(o)?_.isArray(o)?_.forEach(o,(function(e){B(a,e)})):B(a,o):_.forEach(l,(function(e,t){a.push({field:t,matchMode:e.matchMode,type:e.type,value:e.value})})),s&&s.execute(u.DataSource.Operation.SUPPORTS_SERVER_FILTER)?this.handleServerSideSearch(a):s&&s.execute(u.DataSource.Operation.IS_API_AWARE)&&s.execute(u.DataSource.Operation.IS_PAGEABLE)?this.handleSinglePageSearch(a):this.handleClientSideSortSearch(a,t,n))}},e.prototype.sortHandler=function(e,t,n,i){var o=this.table.datasource;if(o||this.table.dataset){if(!i&&"none"!==this.table.getConfiguredState()&&r.unsupportedStatePersistenceTypes.indexOf(this.table.navigation)<0){var a={direction:e.direction,field:e.field};e.direction?this.table.statePersistence.setWidgetState(this.table,{sort:a}):this.table.statePersistence.removeWidgetState(this.table,"sort"),this.table.statePersistence.removeWidgetState(this.table,"selectedItem")}else console.warn("Retain State handling on Widget "+this.table.name+" is not supported for current pagination type.");o&&o.execute(u.DataSource.Operation.IS_SORTABLE)?this.handleSeverSideSort(e,t,i):this.handleClientSideSortSearch(e,t,n)}},e.prototype.setLastActionPerformedToSearchSort=function(){this.table.gridOptions.setLastActionPerformed(this.table.gridOptions.ACTIONS.SEARCH_OR_SORT),this.table.gridOptions.setIsSearchTrigerred(!0)},e.prototype.searchSortHandler=function(e,t,n,i){"change"===(t?t.type:"")&&"multicolumn"!==this.table.filtermode?t.stopPropagation():(this.setLastActionPerformedToSearchSort(),"search"===n?this.searchHandler(e,t,n,i):this.sortHandler(e,t,n,i))},e.prototype.showClearIcon=function(e){var t=this.table.rowFilter[e]&&this.table.rowFilter[e].value;return u.isDefined(t)&&""!==t&&null!==t},e.prototype.clearRowFilter=function(e){this.table.rowFilter&&this.table.rowFilter[e]&&(this.table.columns[e].resetFilter(),this.onRowFilterChange(e))},e.prototype.onFilterConditionSelect=function(e,t){var n=this;this.table.rowFilter[e]=this.table.rowFilter[e]||{},this.table.rowFilter[e].matchMode=t,_.includes(this.table.emptyMatchModes,t)?(this.table.columns[e].resetFilter(),this.table.onRowFilterChange()):u.isDefined(this.table.rowFilter[e].value)&&""!==this.table.rowFilter[e].value?this.table.onRowFilterChange():setTimeout((function(){n.table.columns[e].filterInstance.focus()}))},e.prototype.getFilterOnFieldValues=function(e){var t=this;if(this.table.datasource&&this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_DISTINCT_API)){var n=e.field,i=this.table.fullFieldDefs,o=_.filter(i,{filteronfilter:n}),a=_.get(this.table.rowFilter,[n,"value"]);_.forEach(o,(function(e){var n=e.filteronfilter,i=e.field,o={},s=e.filterwidget;r.isDataSetWidget(s)&&n!==i&&!e.isFilterDataSetBound&&(o[n]=u.isDefined(a)&&""!==a&&null!==a?{value:a}:{},s===u.FormWidgetType.AUTOCOMPLETE&&e.filterInstance.dataoptions?e.filterInstance.dataoptions.filterFields=o:t.table.datasource.execute(u.DataSource.Operation.GET_DISTINCT_DATA_BY_FIELDS,{fields:i,filterFields:o}).then((function(t){e.filterdataset=t.data})))}))}},e.prototype.onRowFilterChange=function(e){var t=this,n=[],i=_.find(this.table.fullFieldDefs,{field:e});_.forEach(this.table.rowFilter,(function(e,o){(u.isDefined(e.value)&&""!==e.value||_.includes(t.table.emptyMatchModes,e.matchMode))&&(i&&o===i.field&&(e.type=e.type||i.type,e.matchMode=e.matchMode||_.get(t.table.matchModeTypesMap[e.type],0)),n.push({field:o,value:e.value,matchMode:e.matchMode,type:e.type}))})),this.table.gridOptions.searchHandler(n,void 0,"search"),i&&this.getFilterOnFieldValues(i)},e.prototype.refreshData=function(e){if(this.table.datasource){var t=e?this.table.dataNavigator.dn.currentPage:1,n=this.table.sortInfo,i=n&&n.direction?n.field+" "+n.direction:"",o=this.getFilterFields(this.table.filterInfo),a=this.getLogicalOperator(o);r.refreshDataSource(this.table.datasource,{page:t,filterFields:o,orderBy:i,condition:a})}},e}();G.decorators=[{type:t.Directive,args:[{selector:"[wmTableFilterSort]"}]}],G.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Self},{type:t.Inject,args:[S]}]}]};var V=function(){r.register("wm-table-action",new Map([["accessroles",r.PROP_STRING],["action",r.PROP_STRING],["caption",r.PROP_STRING],["class",r.PROP_STRING],["conditionalclass",r.PROP_ANY],["conditionalstyle",r.PROP_ANY],["disabled",Object.assign({value:!1},r.PROP_BOOLEAN)],["display-name",r.PROP_STRING],["hyperlink",r.PROP_STRING],["icon",r.PROP_STRING],["iconclass",r.PROP_STRING],["key",r.PROP_STRING],["position",Object.assign({value:"footer"},r.PROP_STRING)],["shortcutkey",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["title",r.PROP_STRING],["target",r.PROP_STRING],["widget-type",Object.assign({value:"button"},r.PROP_STRING)]]))},W={widgetType:"wm-table-action",hostClass:""},U=function(e){function t(t,n){var i=e.call(this,t,W)||this;return i.table=n,i}return g(t,e),t.prototype.populateAction=function(){this.buttonDef={key:this.key,displayName:this["display-name"]||this.caption||"",show:this.show,class:this.class||"",iconclass:this.iconclass||"",title:_.isUndefined(this.title)?this["display-name"]||"":this.title,action:this.action,accessroles:this.accessroles,shortcutkey:this.shortcutkey,disabled:this.disabled,tabindex:this.tabindex,icon:this.icon,position:this.position,widgetType:this["widget-type"],hyperlink:this.hyperlink,target:this.target||"",conditionalclass:this.conditionalclass||"",conditionalstyle:this.conditionalstyle||{}},this._propsInitialized=!0},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateAction(),this.table.registerActions(this.buttonDef)},t.prototype.onPropertyChange=function(e,t){this._propsInitialized&&("display-name"===e?this.buttonDef.displayName=t:this.buttonDef[e]=t)},t}(r.BaseComponent);U.initializeProps=V(),U.decorators=[{type:t.Directive,args:[{selector:"[wmTableAction]",providers:[r.provideAsWidgetRef(U)]}]}],U.ctorParameters=function(){return[{type:t.Injector},{type:S,decorators:[{type:t.Optional}]}]};var q=function(){r.register("wm-table-column",new Map([["accessroles",r.PROP_STRING],["autoclose",Object.assign({value:"outsideClick"},r.PROP_STRING)],["backgroundcolor",r.PROP_STRING],["binding",r.PROP_STRING],["caption",r.PROP_STRING],["checkedvalue",r.PROP_STRING],["col-class",r.PROP_STRING],["collapsible",r.PROP_BOOLEAN],["col-ng-class",r.PROP_STRING],["currencypattern",r.PROP_STRING],["customExpression",r.PROP_BOOLEAN],["dataentrymode",Object.assign({value:"default"},r.PROP_STRING)],["datafield",r.PROP_STRING],["dataoptions",r.PROP_ANY],["dataset",r.PROP_ANY],["datasource",r.PROP_STRING],["dateformat",r.PROP_STRING],["datepattern",r.PROP_STRING],["debouncetime",Object.assign({value:250},r.PROP_NUMBER)],["defaultvalue",r.PROP_STRING],["disabled",r.PROP_BOOLEAN],["displayfield",r.PROP_STRING],["displaylabel",r.PROP_STRING],["editdatepattern",r.PROP_STRING],["outputformat",r.PROP_STRING],["edit-widget-type",r.PROP_STRING],["editinputtype",r.PROP_STRING],["exportexpression",r.PROP_STRING],["filterdataset",r.PROP_STRING],["filterdatafield",r.PROP_STRING],["filterdisplayfield",r.PROP_STRING],["filterdisplaylabel",r.PROP_STRING],["filterexpressions",Object.assign({value:"{}"},r.PROP_STRING)],["filtersearchkey",r.PROP_STRING],["filter-on",r.PROP_STRING],["filteronfilter",r.PROP_STRING],["filterplaceholder",r.PROP_STRING],["filterwidget",r.PROP_STRING],["filterinputtype",r.PROP_STRING],["formatpattern",r.PROP_STRING],["custompipeformat",r.PROP_STRING],["fractionsize",r.PROP_STRING],["generator",r.PROP_STRING],["groupby",r.PROP_STRING],["limit",r.PROP_NUMBER],["match",r.PROP_STRING],["matchmode",r.PROP_STRING],["maxchars",r.PROP_NUMBER],["maxvalue",r.PROP_NUMBER],["step",r.PROP_NUMBER],["mobiledisplay",Object.assign({value:!0},r.PROP_BOOLEAN)],["minvalue",r.PROP_NUMBER],["maxdate",r.PROP_STRING],["mindate",r.PROP_STRING],["excludedays",r.PROP_STRING],["excludedates",r.PROP_STRING],["maxtime",r.PROP_STRING],["mintime",r.PROP_STRING],["pcdisplay",Object.assign({value:!0},r.PROP_BOOLEAN)],["period",r.PROP_BOOLEAN],["placeholder",r.PROP_STRING],["prefix",r.PROP_STRING],["primary-key",r.PROP_BOOLEAN],["readonly",r.PROP_BOOLEAN],["regexp",r.PROP_ANY],["related-entity-name",r.PROP_STRING],["required",r.PROP_BOOLEAN],["rowactionsposition",r.PROP_STRING],["searchkey",r.PROP_STRING],["searchable",Object.assign({value:!0},r.PROP_BOOLEAN)],["showinfilter",Object.assign({value:!1},r.PROP_BOOLEAN)],["suffix",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["showcount",r.PROP_BOOLEAN],["showdropdownon",Object.assign({value:"default"},r.PROP_STRING)],["sortable",Object.assign({value:!0},r.PROP_BOOLEAN)],["tabletdisplay",Object.assign({value:!0},r.PROP_BOOLEAN)],["textalignment",Object.assign({value:"left"},r.PROP_STRING)],["textcolor",r.PROP_STRING],["type",Object.assign({value:"string"},r.PROP_STRING)],["uncheckedvalue",r.PROP_STRING],["validationmessage",r.PROP_STRING],["widget-type",r.PROP_STRING],["width",r.PROP_STRING]]))},z=function(){r.register("wm-table-column-group",new Map([["backgroundcolor",r.PROP_STRING],["caption",r.PROP_STRING],["col-class",r.PROP_STRING],["name",r.PROP_STRING],["textalignment",Object.assign({value:"center"},r.PROP_STRING)]]))},H={widgetType:"wm-table-column-group",hostClass:""},Y=function(e){function t(t,n,i){var o=e.call(this,t,H)||this;return o.group=n,o.table=i,o.config={},o}return g(t,e),t.prototype.populateConfig=function(){this.config={field:this.name,displayName:this.caption||"",columns:[],isGroup:!0,accessroles:this.accessroles,textAlignment:this.textalignment||"center",backgroundColor:this.backgroundcolor,class:this["col-class"]}},t.prototype.onPropertyChange=function(t,n,i){"caption"===t?(this.config.displayName=n||"",this.table.callDataGridMethod("setColumnProp",this.config.field,"displayName",n,!0)):e.prototype.onPropertyChange.call(this,t,n,i)},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateConfig();var t=parseInt(this.getAttr("headerIndex"),10),n=parseInt(this.getAttr("index"),10),i=this.group&&this.group.name;r.setHeaderConfigForTable(this.table.headerConfig,this.config,i,i?n:t)},t}(r.BaseComponent);Y.initializeProps=z(),Y.decorators=[{type:t.Directive,args:[{selector:"[wmTableColumnGroup]",providers:[r.provideAsWidgetRef(Y)]}]}],Y.ctorParameters=function(){return[{type:t.Injector},{type:Y,decorators:[{type:t.SkipSelf},{type:t.Optional}]},{type:S,decorators:[{type:t.Optional}]}]};var K={widgetType:"wm-table-column",hostClass:""},Q=["datafield","displayfield","placeholder","searchkey","matchmode","displaylabel","groupby","match","dateformat","showcount","collapsible","checkedvalue","uncheckedvalue","showdropdownon","dataentrymode","autoclose","dataset","outputformat"];Q=w(w([],b(Q)),b(["maxchars","regexp","minvalue","maxvalue","step","required","mindate","maxdate","excludedates","excludedays","mintime","maxtime"]));var Z=function(){function e(e){this.widget=e}return e.prototype.focus=function(){this.widget.focus()},e.prototype.setProperty=function(e,t){e="value"===e?"datavalue":e,this.widget[e]=t},e.prototype.getProperty=function(e){return e="value"===e?"datavalue":e,this.widget[e]},e}(),J=function(e){function t(t,n,i,o,a,r){var s=e.call(this,t,K)||this;return s.appDefaults=n,s.table=i,s.group=o,s.bindfilterdataset=a,s.binddataset=r,s.syncValidators=[],s.asyncValidators=[],s.observeOnFields=[],s.aggregate={sum:function(){return _.sum(s._getColumnData())},average:function(e){return void 0===e&&(e=2),_.round(_.mean(s._getColumnData()),e)},count:function(){return s._getColumnData().length},minimum:function(){return _.min(s._getColumnData())},maximum:function(){return _.max(s._getColumnData())},percent:function(e,t){return void 0===t&&(t=2),_.round(_.sum(s._getColumnData())/e*100,t)}},s.notifyForFields=[],s}return g(t,e),Object.defineProperty(t.prototype,"dataoptions",{get:function(){return this._dataoptions},set:function(e){this._dataoptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datasource",{get:function(){return this._datasource},set:function(e){this._datasource=e},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this.populateFieldDef();var n=parseInt(this.getAttr("index"),10),i=parseInt(this.getAttr("headerIndex"),10),o=this.group&&this.group.name;if(r.setHeaderConfigForTable(this.table.headerConfig,{field:this.field,displayName:this.displayName},o,o?n:i),this.table.registerColumns(this.widget,n),this._isRowFilter="multicolumn"===this.table.filtermode&&this.searchable,this._isInlineEditable=!this.readonly&&this.table.editmode!==r.EDIT_MODE.DIALOG&&this.table.editmode!==r.EDIT_MODE.FORM,this._isNewEditableRow=this._isInlineEditable&&this.table.editmode===r.EDIT_MODE.QUICK_EDIT&&this.table.shownewrow,this.setUpControls(),this._propsInitialized=!0,this.getFormControl()){var a=this.getFormControl().statusChanges.pipe(m.debounceTime(100)).subscribe((function(e){return t.onStatusChange(e,"inlineInstance")}));this.registerDestroyListener((function(){return a.unsubscribe()})),this.fieldValidations=new r.BaseFieldValidations(this,this.inlineInstance,this.editWidgetType,this.getFormControl(),this.table,"inlineInstance")}if(this._checkNewEditableRowControl()){var s=this.getFormControl("_new").statusChanges.pipe(m.debounceTime(100)).subscribe((function(e){return t.onStatusChange(e,"inlineInstanceNew")}));this.registerDestroyListener((function(){return s.unsubscribe()})),this.fieldValidations_new=new r.BaseFieldValidations(this,this.inlineInstanceNew,this.editWidgetType,this.getFormControl("_new"),this.table,"inlineInstanceNew")}},t.prototype.ngAfterContentInit=function(){var t=this;if(this._isRowFilter){var n=this._filterInstances.changes.subscribe((function(e){t.filterInstance=e.first&&e.first.widget,t.setUpFilterWidget()}));this.registerDestroyListener((function(){return n.unsubscribe()}))}if(this._isInlineEditable){var i=this._inlineInstances.changes.subscribe((function(e){t.inlineInstance=e.first&&e.first.widget,t.fieldValidations.formwidget=e.first,t.table.registerFormField(t.binding,new Z(t.inlineInstance)),t.setUpInlineWidget("inlineInstance")}));if(this.registerDestroyListener((function(){return i.unsubscribe()})),this._isNewEditableRow){var o=this._inlineInstancesNew.changes.subscribe((function(e){t.inlineInstanceNew=e.first&&e.first.widget,t.fieldValidations_new.formwidget=e.first,t.setUpInlineWidget("inlineInstanceNew")}));this.registerDestroyListener((function(){return o.unsubscribe()}))}}this.registerReadyStateListener((function(){t.key=t.field||t.binding})),e.prototype.ngAfterContentInit.call(this),this.table.isdynamictable&&this.table.inlineWidgetTmpl._results.push(this.inlineWidthTempRef)},t.prototype.ngAfterViewInit=function(){this.filterTemplateRef&&this.table.renderDynamicFilterColumn(this.filterTemplateRef)},t.prototype.applyValidations=function(){this.getFormControl()&&(this.syncValidators.length>0&&this.fieldValidations.setValidators(this.syncValidators),this.fieldValidations.setUpValidators(),this.asyncValidators.length>0&&this.fieldValidations.setAsyncValidators(this.asyncValidators),this.observeOnFields.length>0&&this.fieldValidations.observeOn(this.observeOnFields,"columns"))},t.prototype.removeValidations=function(){this.table.ngform.markAsUntouched();var e=this.getFormControl();e&&(e.clearValidators(),e.clearAsyncValidators(),e.updateValueAndValidity())},t.prototype.applyNewRowValidations=function(){this._checkNewEditableRowControl()&&(this.syncValidators.length>0&&this.fieldValidations_new.setValidators(this.syncValidators),this.fieldValidations_new.setUpValidators(),this.asyncValidators.length>0&&this.fieldValidations_new.setAsyncValidators(this.asyncValidators),this.observeOnFields.length>0&&this.fieldValidations_new.observeOn(this.observeOnFields,"columns"))},t.prototype.removeNewRowValidations=function(){if(this.table.ngform.markAsUntouched(),this._checkNewEditableRowControl()){var e=this.getFormControl("_new");e.clearValidators(),e.clearAsyncValidators(),e.updateValueAndValidity()}},t.prototype.addFormControl=function(e){var t=e?this.binding+e:this.binding;this.table.ngform.addControl(t,this.table.fb.control(""))},t.prototype.getFormControl=function(e){var t=e?this.binding+e:this.binding;return this.table.ngform.controls[t]},t.prototype._checkNewEditableRowControl=function(){return this._isNewEditableRow&&this.getFormControl("_new")},t.prototype.setUpControls=function(){var e=this;if(this._isInlineEditable){if(this.editWidgetType===u.FormWidgetType.UPLOAD)return;this.addFormControl();var t=this.getFormControl();if(t){var n=t.valueChanges.pipe(m.debounceTime(200)).subscribe((function(t){return e.onValueChange(t,"inlineInstance")}));this.registerDestroyListener((function(){return n.unsubscribe()}))}if(this._isNewEditableRow){this.addFormControl("_new");var i=this.getFormControl("_new");if(i){var o=i.valueChanges.pipe(m.debounceTime(200)).subscribe((function(t){return e.onValueChange(t,"inlineInstanceNew")}));this.registerDestroyListener((function(){return o.unsubscribe()}))}}}if(this._isRowFilter&&(this.addFormControl("_filter"),this.filterControl=this.getFormControl("_filter"),this.filterControl)){var a=this.filterControl.valueChanges.subscribe(this.onFilterValueChange.bind(this));this.registerDestroyListener((function(){return a.unsubscribe()}))}},t.prototype.resetFilter=function(){this.filterControl&&this.filterControl.setValue(""),this.filterwidget===u.FormWidgetType.AUTOCOMPLETE&&(this.filterInstance.query="",this.filterInstance.queryModel="")},t.prototype.onFilterValueChange=function(e){this.table.rowFilter[this.field].value=e},Object.defineProperty(t.prototype,"datavalue",{get:function(){return this[this.activeControlType]&&this[this.activeControlType].datavalue},set:function(e){var t=this.getFormControl("inlineInstanceNew"===this.activeControlType?"_new":void 0);t&&t&&this.editWidgetType!==u.FormWidgetType.UPLOAD&&t.setValue(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.datavalue},set:function(e){this.datavalue=e},enumerable:!1,configurable:!0}),t.prototype.onValueChange=function(e,t){null!==e&&r.applyFilterOnField(this.table.datasource,this.widget,this.table.fieldDefs,e,{widget:"edit-widget-type"}),this.table.ngform.touched&&(this.activeControlType=t,"inlineInstance"===t?(this.notifyChanges(),this.fieldValidations.setCustomValidationMessage()):this._isNewEditableRow&&(this.notifyChanges("_new"),this.fieldValidations_new.setCustomValidationMessage()))},t.prototype.loadFilterData=function(){var e=this;this._isRowFilter&&r.isDataSetWidget(this.filterwidget)&&!this.bindfilterdataset&&(this.table.datasource.execute(u.DataSource.Operation.SUPPORTS_DISTINCT_API)?(this.relatedEntityName&&(this.widget["is-related"]=!0,this.widget["lookup-type"]=this.relatedEntityName,this.widget["lookup-field"]=_.last(_.split(this.field,"."))),this.filterwidget===u.FormWidgetType.AUTOCOMPLETE?(this.filterInstance.dataoptions=r.getDistinctFieldProperties(this.table.datasource,this),this.filterInstance.datasource=this.table.datasource):r.getDistinctValues(this.table.datasource,this.widget,"filterwidget").then((function(t){e._filterDataSet=t.data,e.setFilterWidgetDataSet()}))):this.registerDestroyListener(u.$watch(this.table.binddataset,this.viewParent,{},(function(t){return e.widget.filterdataset=t}),r.getWatchIdentifier(this.widgetId,"filterdataset"))))},t.prototype.loadInlineWidgetData=function(){if(r.isDataSetWidget(this["edit-widget-type"])&&!this.binddataset&&!this.readonly){var e=this.table.datasource;if(this["related-entity-name"]&&this["primary-key"]){this.isDataSetBound=!0;var t=_.split(this.binding,".");this.showPendingSpinner=!0,r.fetchRelatedFieldData(e,this.widget,{relatedField:_.head(t),datafield:_.last(t),widget:"edit-widget-type"})}else e.execute(u.DataSource.Operation.SUPPORTS_DISTINCT_API)&&r.getDistinctValuesForField(e,this.widget,{widget:"edit-widget-type"})}},t.prototype.onDataSourceChange=function(){this.loadFilterData(),this.table.editmode===r.EDIT_MODE.QUICK_EDIT&&this.loadInlineWidgetData()},t.prototype.setFilterWidgetDataSet=function(){this.filterInstance&&(this.filterInstance.dataset=this._filterDataSet)},t.prototype.setUpFilterWidget=function(){var e=this;this.filterInstance.registerReadyStateListener((function(){if(r.isDataSetWidget(e.filterwidget)){var t=_.last(e.binding.split("."));e.filterInstance.dataset=e._filterDataSet,e.filterInstance.datafield=e.filterdatafield||t,e.filterInstance.displayfield=e.filterdisplayfield||t,e.filterwidget===u.FormWidgetType.AUTOCOMPLETE&&(e.filterInstance.displaylabel=e.filterdisplaylabel||t,e.filterInstance.searchkey=e.filtersearchkey||t)}e.filterwidget===u.FormWidgetType.TIME&&(e.filterInstance.timepattern=e.appDefaults.timeFormat||"hh:mm:ss a"),e.filterInstance.placeholder=e.filterplaceholder||""}))},t.prototype.notifyChanges=function(e){var t=this;_.forEach(this.notifyForFields,(function(n){e&&t._isNewEditableRow?n.fieldValidations_new.validate():n.fieldValidations.validate()}))},t.prototype.observeOn=function(e){this.observeOnFields=_.cloneDeep(e)},t.prototype.setUpValidators=function(){this.fieldValidations.setUpValidators(),this._checkNewEditableRowControl()&&this.fieldValidations_new.setUpValidators()},t.prototype.setAsyncValidators=function(e){this.asyncValidators=_.cloneDeep(e)},t.prototype.setValidators=function(e){this.syncValidators=_.cloneDeep(e)},t.prototype.boundFn=function(e){return e()},t.prototype.onStatusChange=function(e,t){this["showPendingSpinner"+("inlineInstance"===t?"":"New")]="PENDING"===e},t.prototype.setSummaryRowData=function(e){var t=e instanceof Array?e:[e];this._invokeSummaryRowData(t)},t.prototype._invokeSummaryRowData=function(e){var t=this;_.forEach(e,(function(e,n){var i=e;if(i instanceof Promise)i.then((function(e){t.table.callDataGridMethod("setSummaryRowDef",t.key,e,n,!0)}));else if(i.value&&i.value instanceof Promise){var o=i;i.value.then((function(e){o.value=e,t.table.callDataGridMethod("setSummaryRowDef",t.key,o,n,!0)}))}t.table.callDataGridMethod("setSummaryRowDef",t.key,i,n)}))},t.prototype._getColumnData=function(){return _.map(this.table.dataset,this.binding)},t.prototype.setInlineWidgetProp=function(e,t,n){"datepattern"===t&&this.editWidgetType===u.FormWidgetType.TIME&&(t="timepattern"),this[e]&&u.isDefined(n)&&(this[e][t]=n)},t.prototype.setUpInlineWidget=function(e){var t=this;this[e].registerReadyStateListener((function(){r.isDataSetWidget(t["edit-widget-type"])&&(t[e].dataset=t.dataset),Q.forEach((function(n){t.setInlineWidgetProp(e,n,t[n])})),t[e].datasource=t._datasource,t[e].dataoptions=t._dataoptions,t.setInlineWidgetProp(e,"datepattern",t.editdatepattern)}))},t.prototype.getStyleDef=function(){return"width: "+(this.width||"")+"; background-color: "+(this.backgroundcolor||"")+"; color: "+(this.textcolor||"")+";"},t.prototype.populateFieldDef=function(){if(this.width="px"===this.width?"":this.width||"",this.field=this.binding,this.displayName=this.caption||"",this.pcDisplay=this.pcdisplay,this.mobileDisplay=this.mobiledisplay,this.tabletDisplay=this.tabletdisplay,this.textAlignment=this.textalignment,this.backgroundColor=this.backgroundcolor,this.textColor=this.textcolor,this.primaryKey=this["primary-key"],this.relatedEntityName=this["related-entity-name"],this.style=this.getStyleDef(),this.class=this["col-class"],this.ngclass=this["col-ng-class"],this.formatpattern="toNumber"===this.formatpattern?"numberToString":this.formatpattern,this.searchable="blob"!==this.type&&"clob"!==this.type&&this.searchable,this.showinfilter=!this.nativeElement.hasAttribute("showinfilter")||this.table&&this.table.isdynamictable?this.show:this.nativeElement.getAttribute("showinfilter"),this.limit=this.limit?+this.limit:void 0,this.editWidgetType=this["edit-widget-type"]=this["edit-widget-type"]||r.getEditModeWidget(this),this.filterOn=this["filter-on"],this.readonly=u.isDefined(this.getAttr("readonly"))?"true"===this.getAttr("readonly"):this["related-entity-name"]?!this["primary-key"]:_.includes(["identity","uniqueid","sequence"],this.generator),this.filterwidget=this.filterwidget||r.getDataTableFilterWidget(this.type||"string"),this.isFilterDataSetBound=!!this.bindfilterdataset,this.defaultvalue=r.getDefaultValue(this.defaultvalue,this.type,this.editWidgetType),u.isDateTimeType(this.type)&&"toDate"===this.formatpattern&&!this.datepattern){var e=u.getDisplayDateTimeFormat(this.type);this.type===u.DataType.DATE?this.datepattern=this.appDefaults.dateFormat||e:this.type===u.DataType.TIME?this.datepattern=this.appDefaults.timeFormat||e:this.type!==u.DataType.TIMESTAMP&&this.type!==u.DataType.DATETIME||(this.datepattern=this.appDefaults.dateTimeFormat||e)}},t.prototype.onPropertyChange=function(t,n,i){if(this._propsInitialized){switch(t){case"caption":this.displayName=n||"",this.setProperty("displayName",this.displayName);break;case"defaultvalue":this.defaultvalue=r.getDefaultValue(this.defaultvalue,this.type,this.editWidgetType);break;case"show":this.table.redraw(!0),this.showinfilter=this.nativeElement.hasAttribute("showinfilter")?this.nativeElement.getAttribute("showinfilter"):n;break;case"filterdataset":this._filterDataSet=n,this.setFilterWidgetDataSet();break;case"editdatepattern":this.setInlineWidgetProp("inlineInstance","datepattern",n),this.setInlineWidgetProp("inlineInstanceNew","datepattern",n);break;case"showinfilter":this.showinfilter=n;break;default:Q.includes(t)&&(this.setInlineWidgetProp("inlineInstance",t,n),this.setInlineWidgetProp("inlineInstanceNew",t,n))}e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.setProperty=function(e,t){switch(this[e]=t,e){case"displayName":this.table.callDataGridMethod("setColumnProp",this.field,e,t);break;default:this.table.redraw(!0)}},t}(r.BaseComponent);J.initializeProps=q(),J.decorators=[{type:t.Directive,args:[{selector:"[wmTableColumn]",providers:[r.provideAsWidgetRef(J)]}]}],J.ctorParameters=function(){return[{type:t.Injector},{type:u.AppDefaults},{type:S,decorators:[{type:t.Optional}]},{type:Y,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Attribute,args:["filterdataset.bind"]}]},{type:void 0,decorators:[{type:t.Attribute,args:["dataset.bind"]}]}]},J.propDecorators={_filterInstances:[{type:t.ContentChildren,args:["filterWidget"]}],_inlineInstances:[{type:t.ContentChildren,args:["inlineWidget"]}],_inlineInstancesNew:[{type:t.ContentChildren,args:["inlineWidgetNew"]}],customExprTmpl:[{type:t.ContentChild,args:["customExprTmpl"]}],inlineWidthTempRef:[{type:t.ContentChild,args:["inlineWidgetTmpl"]}],filterTemplateRef:[{type:t.ContentChild,args:["filterTmpl"]}]};var X=function(){r.register("wm-table-row",new Map([["class",r.PROP_STRING],["closeothers",Object.assign({value:!0},r.PROP_BOOLEAN)],["content",r.PROP_STRING],["columnwidth",Object.assign({value:"30px"},r.PROP_STRING)],["collapseicon",r.PROP_STRING],["expandicon",r.PROP_STRING],["height",r.PROP_STRING],["position",Object.assign({value:"0"},r.PROP_STRING)]]))},ee={widgetType:"wm-table-row",hostClass:""},te=function(e){function t(t,n){var i=e.call(this,t,ee)||this;return i.table=n,i}return g(t,e),t.prototype.populateConfig=function(){this.config={closeothers:this.closeothers,content:this.content,columnwidth:this.columnwidth,expandicon:this.expandicon,collapseicon:this.collapseicon,height:this.height,position:this.position}},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateConfig(),this.table.registerRow(this.config,this)},t.prototype.onPropertyChange=function(e,t){"content"===e&&this.config&&(this.config.content=this.content)},t}(r.BaseComponent);te.initializeProps=X(),te.decorators=[{type:t.Directive,args:[{selector:"[wmTableRow]",providers:[r.provideAsWidgetRef(te)]}]}],te.ctorParameters=function(){return[{type:t.Injector},{type:S,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]};var ne=function(){r.register("wm-table-row-action",new Map([["accessroles",r.PROP_STRING],["action",r.PROP_STRING],["caption",r.PROP_STRING],["class ",Object.assign({value:"btn-secondary"},r.PROP_STRING)],["disabled",Object.assign({value:!1},r.PROP_BOOLEAN)],["display-name",r.PROP_STRING],["hyperlink",r.PROP_STRING],["iconclass",r.PROP_STRING],["key",r.PROP_STRING],["show",Object.assign({value:!0},r.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},r.PROP_NUMBER)],["target",r.PROP_STRING],["title",r.PROP_STRING],["widget-type",Object.assign({value:"button"},r.PROP_STRING)]]))},ie={widgetType:"wm-table-row-action",hostClass:""},oe=function(e){function t(t,n,i){var o=e.call(this,t,ie)||this;return o.table=n,i[0].editRow=function(e){return o.table.editRow(e)},i[0].deleteRow=function(e){return o.table.deleteRow(e)},i[0].addNewRow=function(e){return o.table.addNewRow(e)},o}return g(t,e),t.prototype.getTitle=function(){return _.isUndefined(this.title)?this["display-name"]||"":this.title},t.prototype.populateAction=function(){this.buttonDef={key:this.key,displayName:this["display-name"]||this.caption||"",show:this.show,class:this.class||"",iconclass:this.iconclass||"",title:this.getTitle(),action:this.action,accessroles:this.accessroles,disabled:this.disabled,tabindex:this.tabindex?+this.tabindex:void 0,widgetType:this["widget-type"]||"button",hyperlink:this.hyperlink,target:this.target||"",conditionalclass:this.conditionalclass||"",conditionalstyle:this.conditionalstyle||{}}},t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.populateAction(),this.table.registerRowActions(this.buttonDef)},t}(r.BaseComponent);oe.initializeProps=ne(),oe.decorators=[{type:t.Directive,args:[{selector:"[wmTableRowAction]",providers:[r.provideAsWidgetRef(oe),{provide:r.Context,useValue:{},multi:!0}]}]}],oe.ctorParameters=function(){return[{type:t.Injector},{type:S,decorators:[{type:t.Optional}]},{type:Array,decorators:[{type:t.Self},{type:t.Inject,args:[r.Context]}]}]};var ae=[S,x,G,U,J,Y,te,oe],re=function(){};re.decorators=[{type:t.NgModule,args:[{imports:[s.BasicModule,a.BsDropdownModule,n.CommonModule,i.FormsModule,i.ReactiveFormsModule,l.InputModule,p.ListModule,c.MenuModule,d.PaginationModule,o.TooltipModule,r.WmComponentsModule],declarations:w([],b(ae)),exports:w([],b(ae)),entryComponents:[]}]}],e.TableActionDirective=U,e.TableCUDDirective=x,e.TableColumnDirective=J,e.TableColumnGroupDirective=Y,e.TableComponent=S,e.TableFilterSortDirective=G,e.TableModule=re,e.TableRowActionDirective=oe,e.TableRowDirective=te,e["\u0275a"]=P,e["\u0275b"]=V,e["\u0275c"]=z,e["\u0275d"]=q,e["\u0275e"]=X,e["\u0275f"]=ne,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@wm/components/base"),require("rxjs/operators"),require("@wm/core"),require("@wm/components/data/table")):"function"==typeof define&&define.amd?define("@wm/components/data/live-table",["exports","@angular/core","@angular/common","@wm/components/base","rxjs/operators","@wm/core","@wm/components/data/table"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.data=e.wm.components.data||{},e.wm.components.data.livetable={}),e.ng.core,e.ng.common,e.wm.components.base,e.rxjs.operators,e.wm.core,e.wm.components.data.table)}(this,(function(e,t,n,i,o,a,r){"use strict";
|
|
521
521
|
/*! *****************************************************************************
|
|
522
522
|
Copyright (c) Microsoft Corporation.
|
|
523
523
|
|
|
@@ -727,7 +727,7 @@ var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Arr
|
|
|
727
727
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
728
728
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
729
729
|
PERFORMANCE OF THIS SOFTWARE.
|
|
730
|
-
***************************************************************************** */var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function l(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var c=function(){i.register("wm-login",new Map([["errormessage",i.PROP_STRING],["eventsource",i.PROP_ANY]]))},p={widgetType:"wm-login",hostClass:"app-login"},d=function(e){function t(t){var n=e.call(this,t,p)||this;return i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.CONTAINER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onSuccessCB=function(){this.invokeEventCallback("success")},t.prototype.onErrorCB=function(e){this.loginMessage={type:"error",caption:this.errormessage||e||this.appLocale.LABEL_INVALID_USERNAME_OR_PASSWORD,show:!0},this.messageCmp.showMessage(this.loginMessage.caption,this.loginMessage.type),this.invokeEventCallback("error")},t.prototype.getLoginDetails=function(){return this.formCmp.dataoutput},t.prototype.doLogin=function(){this.eventsource?this.formCmp.ngform.valid&&this.eventsource.invoke({loginInfo:this.getLoginDetails()},this.onSuccessCB.bind(this),this.onErrorCB.bind(this)):console.warn('Default action "loginAction" does not exist. Either create the Action or assign an event to onSubmit of the login widget')},t.prototype.initLoginButtonActions=function(){var e=this;this.loginBtnCmp.getNativeElement().addEventListener("click",(function(t){e.nativeElement.hasAttribute("submit.event")||e.loginBtnCmp.getNativeElement().hasAttribute("click.event")||e.loginBtnCmp.getNativeElement().hasAttribute("tap.event")||e.doLogin()}))},t.prototype.ngAfterViewInit=function(){var t=this;e.prototype.ngAfterViewInit.call(this),this.formCmp.getNativeElement().addEventListener("submit",(function(e){return e.preventDefault()})),this.buttonComponents.forEach((function(e){if("loginButton"===e.getNativeElement().getAttribute("name")||_.includes(e.getNativeElement().classList,"app-login-button")){if(t.loginBtnCmp)return;t.loginBtnCmp=e,t.initLoginButtonActions()}}))},t}(i.StylableComponent);d.initializeProps=c(),d.decorators=[{type:t.Component,args:[{selector:"div[wmLogin]",template:'<p wmMessage class="app-login-message" #message show.bind="loginMessage.show" caption.bind="loginMessage.caption" type.bind="loginMessage.type"></p>\n<ng-content></ng-content>\n',providers:[i.provideAsWidgetRef(d)]}]}],d.ctorParameters=function(){return[{type:t.Injector}]},d.propDecorators={formCmp:[{type:t.ContentChild,args:[o.FormComponent]}],buttonComponents:[{type:t.ContentChildren,args:[a.ButtonComponent,{descendants:!0}]}],messageCmp:[{type:t.ViewChild,args:[i.MessageComponent,{static:!0}]}]};var u=[d],h=function(){};h.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.WmComponentsModule],declarations:l([],s(u)),exports:l([],s(u)),entryComponents:[]}]}],e.LoginComponent=d,e.LoginModule=h,e["\u0275a"]=c,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wavemaker/variables"),require("@wm/core"),require("angular2-websocket/angular2-websocket"),require("@metrichor/jmespath"),require("@angular/core"),require("@angular/router"),require("@wm/oAuth"),require("@wm/security"),require("@angular/common"),require("@angular/common/http"),require("ngx-toastr"),require("@wm/http")):"function"==typeof define&&define.amd?define("@wm/variables",["exports","@wavemaker/variables","@wm/core","angular2-websocket/angular2-websocket","@metrichor/jmespath","@angular/core","@angular/router","@wm/oAuth","@wm/security","@angular/common","@angular/common/http","ngx-toastr","@wm/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.variables={}),e.wm_common_variables,e.wm.core,e.angularWebSocket,e.jmespath,e.ng.core,e.ng.router,e.wm.oAuth,e.wm.security,e.ng.common,e.ng.common.http,e.ngxToastr,e.wm.http)}(this,(function(e,t,n,i,o,a,r,s,l,c,p,d,u){"use strict";var h={hasCordova:void 0!==window.cordova,isStudioMode:!1,isRunMode:!0,XSRF_COOKIE_NAME:"wm_xsrf_token",DEFAULT_TIMER_DELAY:500,WIDGET_DOESNT_EXIST:"The widget you're trying to navigate to doesn't exist on this page"},m={CATEGORY:{MODEL:"wm.Variable",LIVE:"wm.LiveVariable",CRUD:"wm.CrudVariable",SERVICE:"wm.ServiceVariable",WEBSOCKET:"wm.WebSocketVariable",NAVIGATION:"wm.NavigationVariable",NOTIFICATION:"wm.NotificationVariable",TIMER:"wm.TimerVariable",LOGIN:"wm.LoginVariable",LOGOUT:"wm.LogoutVariable",DEVICE:"wm.DeviceVariable"},EVENTS:["onBefore","onBeforeUpdate","onResult","onBeforeOpen","onOpen","onBeforeMessageSend","onMessageReceive","onProgress","onError","onBeforeDatasetReady","onCanUpdate","onClick","onHide","onOk","onCancel","onBeforeClose","onClose","onTimerFire","onSuccess","onOnline","onOffline"],EVENT:{CAN_UPDATE:"onCanUpdate",BEFORE:"onBefore",BEFORE_UPDATE:"onBeforeUpdate",PREPARE_SETDATA:"onBeforeDatasetReady",RESULT:"onResult",ERROR:"onError",ABORT:"onAbort",PROGRESS:"onProgress",CLICK:"onClick",HIDE:"onHide",OK:"onOk",CANCEL:"onCancel",CLOSE:"onClose",TIMER_FIRE:"onTimerFire",SUCCESS:"onSuccess",BEFORE_OPEN:"onBeforeOpen",OPEN:"onOpen",BEFORE_SEND:"onBeforeMessageSend",MESSAGE_RECEIVE:"onMessageReceive",BEFORE_CLOSE:"onBeforeClose"},OWNER:{APP:"App",PAGE:"Page"},REST_SUPPORTED_SERVICES:["JavaService","SoapService","FeedService","RestService","SecurityServiceType","DataService","WebSocketService","OpenAPIService"],PAGINATION_PARAMS:["page","size","sort"],REST_SERVICE:{BASE_PATH_KEY:"x-WM-BASE_PATH",RELATIVE_PATH_KEY:"x-WM-RELATIVE_PATH",OAUTH_PROVIDER_KEY:"x-WM-PROVIDER_ID",AUTH_HDR_KEY:"Authorization",SECURITY_DEFN:{BASIC:"basic",OAUTH2:"oauth2"},AUTH_TYPE:{BASIC:"BASIC",OAUTH:"OAUTH2",NONE:"NONE"},CONTENT_TYPE_KEY:"x-WM-CONTENT_TYPE",ACCESSTOKEN_PLACEHOLDER:{LEFT:"",RIGHT:".access_token"},ERR_TYPE:{NO_ACCESSTOKEN:"missing_accesstoken",NO_CREDENTIALS:"no_credentials",METADATA_MISSING:"metadata_missing",CRUD_OPERATION_MISSING:"crud_operation_missing",USER_UNAUTHORISED:"user_unauthorised",REQUIRED_FIELD_MISSING:"required_field_missing"},ERR_MSG:{NO_ACCESSTOKEN:"Access token missing",NO_CREDENTIALS:"No credentials present",METADATA_MISSING:'Metadata missing for "$variable"',USER_UNAUTHORISED:"Unauthorized User",CRUD_OPERATION_MISSING:'Operation "$operation" not allowed for "$variable"',REQUIRED_FIELD_MISSING:'Required field(s) missing: "${0}"'},UNCLOAKED_HEADERS:["CONTENT-TYPE","ACCEPT","CONTENT-LENGTH","ACCEPT-ENCODING","ACCEPT-LANGUAGE"],PREFIX:{AUTH_HDR_VAL:{BASIC:"Basic",OAUTH:"Bearer"},CLOAK_HEADER_KEY:"X-WM-"}},SERVICE_TYPE:{JAVA:"JavaService",REST:"RestService",SOAP:"SoapService",FEED:"FeedService",DATA:"DataService",SECURITY:"SecurityServiceType",WEBSOCKET:"WebSocketService",OPENAPI:"OpenAPIService"},CONTROLLER_TYPE:{QUERY:"QueryExecution",PROCEDURE:"ProcedureExecution"},HTTP_STATUS_CODE:{CORS_FAILURE:-1,UNAUTHORIZED:401,FORBIDDEN:403},EXPORT_TYPES_MAP:{EXCEL:".xlsx",CSV:".csv"},DEFAULT_VAR:{NOTIFICATION:"appNotification"}},f={NON_BODY_HTTP_METHODS:["GET","HEAD"],CONTENT_TYPES:{FORM_URL_ENCODED:"application/x-www-form-urlencoded",MULTIPART_FORMDATA:"multipart/form-data",OCTET_STREAM:"application/octet-stream"}},g={WM_DATA_JSON:"wm_data_json",WM_HTTP_JSON:"wm_httpRequestDetails"},v=t.$rootScope,y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function w(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function P(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var O={EXCEL:".xlsx",CSV:".csv"};e.appManager=void 0,e.httpService=void 0,e.metadataService=void 0,e.navigationService=void 0,e.routerService=void 0,e.toasterService=void 0,e.oauthService=void 0,e.securityService=void 0,e.dialogService=void 0;var E=/^\[("|')[\w\W]*(\1)\]$/,R=new Map,A=new Map,T=function(e,t){var n,i,o=_.noop;A.has(e)&&(o=A.get(e).cancel),o(),n=_.debounce((function(){(i=e[t]())instanceof Promise&&i.catch(_.noop)}),100),A.set(e,n),n()},S=function(e,t,n,i,o){switch(i.category){case m.CATEGORY.LIVE:"read"===i.operation?("dataBinding"===e?_.forEach(t,(function(e,t){i.filterFields[t]={value:e}})):i.filterFields[e]={value:t,type:n},i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.listRecords)&&!o&&T(i,"listRecords")):("dataBinding"===e?i.inputFields=t:i.inputFields[e]=t,i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i[i.operation+"Record"])&&!o&&T(i,i.operation+"Record"));break;case m.CATEGORY.CRUD:"list"===i.operationType&&i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.invoke)&&!o&&T(i,"invoke");break;case m.CATEGORY.SERVICE:case m.CATEGORY.LOGIN:i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.invoke)&&!o&&T(i,"invoke");break;case m.CATEGORY.DEVICE:i[e]=t,i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.invoke)&&!o&&T(i,"invoke")}},C=function(t,n){switch(t){case"appManager":e.appManager=n;break;case"http":e.httpService=n;break;case"metadata":e.metadataService=n;break;case"navigationService":e.navigationService=n;break;case"router":e.routerService=n;break;case"toaster":e.toasterService=n;break;case"oAuth":e.oauthService=n;break;case"security":e.securityService=n;break;case"dialog":e.dialogService=n}},I=function(e,t,i,o,a){var r,s=t[e],l=t._context;e!==m.EVENT.ERROR||a||s||(r=l.Actions[m.DEFAULT_VAR.NOTIFICATION])&&(i=r.getMessage()||i,i=_.isString(i)?i:"An error has occured. Please check the app logs.",r.invoke({message:i},void 0,void 0));var c=n.$parseEvent(t[e]);return e===m.EVENT.BEFORE_UPDATE?"wm.LiveVariable"===t.category&&"read"===t.operation?c(t._context,{variable:t,dataFilter:i,options:o}):c(t._context,{variable:t,inputData:i,options:o}):c(t._context,{variable:t,data:i,options:o})},D=function(e){setTimeout((function(){n.triggerFn(e)}),500)},x=function(e,t,i,o){var a,r,s,l,c,p="",d=t.get("Content-Disposition");if(d&&-1!==d.indexOf("attachment")&&null!==(a=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(d))&&a[1]&&(p=a[1].replace(/['"]/g,"")),r=t.get("Content-Type"),s=new Blob([e],{type:r}),void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(s,p)?D(i):n.triggerFn(o);else{if(l=window.URL||window.webkitURL,c=l.createObjectURL(s),p){var u,h=document.createElement("a");void 0===h.download?((u=new FileReader).onloadend=function(){var e=u.result.replace(/^data:[^;]*;/,"data:attachment/file;");window.open(e,"_blank")||(window.location.href=e)},u.onload=D.bind(void 0,i),u.onerror=o,u.readAsDataURL(s)):(h.href=c,h.download=p,document.body.appendChild(h),h.click(),D(i))}else window.open(c,"_blank")||(window.location.href=c),D(i);setTimeout((function(){l.revokeObjectURL(c)}),100)}},N=function(e,t){e=_.split(e,"&"),_.forEach(e,(function(e){e=_.split(e,"="),t[e[0]]=decodeURIComponent(_.join(_.slice(e,1),"="))}))},k=function(e,t){"/"===e.url[1]&&"/"===e.url[2]&&(e.url=e.url.slice(0,1)+e.url.slice(2));var i,o,a,r="",s="fileDownloadIFrame",l="fileDownloadForm",c="Content-Type",p=e.url,d=_.get(e.headers,c),u=_.pickBy(e.headers,(function(e,t){return t!==c}));(i=$("#"+s)).length&&i.first().remove(),i=$('<iframe id="'+s+'" name="'+s+'" class="ng-hide"></iframe>'),(o=$('<form id="'+l+'" name="'+l+'"></form>')).attr({target:i.attr("name"),action:p,method:e.method,enctype:d}),r+=-1!==p.indexOf("?")?p.substring(p.indexOf("?")+1):"",r+=d===f.CONTENT_TYPES.FORM_URL_ENCODED?(r?"&":"")+e.dataParams:"",_.includes(f.NON_BODY_HTTP_METHODS,_.toUpper(e.method))&&N(r,u),N(e.data,u),_.forEach(u,(function(e,t){(a=$('<input type="hidden">')).attr({name:t,value:e}),o.append(a)})),$("body").append(i),setTimeout((function(){i.contents().find("body").append(o),o.submit(),n.triggerFn(t)}),100)},M=function(t,i,o){var a=t.url,r=t.method,s=t.dataParams||t.data,l=t.headers;l["Content-Type"]=l["Content-Type"]||"application/x-www-form-urlencoded",e.httpService.send({target:"WebService",action:"invokeRuntimeRestCall",method:r,url:a,headers:l,data:s,responseType:"arraybuffer"}).then((function(e){setTimeout((function(){x(e.body,e.headers,i,o)}),900)}),(function(e){n.triggerFn(o,e)}))},L=function(){return!!h.hasCordova&&localStorage.getItem(h.XSRF_COOKIE_NAME)},F=function(e,t,i){var o,a=e.target,r=i[t];return E.test(a)?o=r:(a=a.substr(0,a.lastIndexOf(".")),o=e.target===t?i:a?n.findValueOf(r,a,!0):r),o},j=function(e){return E.test(e)?e.replace(/^(\[["'])|(["']\])$/g,""):e.split(".").pop()},B=function(e,t,n,i,o,a){var r=j(e),s=F(t,n,i);o=_.isUndefined(o)?t.value:o,s&&(s[r]=o),S(r,o,t.type,i,a)},G=function(e,t,n){var i,o=_.keys(_.get(R.get(n),[n.name,t])),a=j(e);(i=_.filter(o,(function(e){return e!==a&&_.includes(e,a)||(a===t||"dataBinding"===a)&&e!==a}))).length&&_.forEach(i,(function(e){B(e,{target:e},t,n,_.get(R.get(n),[n.name,t,e]))}))},V=function(e,t,i,o){var a=e.target,r=F(e,i,o),s=j(a),l=t.registerDestroyListener?t.registerDestroyListener.bind(t):_.noop;if(n.stringStartsWith(e.value,"bind:")){l(n.$watch(e.value.replace("bind:",""),t,{},(function(t,l){t===l&&_.isUndefined(t)||!(!_.isUndefined(t)||_.isUndefined(l)&&_.isUndefined(r[s]))||(_.includes(["blob","file"],e.type)||(t=n.getClonedObject(t)),B(a,e,i,o,t),R.has(o)||R.set(o,{}),_.set(R.get(o),[o.name,i,a],t),_.isObject(t)&&G(a,i,o))}),void 0,void 0,void 0,(function(){return o.isMuted})))}else _.isUndefined(e.value)||(B(a,e,i,o,e.value,!0),i!==s&&(R.has(o)||R.set(o,{}),_.set(R.get(o),[o.name,i,a],e.value)))},W=function(e,t,n,i){i=i||"dataBinding";var o=e[n=n||"dataBinding"];e[n]={},e["_bind"+n]=o,o&&_.isArray(o)&&o.forEach((function(n){"wm.Variable"===e.category&&"dataBinding"===n.target&&(n.target="dataSet"),V(n,t,i,e)}))},U=function(t,n,i,o,a){if(h.hasCordova){var r=void 0;i&&(r=O[i]),e.appManager.notify("device-file-download",{url:t.url,name:n,extension:r,headers:t.headers,successCb:o,errorCb:a})}else!_.isEmpty(t.headers)||L()?M(t,o,a):k(t,o)},q=function(){return window.File&&window.FileReader&&window.FileList&&window.Blob},z=T,H=function(e){return n.DEFAULT_FORMATS[_.toUpper(e)]},Y=function(t,i){var o;return _.isDate(t)?o=t.getTime():(isNaN(t)||(t=parseInt(t,10)),o=t&&moment(t).valueOf()),isNaN(o)&&i!==n.DataType.TIME||i===n.DataType.TIMESTAMP?o:(i!==n.DataType.TIME||o||(o=moment((new Date).toDateString()+" "+t).valueOf()),t&&e.appManager.getPipe("date").transform(o,H(i)))},K=function(e,t){return _.includes(t,".")&&(t=_.toLower(n.extractType(t))),_.isArray(e)?_.map(e,(function(e){return Y(e,t)})):Y(e,t)};var Q=function(){function t(){}return t.prototype.initBinding=function(e,t,n){W(e,e._context,t,n)},t.prototype.notifyInflight=function(t,n,i){e.appManager.notify("toggle-variable-state",{variable:t,active:n,data:i})},t}(),Z=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.invoke=function(t,i){!function(t,i){var o;t.dataSet=i&&i.data||t.dataSet;var a=t.dataBinding.pageName||t.pageName,r=t.operation,s=_.clone(t.dataSet),l=_.isNil(null==i?void 0:i.cacheable)?t.cacheable:i.cacheable;switch(i=i||{},_.isNil(l)||n.isString(l)&&""===l.trim()||(s._cache_page=l),r){case"goToPreviousPage":e.navigationService.goToPrevious();break;case"gotoPage":e.navigationService.goToPage(a,{transition:t.pageTransitions,$event:i.$event,urlParams:s,cacheable:t.cacheable});break;case"gotoView":o=t.dataBinding&&t.dataBinding.viewName||t.viewName;break;case"gotoTab":o=t.dataBinding&&t.dataBinding.tabName||t.tabName;break;case"gotoAccordion":o=t.dataBinding&&t.dataBinding.accordionName||t.accordionName;break;case"gotoSegment":o=t.dataBinding&&t.dataBinding.segmentName||t.segmentName}o&&e.navigationService.goToView(o,{pageName:a,transition:t.pageTransitions,$event:i.$event,urlParams:s},t)}(t,i)},i}(Q),J=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.onToasterClick=function(e){I("onClick",e,"")},i.prototype.onToasterHide=function(e){I("onHide",e,"")},i.prototype.notifyViaToaster=function(t,n){var i,o=(n.class||t.dataBinding.class||"info").toLowerCase(),a=n.message||t.dataBinding.text,r=n.title,s="toast-"+(n.position||t.dataBinding.toasterPosition||"bottom right").replace(" ","-"),l=t.dataBinding.page,c=parseInt(n.duration||t.dataBinding.duration,null);c||(c=0!==c&&"success"===o?3e3:0),i=t.dataBinding.content&&"page"===t.dataBinding.content&&l?e.toasterService.showCustom(l,{positionClass:s,timeOut:c,partialParams:t._binddataSet,context:t._context}):e.toasterService.show(o,r,a||null,{positionClass:s,timeOut:c,enableHtml:!0}),t.onClick&&i.onTap.subscribe(this.onToasterClick.bind(this,t)),t.onHide&&i.onHidden.subscribe(this.onToasterHide.bind(this,t))},i.prototype.getDialogConfig=function(t,n,i,o){return{title:n.title||t.dataBinding.title,text:n.message||t.dataBinding.text,okButtonText:n.okButtonText||t.dataBinding.okButtonText||"OK",cancelButtonText:n.cancelButtonText||t.dataBinding.cancelButtonText||"CANCEL",alerttype:n.alerttype||t.dataBinding.alerttype||"information",onOk:function(){e.dialogService.close(i,void 0,o)},onCancel:function(){I("onCancel",t,n.data),e.dialogService.close(i,void 0)},onClose:function(){I("onClose",t,n.data)}}},i.prototype.notifyViaDialog=function(t,i){var o="PREFAB"===n.getWmProjectProperties().type,a=(o?"Prefab":"Common")+_.capitalize(t.operation)+"Dialog",r=this.getDialogConfig(t,i,a,(function(){return I("onOk",t,i.data)}));r=o?r:{notification:r},e.dialogService.open(a,void 0,r)},i.prototype.notify=function(e,t,n,i){t=t||{},"toast"===e.operation?this.notifyViaToaster(e,t):this.notifyViaDialog(e,t)},i.prototype.getMessage=function(e){return e.dataBinding.text},i.prototype.setMessage=function(e,t){return _.isString(t)&&(e.dataBinding.text=t),e.dataBinding.text},i.prototype.getOkButtonText=function(e){return e.dataBinding.okButtonText},i.prototype.setOkButtonText=function(e,t){return _.isString(t)&&(e.dataBinding.okButtonText=t),e.dataBinding.okButtonText},i.prototype.getToasterDuration=function(e){return e.dataBinding.duration},i.prototype.setToasterDuration=function(e,t){return e.dataBinding.duration=t,e.dataBinding.duration},i.prototype.getToasterClass=function(e){return e.dataBinding.class},i.prototype.setToasterClass=function(e,t){return _.isString(t)&&(e.dataBinding.class=t),e.dataBinding.class},i.prototype.getToasterPosition=function(e){return e.dataBinding.class},i.prototype.setToasterPosition=function(e,t){return _.isString(t)&&(e.dataBinding.position=t),e.dataBinding.position},i.prototype.getAlertType=function(e){return e.dataBinding.alerttype},i.prototype.setAlertType=function(e,t){return _.isString(t)&&(e.dataBinding.alerttype=t),e.dataBinding.alerttype},i.prototype.getCancelButtonText=function(e){return e.dataBinding.cancelButtonText},i.prototype.setCancelButtonText=function(e,t){return _.isString(t)&&(e.dataBinding.cancelButtonText=t),e.dataBinding.cancelButtonText},i}(Q),X=function(){function t(){}return t.prototype.initBinding=function(e,t,n){W(e,e._context,t,n)},t.prototype.notifyInflight=function(t,n,i,o){e.appManager.notify("toggle-variable-state",{variable:t,active:n,data:i,options:o})},t.prototype.setRequestTrackId=function(e,t){var n,i=null===(n=null==e?void 0:e.headers)||void 0===n?void 0:n.get("x-wm-request-track-id");i&&(t._requestTrackId=i)},t.prototype.httpCall=function(t,n,i){var o=this;return new Promise((function(a,r){n._observable=e.httpService.sendCallAsObservable(t,i).subscribe((function(e){e&&e.type&&(o.setRequestTrackId(e,n),a(e))}),(function(t){o.setRequestTrackId(t,n),e.httpService.isPlatformSessionTimeout(t)?(o.notifyInflight(n,!1,t),t._401Subscriber.asObservable().subscribe((function(e){return a(e)}),(function(e){return r(e)}))):r(t)}))}))},t.prototype.prepareCallbackOptions=function(e,t){var n={};return n.xhrObj=e,t&&_.extend(n,t),n},t}(),ee=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.validate=function(e){var t,n,i;for(n in["rememberme","remembermecheck"].forEach((function(t){_.isBoolean(e[t])&&(i=t)})),e[i=i||"j_rememberme"]=!!_.isBoolean(e[i])&&e[i],e)if(e.hasOwnProperty(n)&&(""===e[n]||void 0===e[n])){t="Please provide required credentials";break}return t},i.prototype.migrateOldParams=function(e){var t={},n={usernametext:"j_username",username:"j_username",passwordtext:"j_password",password:"j_password",remembermecheck:"j_rememberme",rememberme:"j_rememberme"};return _.each(e,(function(e,i){n[i]?t[n[i]]=e:t[i]=e})),t},i.prototype.redirectToAppBasePath=function(){e.routerService.navigate(["/"]).then((function(e){e&&window.location.reload()}))},i.prototype.login=function(t,i,o,a){var r,s=this,l=(i=i||{}).loginInfo||i.input||t.dataBinding,c=this.validate(l);if(c)return n.triggerFn(a,c),void I("onError",t,c);var p=n.getClonedObject(l),d=I(m.EVENT.BEFORE_UPDATE,t,p);if(_.isObject(d))p=d;else if(!1===d)return void n.triggerFn(a);p=this.migrateOldParams(p);var u=_.get(e.securityService.get(),"userInfo.userName");this.notifyInflight(t,!0),t.promise=e.securityService.appLogin(p,(function(i){e.dialogService.close("CommonLoginDialog"),e.appManager.reloadAppData().then((function(a){I(m.EVENT.RESULT,t,_.get(a,"userInfo")),(r=I(m.EVENT.PREPARE_SETDATA,t,_.get(a,"userInfo")))&&_.set(a,"userInfo",r),s.notifyInflight(t,!1,i),n.triggerFn(o),setTimeout((function(){if(I(m.EVENT.SUCCESS,t,_.get(a,"userInfo")),t.useDefaultSuccessHandler){var n=u===p.j_username;u&&!n||e.appManager.executeSessionFailureRequests();var i=e.securityService.getCurrentRouteQueryParam("redirectTo"),o=e.appManager.noRedirect(),r=e.securityService.getRedirectedRouteQueryParams();if(r.redirectTo&&delete r.redirectTo,e.appManager.noRedirect(!1),u)if(_.isEmpty(i)){var l=e.securityService.get(),c=_.get(l,"loginConfig.sessionTimeout.type")||"PAGE";n&&"DIALOG"===c||s.redirectToAppBasePath()}else u===p.j_username?e.routerService.navigate(["/"+i],{queryParams:r}):s.redirectToAppBasePath();else _.isEmpty(i)?o||e.routerService.navigate(["/"]):e.routerService.navigate(["/"+i],{queryParams:r})}I(m.EVENT.CAN_UPDATE,t,_.get(a,"userInfo"))}))}))}),(function(e){I(m.EVENT.RESULT,t,e),s.notifyInflight(t,!1,e);var i=e.error||"Invalid credentials.",o=e.details;h.isRunMode&&I("onError",t,i,o,!0),n.triggerFn(a,i,o),I(m.EVENT.CAN_UPDATE,t,e)}))},i}(Q),te=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.logout=function(t,i,o,a){var r,s,l,c=this;r=function(e,i,o){h.isStudioMode||I("onError",t,e,o),n.triggerFn(a,e,o)},!1!==I(m.EVENT.BEFORE_UPDATE,t,null)?e.securityService.isAuthenticated((function(i){i?(c.notifyInflight(t,!0),t.promise=e.securityService.appLogout((function(i){var a=i.body;a=n.getValidJSON(a),e.appManager.reloadAppData().then((function(){c.notifyInflight(t,!1,a),I(m.EVENT.RESULT,t,a),(l=I(m.EVENT.PREPARE_SETDATA,t,a))&&(a=l),setTimeout((function(){I(m.EVENT.SUCCESS,t,a),I(m.EVENT.CAN_UPDATE,t,a)}))})),a&&a.result?window.location.href=a.result:t.useDefaultSuccessHandler&&((s=t.redirectTo)&&"login.html"!==s&&"index.html"!==s||(s=""),e.routerService.navigate(["/"+s]),window.cordova||setTimeout((function(){window.location.reload()}))),n.triggerFn(o)}),r)):r("No authenticated user to logout.")}),(function(e){c.notifyInflight(t,!1,e),r(e)})):n.triggerFn(a)},i}(Q),ne=function(e){function t(){var t=e.apply(this,P([],w(arguments)))||this;return t.serviceRegistry=new Map,t}return b(t,e),t.prototype.invoke=function(e,t){var n=this,i=this.serviceRegistry.get(e.service);return null==i?(I("onError",e,null),Promise.reject("Could not find service '"+i+"'")):(this.notifyInflight(e,!0),i.invoke(e,t).then((function(t){return n.notifyInflight(e,!1,t),t}),(function(t){return n.notifyInflight(e,!1,t),Promise.reject(t)})))},t.prototype.registerService=function(e){this.serviceRegistry.set(e.name,e)},t}(X),ie=function(){function e(){}return e.setPaginationQueryParams=function(e,t,n){t.parameters.forEach((function(t){var i;i="offset"===n.type||n.input.offset?"offset":"page",t.name===n.input[i].split(".")[0]?t.sampleValue=e.pagination.page:t.name===n.input.size.split(".")[0]&&(t.sampleValue=e.pagination.size)}))},e.setVariablePagination=function(e,t,n){e.pagination||(e.pagination={empty:!1}),e.pagination.size=t.size,e.pagination.page=t.page||0,e.pagination.totalElements=t.totalElements,e.pagination.numberOfElements=e.pagination.size,e.pagination.number=n.page?n.page-1:0,e.pagination.totalPages=e.pagination.totalElements/e.pagination.size,e.pagination.totalElements%e.pagination.size==0?e.pagination.totalPages=parseInt(e.pagination.totalPages):e.pagination.totalPages=parseInt(e.pagination.totalPages)+1,t.next?(e.pagination.next=t.next,e.pagination.prev=t.prev,e.pagination.last=!t.next,e.pagination.first=!t.prev):(e.pagination.first=e.pagination.page<=1,e.pagination.last=""===t.hasMoreItems?!(e.pagination.page<e.pagination.totalPages):!t.hasMoreItems)},e.setPaginationItems=function(e,t,n,i,a){var r;if(_.startsWith(e,"$body")){var s=e.replace("$body.","");try{n[i]=o.jmespath.search(t,s)}catch(t){console.warn(e+" expression needs to be corrected as per JMES guidelines")}}else if(_.startsWith(e,"$header")){var l=e.replace("$header.",""),c=Object.fromEntries(a.headers),p=l.split(".");try{n[i]=o.jmespath.search(c,p[0].toLowerCase())}catch(t){console.warn(e+" expression needs to be corrected as per JMES guidelines")}if(null===(r=n[i])||void 0===r?void 0:r.length){var d=n[i].join();if(1===p.length)n[i]=d;else{var u=p.slice(1).join("."),h=JSON.parse(d);/[!@#$%^&*()+\=\[\]{};':"\\|,<>\/?]+/.test(u)&&(u="headerResp."+u);try{n[i]=o.jmespath.search(h,u)}catch(t){console.warn(e+" expression needs to be corrected as per JMES guidelines")}}}}},e.getPaginationInfo=function(e,t){return(null==e?void 0:e.paginationInfo)?e.paginationInfo:t._paginationConfig},e.checkPaginationAtQuery=function(e,t,n){var i,o=this.getPaginationInfo(e,t);if(n&&n.page&&(null==o?void 0:o.input.size)&&t.pagination){var a;a="offset"===o.type||o.input.offset?"offset":"page";var r=o.input[a].split(".")[0],s=_.find(e.parameters,(function(e){return e.name===r}));!_.isEmpty(t.dataBinding)&&s&&"query"===s.parameterType&&((null===(i=o.output)||void 0===i?void 0:i.page)||"offset"===o.type?t.pagination.page=this.getOffsetInfo(t,n):t.pagination.page=n.page,this.setPaginationQueryParams(t,e,o))}},e.getOffsetInfo=function(e,t){return e.pagination.size*(t.page?t.page-1:1)},e.setPaginationAtReq=function(e,t,n,i,o,a,r){var s,l={},c={};s="offset"===e.type||e.input.offset?"offset":"page";var p=e.input[s].split(".")[0],d=_.find(t.parameters,(function(e){return e.name===p}));if("header"===(null==d?void 0:d.parameterType))_.set(l,e.input[s],n.pagination.page),_.set(l,e.input.size,n.pagination.size),i[p]=JSON.stringify(l[p]),c.headers=i;else if("body"===(null==d?void 0:d.parameterType)){var u=JSON.parse(d.sampleValue),h=e.input[s].split(".")[1];if(u&&u[h]){var m=e.input[s].split(".").splice(1).join(".");"offset"!==s?_.set(l,m,n.pagination.page):_.set(l,m,this.getOffsetInfo(n,r)),_.set(l,e.input.size.split(".").splice(1).join("."),n.pagination.size),u[h]=l[h],o=JSON.stringify(u),c.requestBody=o}}else if(n.pagination.next&&d)if("path"===d.parameterType){var f=t.relativePath.split("/"),g="{"+d.name+"}",v=f.indexOf(g),y=void 0;y=n.pagination.isNext?n.pagination.next.split("/"):n.pagination.prev.split("/");var b=void 0,w=void 0;t.directPath?((b=(w=new URL(a)).pathname.split("/"))[v]=y[v],w.pathname=b.join("/"),a=w.href,c.url=a):((b=a.split("/"))[v+1]=y[v],a=b.join("/"),c.url=a)}else if("query"===d.parameterType){f=a.split("?"),y=void 0;y=n.pagination.isNext?n.pagination.next.split("?"):n.pagination.prev.split("?"),f[1]=y[1],a=f.join("?"),c.url=a}return c},e.setParameterVal=function(e,t,n,i){var o=this.getPaginationInfo(n,i).input[e].split(".")[0],a=_.find(n.parameters,(function(e){return e.name===o}));t[e]=_.result(a,"sampleValue")},e.generatePaginationRes=function(e,t,n,i,o,a){var r={},s=t.output;if(null==s?void 0:s.next)s&&(this.setPaginationItems(s.next,n,r,"next",i),this.setPaginationItems(s.prev,n,r,"prev",i));else{if((null==s?void 0:s.size)?this.setPaginationItems(s.size,n,r,"size",i):this.setParameterVal("size",r,e,a),(null==s?void 0:s.page)?this.setPaginationItems(s.page,n,r,"page",i):"offset"!==t.type&&this.setParameterVal("page",r,e,a),_.startsWith(null==s?void 0:s.totalElements,"$minValue")){var l=s.totalElements.replace("$minValue=",""),c=r.page?r.page:o.page,p=r.size*c;!a.pagination||a.pagination.totalElements>p?r.totalElements=parseInt(l):r.totalElements=p+1}else(null==s?void 0:s.totalElements)?this.setPaginationItems(s.totalElements,n,r,"totalElements",i):"offset"===t.type||t.input.offset?r.totalElements=r.size*(o.page?o.page:1)+1:r.totalElements=r.size*r.page+1;(null==s?void 0:s.hasMoreItems)?this.setPaginationItems(s.hasMoreItems,n,r,"hasMoreItems",i):r.hasMoreItems=""}return r},e}(),oe=function(e){return _.includes(["QueryExecution","ProcedureExecution"],e.controller)&&_.includes(["put","post"],e.operationType)},ae=function(e,t){return e===m.CONTROLLER_TYPE.QUERY&&t===m.SERVICE_TYPE.DATA},re=function(e,t,i){var o=_.toLower(n.extractType(_.get(t,"items.type")||t.type)),a=h.isStudioMode?t["x-WM-CONTENT_TYPE"]:t.contentType;if(q())return"file"===o||"string"!==a&&a?_.isArray(i)&&"file"===o?_.forEach(i,(function(i){e.append(t.name,i&&i.content||n.getBlob(i),i.name)})):e.append(t.name,n.getBlob(i,a),i&&i.name):(_.isObject(i)&&(i=JSON.stringify(i)),e.append(t.name,i)),e},se=function(e,t){var i,o={},a=[];return _.forEach(t,(function(t){i=_.get(e,t.name),_.isUndefined(i)||""===i||null===i||t.readOnly?t.required&&a.push(t.name||t.id):(i=n.isDateTimeType(t.type)?K(i,t.type):i,_.isArray(i)&&"string"===_.toLower(n.extractType(t.type))&&(i=_.join(i,",")),o[t.name]=i)})),{requestBody:o,missingParams:a}},le=function(e){var t={},n=m.REST_SERVICE.UNCLOAKED_HEADERS,i=m.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;return _.forEach(e,(function(e,o){_.includes(n,o.toUpperCase())?t[o]=e:t[i+o]=e})),t},ce=function(){function t(){}return t.constructRequestParams=function(t,i,o,a){if(t=t||{},null===i)return{error:{type:m.REST_SERVICE.ERR_TYPE.USER_UNAUTHORISED,message:m.REST_SERVICE.ERR_MSG.USER_UNAUTHORISED,field:"_wmServiceOperationInfo"}};if(_.isEmpty(i))return{error:{type:m.REST_SERVICE.ERR_TYPE.METADATA_MISSING,message:m.REST_SERVICE.ERR_MSG.METADATA_MISSING,field:"_wmServiceOperationInfo"}};if(i&&i.invalid)return{error:{type:m.REST_SERVICE.ERR_TYPE.CRUD_OPERATION_MISSING,message:m.REST_SERVICE.ERR_MSG.CRUD_OPERATION_MISSING,field:"_wmServiceOperationInfo"}};var r,s,l,c,p,d,u,y,b,w,P,O,E,R,A,T,S,C=i.directPath||"",I=i.basePath?i.basePath+i.relativePath:i.relativePath,D=oe(t),x="",N={},k=[],M=null;function L(){return b||(b=new FormData)}if(E=_.get(i.securityDefinitions,"0"))switch(E.type){case m.REST_SERVICE.SECURITY_DEFN.OAUTH2:if(T=E[m.REST_SERVICE.OAUTH_PROVIDER_KEY],S=null,!(R=e.oauthService.getAccessToken(T,S)))return{error:{type:m.REST_SERVICE.ERR_TYPE.NO_ACCESSTOKEN,message:m.REST_SERVICE.ERR_MSG.NO_ACCESSTOKEN},securityDefnObj:E};N[m.REST_SERVICE.AUTH_HDR_KEY]=m.REST_SERVICE.PREFIX.AUTH_HDR_VAL.OAUTH+" "+R;break;case m.REST_SERVICE.SECURITY_DEFN.BASIC:if(d=o.wm_auth_username,u=o.wm_auth_password,!d||!u)return{error:{type:m.REST_SERVICE.ERR_TYPE.NO_CREDENTIALS,message:m.REST_SERVICE.ERR_MSG.NO_CREDENTIALS},securityDefnObj:E};N[m.REST_SERVICE.AUTH_HDR_KEY]=m.REST_SERVICE.PREFIX.AUTH_HDR_VAL.BASIC+" "+btoa(d+":"+u),M={type:m.REST_SERVICE.AUTH_TYPE.BASIC}}if(ie.checkPaginationAtQuery(i,t,a),i.proxySettings=i.proxySettings||{web:!0,mobile:!1},y=i.httpMethod||i.methodType,w=h.hasCordova?i.proxySettings.mobile:i.proxySettings.web,A=i.proxySettings.withCredentials,l=w?I:C,_.forEach(i.parameters,(function(e){function a(){o?(P=o[e.name]&&_.isObject(o[e.name])?o[e.name]:o,O=_.get(i,["definitions",e.type])):(P=c||{},O=e.children)}var c=e.sampleValue;if(n.isDefined(c)&&null!==c&&""!==c||D&&"file"!==e.type)switch(t.serviceType===m.SERVICE_TYPE.DATA&&n.isDateTimeType(e.type)&&(c=K(c,e.type)),_.isArray(c)&&"string"===_.toLower(n.extractType(e.type))&&t.serviceType===m.SERVICE_TYPE.DATA&&(c=_.join(c,",")),e.parameterType.toUpperCase()){case"QUERY":if(_.isNull(c)&&ae(t.controller,t.serviceType))break;x?x+="&"+e.name+"="+encodeURIComponent(c):x="?"+e.name+"="+encodeURIComponent(c);break;case"PATH":p=new RegExp("\\s*\\{\\s*"+e.name+"(:\\.\\+)?\\s*\\}\\s*"),l=l.replace(p,c);break;case"HEADER":N[e.name]=c;break;case"BODY":D?(a(),r=se(P,O),s=r.requestBody,k=_.concat(k,r.missingParams)):s=c;break;case"FORMDATA":D&&e.name===g.WM_DATA_JSON?(a(),r=se(P,O),s=re(L(),e,r.requestBody),k=_.concat(k,r.missingParams)):s=re(L(),e,c)}else e.required&&k.push(e.name||e.id)})),k.length)return{error:{type:m.REST_SERVICE.ERR_TYPE.REQUIRED_FIELD_MISSING,field:k.join(","),message:n.replace(m.REST_SERVICE.ERR_MSG.REQUIRED_FIELD_MISSING,[k.join(",")]),skipDefaultNotification:!0}};_.includes(f.NON_BODY_HTTP_METHODS,_.toUpper(y))||i.consumes&&i.consumes[0]===f.CONTENT_TYPES.MULTIPART_FORMDATA||(N["Content-Type"]=i.consumes&&i.consumes[0]||"application/json"),_.includes(i.consumes,f.CONTENT_TYPES.FORM_URL_ENCODED)&&!_.includes(f.NON_BODY_HTTP_METHODS,(y||"").toUpperCase())?(x&&(s=(s?s+"&":"")+x.substring(1)),N["Content-Type"]=f.CONTENT_TYPES.FORM_URL_ENCODED):l+=x,w&&(N=t.serviceType!==m.SERVICE_TYPE.REST&&t.serviceType!==m.SERVICE_TYPE.OPENAPI||i.skipCloakHeaders?N:le(N),t.getPrefabName()&&-1!==m.REST_SUPPORTED_SERVICES.indexOf(t.serviceType)?(l="prefabs/"+t.getPrefabName()+l,c="invokePrefabRestService"):t.getPrefabName()||(l="services"+l),l=v.project.deployedUrl+l);var F=ie.getPaginationInfo(i,t);if(F&&t.pagination){var j=ie.setPaginationAtReq(F,i,t,N,s,l,a);j&&(j.headers?N=j.headers:j.requestBody?s=j.requestBody:j.url&&(l=j.url))}return{projectID:v.project.id,url:l,target:c,method:y,headers:N,data:s,authDetails:M,isDirectCall:!w,isExtURL:t.serviceType===m.SERVICE_TYPE.REST,withCredentials:A}},t.isFileUploadRequest=function(e){return"FileService"===e.service&&"uploadFile"===e.operation},t.excludePaginationParams=function(e){return _.map(_.reject(e,(function(e){return _.includes(m.PAGINATION_PARAMS,e.name)})),(function(e){return e.name}))},t}(),pe=function(t){function o(){var e=t.apply(this,P([],w(arguments)))||this;return e.scope_var_socket_map=new Map,e.PROPERTY={SERVICE:"service",DATA_UPDATE_STRATEGY:"dataUpdateStrategy",DATA_LIMIT:"dataLimit"},e.DATA_UPDATE_STRATEGY={REFRESH:"refresh",PREPEND:"prepend",APPEND:"append"},e}return b(o,t),o.prototype.shouldAppendData=function(e){return(e=e||this)[this.PROPERTY.DATA_UPDATE_STRATEGY]!==this.DATA_UPDATE_STRATEGY.REFRESH},o.prototype.shouldAppendLast=function(e){return e[this.PROPERTY.DATA_UPDATE_STRATEGY]===this.DATA_UPDATE_STRATEGY.APPEND},o.prototype.getDataLimit=function(e){return e.dataLimit},o.prototype.getURL=function(t){var n,i=t.getPrefabName(),o=i?_.get(e.metadataService.getByOperationId(t.operationId,i),"wmServiceOperationInfo"):_.get(e.metadataService.getByOperationId(t.operationId),"wmServiceOperationInfo"),a=t.dataBinding;if(_.forEach(o.parameters,(function(e){e.sampleValue=a[e.name]})),$.extend(o,{skipCloakHeaders:!0}),!(n=ce.constructRequestParams(t,o,a)).error||!n.error.message)return n.url;this._onSocketError(t,{data:n.error.message})},o.prototype._onSocketMessage=function(e,t){var i,o,a,r,s,l=_.get(t,"data");l=n.getValidJSON(l)||n.xmlToJson(l)||l,i=I(m.EVENT.MESSAGE_RECEIVE,e,l,t),l=n.isDefined(i)?i:l,this.shouldAppendData(e)?(e.dataSet=e.dataSet||[],o=e.dataSet.length,a=this.getDataLimit(e),r=this.shouldAppendLast(e),a&&o>=a&&(r?e.dataSet.shift():e.dataSet.pop()),s=r?o:0,e.dataSet.splice(s,0,l)):e.dataSet=n.isDefined(i)?i:l},o.prototype._onBeforeSend=function(e,t){return I(m.EVENT.BEFORE_SEND,e,t)},o.prototype._onBeforeSocketClose=function(e,t){return I(m.EVENT.BEFORE_CLOSE,e,_.get(t,"data"),t)},o.prototype._onBeforeSocketOpen=function(e,t){return I(m.EVENT.BEFORE_OPEN,e,_.get(t,"data"),t)},o.prototype._onSocketOpen=function(e,t){e._socketConnected=!0,I(m.EVENT.OPEN,e,_.get(t,"data"),t)},o.prototype.freeSocket=function(e){this.scope_var_socket_map.set(e,void 0)},o.prototype._onSocketClose=function(e,t){e._socketConnected=!1,this.freeSocket(e),I(m.EVENT.CLOSE,e,_.get(t,"data"),t)},o.prototype._onSocketError=function(e,t){e._socketConnected=!1,this.freeSocket(e),I(m.EVENT.ERROR,e,_.get(t,"data")||"Error while connecting with "+e.service,t)},o.prototype.getSocket=function(e){var t=this.getURL(e),o=this.scope_var_socket_map.get(e);return o||(h.hasCordova||!n.isInsecureContentRequest(t)?((o=new i.$WebSocket(t)).onOpen(this._onSocketOpen.bind(this,e)),o.onError(this._onSocketError.bind(this,e)),o.onMessage(this._onSocketMessage.bind(this,e)),o.onClose(this._onSocketClose.bind(this,e)),this.scope_var_socket_map.set(e,o),e._socket=o,o):void n.triggerFn(this._onSocketError.bind(this,e)))},o.prototype.open=function(e,t,i){var o;if(!1!==this._onBeforeSocketOpen(e))return o=this.getSocket(e),n.triggerFn(t),o;n.triggerFn(i)},o.prototype.close=function(e){var t=this._onBeforeSocketClose(e),n=this.getSocket(e);!1!==t&&n.close()},o.prototype.send=function(e,t){var i,o=this.getSocket(e);t=t||_.get(e,"dataBinding.RequestBody"),!1!==(i=this._onBeforeSend(e,t))&&(t=n.isDefined(i)?i:t,t=n.isObject(t)?JSON.stringify(t):t,o.send(t,0))},o}(X),de=new Map,ue={Variable:X,Action:Q,"wm.NavigationVariable":Z,"wm.NotificationVariable":J,"wm.LoginVariable":ee,"wm.LogoutVariable":te,"wm.DeviceVariable":ne,"wm.WebSocketVariable":pe},he=function(){function e(){}return e.get=function(e){return de.has(e)?de.get(e):de.set(e,new ue[e]).get(e)},e}(),me=function(){function e(){}return e.prototype.invoke=function(e,t){var i=this.operations.find((function(t){return t.name===e.operation}));if(null==i)return I(m.EVENT.ERROR,e,null),Promise.reject("Could not find operation '"+e.operation+"' in service '"+this.name+"'");if(n.hasCordova()){var o=new Map;return void 0!==e.dataBinding&&(Object.entries(e).forEach((function(e){o.set(e[0],e[1])})),Object.entries(e.dataBinding).forEach((function(e){o.set(e[0],e[1])}))),i.invoke(e,t,o).then((function(t){return e.dataSet=t,n.$invokeWatchers(!0),I(m.EVENT.SUCCESS,e,t),t}),(function(t){return e.dataSet={},n.$invokeWatchers(!0),I(m.EVENT.ERROR,e,null),t}))}return Promise.resolve().then((function(){return I(m.EVENT.SUCCESS,e,i.model),i.model}))},e}(),fe=function(){return he.get(m.CATEGORY.DEVICE)},ge=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.init=function(){fe().initBinding(this)},t.prototype.invoke=function(e,t,n){fe().invoke(this,e).then(t,n)},t}(t.ApiAwareVariable),ve=function(){return he.get(m.CATEGORY.NAVIGATION)},ye=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.invoke=function(e){ve().invoke(this,e)},t.prototype.navigate=function(e){this.invoke(e)},t.prototype.init=function(){ve().initBinding(this,"dataBinding","dataBinding"),ve().initBinding(this,"dataSet","dataSet")},t}(t.BaseAction),be=function(){return he.get(m.CATEGORY.NOTIFICATION)},we=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.execute=function(t,i){var o=this,a=e.prototype.execute.call(this,t,i);return n.isDefined(a)?a:new Promise((function(e,a){switch(t){case n.DataSource.Operation.INVOKE:o.invoke(i,e,a);break;case n.DataSource.Operation.NOTIFY:o.notify(i,e,a);break;default:a(t+" operation is not supported on this data source")}}))},t.prototype.notify=function(e,t,n){be().notify(this,e,t,n)},t.prototype.invoke=function(e,t,n){this.notify(e,t,n)},t.prototype.getMessage=function(){return be().getMessage(this)},t.prototype.setMessage=function(e){return be().setMessage(this,e)},t.prototype.clearMessage=function(){return be().setMessage(this,"")},t.prototype.getOkButtonText=function(){return be().getOkButtonText(this)},t.prototype.setOkButtonText=function(e){return be().setOkButtonText(this,e)},t.prototype.getToasterDuration=function(){return be().getToasterDuration(this)},t.prototype.setToasterDuration=function(e){return be().setToasterDuration(this,e)},t.prototype.getToasterClass=function(){return be().getToasterClass(this)},t.prototype.setToasterClass=function(e){return be().setToasterClass(this,e)},t.prototype.getToasterPosition=function(){return be().getToasterPosition(this)},t.prototype.setToasterPosition=function(e){return be().setToasterPosition(this,e)},t.prototype.getAlertType=function(){return be().getAlertType(this)},t.prototype.setAlertType=function(e){return be().setAlertType(this,e)},t.prototype.getCancelButtonText=function(){return be().getCancelButtonText(this)},t.prototype.setCancelButtonText=function(e){return be().setCancelButtonText(this,e)},t.prototype.init=function(){be().initBinding(this,"dataBinding","dataBinding"),be().initBinding(this,"dataSet","dataSet")},t}(t.BaseAction),Pe=function(){return he.get(m.CATEGORY.LOGIN)},_e=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.login=function(e,t,n){return Pe().login(this,e,t,n)},t.prototype.invoke=function(e,t,n){return this.login(e,t,n)},t.prototype.cancel=function(){},t.prototype.init=function(){Pe().initBinding(this,"dataBinding","dataBinding")},t}(t.BaseAction),Oe=function(){return he.get(m.CATEGORY.LOGOUT)},Ee=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.logout=function(e,t,n){Oe().logout(this,e,t,n)},t.prototype.invoke=function(e,t,n){this.logout(e,t,n)},t.prototype.cancel=function(){},t}(t.BaseAction),Re=function(){return he.get(m.CATEGORY.WEBSOCKET)},Ae=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.open=function(e,t){return Re().open(this,e,t)},t.prototype.close=function(){return Re().close(this)},t.prototype.update=function(){return Re().update(this)},t.prototype.send=function(e){return Re().send(this,e)},t.prototype.cancel=function(){return this.close()},t.prototype.invoke=function(e,t,n){this.open(t,n)},t.prototype.init=function(){Re().initBinding(this)},t}(t.ApiAwareVariable),Te=function(){function e(){}return e.create=function(e,n){var i;switch(e.category){case t.VARIABLE_CONSTANTS.CATEGORY.MODEL:i=new t.ModelVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.SERVICE:i=new t.ServiceVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LIVE:i=new t.LiveVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.CRUD:i=new t.CrudVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.DEVICE:i=new ge(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.NAVIGATION:i=new ye(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION:i=new we(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LOGIN:i=new _e(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LOGOUT:i=new Ee(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.TIMER:i=new t.TimerAction(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET:i=new Ae(e)}return i._context=n,i.__cloneable__=!1,i},e}(),Se=function(){function e(e){this.$http=e,this.CONTEXT_APP="app"}return e.prototype.isLoaded=function(){return!!this.metadataMap&&this.metadataMap.has(this.CONTEXT_APP)},e.prototype.load=function(e){var t,i=this;return t=n.hasCordova()?"metadata/"+(e?"prefabs/"+e+"/":"app/")+"service-definitions.json":"./services/"+(e?"prefabs/"+e+"/":"")+"servicedefs",new Promise((function(n,o){i.$http.send({url:t,method:"GET"}).then((function(t){i.metadataMap=i.metadataMap||new Map,i.providerMap=i.providerMap||new Map,t.body=t.body||{},i.metadataMap.set(e||i.CONTEXT_APP,t.body.serviceDefs),t.body.securityDefinitions&&i.providerMap.set(e||i.CONTEXT_APP,t.body.securityDefinitions.oauthProvider),n(t.body.serviceDefs)}),o)}))},e.prototype.getByOperationId=function(e,t){t=t||this.CONTEXT_APP;var n=this.metadataMap.get(t);return n&&n[e]},e.prototype.getByProviderId=function(e,t){t=t||this.CONTEXT_APP;var n=this.providerMap.get(t);return n&&n[e]},e.prototype.getByCrudId=function(e,t){t=t||this.CONTEXT_APP;var n=this.metadataMap.get(t),i=[];for(var o in n)n[o]&&n[o].crudOperationId===e&&i.push(n[o]);return i},e}();Se.decorators=[{type:a.Injectable}],Se.ctorParameters=function(){return[{type:n.AbstractHttpService}]};var Ce=function(){function t(){}return t.prototype.format=function(t,n){return e.appManager.getPipe("date").transform(t,n)},t}(),Ie=function(){function e(e,n,i,o,a,r,s,l){this.httpService=e,this.metadataService=n,this.navigationService=i,this.routerService=o,this.toasterService=a,this.oAuthService=r,this.securityService=s,this.dialogService=l,C("http",this.httpService),C("metadata",this.metadataService),C("navigationService",this.navigationService),C("router",this.routerService),C("toaster",this.toasterService),C("oAuth",this.oAuthService),C("security",this.securityService),C("dialog",this.dialogService),t.wmSetDependency("oAuth",this.oAuthService),t.wmSetDependency("security",this.securityService),t.wmSetDependency("metadata",this.metadataService)}return e.prototype.bulkCancel=function(e){Object.keys(e).forEach((function(t){var n=e[t];_.isFunction(n.cancel)&&n.cancel()}))},e.prototype.triggerStartUpdate=function(e){return Promise.all(Object.keys(e).map((function(t){return e[t]})).filter((function(e){return(null==e?void 0:e.startUpdate)&&e.invoke})).map((function(e){return e.invoke()})))},e.prototype.processBindExp=function(e,i,o){var a=t.getTarget(o),r=t.getTargetNodeKey(e.target),s=_.isArray(e.value)?e.value[0]:e.value;return s&&(s.startsWith&&s.startsWith("bind:")?s=n.$watch(s.replace("bind:",""),i,{},o.invokeOnParamChange.bind(o,e),void 0,void 0,void 0,(function(){return o.isMuted})):_.isUndefined(e.value)||(t.setValueToNode(e.target,e,a,o,e.value,!0),a!==r&&(t.internalBoundNodeMap.has(o)||t.internalBoundNodeMap.set(o,{}),_.set(t.internalBoundNodeMap.get(o),[o.name,a,e.target],e.value)))),{name:e.target,value:s}},e.prototype.processBinding=function(e,t,n,i){var o=this;i=i||"dataBinding";var a=e[n=n||"dataBinding"];e[n]={},e["_bind"+n]=a,a&&_.isArray(a)&&a.forEach((function(n){"wm.Variable"===e.category&&"dataBinding"===n.target&&(n.target="dataSet"),o.processBindExp(n,t,e)}))},e.prototype.isVariableSeperated=function(e,t){return"wm.Variable"===e[t].category||"wm.ServiceVariable"===e[t].category||"wm.LiveVariable"===e[t].category||"wm.CrudVariable"===e[t].category},e.prototype.getBindSourceTarget=function(e){return"wm.LiveVariable"===e.category?"read"===e.operation?"filterFields":"inputFields":"wm.ModelVariable"===e.category?"dataSet":"dataBinding"},e.prototype.register=function(e,i,o){var a,r=this,s={Variables:{},Actions:{},callback:this.triggerStartUpdate};for(var l in i){if((a=Te.create(i[l],o)).init(),this.isVariableSeperated(i,l)&&(this.processBinding(a,o,"dataBinding",this.getBindSourceTarget(a)),a.httpService=this.httpService,a.dateFormatter=new Ce,a.subscribe("afterInvoke",(function(){return n.$invokeWatchers(!0)})),"wm.LiveVariable"===a.category&&"read"===a.operation&&n.processFilterExpBindNode(a._context,a.filterExpressions,a),"wm.CrudVariable"!==a.category&&"wm.ServiceVariable"!==a.category||(a.simulateFileDownload=U)),this.isVariableSeperated(i,l)||"wm.TimerVariable"===i[l].category)for(var c in m.EVENT)a[m.EVENT[c]]&&(a[m.EVENT[c]]=n.$parseEvent(a[m.EVENT[c]]));a instanceof t.BaseAction?s.Actions[l]=a:s.Variables[l]=a}return o.registerDestroyListener&&o.registerDestroyListener((function(){r.bulkCancel(s.Variables),r.bulkCancel(s.Actions)})),s},e.prototype.destroy=function(){},e.prototype.registerDependency=function(e,n){C(e,n),t.wmSetDependency(e,n)},e}();Ie.decorators=[{type:a.Injectable}],Ie.ctorParameters=function(){return[{type:n.AbstractHttpService},{type:Se},{type:n.AbstractNavigationService},{type:r.Router},{type:n.AbstractToasterService},{type:s.OAuthService},{type:l.SecurityService},{type:n.AbstractDialogService}]};var De=d.ToastrModule.forRoot({maxOpened:1,autoDismiss:!0}),xe=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Ie,Se,c.Location,{provide:c.LocationStrategy,useClass:c.HashLocationStrategy}]}},e}();xe.decorators=[{type:a.NgModule,args:[{imports:[c.CommonModule,De,p.HttpClientModule,u.HttpServiceModule,s.OAuthModule,l.SecurityModule],declarations:[]}]}],e.$rootScope=v,e.CONSTANTS=h,e.DB_CONSTANTS={DATABASE_MATCH_MODES:{like:"LIKE",start:"STARTING_WITH",startignorecase:"STARTING_WITH_IGNORECASE",end:"ENDING_WITH",endignorecase:"ENDING_WITH_IGNORECASE",anywhere:"CONTAINING",anywhereignorecase:"CONTAINING_IGNORECASE",nowhere:"DOES_NOT_CONTAIN",nowhereignorecase:"DOES_NOT_CONTAIN_IGNORECASE",exact:"EQUALS",exactignorecase:"EQUALS_IGNORECASE",notequals:"NOT_EQUALS",notequalsignorecase:"NOT_EQUALS_IGNORECASE",between:"BETWEEN",in:"IN",notin:"NOTIN",lessthan:"LESS_THAN",lessthanequal:"LESS_THAN_OR_EQUALS",greaterthan:"GREATER_THAN",greaterthanequal:"GREATER_THAN_OR_EQUALS",null:"NULL",isnotnull:"IS_NOT_NULL",empty:"EMPTY",isnotempty:"IS_NOT_EMPTY",nullorempty:"NULL_OR_EMPTY"},DATABASE_EMPTY_MATCH_MODES:["NULL","IS_NOT_NULL","EMPTY","IS_NOT_EMPTY","NULL_OR_EMPTY"],DATABASE_RANGE_MATCH_MODES:["IN","NOTIN","BETWEEN","LESS_THAN","LESS_THAN_OR_EQUALS","GREATER_THAN","GREATER_THAN_OR_EQUALS","NOT_EQUALS"],DATABASE_NULL_EMPTY_MATCH:{NULL:"NULL",IS_NOT_NULL:"IS_NOT_NULL",EMPTY:"NULL",IS_NOT_EMPTY:"IS_NOT_NULL",NULL_OR_EMPTY:"NULL"},DATABASE_MATCH_MODES_WITH_QUERY:{LIKE:"${0} like ${1}",STARTING_WITH:"${0} like ${1}",STARTING_WITH_IGNORECASE:"${0} like ${1}",ENDING_WITH:"${0} like ${1}",ENDING_WITH_IGNORECASE:"${0} like ${1}",CONTAINING:"${0} like ${1}",CONTAINING_IGNORECASE:"${0} like ${1}",DOES_NOT_CONTAIN:"${0} not like ${1}",DOES_NOT_CONTAIN_IGNORECASE:"${0} not like ${1}",EQUALS:"${0}=${1}",EQUALS_IGNORECASE:"${0}=${1}",NOT_EQUALS:"${0}!=${1}",NOT_EQUALS_IGNORECASE:"${0}!=${1}",BETWEEN:"${0} between ${1}",IN:"${0} in ${1}",NOTIN:"${0} not in ${1}",LESS_THAN:"${0}<${1}",LESS_THAN_OR_EQUALS:"${0}<=${1}",GREATER_THAN:"${0}>${1}",GREATER_THAN_OR_EQUALS:"${0}>=${1}",NULL:"${0} is null",IS_NOT_NULL:"${0} is not null",EMPTY:"${0}=''",IS_NOT_EMPTY:"${0}<>''",NULL_OR_EMPTY:"${0} is null or ${0}=''"},DATABASE_STRING_MODES:["LIKE","STARTING_WITH","STARTING_WITH_IGNORECASE","ENDING_WITH","ENDING_WITH_IGNORECASE","CONTAINING","CONTAINING_IGNORECASE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_IGNORECASE","EQUALS","EQUALS_IGNORECASE","NOT_EQUALS","NOT_EQUALS_IGNORECASE"]},e.DeviceVariableManager=ne,e.DeviceVariableService=me,e.Formatter=Ce,e.MetadataService=Se,e.SWAGGER_CONSTANTS=g,e.VARIABLE_CONSTANTS=m,e.VARIABLE_URLS={DATABASE:{searchTableData:{url:"/:service/:dataModelName/:entityName/search?page=:page&size=:size&:sort",method:"POST"},searchTableDataWithQuery:{url:"/:service/:dataModelName/:entityName/filter?page=:page&size=:size&:sort",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}},readTableData:{url:"/:service/:dataModelName/:entityName?page=:page&size=:size&:sort",method:"GET"},insertTableData:{url:"/:service/:dataModelName/:entityName",method:"POST"},insertMultiPartTableData:{url:"/:service/:dataModelName/:entityName",method:"POST",headers:{}},updateTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"PUT"},updateMultiPartTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"POST",headers:{}},deleteTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"DELETE"},updateCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"PUT"},periodUpdateCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id/periods?:id",method:"PUT"},updateMultiPartCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"POST",headers:{}},deleteCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"DELETE"},periodDeleteCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id/periods?:id",method:"DELETE"},getDistinctDataByFields:{url:"/:service/:dataModelName/:entityName/aggregations?page=:page&size=:size&:sort",method:"POST"},exportTableData:{url:"/services/:dataModelName/:entityName/export?:sort",method:"POST"},readTableRelatedData:{url:"/:service/:dataModelName/:entityName/:id/:relatedFieldName?page=:page&size=:size&:sort",method:"GET"},executeNamedQuery:{url:"/:service/:dataModelName/queryExecutor/queries/:queryName?page=:page&size=:size&:queryParams",method:"GET"},executeCustomQuery:{url:"/:service/:dataModelName/queries/execute?page=:page&size=:size",method:"POST"},executeAggregateQuery:{url:"/services/:dataModelName/:entityName/aggregations?page=:page&size=:size&sort=:sort",method:"POST"},executeNamedProcedure:{url:"/:service/:dataModelName/procedureExecutor/procedure/execute/:procedureName?page=:page&size=:size&:procedureParams",method:"GET"},countTableDataWithQuery:{url:"/:service/:dataModelName/:entityName/count?:queryParams",method:"GET"}},oauthConfiguration:{getAuthorizationUrl:{url:"services/oauth2/:providerId/authorizationUrl",method:"GET"}}},e.VariableManagerFactory=he,e.VariablesModule=xe,e.VariablesService=Ie,e.WS_CONSTANTS=f,e.debounceVariableCall=z,e.formatDate=K,e.formatExportExpression=function(e){return _.forEach(e,(function(e){e.expression&&(e.expression="${"+e.expression+"}")})),e},e.getEvaluatedOrderBy=function(e,t){var n,i;return!t||_.isEmpty(t)?e:e?(e=_.split(e,","),t=_.split(t,","),n=_.map(t,(function(e){return _.split(_.trim(e)," ")[0]})),_.remove(e,(function(e){return _.includes(n,_.split(_.trim(e)," ")[0])})),i=e.length?","+_.join(e,","):"",_.join(t,",")+i):t},e.initiateCallback=I,e.isFileUploadSupported=q,e.processBinding=W,e.setDependency=C,e.setInput=function(e,t,i,o){e=e||{};var a,r,s={};if(_.isObject(o))switch(o.type){case"file":i=n.getBlob(i,o.contentType);break;case"number":i=_.isNumber(i)?i:parseInt(i,10)}return _.isObject(t)?s=t:t.indexOf(".")>-1?(r=(a=t.split(".")).pop(),e=n.findValueOf(e,a.join("."),!0),s[t=r]=i):s[t]=i,_.forEach(s,(function(t,n){e[n]=t})),e},e.simulateFileDownload=U,e.toastrModule=De,e["\u0275a"]=X,e["\u0275b"]=Q,e["\u0275c"]=Z,e["\u0275d"]=J,e["\u0275e"]=ee,e["\u0275f"]=te,e["\u0275g"]=pe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@wm/mobile/runtime",["exports","@angular/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.mobile=e.wm.mobile||{},e.wm.mobile.runtime={}),e.ng.core)}(this,(function(e,t){"use strict";var n=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();n.decorators=[{type:t.NgModule,args:[{}]}],e.MobileRuntimeModule=n,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@wm/mobile/runtime/dynamic",["exports","@angular/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.mobile=e.wm.mobile||{},e.wm.mobile.runtime=e.wm.mobile.runtime||{},e.wm.mobile.runtime.dynamic={}),e.ng.core)}(this,(function(e,t){"use strict";var n=function(){};n.decorators=[{type:t.NgModule,args:[{}]}],e.MOBILE_COMPONENT_MODULES_FOR_ROOT=[],e.MobileRuntimeDynamicModule=n,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("@angular/common"),require("@wm/core"),require("@wm/security"),require("@wm/variables"),require("@wm/components/page"),require("rxjs"),require("@wm/components/base"),require("@wm/components/prefab"),require("@angular/common/http"),require("@angular/platform-browser"),require("ngx-toastr"),require("@wm/components/dialogs"),require("@wm/components/dialogs/confirm-dialog"),require("@wm/components/dialogs/design-dialog"),require("@wm/mobile/runtime"),require("@wm/http"),require("@wm/oAuth"),require("ngx-bootstrap/chronos"),require("ngx-bootstrap/datepicker"),require("ngx-bootstrap/utils"),require("rxjs/operators"),require("@wm/transpiler"),require("@wm/build-task")):"function"==typeof define&&define.amd?define("@wm/runtime/base",["exports","@angular/core","@angular/router","@angular/common","@wm/core","@wm/security","@wm/variables","@wm/components/page","rxjs","@wm/components/base","@wm/components/prefab","@angular/common/http","@angular/platform-browser","ngx-toastr","@wm/components/dialogs","@wm/components/dialogs/confirm-dialog","@wm/components/dialogs/design-dialog","@wm/mobile/runtime","@wm/http","@wm/oAuth","ngx-bootstrap/chronos","ngx-bootstrap/datepicker","ngx-bootstrap/utils","rxjs/operators","@wm/transpiler","@wm/build-task"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.runtime=e.wm.runtime||{},e.wm.runtime.base={}),e.ng.core,e.ng.router,e.ng.common,e.wm.core,e.wm.security,e.wm.variables,e.wm.components.page,e.rxjs,e.wm.components.base,e.wm.components.prefab,e.ng.common.http,e.ng.platformBrowser,e.ngxToastr,e.wm.components.dialogs,e.wm.components.dialogs.confirmdialog,e.wm.components.dialogs.designdialog,e.wm.mobile.runtime,e.wm.http,e.wm.oAuth,e["ngx-bootstrap"].chronos,e["ngx-bootstrap"].datepicker,e["ngx-bootstrap"].utils,e.rxjs.operators,e.wm.transpiler,e.wm.buildTask)}(this,(function(e,t,n,i,o,a,r,s,l,c,p,d,u,h,m,f,g,v,y,b,w,P,O,E,R,A){"use strict";function T(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var S,C=T(t),I=T(o),D=T(u);e.ComponentType=void 0,(S=e.ComponentType||(e.ComponentType={}))[S.PAGE=0]="PAGE",S[S.PREFAB=1]="PREFAB",S[S.PARTIAL=2]="PARTIAL";var x,N=function(){function e(){}return e.prototype.clearComponentFactoryRefCache=function(){},e}(),k=function(){},M=function(){},L=function(){},F=function(){};!function(e){e.HIDE_TEMPLATES_SHOW_CASE="hide-templates-show-case",e.SHOW_TEMPLATES_SHOW_CASE="show-templates-show-case",e.UPDATE_LOCATION="update-location-path",e.SELECT_TEMPLATE="select-template",e.TEMPLATEBUNDLE_CONFIG="template-bundle-config",e.ON_LOAD="on-load"}(x||(x={}));var j=function(){function e(e,t,n,i,o,a,r,s,l,c){var p=this;this.$http=e,this.$security=t,this.$dialog=n,this.$router=i,this.$app=o,this.$variables=a,this.$metadata=r,this.$spinner=s,this.$i18n=l,this.$datePipe=c,this.appVariablesLoaded=!1,this.appVariablesFired=!1,this._noRedirect=!1,this.$http.registerOnSessionTimeout(this.handle401.bind(this)),this.$variables.registerDependency("appManager",this),this.$app.subscribe("toggle-variable-state",(function(e){var t,n=e.variable,i=e.active;if(!_.isEmpty(_.trim(n.spinnerContext)))if(i){if(n._spinnerId&&n._spinnerId.length&&_.forEach(n._spinnerId,(function(e){e.slice(0,e.lastIndexOf("_"))!==n._id||!p.$spinner.messagesByContext||!p.$spinner.messagesByContext[n.spinnerContext]||n.spinnerMessage!==p.$spinner.messagesByContext[n.spinnerContext].finalMessage&&n.spinnerMessage!==p.$spinner.messagesByContext[n.spinnerContext][e]||(t=!0)})),!t){n._spinnerId=n._spinnerId||[];var o=p.$spinner.show(n.spinnerMessage,n._id+"_"+Date.now(),n.spinnerclass,n.spinnerContext);n._spinnerId.push(o)}}else p.$spinner.hide(n._spinnerId.shift())})),this.$app.subscribe("userLoggedIn",(function(){p.setLandingPage(),p.lastLoggedUserId&&p.$security.getConfig((function(e){e&&e.userInfo.userId!==p.lastLoggedUserId&&p.$app.clearPageCache()}),null)})),this.$app.subscribe("userLoggedOut",(function(){return p.setLandingPage().then((function(){p.$app.clearPageCache()}))})),this.$app.subscribe("http401",(function(e){return void 0===e&&(e={}),p.handle401(e.page,e.options)}))}return e.prototype.showLoginDialog=function(){this.$spinner.hide("globalSpinner"),this.$dialog.open("CommonLoginDialog"),o.$appDigest()},e.prototype.loadAppJS=function(){},e.prototype.loadCommonPage=function(){},e.prototype.loadSecurityConfig=function(e){var t=this;return this.$security.load(e).then((function(e){return t.$app.landingPageName||t.setLandingPage(),e}))},e.prototype.loadMetadata=function(){return this.$metadata.load()},e.prototype.loadAppVariables=function(e){var t=this;if(this.appVariablesLoaded)return Promise.resolve();var n=function(e){var n=t.$variables.register("app",e,t.$app);_.extend(t.$app.Variables,n.Variables),_.extend(t.$app.Actions,n.Actions),t.updateLoggedInUserVariable(),t.updateSupportedLocaleVariable(),t.appVariablesLoaded=!0,t.appVariablesFired=!1};return o.isDefined(e)?(n(e),Promise.resolve()):this.$http.get("./app.variables.json").then((function(e){return n(e)}))},e.prototype.isAppVariablesFired=function(e){return o.isDefined(e)&&(this.appVariablesFired=e),this.appVariablesFired},e.prototype.clearLoggedInUserVariable=function(e){e.isAuthenticated=!1,e.roles=[],e.name=void 0,e.id=void 0,e.tenantId=void 0},e.prototype.updateLoggedInUserVariable=function(){var e=this,t=_.get(this.$app,"Variables.loggedInUser.dataSet");if(t)return this.$security.load().then((function(){var n=e.$security.get();if(!(n&&n.securityEnabled&&n.authenticated))throw e.clearLoggedInUserVariable(t),t.isSecurityEnabled=n&&n.securityEnabled,null;return t.isAuthenticated=n.authenticated,t.roles=n.userInfo.userRoles,t.name=n.userInfo.userName,t.id=n.userInfo.userId,t.tenantId=n.userInfo.tenantId,t.userAttributes=n.userInfo.userAttributes,n})).catch((function(e){t.isAuthenticated=!1,t.roles=[],t.name=void 0,t.id=void 0,t.tenantId=void 0,t.userAttributes={}}))},e.prototype.updateSupportedLocaleVariable=function(){_.get(this.$app,"Variables.supportedLocale")},e.prototype.handleSSOLogin=function(e){var t,n,i=this;if(t=this.$security.getRedirectPage(e),r.CONSTANTS.hasCordova){var o=_.get(this.$security.get(),"userInfo.userName");this.$security.authInBrowser().then((function(){return i.reloadAppData()})).then((function(){var e=_.get(i.$security.get(),"userInfo.userName");e&&e===o?r.routerService.navigate([t]):r.routerService.navigate(["/"])}))}else{t=t?"?redirectPage="+encodeURIComponent(t):"",n=(n=this.$security.getQueryString(this.$security.getRedirectedRouteQueryParams()))?"?"+n:"",document.body.textContent=_.get(this.getAppLocale(),["MESSAGE_LOGIN_REDIRECTION"])||"Redirecting to sso login...";var a=this.getDeployedURL()+"services/security/ssologin"+t+n;window.self!==window.top&&"WM_PREVIEW_WINDOW"===window.parent.name?(window.parent.location.href=window.self.location.href,window.parent.name=""):window.location.href=a}},e.prototype.handle401=function(e,t){var n,i,o="DIALOG",a="PAGE",r="SSO",s=this.$security.get(),l={};if(i=s.loginConfig,this.lastLoggedUserId=s.userInfo&&s.userInfo.userId,s.userInfo&&s.userInfo.userName){switch(s.authenticated=!1,(n=i.sessionTimeout||{type:o}).type.toUpperCase()){case o:this.showLoginDialog();break;case a:e||(e=this.$security.getCurrentRoutePage()),l.redirectTo=e,l=_.merge(l,this.$security.getRedirectedRouteQueryParams()),e!==n.pageName&&this.$router.navigate([n.pageName],{queryParams:l});break;case r:this.handleSSOLogin(s)}this.setLandingPage()}else switch(i.type.toUpperCase()){case o:this.noRedirect(!0),this.showLoginDialog();break;case a:e=this.$security.getRedirectPage(s,e),l.redirectTo=e;var c=t&&t.queryParams||this.$security.getRedirectedRouteQueryParams();l=_.merge(l,c),this.$router.navigate([i.pageName],{queryParams:l}),this.$app.landingPageName=i.pageName;break;case r:this.handleSSOLogin(s)}},e.prototype.reloadAppData=function(){var e=this;return this.loadSecurityConfig(!0).then((function(){return e.loadMetadata().then((function(){return e.updateLoggedInUserVariable()}))}))},e.prototype.noRedirect=function(e){return _.isUndefined(e)||(this._noRedirect=e),this._noRedirect},e.prototype.executeSessionFailureRequests=function(){this.$http.executeSessionFailureRequests()},e.prototype.pushToSessionFailureRequests=function(e){this.$http.pushToSessionFailureQueue(e)},e.prototype.getDeployedURL=function(){return this.$app.deployedUrl?this.$app.deployedUrl:r.$rootScope.project.deployedUrl},e.prototype.getCustomUrlScheme=function(){return this.$app.customUrlScheme},e.prototype.notify=function(e,t){this.$app.notify(e,t)},e.prototype.subscribe=function(e,t){return this.$app.subscribe(e,t)},e.prototype.getActivePage=function(){return this.$app.activePage},e.prototype.getAppLocale=function(){return this.$app.appLocale},e.prototype.getSelectedLocale=function(){return this.$i18n.getSelectedLocale()},e.prototype.notifyApp=function(e,t,n){this.$app.notifyApp(e,t,n)},e.prototype.appOnBeforeServiceCall=function(e){return o.triggerFn(this.$app.onBeforeServiceCall,e)},e.prototype.appOnServiceSuccess=function(e,t){return o.triggerFn(this.$app.onServiceSuccess,e,t)},e.prototype.appOnServiceError=function(e,t){return o.triggerFn(this.$app.onServiceError,e,t)},e.prototype.appVariablesReady=function(){o.triggerFn(this.$app.onAppVariablesReady)},e.prototype.beforeAppReady=function(){o.triggerFn(this.$app.onBeforeAppReady)},e.prototype.getPipe=function(e){if("date"===e)return this.$datePipe},e.prototype.setLandingPage=function(){var e=this;return this.$security.getPageByLoggedInUser().then((function(t){return e.$app.landingPageName=t}))},e.prototype.isPrefabType=function(){return this.$app.isPrefabType},e.prototype.isTemplateBundleType=function(){return this.$app.isTemplateBundleType},e.prototype.postMessage=function(e){window.top.postMessage(e,"*")},e.prototype.showTemplate=function(e){var t=this.templates[e];this.$router.navigate([t.id])},e.prototype.postTemplateBundleInfo=function(){var e=this;return window.onmessage=function(t){var n=t.data;if(_.isObject(n))switch(n.key){case x.HIDE_TEMPLATES_SHOW_CASE:break;case x.SELECT_TEMPLATE:e.showTemplate(n.templateIndex)}},setTimeout((function(){e.postMessage({key:x.ON_LOAD})})),o.fetchContent("json","./config.json",!0,(function(t){e.templates=[],t.error||(e.templates=t.templates,e.postMessage({key:x.TEMPLATEBUNDLE_CONFIG,config:t}))}))},e.prototype.postAppTypeInfo=function(){if(this.isTemplateBundleType())return this.postTemplateBundleInfo()},e}();j.SERVICE_NAME="AppManagerService",j.decorators=[{type:t.Injectable}],j.ctorParameters=function(){return[{type:o.AbstractHttpService},{type:a.SecurityService},{type:o.AbstractDialogService},{type:n.Router},{type:o.App},{type:r.VariablesService},{type:r.MetadataService},{type:o.AbstractSpinnerService},{type:o.AbstractI18nService},{type:i.DatePipe}]};var B=function(e){return"__self__"===e},G=function(e){return B(e)?".":"app/prefabs/"+e},V=new Set,W=new Map,U=new Set,q=function(e,t){var n=e;return o.stringStartsWith(e,"http://|https://|//")||(n=(t+n).replace("//","/")),n},z=q,H=function(){function e(e,t){this.$metadata=e,this.prefabConfigProvider=t}return e.prototype.getConfig=function(e){return this.prefabConfigProvider.getConfig(e)},e.prototype.loadServiceDefs=function(e){return B(e)?Promise.resolve():this.$metadata.load(e)},e.prototype.loadStyles=function(e,t){var n=(void 0===t?{resources:{styles:[]}}:t).resources.styles,i=G(e),a=n.map((function(e){if(!_.endsWith(e,"/pages/Main/Main.css"))return q(e,i)})).filter((function(e){return!!e}));return o.loadStyleSheets(a),Promise.resolve()},e.prototype.loadScripts=function(e,t){var n=(void 0===t?{resources:{scripts:[]}}:t).resources.scripts,i=G(e),a=(n=n.filter((function(e){return!e.startsWith("npm://")}))).map((function(e){return q(e,i)}));return o.loadScripts(a,!0)},e.prototype.setInProgress=function(e){var t,n,i=new Promise((function(e,i){t=e,n=i}));i.resolve=t,i.reject=n,W.set(e,i)},e.prototype.resolveInProgress=function(e){W.get(e)&&(W.get(e).resolve(),W.delete(e))},e.prototype.loadDependencies=function(e){var t=this;return U.has(e)?Promise.resolve():V.has(e)?Promise.reject(""):W.get(e)?W.get(e):(this.setInProgress(e),this.getConfig(e).then((function(n){return Promise.all([t.loadStyles(e,n),t.loadScripts(e,n),t.loadServiceDefs(e)]).then((function(){t.resolveInProgress(e),U.add(e)}))})))},e}();H.decorators=[{type:t.Injectable}],H.ctorParameters=function(){return[{type:r.MetadataService},{type:k}]};
|
|
730
|
+
***************************************************************************** */var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function l(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var c=function(){i.register("wm-login",new Map([["errormessage",i.PROP_STRING],["eventsource",i.PROP_ANY]]))},p={widgetType:"wm-login",hostClass:"app-login"},d=function(e){function t(t){var n=e.call(this,t,p)||this;return i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.CONTAINER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onSuccessCB=function(){this.invokeEventCallback("success")},t.prototype.onErrorCB=function(e){this.loginMessage={type:"error",caption:this.errormessage||e||this.appLocale.LABEL_INVALID_USERNAME_OR_PASSWORD,show:!0},this.messageCmp.showMessage(this.loginMessage.caption,this.loginMessage.type),this.invokeEventCallback("error")},t.prototype.getLoginDetails=function(){return this.formCmp.dataoutput},t.prototype.doLogin=function(){this.eventsource?this.formCmp.ngform.valid&&this.eventsource.invoke({loginInfo:this.getLoginDetails()},this.onSuccessCB.bind(this),this.onErrorCB.bind(this)):console.warn('Default action "loginAction" does not exist. Either create the Action or assign an event to onSubmit of the login widget')},t.prototype.initLoginButtonActions=function(){var e=this;this.loginBtnCmp.getNativeElement().addEventListener("click",(function(t){e.nativeElement.hasAttribute("submit.event")||e.loginBtnCmp.getNativeElement().hasAttribute("click.event")||e.loginBtnCmp.getNativeElement().hasAttribute("tap.event")||e.doLogin()}))},t.prototype.ngAfterViewInit=function(){var t=this;e.prototype.ngAfterViewInit.call(this),this.formCmp.getNativeElement().addEventListener("submit",(function(e){return e.preventDefault()})),this.buttonComponents.forEach((function(e){if("loginButton"===e.getNativeElement().getAttribute("name")||_.includes(e.getNativeElement().classList,"app-login-button")){if(t.loginBtnCmp)return;t.loginBtnCmp=e,t.initLoginButtonActions()}}))},t}(i.StylableComponent);d.initializeProps=c(),d.decorators=[{type:t.Component,args:[{selector:"div[wmLogin]",template:'<p wmMessage class="app-login-message" #message show.bind="loginMessage.show" caption.bind="loginMessage.caption" type.bind="loginMessage.type"></p>\n<ng-content></ng-content>\n',providers:[i.provideAsWidgetRef(d)]}]}],d.ctorParameters=function(){return[{type:t.Injector}]},d.propDecorators={formCmp:[{type:t.ContentChild,args:[o.FormComponent]}],buttonComponents:[{type:t.ContentChildren,args:[a.ButtonComponent,{descendants:!0}]}],messageCmp:[{type:t.ViewChild,args:[i.MessageComponent,{static:!0}]}]};var u=[d],h=function(){};h.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.WmComponentsModule],declarations:l([],s(u)),exports:l([],s(u)),entryComponents:[]}]}],e.LoginComponent=d,e.LoginModule=h,e["\u0275a"]=c,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@wavemaker/variables"),require("@wm/core"),require("angular2-websocket/angular2-websocket"),require("@metrichor/jmespath"),require("@angular/core"),require("@angular/router"),require("@wm/oAuth"),require("@wm/security"),require("@angular/common"),require("@angular/common/http"),require("ngx-toastr"),require("@wm/http")):"function"==typeof define&&define.amd?define("@wm/variables",["exports","@wavemaker/variables","@wm/core","angular2-websocket/angular2-websocket","@metrichor/jmespath","@angular/core","@angular/router","@wm/oAuth","@wm/security","@angular/common","@angular/common/http","ngx-toastr","@wm/http"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.variables={}),e.wm_common_variables,e.wm.core,e.angularWebSocket,e.jmespath,e.ng.core,e.ng.router,e.wm.oAuth,e.wm.security,e.ng.common,e.ng.common.http,e.ngxToastr,e.wm.http)}(this,(function(e,t,n,i,o,a,r,s,l,c,p,d,u){"use strict";var h={hasCordova:void 0!==window.cordova,isStudioMode:!1,isRunMode:!0,XSRF_COOKIE_NAME:"wm_xsrf_token",DEFAULT_TIMER_DELAY:500,WIDGET_DOESNT_EXIST:"The widget you're trying to navigate to doesn't exist on this page"},m={CATEGORY:{MODEL:"wm.Variable",LIVE:"wm.LiveVariable",CRUD:"wm.CrudVariable",SERVICE:"wm.ServiceVariable",WEBSOCKET:"wm.WebSocketVariable",NAVIGATION:"wm.NavigationVariable",NOTIFICATION:"wm.NotificationVariable",TIMER:"wm.TimerVariable",LOGIN:"wm.LoginVariable",LOGOUT:"wm.LogoutVariable",DEVICE:"wm.DeviceVariable"},EVENTS:["onBefore","onBeforeUpdate","onResult","onBeforeOpen","onOpen","onBeforeMessageSend","onMessageReceive","onProgress","onError","onBeforeDatasetReady","onCanUpdate","onClick","onHide","onOk","onCancel","onBeforeClose","onClose","onTimerFire","onSuccess","onOnline","onOffline"],EVENT:{CAN_UPDATE:"onCanUpdate",BEFORE:"onBefore",BEFORE_UPDATE:"onBeforeUpdate",PREPARE_SETDATA:"onBeforeDatasetReady",RESULT:"onResult",ERROR:"onError",ABORT:"onAbort",PROGRESS:"onProgress",CLICK:"onClick",HIDE:"onHide",OK:"onOk",CANCEL:"onCancel",CLOSE:"onClose",TIMER_FIRE:"onTimerFire",SUCCESS:"onSuccess",BEFORE_OPEN:"onBeforeOpen",OPEN:"onOpen",BEFORE_SEND:"onBeforeMessageSend",MESSAGE_RECEIVE:"onMessageReceive",BEFORE_CLOSE:"onBeforeClose"},OWNER:{APP:"App",PAGE:"Page"},REST_SUPPORTED_SERVICES:["JavaService","SoapService","FeedService","RestService","SecurityServiceType","DataService","WebSocketService","OpenAPIService"],PAGINATION_PARAMS:["page","size","sort"],REST_SERVICE:{BASE_PATH_KEY:"x-WM-BASE_PATH",RELATIVE_PATH_KEY:"x-WM-RELATIVE_PATH",OAUTH_PROVIDER_KEY:"x-WM-PROVIDER_ID",AUTH_HDR_KEY:"Authorization",SECURITY_DEFN:{BASIC:"basic",OAUTH2:"oauth2"},AUTH_TYPE:{BASIC:"BASIC",OAUTH:"OAUTH2",NONE:"NONE"},CONTENT_TYPE_KEY:"x-WM-CONTENT_TYPE",ACCESSTOKEN_PLACEHOLDER:{LEFT:"",RIGHT:".access_token"},ERR_TYPE:{NO_ACCESSTOKEN:"missing_accesstoken",NO_CREDENTIALS:"no_credentials",METADATA_MISSING:"metadata_missing",CRUD_OPERATION_MISSING:"crud_operation_missing",USER_UNAUTHORISED:"user_unauthorised",REQUIRED_FIELD_MISSING:"required_field_missing"},ERR_MSG:{NO_ACCESSTOKEN:"Access token missing",NO_CREDENTIALS:"No credentials present",METADATA_MISSING:'Metadata missing for "$variable"',USER_UNAUTHORISED:"Unauthorized User",CRUD_OPERATION_MISSING:'Operation "$operation" not allowed for "$variable"',REQUIRED_FIELD_MISSING:'Required field(s) missing: "${0}"'},UNCLOAKED_HEADERS:["CONTENT-TYPE","ACCEPT","CONTENT-LENGTH","ACCEPT-ENCODING","ACCEPT-LANGUAGE"],PREFIX:{AUTH_HDR_VAL:{BASIC:"Basic",OAUTH:"Bearer"},CLOAK_HEADER_KEY:"X-WM-"}},SERVICE_TYPE:{JAVA:"JavaService",REST:"RestService",SOAP:"SoapService",FEED:"FeedService",DATA:"DataService",SECURITY:"SecurityServiceType",WEBSOCKET:"WebSocketService",OPENAPI:"OpenAPIService"},CONTROLLER_TYPE:{QUERY:"QueryExecution",PROCEDURE:"ProcedureExecution"},HTTP_STATUS_CODE:{CORS_FAILURE:-1,UNAUTHORIZED:401,FORBIDDEN:403},EXPORT_TYPES_MAP:{EXCEL:".xlsx",CSV:".csv"},DEFAULT_VAR:{NOTIFICATION:"appNotification"}},f={NON_BODY_HTTP_METHODS:["GET","HEAD"],CONTENT_TYPES:{FORM_URL_ENCODED:"application/x-www-form-urlencoded",MULTIPART_FORMDATA:"multipart/form-data",OCTET_STREAM:"application/octet-stream"}},g={WM_DATA_JSON:"wm_data_json",WM_HTTP_JSON:"wm_httpRequestDetails"},v=t.$rootScope,y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function w(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function P(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var O={EXCEL:".xlsx",CSV:".csv"};e.appManager=void 0,e.httpService=void 0,e.metadataService=void 0,e.navigationService=void 0,e.routerService=void 0,e.toasterService=void 0,e.oauthService=void 0,e.securityService=void 0,e.dialogService=void 0;var E=/^\[("|')[\w\W]*(\1)\]$/,R=new Map,A=new Map,T=function(e,t){var n,i,o=_.noop;A.has(e)&&(o=A.get(e).cancel),o(),n=_.debounce((function(){(i=e[t]())instanceof Promise&&i.catch(_.noop)}),100),A.set(e,n),n()},S=function(e,t,n,i,o){switch(i.category){case m.CATEGORY.LIVE:"read"===i.operation?("dataBinding"===e?_.forEach(t,(function(e,t){i.filterFields[t]={value:e}})):i.filterFields[e]={value:t,type:n},i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.listRecords)&&!o&&T(i,"listRecords")):("dataBinding"===e?i.inputFields=t:i.inputFields[e]=t,i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i[i.operation+"Record"])&&!o&&T(i,i.operation+"Record"));break;case m.CATEGORY.CRUD:"list"===i.operationType&&i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.invoke)&&!o&&T(i,"invoke");break;case m.CATEGORY.SERVICE:case m.CATEGORY.LOGIN:i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.invoke)&&!o&&T(i,"invoke");break;case m.CATEGORY.DEVICE:i[e]=t,i.autoUpdate&&!_.isUndefined(t)&&_.isFunction(i.invoke)&&!o&&T(i,"invoke")}},C=function(t,n){switch(t){case"appManager":e.appManager=n;break;case"http":e.httpService=n;break;case"metadata":e.metadataService=n;break;case"navigationService":e.navigationService=n;break;case"router":e.routerService=n;break;case"toaster":e.toasterService=n;break;case"oAuth":e.oauthService=n;break;case"security":e.securityService=n;break;case"dialog":e.dialogService=n}},I=function(e,t,i,o,a){var r,s=t[e],l=t._context;e!==m.EVENT.ERROR||a||s||(r=l.Actions[m.DEFAULT_VAR.NOTIFICATION])&&(i=r.getMessage()||i,i=_.isString(i)?i:"An error has occured. Please check the app logs.",r.invoke({message:i},void 0,void 0));var c=n.$parseEvent(t[e]);return e===m.EVENT.BEFORE_UPDATE?"wm.LiveVariable"===t.category&&"read"===t.operation?c(t._context,{variable:t,dataFilter:i,options:o}):c(t._context,{variable:t,inputData:i,options:o}):c(t._context,{variable:t,data:i,options:o})},D=function(e){setTimeout((function(){n.triggerFn(e)}),500)},x=function(e,t,i,o){var a,r,s,l,c,p="",d=t.get("Content-Disposition");if(d&&-1!==d.indexOf("attachment")&&null!==(a=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(d))&&a[1]&&(p=a[1].replace(/['"]/g,"")),r=t.get("Content-Type"),s=new Blob([e],{type:r}),void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(s,p)?D(i):n.triggerFn(o);else{if(l=window.URL||window.webkitURL,c=l.createObjectURL(s),p){var u,h=document.createElement("a");void 0===h.download?((u=new FileReader).onloadend=function(){var e=u.result.replace(/^data:[^;]*;/,"data:attachment/file;");window.open(e,"_blank")||(window.location.href=e)},u.onload=D.bind(void 0,i),u.onerror=o,u.readAsDataURL(s)):(h.href=c,h.download=p,document.body.appendChild(h),h.click(),D(i))}else window.open(c,"_blank")||(window.location.href=c),D(i);setTimeout((function(){l.revokeObjectURL(c)}),100)}},N=function(e,t){e=_.split(e,"&"),_.forEach(e,(function(e){e=_.split(e,"="),t[e[0]]=decodeURIComponent(_.join(_.slice(e,1),"="))}))},k=function(e,t){"/"===e.url[1]&&"/"===e.url[2]&&(e.url=e.url.slice(0,1)+e.url.slice(2));var i,o,a,r="",s="fileDownloadIFrame",l="fileDownloadForm",c="Content-Type",p=e.url,d=_.get(e.headers,c),u=_.pickBy(e.headers,(function(e,t){return t!==c}));(i=$("#"+s)).length&&i.first().remove(),i=$('<iframe id="'+s+'" name="'+s+'" class="ng-hide"></iframe>'),(o=$('<form id="'+l+'" name="'+l+'"></form>')).attr({target:i.attr("name"),action:p,method:e.method,enctype:d}),r+=-1!==p.indexOf("?")?p.substring(p.indexOf("?")+1):"",r+=d===f.CONTENT_TYPES.FORM_URL_ENCODED?(r?"&":"")+e.dataParams:"",_.includes(f.NON_BODY_HTTP_METHODS,_.toUpper(e.method))&&N(r,u),N(e.data,u),_.forEach(u,(function(e,t){(a=$('<input type="hidden">')).attr({name:t,value:e}),o.append(a)})),$("body").append(i),setTimeout((function(){i.contents().find("body").append(o),o.submit(),n.triggerFn(t)}),100)},M=function(t,i,o){var a=t.url,r=t.method,s=t.dataParams||t.data,l=t.headers;l["Content-Type"]=l["Content-Type"]||"application/x-www-form-urlencoded",e.httpService.send({target:"WebService",action:"invokeRuntimeRestCall",method:r,url:a,headers:l,data:s,responseType:"arraybuffer"}).then((function(e){setTimeout((function(){x(e.body,e.headers,i,o)}),900)}),(function(e){n.triggerFn(o,e)}))},L=function(){return!!h.hasCordova&&localStorage.getItem(h.XSRF_COOKIE_NAME)},F=function(e,t,i){var o,a=e.target,r=i[t];return E.test(a)?o=r:(a=a.substr(0,a.lastIndexOf(".")),o=e.target===t?i:a?n.findValueOf(r,a,!0):r),o},j=function(e){return E.test(e)?e.replace(/^(\[["'])|(["']\])$/g,""):e.split(".").pop()},B=function(e,t,n,i,o,a){var r=j(e),s=F(t,n,i);o=_.isUndefined(o)?t.value:o,s&&(s[r]=o),S(r,o,t.type,i,a)},G=function(e,t,n){var i,o=_.keys(_.get(R.get(n),[n.name,t])),a=j(e);(i=_.filter(o,(function(e){return e!==a&&_.includes(e,a)||(a===t||"dataBinding"===a)&&e!==a}))).length&&_.forEach(i,(function(e){B(e,{target:e},t,n,_.get(R.get(n),[n.name,t,e]))}))},V=function(e,t,i,o){var a=e.target,r=F(e,i,o),s=j(a),l=t.registerDestroyListener?t.registerDestroyListener.bind(t):_.noop;if(n.stringStartsWith(e.value,"bind:")){l(n.$watch(e.value.replace("bind:",""),t,{},(function(t,l){t===l&&_.isUndefined(t)||!(!_.isUndefined(t)||_.isUndefined(l)&&_.isUndefined(r[s]))||(_.includes(["blob","file"],e.type)||(t=n.getClonedObject(t)),B(a,e,i,o,t),R.has(o)||R.set(o,{}),_.set(R.get(o),[o.name,i,a],t),_.isObject(t)&&G(a,i,o))}),void 0,void 0,void 0,(function(){return o.isMuted})))}else _.isUndefined(e.value)||(B(a,e,i,o,e.value,!0),i!==s&&(R.has(o)||R.set(o,{}),_.set(R.get(o),[o.name,i,a],e.value)))},W=function(e,t,n,i){i=i||"dataBinding";var o=e[n=n||"dataBinding"];e[n]={},e["_bind"+n]=o,o&&_.isArray(o)&&o.forEach((function(n){"wm.Variable"===e.category&&"dataBinding"===n.target&&(n.target="dataSet"),V(n,t,i,e)}))},U=function(t,n,i,o,a){if(h.hasCordova){var r=void 0;i&&(r=O[i]),e.appManager.notify("device-file-download",{url:t.url,name:n,extension:r,headers:t.headers,successCb:o,errorCb:a})}else!_.isEmpty(t.headers)||L()?M(t,o,a):k(t,o)},q=function(){return window.File&&window.FileReader&&window.FileList&&window.Blob},z=T,H=function(e){return n.DEFAULT_FORMATS[_.toUpper(e)]},Y=function(t,i){var o;return _.isDate(t)?o=t.getTime():(isNaN(t)||(t=parseInt(t,10)),o=t&&moment(t).valueOf()),isNaN(o)&&i!==n.DataType.TIME||i===n.DataType.TIMESTAMP?o:(i!==n.DataType.TIME||o||(o=moment((new Date).toDateString()+" "+t).valueOf()),t&&e.appManager.getPipe("date").transform(o,H(i)))},K=function(e,t){return _.includes(t,".")&&(t=_.toLower(n.extractType(t))),_.isArray(e)?_.map(e,(function(e){return Y(e,t)})):Y(e,t)};var Q=function(){function t(){}return t.prototype.initBinding=function(e,t,n){W(e,e._context,t,n)},t.prototype.notifyInflight=function(t,n,i){e.appManager.notify("toggle-variable-state",{variable:t,active:n,data:i})},t}(),Z=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.invoke=function(t,i){!function(t,i){var o;t.dataSet=i&&i.data||t.dataSet;var a=t.dataBinding.pageName||t.pageName,r=t.operation,s=_.clone(t.dataSet),l=_.isNil(null==i?void 0:i.cacheable)?t.cacheable:i.cacheable;switch(i=i||{},_.isNil(l)||n.isString(l)&&""===l.trim()||(s._cache_page=l),r){case"goToPreviousPage":e.navigationService.goToPrevious();break;case"gotoPage":e.navigationService.goToPage(a,{transition:t.pageTransitions,$event:i.$event,urlParams:s,cacheable:t.cacheable});break;case"gotoView":o=t.dataBinding&&t.dataBinding.viewName||t.viewName;break;case"gotoTab":o=t.dataBinding&&t.dataBinding.tabName||t.tabName;break;case"gotoAccordion":o=t.dataBinding&&t.dataBinding.accordionName||t.accordionName;break;case"gotoSegment":o=t.dataBinding&&t.dataBinding.segmentName||t.segmentName}o&&e.navigationService.goToView(o,{pageName:a,transition:t.pageTransitions,$event:i.$event,urlParams:s},t)}(t,i)},i}(Q),J=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.onToasterClick=function(e){I("onClick",e,"")},i.prototype.onToasterHide=function(e){I("onHide",e,"")},i.prototype.notifyViaToaster=function(t,n){var i,o=(n.class||t.dataBinding.class||"info").toLowerCase(),a=n.message||t.dataBinding.text,r=n.title,s="toast-"+(n.position||t.dataBinding.toasterPosition||"bottom right").replace(" ","-"),l=t.dataBinding.page,c=parseInt(n.duration||t.dataBinding.duration,null);c||(c=0!==c&&"success"===o?3e3:0),i=t.dataBinding.content&&"page"===t.dataBinding.content&&l?e.toasterService.showCustom(l,{positionClass:s,timeOut:c,partialParams:t._binddataSet,context:t._context}):e.toasterService.show(o,r,a||null,{positionClass:s,timeOut:c,enableHtml:!0}),t.onClick&&i.onTap.subscribe(this.onToasterClick.bind(this,t)),t.onHide&&i.onHidden.subscribe(this.onToasterHide.bind(this,t))},i.prototype.getDialogConfig=function(t,n,i,o){return{title:n.title||t.dataBinding.title,text:n.message||t.dataBinding.text,okButtonText:n.okButtonText||t.dataBinding.okButtonText||"OK",cancelButtonText:n.cancelButtonText||t.dataBinding.cancelButtonText||"CANCEL",alerttype:n.alerttype||t.dataBinding.alerttype||"information",onOk:function(){e.dialogService.close(i,void 0,o)},onCancel:function(){I("onCancel",t,n.data),e.dialogService.close(i,void 0)},onClose:function(){I("onClose",t,n.data)}}},i.prototype.notifyViaDialog=function(t,i){var o="PREFAB"===n.getWmProjectProperties().type,a=(o?"Prefab":"Common")+_.capitalize(t.operation)+"Dialog",r=this.getDialogConfig(t,i,a,(function(){return I("onOk",t,i.data)}));r=o?r:{notification:r},e.dialogService.open(a,void 0,r)},i.prototype.notify=function(e,t,n,i){t=t||{},"toast"===e.operation?this.notifyViaToaster(e,t):this.notifyViaDialog(e,t)},i.prototype.getMessage=function(e){return e.dataBinding.text},i.prototype.setMessage=function(e,t){return _.isString(t)&&(e.dataBinding.text=t),e.dataBinding.text},i.prototype.getOkButtonText=function(e){return e.dataBinding.okButtonText},i.prototype.setOkButtonText=function(e,t){return _.isString(t)&&(e.dataBinding.okButtonText=t),e.dataBinding.okButtonText},i.prototype.getToasterDuration=function(e){return e.dataBinding.duration},i.prototype.setToasterDuration=function(e,t){return e.dataBinding.duration=t,e.dataBinding.duration},i.prototype.getToasterClass=function(e){return e.dataBinding.class},i.prototype.setToasterClass=function(e,t){return _.isString(t)&&(e.dataBinding.class=t),e.dataBinding.class},i.prototype.getToasterPosition=function(e){return e.dataBinding.class},i.prototype.setToasterPosition=function(e,t){return _.isString(t)&&(e.dataBinding.position=t),e.dataBinding.position},i.prototype.getAlertType=function(e){return e.dataBinding.alerttype},i.prototype.setAlertType=function(e,t){return _.isString(t)&&(e.dataBinding.alerttype=t),e.dataBinding.alerttype},i.prototype.getCancelButtonText=function(e){return e.dataBinding.cancelButtonText},i.prototype.setCancelButtonText=function(e,t){return _.isString(t)&&(e.dataBinding.cancelButtonText=t),e.dataBinding.cancelButtonText},i}(Q),X=function(){function t(){}return t.prototype.initBinding=function(e,t,n){W(e,e._context,t,n)},t.prototype.notifyInflight=function(t,n,i,o){e.appManager.notify("toggle-variable-state",{variable:t,active:n,data:i,options:o})},t.prototype.setRequestTrackId=function(e,t){var n,i=null===(n=null==e?void 0:e.headers)||void 0===n?void 0:n.get("x-wm-request-track-id");i&&(t._requestTrackId=i)},t.prototype.httpCall=function(t,n,i){var o=this;return new Promise((function(a,r){n._observable=e.httpService.sendCallAsObservable(t,i).subscribe((function(e){e&&e.type&&(o.setRequestTrackId(e,n),a(e))}),(function(t){o.setRequestTrackId(t,n),e.httpService.isPlatformSessionTimeout(t)?(o.notifyInflight(n,!1,t),t._401Subscriber.asObservable().subscribe((function(e){return a(e)}),(function(e){return r(e)}))):r(t)}))}))},t.prototype.prepareCallbackOptions=function(e,t){var n={};return n.xhrObj=e,t&&_.extend(n,t),n},t}(),ee=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.validate=function(e){var t,n,i;for(n in["rememberme","remembermecheck"].forEach((function(t){_.isBoolean(e[t])&&(i=t)})),e[i=i||"j_rememberme"]=!!_.isBoolean(e[i])&&e[i],e)if(e.hasOwnProperty(n)&&(""===e[n]||void 0===e[n])){t="Please provide required credentials";break}return t},i.prototype.migrateOldParams=function(e){var t={},n={usernametext:"j_username",username:"j_username",passwordtext:"j_password",password:"j_password",remembermecheck:"j_rememberme",rememberme:"j_rememberme"};return _.each(e,(function(e,i){n[i]?t[n[i]]=e:t[i]=e})),t},i.prototype.redirectToAppBasePath=function(){e.routerService.navigate(["/"]).then((function(e){e&&window.location.reload()}))},i.prototype.login=function(t,i,o,a){var r,s=this,l=(i=i||{}).loginInfo||i.input||t.dataBinding,c=this.validate(l);if(c)return n.triggerFn(a,c),void I("onError",t,c);var p=n.getClonedObject(l),d=I(m.EVENT.BEFORE_UPDATE,t,p);if(_.isObject(d))p=d;else if(!1===d)return void n.triggerFn(a);p=this.migrateOldParams(p);var u=_.get(e.securityService.get(),"userInfo.userName");this.notifyInflight(t,!0),t.promise=e.securityService.appLogin(p,(function(i){e.dialogService.close("CommonLoginDialog"),e.appManager.reloadAppData().then((function(a){I(m.EVENT.RESULT,t,_.get(a,"userInfo")),(r=I(m.EVENT.PREPARE_SETDATA,t,_.get(a,"userInfo")))&&_.set(a,"userInfo",r),s.notifyInflight(t,!1,i),n.triggerFn(o),setTimeout((function(){if(I(m.EVENT.SUCCESS,t,_.get(a,"userInfo")),t.useDefaultSuccessHandler){var n=u===p.j_username;u&&!n||e.appManager.executeSessionFailureRequests();var i=e.securityService.getCurrentRouteQueryParam("redirectTo"),o=e.appManager.noRedirect(),r=e.securityService.getRedirectedRouteQueryParams();if(r.redirectTo&&delete r.redirectTo,e.appManager.noRedirect(!1),u)if(_.isEmpty(i)){var l=e.securityService.get(),c=_.get(l,"loginConfig.sessionTimeout.type")||"PAGE";n&&"DIALOG"===c||s.redirectToAppBasePath()}else u===p.j_username?e.routerService.navigate(["/"+i],{queryParams:r}):s.redirectToAppBasePath();else _.isEmpty(i)?o||e.routerService.navigate(["/"]):e.routerService.navigate(["/"+i],{queryParams:r})}I(m.EVENT.CAN_UPDATE,t,_.get(a,"userInfo"))}))}))}),(function(e){I(m.EVENT.RESULT,t,e),s.notifyInflight(t,!1,e);var i=e.error||"Invalid credentials.",o=e.details;h.isRunMode&&I("onError",t,i,o,!0),n.triggerFn(a,i,o),I(m.EVENT.CAN_UPDATE,t,e)}))},i}(Q),te=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return b(i,t),i.prototype.logout=function(t,i,o,a){var r,s,l,c=this;r=function(e,i,o){h.isStudioMode||I("onError",t,e,o),n.triggerFn(a,e,o)},!1!==I(m.EVENT.BEFORE_UPDATE,t,null)?e.securityService.isAuthenticated((function(i){i?(c.notifyInflight(t,!0),t.promise=e.securityService.appLogout((function(i){var a=i.body;a=n.getValidJSON(a),e.appManager.reloadAppData().then((function(){c.notifyInflight(t,!1,a),I(m.EVENT.RESULT,t,a),(l=I(m.EVENT.PREPARE_SETDATA,t,a))&&(a=l),setTimeout((function(){I(m.EVENT.SUCCESS,t,a),I(m.EVENT.CAN_UPDATE,t,a)}))})),a&&a.result?window.location.href=a.result:t.useDefaultSuccessHandler&&((s=t.redirectTo)&&"login.html"!==s&&"index.html"!==s||(s=""),e.routerService.navigate(["/"+s]),window.cordova||setTimeout((function(){window.location.reload()}))),n.triggerFn(o)}),r)):r("No authenticated user to logout.")}),(function(e){c.notifyInflight(t,!1,e),r(e)})):n.triggerFn(a)},i}(Q),ne=function(e){function t(){var t=e.apply(this,P([],w(arguments)))||this;return t.serviceRegistry=new Map,t}return b(t,e),t.prototype.invoke=function(e,t){var n=this,i=this.serviceRegistry.get(e.service);return null==i?(I("onError",e,null),Promise.reject("Could not find service '"+i+"'")):(this.notifyInflight(e,!0),i.invoke(e,t).then((function(t){return n.notifyInflight(e,!1,t),t}),(function(t){return n.notifyInflight(e,!1,t),Promise.reject(t)})))},t.prototype.registerService=function(e){this.serviceRegistry.set(e.name,e)},t}(X),ie=function(){function e(){}return e.setPaginationQueryParams=function(e,t,n){t.parameters.forEach((function(t){var i;i="offset"===n.type||n.input.offset?"offset":"page",t.name===n.input[i].split(".")[0]?t.sampleValue=e.pagination.page:t.name===n.input.size.split(".")[0]&&(t.sampleValue=e.pagination.size)}))},e.setVariablePagination=function(e,t,n){e.pagination||(e.pagination={empty:!1}),e.pagination.size=t.size,e.pagination.page=t.page||0,e.pagination.totalElements=t.totalElements,e.pagination.numberOfElements=e.pagination.size,e.pagination.number=n.page?n.page-1:0,e.pagination.totalPages=e.pagination.totalElements/e.pagination.size,e.pagination.totalElements%e.pagination.size==0?e.pagination.totalPages=parseInt(e.pagination.totalPages):e.pagination.totalPages=parseInt(e.pagination.totalPages)+1,t.next?(e.pagination.next=t.next,e.pagination.prev=t.prev,e.pagination.last=!t.next,e.pagination.first=!t.prev):(e.pagination.first=e.pagination.page<=1,e.pagination.last=""===t.hasMoreItems?!(e.pagination.page<e.pagination.totalPages):!t.hasMoreItems)},e.setPaginationItems=function(e,t,n,i,a){var r;if(_.startsWith(e,"$body")){var s=e.replace("$body.","");try{n[i]=o.jmespath.search(t,s)}catch(t){console.warn(e+" expression needs to be corrected as per JMES guidelines")}}else if(_.startsWith(e,"$header")){var l=e.replace("$header.",""),c=Object.fromEntries(a.headers),p=l.split(".");try{n[i]=o.jmespath.search(c,p[0].toLowerCase())}catch(t){console.warn(e+" expression needs to be corrected as per JMES guidelines")}if(null===(r=n[i])||void 0===r?void 0:r.length){var d=n[i].join();if(1===p.length)n[i]=d;else{var u=p.slice(1).join("."),h=JSON.parse(d);/[!@#$%^&*()+\=\[\]{};':"\\|,<>\/?]+/.test(u)&&(u="headerResp."+u);try{n[i]=o.jmespath.search(h,u)}catch(t){console.warn(e+" expression needs to be corrected as per JMES guidelines")}}}}},e.getPaginationInfo=function(e,t){return(null==e?void 0:e.paginationInfo)?e.paginationInfo:t._paginationConfig},e.checkPaginationAtQuery=function(e,t,n){var i,o=this.getPaginationInfo(e,t);if(n&&n.page&&(null==o?void 0:o.input.size)&&t.pagination){var a;a="offset"===o.type||o.input.offset?"offset":"page";var r=o.input[a].split(".")[0],s=_.find(e.parameters,(function(e){return e.name===r}));!_.isEmpty(t.dataBinding)&&s&&"query"===s.parameterType&&((null===(i=o.output)||void 0===i?void 0:i.page)||"offset"===o.type?t.pagination.page=this.getOffsetInfo(t,n):t.pagination.page=n.page,this.setPaginationQueryParams(t,e,o))}},e.getOffsetInfo=function(e,t){return e.pagination.size*(t.page?t.page-1:1)},e.setPaginationAtReq=function(e,t,n,i,o,a,r){var s,l={},c={};s="offset"===e.type||e.input.offset?"offset":"page";var p=e.input[s].split(".")[0],d=_.find(t.parameters,(function(e){return e.name===p}));if("header"===(null==d?void 0:d.parameterType))_.set(l,e.input[s],n.pagination.page),_.set(l,e.input.size,n.pagination.size),i[p]=JSON.stringify(l[p]),c.headers=i;else if("body"===(null==d?void 0:d.parameterType)){var u=JSON.parse(d.sampleValue),h=e.input[s].split(".")[1];if(u&&u[h]){var m=e.input[s].split(".").splice(1).join(".");"offset"!==s?_.set(l,m,n.pagination.page):_.set(l,m,this.getOffsetInfo(n,r)),_.set(l,e.input.size.split(".").splice(1).join("."),n.pagination.size),u[h]=l[h],o=JSON.stringify(u),c.requestBody=o}}else if(n.pagination.next&&d)if("path"===d.parameterType){var f=t.relativePath.split("/"),g="{"+d.name+"}",v=f.indexOf(g),y=void 0;y=n.pagination.isNext?n.pagination.next.split("/"):n.pagination.prev.split("/");var b=void 0,w=void 0;t.directPath?((b=(w=new URL(a)).pathname.split("/"))[v]=y[v],w.pathname=b.join("/"),a=w.href,c.url=a):((b=a.split("/"))[v+1]=y[v],a=b.join("/"),c.url=a)}else if("query"===d.parameterType){f=a.split("?"),y=void 0;y=n.pagination.isNext?n.pagination.next.split("?"):n.pagination.prev.split("?"),f[1]=y[1],a=f.join("?"),c.url=a}return c},e.setParameterVal=function(e,t,n,i){var o=this.getPaginationInfo(n,i).input[e].split(".")[0],a=_.find(n.parameters,(function(e){return e.name===o}));t[e]=_.result(a,"sampleValue")},e.generatePaginationRes=function(e,t,n,i,o,a){var r={},s=t.output;if(null==s?void 0:s.next)s&&(this.setPaginationItems(s.next,n,r,"next",i),this.setPaginationItems(s.prev,n,r,"prev",i));else{if((null==s?void 0:s.size)?this.setPaginationItems(s.size,n,r,"size",i):this.setParameterVal("size",r,e,a),(null==s?void 0:s.page)?this.setPaginationItems(s.page,n,r,"page",i):"offset"!==t.type&&this.setParameterVal("page",r,e,a),_.startsWith(null==s?void 0:s.totalElements,"$minValue")){var l=s.totalElements.replace("$minValue=",""),c=r.page?r.page:o.page,p=r.size*c;!a.pagination||a.pagination.totalElements>p?r.totalElements=parseInt(l):r.totalElements=p+1}else(null==s?void 0:s.totalElements)?this.setPaginationItems(s.totalElements,n,r,"totalElements",i):"offset"===t.type||t.input.offset?r.totalElements=r.size*(o.page?o.page:1)+1:r.totalElements=r.size*r.page+1;(null==s?void 0:s.hasMoreItems)?this.setPaginationItems(s.hasMoreItems,n,r,"hasMoreItems",i):r.hasMoreItems=""}return r},e}(),oe=function(e){return _.includes(["QueryExecution","ProcedureExecution"],e.controller)&&_.includes(["put","post"],e.operationType)},ae=function(e,t){return e===m.CONTROLLER_TYPE.QUERY&&t===m.SERVICE_TYPE.DATA},re=function(e,t,i){var o=_.toLower(n.extractType(_.get(t,"items.type")||t.type)),a=h.isStudioMode?t["x-WM-CONTENT_TYPE"]:t.contentType;if(q())return"file"===o||"string"!==a&&a?_.isArray(i)&&"file"===o?_.forEach(i,(function(i){e.append(t.name,i&&i.content||n.getBlob(i),i.name)})):e.append(t.name,n.getBlob(i,a),i&&i.name):(_.isObject(i)&&(i=JSON.stringify(i)),e.append(t.name,i)),e},se=function(e,t){var i,o={},a=[];return _.forEach(t,(function(t){i=_.get(e,t.name),_.isUndefined(i)||""===i||null===i||t.readOnly?t.required&&a.push(t.name||t.id):(i=n.isDateTimeType(t.type)?K(i,t.type):i,_.isArray(i)&&"string"===_.toLower(n.extractType(t.type))&&(i=_.join(i,",")),o[t.name]=i)})),{requestBody:o,missingParams:a}},le=function(e){var t={},n=m.REST_SERVICE.UNCLOAKED_HEADERS,i=m.REST_SERVICE.PREFIX.CLOAK_HEADER_KEY;return _.forEach(e,(function(e,o){_.includes(n,o.toUpperCase())?t[o]=e:t[i+o]=e})),t},ce=function(){function t(){}return t.constructRequestParams=function(t,i,o,a){if(t=t||{},null===i)return{error:{type:m.REST_SERVICE.ERR_TYPE.USER_UNAUTHORISED,message:m.REST_SERVICE.ERR_MSG.USER_UNAUTHORISED,field:"_wmServiceOperationInfo"}};if(_.isEmpty(i))return{error:{type:m.REST_SERVICE.ERR_TYPE.METADATA_MISSING,message:m.REST_SERVICE.ERR_MSG.METADATA_MISSING,field:"_wmServiceOperationInfo"}};if(i&&i.invalid)return{error:{type:m.REST_SERVICE.ERR_TYPE.CRUD_OPERATION_MISSING,message:m.REST_SERVICE.ERR_MSG.CRUD_OPERATION_MISSING,field:"_wmServiceOperationInfo"}};var r,s,l,c,p,d,u,y,b,w,P,O,E,R,A,T,S,C=i.directPath||"",I=i.basePath?i.basePath+i.relativePath:i.relativePath,D=oe(t),x="",N={},k=[],M=null;function L(){return b||(b=new FormData)}if(E=_.get(i.securityDefinitions,"0"))switch(E.type){case m.REST_SERVICE.SECURITY_DEFN.OAUTH2:if(T=E[m.REST_SERVICE.OAUTH_PROVIDER_KEY],S=null,!(R=e.oauthService.getAccessToken(T,S)))return{error:{type:m.REST_SERVICE.ERR_TYPE.NO_ACCESSTOKEN,message:m.REST_SERVICE.ERR_MSG.NO_ACCESSTOKEN},securityDefnObj:E};N[m.REST_SERVICE.AUTH_HDR_KEY]=m.REST_SERVICE.PREFIX.AUTH_HDR_VAL.OAUTH+" "+R;break;case m.REST_SERVICE.SECURITY_DEFN.BASIC:if(d=o.wm_auth_username,u=o.wm_auth_password,!d||!u)return{error:{type:m.REST_SERVICE.ERR_TYPE.NO_CREDENTIALS,message:m.REST_SERVICE.ERR_MSG.NO_CREDENTIALS},securityDefnObj:E};N[m.REST_SERVICE.AUTH_HDR_KEY]=m.REST_SERVICE.PREFIX.AUTH_HDR_VAL.BASIC+" "+btoa(d+":"+u),M={type:m.REST_SERVICE.AUTH_TYPE.BASIC}}if(ie.checkPaginationAtQuery(i,t,a),i.proxySettings=i.proxySettings||{web:!0,mobile:!1},y=i.httpMethod||i.methodType,w=h.hasCordova?i.proxySettings.mobile:i.proxySettings.web,A=i.proxySettings.withCredentials,l=w?I:C,_.forEach(i.parameters,(function(e){function a(){o?(P=o[e.name]&&_.isObject(o[e.name])?o[e.name]:o,O=_.get(i,["definitions",e.type])):(P=c||{},O=e.children)}var c=e.sampleValue;if(n.isDefined(c)&&null!==c&&""!==c||D&&"file"!==e.type)switch(t.serviceType===m.SERVICE_TYPE.DATA&&n.isDateTimeType(e.type)&&(c=K(c,e.type)),_.isArray(c)&&"string"===_.toLower(n.extractType(e.type))&&t.serviceType===m.SERVICE_TYPE.DATA&&(c=_.join(c,",")),e.parameterType.toUpperCase()){case"QUERY":if(_.isNull(c)&&ae(t.controller,t.serviceType))break;x?x+="&"+e.name+"="+encodeURIComponent(c):x="?"+e.name+"="+encodeURIComponent(c);break;case"PATH":p=new RegExp("\\s*\\{\\s*"+e.name+"(:\\.\\+)?\\s*\\}\\s*"),l=l.replace(p,c);break;case"HEADER":N[e.name]=c;break;case"BODY":D?(a(),r=se(P,O),s=r.requestBody,k=_.concat(k,r.missingParams)):s=c;break;case"FORMDATA":D&&e.name===g.WM_DATA_JSON?(a(),r=se(P,O),s=re(L(),e,r.requestBody),k=_.concat(k,r.missingParams)):s=re(L(),e,c)}else e.required&&k.push(e.name||e.id)})),k.length)return{error:{type:m.REST_SERVICE.ERR_TYPE.REQUIRED_FIELD_MISSING,field:k.join(","),message:n.replace(m.REST_SERVICE.ERR_MSG.REQUIRED_FIELD_MISSING,[k.join(",")]),skipDefaultNotification:!0}};_.includes(f.NON_BODY_HTTP_METHODS,_.toUpper(y))||i.consumes&&i.consumes[0]===f.CONTENT_TYPES.MULTIPART_FORMDATA||(N["Content-Type"]=i.consumes&&i.consumes[0]||"application/json"),_.includes(i.consumes,f.CONTENT_TYPES.FORM_URL_ENCODED)&&!_.includes(f.NON_BODY_HTTP_METHODS,(y||"").toUpperCase())?(x&&(s=(s?s+"&":"")+x.substring(1)),N["Content-Type"]=f.CONTENT_TYPES.FORM_URL_ENCODED):l+=x,w&&(N=t.serviceType!==m.SERVICE_TYPE.REST&&t.serviceType!==m.SERVICE_TYPE.OPENAPI||i.skipCloakHeaders?N:le(N),t.getPrefabName()&&-1!==m.REST_SUPPORTED_SERVICES.indexOf(t.serviceType)?(l="prefabs/"+t.getPrefabName()+l,c="invokePrefabRestService"):t.getPrefabName()||(l="services"+l),l=v.project.deployedUrl+l);var F=ie.getPaginationInfo(i,t);if(F&&t.pagination){var j=ie.setPaginationAtReq(F,i,t,N,s,l,a);j&&(j.headers?N=j.headers:j.requestBody?s=j.requestBody:j.url&&(l=j.url))}return{projectID:v.project.id,url:l,target:c,method:y,headers:N,data:s,authDetails:M,isDirectCall:!w,isExtURL:t.serviceType===m.SERVICE_TYPE.REST,withCredentials:A}},t.isFileUploadRequest=function(e){return"FileService"===e.service&&"uploadFile"===e.operation},t.excludePaginationParams=function(e){return _.map(_.reject(e,(function(e){return _.includes(m.PAGINATION_PARAMS,e.name)})),(function(e){return e.name}))},t}(),pe=function(t){function o(){var e=t.apply(this,P([],w(arguments)))||this;return e.scope_var_socket_map=new Map,e.PROPERTY={SERVICE:"service",DATA_UPDATE_STRATEGY:"dataUpdateStrategy",DATA_LIMIT:"dataLimit"},e.DATA_UPDATE_STRATEGY={REFRESH:"refresh",PREPEND:"prepend",APPEND:"append"},e}return b(o,t),o.prototype.shouldAppendData=function(e){return(e=e||this)[this.PROPERTY.DATA_UPDATE_STRATEGY]!==this.DATA_UPDATE_STRATEGY.REFRESH},o.prototype.shouldAppendLast=function(e){return e[this.PROPERTY.DATA_UPDATE_STRATEGY]===this.DATA_UPDATE_STRATEGY.APPEND},o.prototype.getDataLimit=function(e){return e.dataLimit},o.prototype.getURL=function(t){var n,i=t.getPrefabName(),o=i?_.get(e.metadataService.getByOperationId(t.operationId,i),"wmServiceOperationInfo"):_.get(e.metadataService.getByOperationId(t.operationId),"wmServiceOperationInfo"),a=t.dataBinding;if(_.forEach(o.parameters,(function(e){e.sampleValue=a[e.name]})),$.extend(o,{skipCloakHeaders:!0}),!(n=ce.constructRequestParams(t,o,a)).error||!n.error.message)return n.url;this._onSocketError(t,{data:n.error.message})},o.prototype._onSocketMessage=function(e,t){var i,o,a,r,s,l=_.get(t,"data");l=n.getValidJSON(l)||n.xmlToJson(l)||l,i=I(m.EVENT.MESSAGE_RECEIVE,e,l,t),l=n.isDefined(i)?i:l,this.shouldAppendData(e)?(e.dataSet=e.dataSet||[],o=e.dataSet.length,a=this.getDataLimit(e),r=this.shouldAppendLast(e),a&&o>=a&&(r?e.dataSet.shift():e.dataSet.pop()),s=r?o:0,e.dataSet.splice(s,0,l)):e.dataSet=n.isDefined(i)?i:l},o.prototype._onBeforeSend=function(e,t){return I(m.EVENT.BEFORE_SEND,e,t)},o.prototype._onBeforeSocketClose=function(e,t){return I(m.EVENT.BEFORE_CLOSE,e,_.get(t,"data"),t)},o.prototype._onBeforeSocketOpen=function(e,t){return I(m.EVENT.BEFORE_OPEN,e,_.get(t,"data"),t)},o.prototype._onSocketOpen=function(e,t){e._socketConnected=!0,I(m.EVENT.OPEN,e,_.get(t,"data"),t)},o.prototype.freeSocket=function(e){this.scope_var_socket_map.set(e,void 0)},o.prototype._onSocketClose=function(e,t){e._socketConnected=!1,this.freeSocket(e),I(m.EVENT.CLOSE,e,_.get(t,"data"),t)},o.prototype._onSocketError=function(e,t){e._socketConnected=!1,this.freeSocket(e),I(m.EVENT.ERROR,e,_.get(t,"data")||"Error while connecting with "+e.service,t)},o.prototype.getSocket=function(e){var t=this.getURL(e),o=this.scope_var_socket_map.get(e);return o||(h.hasCordova||!n.isInsecureContentRequest(t)?((o=new i.$WebSocket(t)).onOpen(this._onSocketOpen.bind(this,e)),o.onError(this._onSocketError.bind(this,e)),o.onMessage(this._onSocketMessage.bind(this,e)),o.onClose(this._onSocketClose.bind(this,e)),this.scope_var_socket_map.set(e,o),e._socket=o,o):void n.triggerFn(this._onSocketError.bind(this,e)))},o.prototype.open=function(e,t,i){var o;if(!1!==this._onBeforeSocketOpen(e))return o=this.getSocket(e),n.triggerFn(t),o;n.triggerFn(i)},o.prototype.close=function(e){var t=this._onBeforeSocketClose(e),n=this.getSocket(e);!1!==t&&n.close()},o.prototype.send=function(e,t){var i,o=this.getSocket(e);t=t||_.get(e,"dataBinding.RequestBody"),!1!==(i=this._onBeforeSend(e,t))&&(t=n.isDefined(i)?i:t,t=n.isObject(t)?JSON.stringify(t):t,o.send(t,0))},o}(X),de=new Map,ue={Variable:X,Action:Q,"wm.NavigationVariable":Z,"wm.NotificationVariable":J,"wm.LoginVariable":ee,"wm.LogoutVariable":te,"wm.DeviceVariable":ne,"wm.WebSocketVariable":pe},he=function(){function e(){}return e.get=function(e){return de.has(e)?de.get(e):de.set(e,new ue[e]).get(e)},e}(),me=function(){function e(){}return e.prototype.invoke=function(e,t){var i=this.operations.find((function(t){return t.name===e.operation}));if(null==i)return I(m.EVENT.ERROR,e,null),Promise.reject("Could not find operation '"+e.operation+"' in service '"+this.name+"'");if(n.hasCordova()){var o=new Map;return void 0!==e.dataBinding&&(Object.entries(e).forEach((function(e){o.set(e[0],e[1])})),Object.entries(e.dataBinding).forEach((function(e){o.set(e[0],e[1])}))),i.invoke(e,t,o).then((function(t){return e.dataSet=t,n.$invokeWatchers(!0),I(m.EVENT.SUCCESS,e,t),t}),(function(t){return e.dataSet={},n.$invokeWatchers(!0),I(m.EVENT.ERROR,e,null),t}))}return Promise.resolve().then((function(){return I(m.EVENT.SUCCESS,e,i.model),i.model}))},e}(),fe=function(){return he.get(m.CATEGORY.DEVICE)},ge=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.init=function(){fe().initBinding(this)},t.prototype.invoke=function(e,t,n){fe().invoke(this,e).then(t,n)},t}(t.ApiAwareVariable),ve=function(){return he.get(m.CATEGORY.NAVIGATION)},ye=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.invoke=function(e){ve().invoke(this,e)},t.prototype.navigate=function(e){this.invoke(e)},t.prototype.init=function(){ve().initBinding(this,"dataBinding","dataBinding"),ve().initBinding(this,"dataSet","dataSet")},t}(t.BaseAction),be=function(){return he.get(m.CATEGORY.NOTIFICATION)},we=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.execute=function(t,i){var o=this,a=e.prototype.execute.call(this,t,i);return n.isDefined(a)?a:new Promise((function(e,a){switch(t){case n.DataSource.Operation.INVOKE:o.invoke(i,e,a);break;case n.DataSource.Operation.NOTIFY:o.notify(i,e,a);break;default:a(t+" operation is not supported on this data source")}}))},t.prototype.notify=function(e,t,n){be().notify(this,e,t,n)},t.prototype.invoke=function(e,t,n){this.notify(e,t,n)},t.prototype.getMessage=function(){return be().getMessage(this)},t.prototype.setMessage=function(e){return be().setMessage(this,e)},t.prototype.clearMessage=function(){return be().setMessage(this,"")},t.prototype.getOkButtonText=function(){return be().getOkButtonText(this)},t.prototype.setOkButtonText=function(e){return be().setOkButtonText(this,e)},t.prototype.getToasterDuration=function(){return be().getToasterDuration(this)},t.prototype.setToasterDuration=function(e){return be().setToasterDuration(this,e)},t.prototype.getToasterClass=function(){return be().getToasterClass(this)},t.prototype.setToasterClass=function(e){return be().setToasterClass(this,e)},t.prototype.getToasterPosition=function(){return be().getToasterPosition(this)},t.prototype.setToasterPosition=function(e){return be().setToasterPosition(this,e)},t.prototype.getAlertType=function(){return be().getAlertType(this)},t.prototype.setAlertType=function(e){return be().setAlertType(this,e)},t.prototype.getCancelButtonText=function(){return be().getCancelButtonText(this)},t.prototype.setCancelButtonText=function(e){return be().setCancelButtonText(this,e)},t.prototype.init=function(){be().initBinding(this,"dataBinding","dataBinding"),be().initBinding(this,"dataSet","dataSet")},t}(t.BaseAction),Pe=function(){return he.get(m.CATEGORY.LOGIN)},_e=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.login=function(e,t,n){return Pe().login(this,e,t,n)},t.prototype.invoke=function(e,t,n){return this.login(e,t,n)},t.prototype.cancel=function(){},t.prototype.init=function(){Pe().initBinding(this,"dataBinding","dataBinding")},t}(t.BaseAction),Oe=function(){return he.get(m.CATEGORY.LOGOUT)},Ee=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.logout=function(e,t,n){Oe().logout(this,e,t,n)},t.prototype.invoke=function(e,t,n){this.logout(e,t,n)},t.prototype.cancel=function(){},t}(t.BaseAction),Re=function(){return he.get(m.CATEGORY.WEBSOCKET)},Ae=function(e){function t(t){var n=e.call(this)||this;return Object.assign(n,t),n}return b(t,e),t.prototype.open=function(e,t){return Re().open(this,e,t)},t.prototype.close=function(){return Re().close(this)},t.prototype.update=function(){return Re().update(this)},t.prototype.send=function(e){return Re().send(this,e)},t.prototype.cancel=function(){return this.close()},t.prototype.invoke=function(e,t,n){this.open(t,n)},t.prototype.init=function(){Re().initBinding(this)},t}(t.ApiAwareVariable),Te=function(){function e(){}return e.create=function(e,n){var i;switch(e.category){case t.VARIABLE_CONSTANTS.CATEGORY.MODEL:i=new t.ModelVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.SERVICE:i=new t.ServiceVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LIVE:i=new t.LiveVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.CRUD:i=new t.CrudVariable(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.DEVICE:i=new ge(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.NAVIGATION:i=new ye(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.NOTIFICATION:i=new we(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LOGIN:i=new _e(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.LOGOUT:i=new Ee(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.TIMER:i=new t.TimerAction(e);break;case t.VARIABLE_CONSTANTS.CATEGORY.WEBSOCKET:i=new Ae(e)}return i._context=n,i.__cloneable__=!1,i},e}(),Se=function(){function e(e){this.$http=e,this.CONTEXT_APP="app"}return e.prototype.isLoaded=function(){return!!this.metadataMap&&this.metadataMap.has(this.CONTEXT_APP)},e.prototype.load=function(e){var t,i=this;return t=n.hasCordova()?"metadata/"+(e?"prefabs/"+e+"/":"app/")+"service-definitions.json":"./services/"+(e?"prefabs/"+e+"/":"")+"servicedefs",new Promise((function(n,o){i.$http.send({url:t,method:"GET"}).then((function(t){i.metadataMap=i.metadataMap||new Map,i.providerMap=i.providerMap||new Map,t.body=t.body||{},i.metadataMap.set(e||i.CONTEXT_APP,t.body.serviceDefs),t.body.securityDefinitions&&i.providerMap.set(e||i.CONTEXT_APP,t.body.securityDefinitions.oauthProvider),n(t.body.serviceDefs)}),o)}))},e.prototype.getByOperationId=function(e,t){t=t||this.CONTEXT_APP;var n=this.metadataMap.get(t);return n&&n[e]},e.prototype.getByProviderId=function(e,t){t=t||this.CONTEXT_APP;var n=this.providerMap.get(t);return n&&n[e]},e.prototype.getByCrudId=function(e,t){t=t||this.CONTEXT_APP;var n=this.metadataMap.get(t),i=[];for(var o in n)n[o]&&n[o].crudOperationId===e&&i.push(n[o]);return i},e}();Se.decorators=[{type:a.Injectable}],Se.ctorParameters=function(){return[{type:n.AbstractHttpService}]};var Ce=function(){function t(){}return t.prototype.format=function(t,n){return e.appManager.getPipe("date").transform(t,n)},t}(),Ie=function(){function e(e,n,i,o,a,r,s,l){this.httpService=e,this.metadataService=n,this.navigationService=i,this.routerService=o,this.toasterService=a,this.oAuthService=r,this.securityService=s,this.dialogService=l,C("http",this.httpService),C("metadata",this.metadataService),C("navigationService",this.navigationService),C("router",this.routerService),C("toaster",this.toasterService),C("oAuth",this.oAuthService),C("security",this.securityService),C("dialog",this.dialogService),t.wmSetDependency("oAuth",this.oAuthService),t.wmSetDependency("security",this.securityService),t.wmSetDependency("metadata",this.metadataService),t.wmSetDependency("http",this.httpService)}return e.prototype.bulkCancel=function(e){Object.keys(e).forEach((function(t){var n=e[t];_.isFunction(n.cancel)&&n.cancel()}))},e.prototype.triggerStartUpdate=function(e){return Promise.all(Object.keys(e).map((function(t){return e[t]})).filter((function(e){return(null==e?void 0:e.startUpdate)&&e.invoke})).map((function(e){return e.invoke()})))},e.prototype.processBindExp=function(e,i,o){var a=t.getTarget(o),r=t.getTargetNodeKey(e.target),s=_.isArray(e.value)?e.value[0]:e.value;return s&&(s.startsWith&&s.startsWith("bind:")?s=n.$watch(s.replace("bind:",""),i,{},o.invokeOnParamChange.bind(o,e),void 0,void 0,void 0,(function(){return o.isMuted})):_.isUndefined(e.value)||(t.setValueToNode(e.target,e,a,o,e.value,!0),a!==r&&(t.internalBoundNodeMap.has(o)||t.internalBoundNodeMap.set(o,{}),_.set(t.internalBoundNodeMap.get(o),[o.name,a,e.target],e.value)))),{name:e.target,value:s}},e.prototype.processBinding=function(e,t,n,i){var o=this;i=i||"dataBinding";var a=e[n=n||"dataBinding"];e[n]={},e["_bind"+n]=a,a&&_.isArray(a)&&a.forEach((function(n){"wm.Variable"===e.category&&"dataBinding"===n.target&&(n.target="dataSet"),o.processBindExp(n,t,e)}))},e.prototype.isVariableSeperated=function(e,t){return"wm.Variable"===e[t].category||"wm.ServiceVariable"===e[t].category||"wm.LiveVariable"===e[t].category||"wm.CrudVariable"===e[t].category},e.prototype.getBindSourceTarget=function(e){return"wm.LiveVariable"===e.category?"read"===e.operation?"filterFields":"inputFields":"wm.ModelVariable"===e.category?"dataSet":"dataBinding"},e.prototype.register=function(e,i,o){var a,r=this,s={Variables:{},Actions:{},callback:this.triggerStartUpdate};for(var l in i){if((a=Te.create(i[l],o)).init(),this.isVariableSeperated(i,l)&&(this.processBinding(a,o,"dataBinding",this.getBindSourceTarget(a)),a.httpService=this.httpService,a.dateFormatter=new Ce,a.subscribe("afterInvoke",(function(){return n.$invokeWatchers(!0)})),"wm.LiveVariable"===a.category&&"read"===a.operation&&n.processFilterExpBindNode(a._context,a.filterExpressions,a),"wm.CrudVariable"!==a.category&&"wm.ServiceVariable"!==a.category||(a.simulateFileDownload=U)),this.isVariableSeperated(i,l)||"wm.TimerVariable"===i[l].category)for(var c in m.EVENT)a[m.EVENT[c]]&&(a[m.EVENT[c]]=n.$parseEvent(a[m.EVENT[c]]));a instanceof t.BaseAction?s.Actions[l]=a:s.Variables[l]=a}return o.registerDestroyListener&&o.registerDestroyListener((function(){r.bulkCancel(s.Variables),r.bulkCancel(s.Actions)})),s},e.prototype.destroy=function(){},e.prototype.registerDependency=function(e,n){C(e,n),t.wmSetDependency(e,n)},e}();Ie.decorators=[{type:a.Injectable}],Ie.ctorParameters=function(){return[{type:n.AbstractHttpService},{type:Se},{type:n.AbstractNavigationService},{type:r.Router},{type:n.AbstractToasterService},{type:s.OAuthService},{type:l.SecurityService},{type:n.AbstractDialogService}]};var De=d.ToastrModule.forRoot({maxOpened:1,autoDismiss:!0}),xe=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Ie,Se,c.Location,{provide:c.LocationStrategy,useClass:c.HashLocationStrategy}]}},e}();xe.decorators=[{type:a.NgModule,args:[{imports:[c.CommonModule,De,p.HttpClientModule,u.HttpServiceModule,s.OAuthModule,l.SecurityModule],declarations:[]}]}],e.$rootScope=v,e.CONSTANTS=h,e.DB_CONSTANTS={DATABASE_MATCH_MODES:{like:"LIKE",start:"STARTING_WITH",startignorecase:"STARTING_WITH_IGNORECASE",end:"ENDING_WITH",endignorecase:"ENDING_WITH_IGNORECASE",anywhere:"CONTAINING",anywhereignorecase:"CONTAINING_IGNORECASE",nowhere:"DOES_NOT_CONTAIN",nowhereignorecase:"DOES_NOT_CONTAIN_IGNORECASE",exact:"EQUALS",exactignorecase:"EQUALS_IGNORECASE",notequals:"NOT_EQUALS",notequalsignorecase:"NOT_EQUALS_IGNORECASE",between:"BETWEEN",in:"IN",notin:"NOTIN",lessthan:"LESS_THAN",lessthanequal:"LESS_THAN_OR_EQUALS",greaterthan:"GREATER_THAN",greaterthanequal:"GREATER_THAN_OR_EQUALS",null:"NULL",isnotnull:"IS_NOT_NULL",empty:"EMPTY",isnotempty:"IS_NOT_EMPTY",nullorempty:"NULL_OR_EMPTY"},DATABASE_EMPTY_MATCH_MODES:["NULL","IS_NOT_NULL","EMPTY","IS_NOT_EMPTY","NULL_OR_EMPTY"],DATABASE_RANGE_MATCH_MODES:["IN","NOTIN","BETWEEN","LESS_THAN","LESS_THAN_OR_EQUALS","GREATER_THAN","GREATER_THAN_OR_EQUALS","NOT_EQUALS"],DATABASE_NULL_EMPTY_MATCH:{NULL:"NULL",IS_NOT_NULL:"IS_NOT_NULL",EMPTY:"NULL",IS_NOT_EMPTY:"IS_NOT_NULL",NULL_OR_EMPTY:"NULL"},DATABASE_MATCH_MODES_WITH_QUERY:{LIKE:"${0} like ${1}",STARTING_WITH:"${0} like ${1}",STARTING_WITH_IGNORECASE:"${0} like ${1}",ENDING_WITH:"${0} like ${1}",ENDING_WITH_IGNORECASE:"${0} like ${1}",CONTAINING:"${0} like ${1}",CONTAINING_IGNORECASE:"${0} like ${1}",DOES_NOT_CONTAIN:"${0} not like ${1}",DOES_NOT_CONTAIN_IGNORECASE:"${0} not like ${1}",EQUALS:"${0}=${1}",EQUALS_IGNORECASE:"${0}=${1}",NOT_EQUALS:"${0}!=${1}",NOT_EQUALS_IGNORECASE:"${0}!=${1}",BETWEEN:"${0} between ${1}",IN:"${0} in ${1}",NOTIN:"${0} not in ${1}",LESS_THAN:"${0}<${1}",LESS_THAN_OR_EQUALS:"${0}<=${1}",GREATER_THAN:"${0}>${1}",GREATER_THAN_OR_EQUALS:"${0}>=${1}",NULL:"${0} is null",IS_NOT_NULL:"${0} is not null",EMPTY:"${0}=''",IS_NOT_EMPTY:"${0}<>''",NULL_OR_EMPTY:"${0} is null or ${0}=''"},DATABASE_STRING_MODES:["LIKE","STARTING_WITH","STARTING_WITH_IGNORECASE","ENDING_WITH","ENDING_WITH_IGNORECASE","CONTAINING","CONTAINING_IGNORECASE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_IGNORECASE","EQUALS","EQUALS_IGNORECASE","NOT_EQUALS","NOT_EQUALS_IGNORECASE"]},e.DeviceVariableManager=ne,e.DeviceVariableService=me,e.Formatter=Ce,e.MetadataService=Se,e.SWAGGER_CONSTANTS=g,e.VARIABLE_CONSTANTS=m,e.VARIABLE_URLS={DATABASE:{searchTableData:{url:"/:service/:dataModelName/:entityName/search?page=:page&size=:size&:sort",method:"POST"},searchTableDataWithQuery:{url:"/:service/:dataModelName/:entityName/filter?page=:page&size=:size&:sort",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}},readTableData:{url:"/:service/:dataModelName/:entityName?page=:page&size=:size&:sort",method:"GET"},insertTableData:{url:"/:service/:dataModelName/:entityName",method:"POST"},insertMultiPartTableData:{url:"/:service/:dataModelName/:entityName",method:"POST",headers:{}},updateTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"PUT"},updateMultiPartTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"POST",headers:{}},deleteTableData:{url:"/:service/:dataModelName/:entityName/:id",method:"DELETE"},updateCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"PUT"},periodUpdateCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id/periods?:id",method:"PUT"},updateMultiPartCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"POST",headers:{}},deleteCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id?:id",method:"DELETE"},periodDeleteCompositeTableData:{url:"/:service/:dataModelName/:entityName/composite-id/periods?:id",method:"DELETE"},getDistinctDataByFields:{url:"/:service/:dataModelName/:entityName/aggregations?page=:page&size=:size&:sort",method:"POST"},exportTableData:{url:"/services/:dataModelName/:entityName/export?:sort",method:"POST"},readTableRelatedData:{url:"/:service/:dataModelName/:entityName/:id/:relatedFieldName?page=:page&size=:size&:sort",method:"GET"},executeNamedQuery:{url:"/:service/:dataModelName/queryExecutor/queries/:queryName?page=:page&size=:size&:queryParams",method:"GET"},executeCustomQuery:{url:"/:service/:dataModelName/queries/execute?page=:page&size=:size",method:"POST"},executeAggregateQuery:{url:"/services/:dataModelName/:entityName/aggregations?page=:page&size=:size&sort=:sort",method:"POST"},executeNamedProcedure:{url:"/:service/:dataModelName/procedureExecutor/procedure/execute/:procedureName?page=:page&size=:size&:procedureParams",method:"GET"},countTableDataWithQuery:{url:"/:service/:dataModelName/:entityName/count?:queryParams",method:"GET"}},oauthConfiguration:{getAuthorizationUrl:{url:"services/oauth2/:providerId/authorizationUrl",method:"GET"}}},e.VariableManagerFactory=he,e.VariablesModule=xe,e.VariablesService=Ie,e.WS_CONSTANTS=f,e.debounceVariableCall=z,e.formatDate=K,e.formatExportExpression=function(e){return _.forEach(e,(function(e){e.expression&&(e.expression="${"+e.expression+"}")})),e},e.getEvaluatedOrderBy=function(e,t){var n,i;return!t||_.isEmpty(t)?e:e?(e=_.split(e,","),t=_.split(t,","),n=_.map(t,(function(e){return _.split(_.trim(e)," ")[0]})),_.remove(e,(function(e){return _.includes(n,_.split(_.trim(e)," ")[0])})),i=e.length?","+_.join(e,","):"",_.join(t,",")+i):t},e.initiateCallback=I,e.isFileUploadSupported=q,e.processBinding=W,e.setDependency=C,e.setInput=function(e,t,i,o){e=e||{};var a,r,s={};if(_.isObject(o))switch(o.type){case"file":i=n.getBlob(i,o.contentType);break;case"number":i=_.isNumber(i)?i:parseInt(i,10)}return _.isObject(t)?s=t:t.indexOf(".")>-1?(r=(a=t.split(".")).pop(),e=n.findValueOf(e,a.join("."),!0),s[t=r]=i):s[t]=i,_.forEach(s,(function(t,n){e[n]=t})),e},e.simulateFileDownload=U,e.toastrModule=De,e["\u0275a"]=X,e["\u0275b"]=Q,e["\u0275c"]=Z,e["\u0275d"]=J,e["\u0275e"]=ee,e["\u0275f"]=te,e["\u0275g"]=pe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@wm/mobile/runtime",["exports","@angular/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.mobile=e.wm.mobile||{},e.wm.mobile.runtime={}),e.ng.core)}(this,(function(e,t){"use strict";var n=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();n.decorators=[{type:t.NgModule,args:[{}]}],e.MobileRuntimeModule=n,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@wm/mobile/runtime/dynamic",["exports","@angular/core"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.mobile=e.wm.mobile||{},e.wm.mobile.runtime=e.wm.mobile.runtime||{},e.wm.mobile.runtime.dynamic={}),e.ng.core)}(this,(function(e,t){"use strict";var n=function(){};n.decorators=[{type:t.NgModule,args:[{}]}],e.MOBILE_COMPONENT_MODULES_FOR_ROOT=[],e.MobileRuntimeDynamicModule=n,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("@angular/common"),require("@wm/core"),require("@wm/security"),require("@wm/variables"),require("@wm/components/page"),require("rxjs"),require("@wm/components/base"),require("@wm/components/prefab"),require("@angular/common/http"),require("@angular/platform-browser"),require("ngx-toastr"),require("@wm/components/dialogs"),require("@wm/components/dialogs/confirm-dialog"),require("@wm/components/dialogs/design-dialog"),require("@wm/mobile/runtime"),require("@wm/http"),require("@wm/oAuth"),require("ngx-bootstrap/chronos"),require("ngx-bootstrap/datepicker"),require("ngx-bootstrap/utils"),require("rxjs/operators"),require("@wm/transpiler"),require("@wm/build-task")):"function"==typeof define&&define.amd?define("@wm/runtime/base",["exports","@angular/core","@angular/router","@angular/common","@wm/core","@wm/security","@wm/variables","@wm/components/page","rxjs","@wm/components/base","@wm/components/prefab","@angular/common/http","@angular/platform-browser","ngx-toastr","@wm/components/dialogs","@wm/components/dialogs/confirm-dialog","@wm/components/dialogs/design-dialog","@wm/mobile/runtime","@wm/http","@wm/oAuth","ngx-bootstrap/chronos","ngx-bootstrap/datepicker","ngx-bootstrap/utils","rxjs/operators","@wm/transpiler","@wm/build-task"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.runtime=e.wm.runtime||{},e.wm.runtime.base={}),e.ng.core,e.ng.router,e.ng.common,e.wm.core,e.wm.security,e.wm.variables,e.wm.components.page,e.rxjs,e.wm.components.base,e.wm.components.prefab,e.ng.common.http,e.ng.platformBrowser,e.ngxToastr,e.wm.components.dialogs,e.wm.components.dialogs.confirmdialog,e.wm.components.dialogs.designdialog,e.wm.mobile.runtime,e.wm.http,e.wm.oAuth,e["ngx-bootstrap"].chronos,e["ngx-bootstrap"].datepicker,e["ngx-bootstrap"].utils,e.rxjs.operators,e.wm.transpiler,e.wm.buildTask)}(this,(function(e,t,n,i,o,a,r,s,l,c,p,d,u,h,m,f,g,v,y,b,w,P,O,E,R,A){"use strict";function T(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var S,C=T(t),I=T(o),D=T(u);e.ComponentType=void 0,(S=e.ComponentType||(e.ComponentType={}))[S.PAGE=0]="PAGE",S[S.PREFAB=1]="PREFAB",S[S.PARTIAL=2]="PARTIAL";var x,N=function(){function e(){}return e.prototype.clearComponentFactoryRefCache=function(){},e}(),k=function(){},M=function(){},L=function(){},F=function(){};!function(e){e.HIDE_TEMPLATES_SHOW_CASE="hide-templates-show-case",e.SHOW_TEMPLATES_SHOW_CASE="show-templates-show-case",e.UPDATE_LOCATION="update-location-path",e.SELECT_TEMPLATE="select-template",e.TEMPLATEBUNDLE_CONFIG="template-bundle-config",e.ON_LOAD="on-load"}(x||(x={}));var j=function(){function e(e,t,n,i,o,a,r,s,l,c){var p=this;this.$http=e,this.$security=t,this.$dialog=n,this.$router=i,this.$app=o,this.$variables=a,this.$metadata=r,this.$spinner=s,this.$i18n=l,this.$datePipe=c,this.appVariablesLoaded=!1,this.appVariablesFired=!1,this._noRedirect=!1,this.$http.registerOnSessionTimeout(this.handle401.bind(this)),this.$variables.registerDependency("appManager",this),this.$app.subscribe("toggle-variable-state",(function(e){var t,n=e.variable,i=e.active;if(!_.isEmpty(_.trim(n.spinnerContext)))if(i){if(n._spinnerId&&n._spinnerId.length&&_.forEach(n._spinnerId,(function(e){e.slice(0,e.lastIndexOf("_"))!==n._id||!p.$spinner.messagesByContext||!p.$spinner.messagesByContext[n.spinnerContext]||n.spinnerMessage!==p.$spinner.messagesByContext[n.spinnerContext].finalMessage&&n.spinnerMessage!==p.$spinner.messagesByContext[n.spinnerContext][e]||(t=!0)})),!t){n._spinnerId=n._spinnerId||[];var o=p.$spinner.show(n.spinnerMessage,n._id+"_"+Date.now(),n.spinnerclass,n.spinnerContext);n._spinnerId.push(o)}}else p.$spinner.hide(n._spinnerId.shift())})),this.$app.subscribe("userLoggedIn",(function(){p.setLandingPage(),p.lastLoggedUserId&&p.$security.getConfig((function(e){e&&e.userInfo.userId!==p.lastLoggedUserId&&p.$app.clearPageCache()}),null)})),this.$app.subscribe("userLoggedOut",(function(){return p.setLandingPage().then((function(){p.$app.clearPageCache()}))})),this.$app.subscribe("http401",(function(e){return void 0===e&&(e={}),p.handle401(e.page,e.options)}))}return e.prototype.showLoginDialog=function(){this.$spinner.hide("globalSpinner"),this.$dialog.open("CommonLoginDialog"),o.$appDigest()},e.prototype.loadAppJS=function(){},e.prototype.loadCommonPage=function(){},e.prototype.loadSecurityConfig=function(e){var t=this;return this.$security.load(e).then((function(e){return t.$app.landingPageName||t.setLandingPage(),e}))},e.prototype.loadMetadata=function(){return this.$metadata.load()},e.prototype.loadAppVariables=function(e){var t=this;if(this.appVariablesLoaded)return Promise.resolve();var n=function(e){var n=t.$variables.register("app",e,t.$app);_.extend(t.$app.Variables,n.Variables),_.extend(t.$app.Actions,n.Actions),t.updateLoggedInUserVariable(),t.updateSupportedLocaleVariable(),t.appVariablesLoaded=!0,t.appVariablesFired=!1};return o.isDefined(e)?(n(e),Promise.resolve()):this.$http.get("./app.variables.json").then((function(e){return n(e)}))},e.prototype.isAppVariablesFired=function(e){return o.isDefined(e)&&(this.appVariablesFired=e),this.appVariablesFired},e.prototype.clearLoggedInUserVariable=function(e){e.isAuthenticated=!1,e.roles=[],e.name=void 0,e.id=void 0,e.tenantId=void 0},e.prototype.updateLoggedInUserVariable=function(){var e=this,t=_.get(this.$app,"Variables.loggedInUser.dataSet");if(t)return this.$security.load().then((function(){var n=e.$security.get();if(!(n&&n.securityEnabled&&n.authenticated))throw e.clearLoggedInUserVariable(t),t.isSecurityEnabled=n&&n.securityEnabled,null;return t.isAuthenticated=n.authenticated,t.roles=n.userInfo.userRoles,t.name=n.userInfo.userName,t.id=n.userInfo.userId,t.tenantId=n.userInfo.tenantId,t.userAttributes=n.userInfo.userAttributes,n})).catch((function(e){t.isAuthenticated=!1,t.roles=[],t.name=void 0,t.id=void 0,t.tenantId=void 0,t.userAttributes={}}))},e.prototype.updateSupportedLocaleVariable=function(){_.get(this.$app,"Variables.supportedLocale")},e.prototype.handleSSOLogin=function(e){var t,n,i=this;if(t=this.$security.getRedirectPage(e),r.CONSTANTS.hasCordova){var o=_.get(this.$security.get(),"userInfo.userName");this.$security.authInBrowser().then((function(){return i.reloadAppData()})).then((function(){var e=_.get(i.$security.get(),"userInfo.userName");e&&e===o?r.routerService.navigate([t]):r.routerService.navigate(["/"])}))}else{t=t?"?redirectPage="+encodeURIComponent(t):"",n=(n=this.$security.getQueryString(this.$security.getRedirectedRouteQueryParams()))?"?"+n:"",document.body.textContent=_.get(this.getAppLocale(),["MESSAGE_LOGIN_REDIRECTION"])||"Redirecting to sso login...";var a=this.getDeployedURL()+"services/security/ssologin"+t+n;window.self!==window.top&&"WM_PREVIEW_WINDOW"===window.parent.name?(window.parent.location.href=window.self.location.href,window.parent.name=""):window.location.href=a}},e.prototype.handle401=function(e,t){var n,i,o="DIALOG",a="PAGE",r="SSO",s=this.$security.get(),l={};if(i=s.loginConfig,this.lastLoggedUserId=s.userInfo&&s.userInfo.userId,s.userInfo&&s.userInfo.userName){switch(s.authenticated=!1,(n=i.sessionTimeout||{type:o}).type.toUpperCase()){case o:this.showLoginDialog();break;case a:e||(e=this.$security.getCurrentRoutePage()),l.redirectTo=e,l=_.merge(l,this.$security.getRedirectedRouteQueryParams()),e!==n.pageName&&this.$router.navigate([n.pageName],{queryParams:l});break;case r:this.handleSSOLogin(s)}this.setLandingPage()}else switch(i.type.toUpperCase()){case o:this.noRedirect(!0),this.showLoginDialog();break;case a:e=this.$security.getRedirectPage(s,e),l.redirectTo=e;var c=t&&t.queryParams||this.$security.getRedirectedRouteQueryParams();l=_.merge(l,c),this.$router.navigate([i.pageName],{queryParams:l}),this.$app.landingPageName=i.pageName;break;case r:this.handleSSOLogin(s)}},e.prototype.reloadAppData=function(){var e=this;return this.loadSecurityConfig(!0).then((function(){return e.loadMetadata().then((function(){return e.updateLoggedInUserVariable()}))}))},e.prototype.noRedirect=function(e){return _.isUndefined(e)||(this._noRedirect=e),this._noRedirect},e.prototype.executeSessionFailureRequests=function(){this.$http.executeSessionFailureRequests()},e.prototype.pushToSessionFailureRequests=function(e){this.$http.pushToSessionFailureQueue(e)},e.prototype.getDeployedURL=function(){return this.$app.deployedUrl?this.$app.deployedUrl:r.$rootScope.project.deployedUrl},e.prototype.getCustomUrlScheme=function(){return this.$app.customUrlScheme},e.prototype.notify=function(e,t){this.$app.notify(e,t)},e.prototype.subscribe=function(e,t){return this.$app.subscribe(e,t)},e.prototype.getActivePage=function(){return this.$app.activePage},e.prototype.getAppLocale=function(){return this.$app.appLocale},e.prototype.getSelectedLocale=function(){return this.$i18n.getSelectedLocale()},e.prototype.notifyApp=function(e,t,n){this.$app.notifyApp(e,t,n)},e.prototype.appOnBeforeServiceCall=function(e){return o.triggerFn(this.$app.onBeforeServiceCall,e)},e.prototype.appOnServiceSuccess=function(e,t){return o.triggerFn(this.$app.onServiceSuccess,e,t)},e.prototype.appOnServiceError=function(e,t){return o.triggerFn(this.$app.onServiceError,e,t)},e.prototype.appVariablesReady=function(){o.triggerFn(this.$app.onAppVariablesReady)},e.prototype.beforeAppReady=function(){o.triggerFn(this.$app.onBeforeAppReady)},e.prototype.getPipe=function(e){if("date"===e)return this.$datePipe},e.prototype.setLandingPage=function(){var e=this;return this.$security.getPageByLoggedInUser().then((function(t){return e.$app.landingPageName=t}))},e.prototype.isPrefabType=function(){return this.$app.isPrefabType},e.prototype.isTemplateBundleType=function(){return this.$app.isTemplateBundleType},e.prototype.postMessage=function(e){window.top.postMessage(e,"*")},e.prototype.showTemplate=function(e){var t=this.templates[e];this.$router.navigate([t.id])},e.prototype.postTemplateBundleInfo=function(){var e=this;return window.onmessage=function(t){var n=t.data;if(_.isObject(n))switch(n.key){case x.HIDE_TEMPLATES_SHOW_CASE:break;case x.SELECT_TEMPLATE:e.showTemplate(n.templateIndex)}},setTimeout((function(){e.postMessage({key:x.ON_LOAD})})),o.fetchContent("json","./config.json",!0,(function(t){e.templates=[],t.error||(e.templates=t.templates,e.postMessage({key:x.TEMPLATEBUNDLE_CONFIG,config:t}))}))},e.prototype.postAppTypeInfo=function(){if(this.isTemplateBundleType())return this.postTemplateBundleInfo()},e}();j.SERVICE_NAME="AppManagerService",j.decorators=[{type:t.Injectable}],j.ctorParameters=function(){return[{type:o.AbstractHttpService},{type:a.SecurityService},{type:o.AbstractDialogService},{type:n.Router},{type:o.App},{type:r.VariablesService},{type:r.MetadataService},{type:o.AbstractSpinnerService},{type:o.AbstractI18nService},{type:i.DatePipe}]};var B=function(e){return"__self__"===e},G=function(e){return B(e)?".":"app/prefabs/"+e},V=new Set,W=new Map,U=new Set,q=function(e,t){var n=e;return o.stringStartsWith(e,"http://|https://|//")||(n=(t+n).replace("//","/")),n},z=q,H=function(){function e(e,t){this.$metadata=e,this.prefabConfigProvider=t}return e.prototype.getConfig=function(e){return this.prefabConfigProvider.getConfig(e)},e.prototype.loadServiceDefs=function(e){return B(e)?Promise.resolve():this.$metadata.load(e)},e.prototype.loadStyles=function(e,t){var n=(void 0===t?{resources:{styles:[]}}:t).resources.styles,i=G(e),a=n.map((function(e){if(!_.endsWith(e,"/pages/Main/Main.css"))return q(e,i)})).filter((function(e){return!!e}));return o.loadStyleSheets(a),Promise.resolve()},e.prototype.loadScripts=function(e,t){var n=(void 0===t?{resources:{scripts:[]}}:t).resources.scripts,i=G(e),a=(n=n.filter((function(e){return!e.startsWith("npm://")}))).map((function(e){return q(e,i)}));return o.loadScripts(a,!0)},e.prototype.setInProgress=function(e){var t,n,i=new Promise((function(e,i){t=e,n=i}));i.resolve=t,i.reject=n,W.set(e,i)},e.prototype.resolveInProgress=function(e){W.get(e)&&(W.get(e).resolve(),W.delete(e))},e.prototype.loadDependencies=function(e){var t=this;return U.has(e)?Promise.resolve():V.has(e)?Promise.reject(""):W.get(e)?W.get(e):(this.setInProgress(e),this.getConfig(e).then((function(n){return Promise.all([t.loadStyles(e,n),t.loadScripts(e,n),t.loadServiceDefs(e)]).then((function(){t.resolveInProgress(e),U.add(e)}))})))},e}();H.decorators=[{type:t.Injectable}],H.ctorParameters=function(){return[{type:r.MetadataService},{type:k}]};
|
|
731
731
|
/*! *****************************************************************************
|
|
732
732
|
Copyright (c) Microsoft Corporation.
|
|
733
733
|
|