@osovitny/anatoly 2.0.23 → 2.0.26

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.
Files changed (78) hide show
  1. package/bundles/osovitny-anatoly.umd.js +2039 -1292
  2. package/bundles/osovitny-anatoly.umd.js.map +1 -1
  3. package/bundles/osovitny-anatoly.umd.min.js +2 -3
  4. package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
  5. package/esm2015/lib/core/consts/urls.js +22 -0
  6. package/esm2015/lib/core/convert.js +27 -0
  7. package/esm2015/lib/core/core.module.js +12 -9
  8. package/esm2015/lib/core/go/base-go.service.js +4 -4
  9. package/esm2015/lib/core/interceptors/httpInterceptor.js +2 -2
  10. package/esm2015/lib/core/localization/localization.module.js +41 -0
  11. package/esm2015/lib/core/localization/localization.service.js +5 -5
  12. package/esm2015/lib/core/localization/localizationSettings.module.js +70 -0
  13. package/esm2015/lib/core/localization/localize.pipe.js +65 -0
  14. package/esm2015/lib/core/notifications/alerts.js +107 -0
  15. package/esm2015/lib/core/notifications/interfaces/notification.js +19 -0
  16. package/esm2015/lib/core/notifications/services/notification-service.js +230 -0
  17. package/esm2015/lib/core/services/appcontext.service.js +12 -12
  18. package/esm2015/lib/core/services/idle.service.js +65 -0
  19. package/esm2015/lib/core/services/web-storage.service.js +65 -0
  20. package/esm2015/lib/core/subs.js +1 -1
  21. package/esm2015/lib/core/utils.js +3 -14
  22. package/esm2015/lib/data/base/base-api.service.js +26 -30
  23. package/esm2015/lib/data/consts.js +24 -0
  24. package/esm2015/lib/data/data.module.js +19 -8
  25. package/esm2015/lib/data/services/billing-api.service.js +4 -5
  26. package/esm2015/lib/data/services/notifications/notifications-api-service.js +45 -0
  27. package/esm2015/lib/ui/components/billing/buyaccess-button.component.js +9 -9
  28. package/esm2015/lib/ui/components/billing/upgrade-plan-button.component.js +7 -7
  29. package/esm2015/lib/ui/components/html-editor/base-html-editor.component.js +19 -19
  30. package/esm2015/lib/ui/components/loading/loading.component.js +49 -0
  31. package/esm2015/lib/ui/components/spinner/spinner.component.js +73 -0
  32. package/esm2015/lib/ui/pipes/filesize.pipe.js +41 -0
  33. package/esm2015/lib/ui/pipes/replace-text.pipe.js +36 -0
  34. package/esm2015/lib/ui/pipes/safeHtml.pipe.js +36 -0
  35. package/esm2015/lib/ui/ui.module.js +19 -13
  36. package/esm2015/public-api.js +57 -4
  37. package/fesm2015/osovitny-anatoly.js +1449 -709
  38. package/fesm2015/osovitny-anatoly.js.map +1 -1
  39. package/lib/core/consts/urls.d.ts +3 -0
  40. package/lib/core/convert.d.ts +3 -0
  41. package/lib/core/go/base-go.service.d.ts +1 -1
  42. package/lib/core/localization/localization.module.d.ts +2 -0
  43. package/lib/core/localization/localizationSettings.module.d.ts +10 -0
  44. package/lib/core/localization/localize.pipe.d.ts +7 -0
  45. package/lib/core/notifications/alerts.d.ts +9 -0
  46. package/lib/core/notifications/interfaces/notification.d.ts +10 -0
  47. package/lib/core/notifications/services/notification-service.d.ts +22 -0
  48. package/lib/core/services/appcontext.service.d.ts +2 -2
  49. package/lib/core/services/idle.service.d.ts +13 -0
  50. package/lib/core/services/web-storage.service.d.ts +17 -0
  51. package/lib/core/subs.d.ts +1 -1
  52. package/lib/core/utils.d.ts +0 -5
  53. package/lib/data/base/base-api.service.d.ts +2 -3
  54. package/lib/data/consts.d.ts +4 -0
  55. package/lib/data/data.module.d.ts +1 -0
  56. package/lib/data/services/notifications/notifications-api-service.d.ts +9 -0
  57. package/lib/ui/components/billing/buyaccess-button.component.d.ts +3 -3
  58. package/lib/ui/components/billing/upgrade-plan-button.component.d.ts +1 -1
  59. package/lib/ui/components/html-editor/base-html-editor.component.d.ts +2 -2
  60. package/lib/ui/components/loading/loading.component.d.ts +10 -0
  61. package/lib/ui/components/spinner/spinner.component.d.ts +22 -0
  62. package/lib/ui/pipes/filesize.pipe.d.ts +5 -0
  63. package/lib/ui/pipes/replace-text.pipe.d.ts +4 -0
  64. package/lib/ui/pipes/safeHtml.pipe.d.ts +7 -0
  65. package/lib/ui/ui.module.d.ts +2 -3
  66. package/osovitny-anatoly.metadata.json +1 -1
  67. package/package.json +1 -1
  68. package/public-api.d.ts +53 -3
  69. package/esm2015/lib/core/alerts.js +0 -145
  70. package/esm2015/lib/core/consts/index.js +0 -20
  71. package/esm2015/lib/core/index.js +0 -37
  72. package/esm2015/lib/data/index.js +0 -26
  73. package/esm2015/lib/ui/index.js +0 -43
  74. package/lib/core/alerts.d.ts +0 -12
  75. package/lib/core/consts/index.d.ts +0 -1
  76. package/lib/core/index.d.ts +0 -13
  77. package/lib/data/index.d.ts +0 -5
  78. package/lib/ui/index.d.ts +0 -16
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("sweetalert2"),require("@angular/core"),require("@ngx-translate/core"),require("date-fns"),require("date-fns/locale/en-US"),require("@angular/common"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("uuid"),require("@angular/router"),require("@angular/forms"),require("angular-froala-wysiwyg")):"function"==typeof define&&define.amd?define("@osovitny/anatoly",["exports","sweetalert2","@angular/core","@ngx-translate/core","date-fns","date-fns/locale/en-US","@angular/common","@angular/common/http","rxjs/operators","rxjs","uuid","@angular/router","@angular/forms","angular-froala-wysiwyg"],e):e(((t=t||self).osovitny=t.osovitny||{},t.osovitny.anatoly={}),t.Swal,t.ng.core,t.i1,t.dateFns,t.enUS,t.ng.common,t.ng.common.http,t.rxjs.operators,t.rxjs,t.uuid,t.ng.router,t.ng.forms,t.angularFroalaWysiwyg)}(this,(function(t,e,n,r,o,i,a,s,u,l,c,p,d,f){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;var h=JSON.parse(document.getElementById("contextInitState").getAttribute("data-contextinitstate")),g=JSON.parse(document.getElementById("appCoreSettings").getAttribute("data-appcoresettings"));function m(t,e){if(t)throw new Error(e+" has already been loaded. Import "+e+" modules in the AppModule only.")}var y=function(){function t(){}return t.Info=function(t){e.fire({title:"Information",text:t,icon:"info",confirmButtonText:"OK"})},t.Warning=function(t){e.fire({title:"Warning",text:t,icon:"warning",confirmButtonText:"OK"})},t.Error=function(t){e.fire({title:"Error",text:t,icon:"error",confirmButtonText:"OK"})},t.NotImplemented=function(){this.Warning("Not Implemented Yet")},t.ErrorOccurred=function(){this.Error("Sorry, an unexpected error occurred")},t.AreYouSure=function(t,n,r,o,i,a){void 0!==n&&null!=n||(n="Are you sure?"),e.fire({title:n,text:t,icon:"warning",confirmButtonText:r,cancelButtonText:o,showCancelButton:!0}).then((function(t){t.value?i&&i():t.dismiss!=e.DismissReason.cancel&&t.dismiss!=e.DismissReason.close||a&&a()}))},t.Success=function(t,n,r){void 0!==n&&null!=n||(n="Success"),t||(t="Operation was successful"),e.fire({title:n,text:t,icon:"success",confirmButtonText:"OK"}).then((function(){r&&r()}))},t.Cancel=function(t){t||(t="Operation has been cancled"),e.fire({title:"Cancelled",text:t,icon:"info"})},t.NotificationCancel=function(t,n){void 0!==n&&null!=n||(n="Canceled"),t||(t="Operation has been canceled"),e.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0}).fire({title:n,text:t,icon:"info"})},t.NotificationSuccess=function(t,n){void 0!==n&&null!=n||(n="Success"),t||(t="Operation was successful"),e.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0}).fire({title:n,text:t,icon:"success"})},t}(),v=function(){function t(t){this.translate=t,this.setSupportedLanguages(["en"])}return t.prototype.format=function(t,e){return t.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))},t.prototype.configureTranslationSettings=function(t){return t.setDefaultLang("en"),"en"},t.prototype.getBrowserLanguage=function(){return this.translate.getBrowserLang()},t.prototype.getDatefnsLocale=function(){var t;switch(this.getBrowserLanguage()){case"en":t={locale:i};break;default:t={locale:i}}return t},t.prototype.setDefaultLanguage=function(t){this.translate.setDefaultLang(t)},t.prototype.setSupportedLanguages=function(t){this.translate.addLangs(t)},t.prototype.updateLanguage=function(t){this.translate.use(t)},t.prototype.getLocalizedValue=function(t,e){var n=this.translate.instant(t);return e&&0!==e.length?this.format(n,e):n},t.prototype.getLocalizedDate=function(t){return o.isValid(new Date(t))?o.format(new Date(t),g.DATE_FORMATS.angular,this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDateTime=function(t){var e=new Date(t);if(o.isValid(e)){var n=D.convertToLocalizedDateTime(e);return o.format(n,g.DATE_FORMATS.angularWithTime,this.dateFnsLocale)}return"Invalid Date"},t.prototype.getLocalizedDistanceToNowInWords=function(t){return o.isValid(new Date(t))?o.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDistanceInWords=function(t,e){return o.isValid(new Date(t))&&o.isValid(new Date(e))?o.formatDistance(new Date(t),new Date(e),this.dateFnsLocale):"Invalid Date"},t}();v.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new v(n.ɵɵinject(r.TranslateService))},token:v,providedIn:"root"}),v.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[{type:r.TranslateService}]};
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("@ngx-translate/core"),require("date-fns"),require("date-fns/locale/en-US"),require("@angular/common"),require("@ngx-translate/http-loader"),require("sweetalert2"),require("ngx-toastr"),require("uuid"),require("@angular/forms"),require("@angular/platform-browser"),require("angular-froala-wysiwyg")):"function"==typeof define&&define.amd?define("@osovitny/anatoly",["exports","@angular/core","@angular/router","@angular/common/http","rxjs/operators","rxjs","@ngx-translate/core","date-fns","date-fns/locale/en-US","@angular/common","@ngx-translate/http-loader","sweetalert2","ngx-toastr","uuid","@angular/forms","@angular/platform-browser","angular-froala-wysiwyg"],e):e(((t=t||self).osovitny=t.osovitny||{},t.osovitny.anatoly={}),t.ng.core,t.ng.router,t.ng.common.http,t.rxjs.operators,t.rxjs,t.i1$1,t.dateFns,t.enUS,t.ng.common,t.httpLoader,t.Swal,t.i1$2,t.uuid,t.ng.forms,t.ng.platformBrowser,t.angularFroalaWysiwyg)}(this,(function(t,e,n,r,o,i,a,s,u,c,l,p,d,f,h,g,m){"use strict";u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var y=JSON.parse(document.getElementById("contextInitState").getAttribute("data-contextinitstate")),v=JSON.parse(document.getElementById("appCoreSettings").getAttribute("data-appcoresettings")),b=function(){function t(t,e){this.route=t,this.router=e}return t.prototype.locationReload=function(){window.location.reload()},t}();function S(t,e){if(t)throw new Error(e+" has already been loaded. Import "+e+" modules in the AppModule only.")}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,6 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function I(t,e){function n(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function C(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}Object.create;var w=function(){function t(){}return t.prototype.logError=function(t){console.error(t)},t.prototype.logInformation=function(t){console.info(t)},t}();w.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new w},token:w,providedIn:"root"}),w.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],w.ctorParameters=function(){return[]};var P=function(){function t(t){this.http=t,this.baseUrl=""}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(u.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getById=function(t){return this.get("getById",{id:t})},t.prototype.getAll=function(t){return this.get("getall",t).pipe(u.map((function(t){return t})))},t.prototype.getJsonFile=function(t,e,n){e||(e="/dist/jsons"),n||(n="1.0");var r=e+"/"+t+"?"+n;return this.http.get(r).pipe(u.map((function(t){return t})))},t.prototype.getNewGuid=function(){var t=this.baseUrl+"/getNewGuid";return this.http.get(t,{responseType:"text"})},t}();P.decorators=[{type:n.Injectable}],P.ctorParameters=function(){return[{type:s.HttpClient}]};var E=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return I(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return h.isUserSignedIn},e.prototype.isUserAdmin=function(){return h.isUserAdmin},e}(P);E.decorators=[{type:n.Injectable}],E.ctorParameters=function(){return[{type:s.HttpClient}]};var U=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return I(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),1e3)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e}(l.BehaviorSubject);U.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new U},token:U,providedIn:"root"}),U.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],U.ctorParameters=function(){return[]};var T,O=[w,E,U],A=function(t,e){this.injector=t,m(e,"AnatolyCoreModule"),T=this.injector};A.decorators=[{type:n.NgModule,args:[{imports:[a.CommonModule],providers:C(O)}]}],A.ctorParameters=function(){return[{type:n.Injector},{type:A,decorators:[{type:n.Optional},{type:n.SkipSelf}]}]};var D=function(){function t(){}return t.getValueByNameInQS=function(e){return t.getValueByName(location.search,e)},t.getValueByName=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},t.copyToClipBoard=function(t,e){t.preventDefault();var n=document.createElement("textarea");n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0",n.value=e,document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)},t.downloadFile=function(t,e){var n=document.createElement("a");n.download=t,n.href=e,n.click()},Object.defineProperty(t,"localizationService",{get:function(){return T.get(v)},enumerable:!1,configurable:!0}),t.getLocalizedValue=function(t,e,n){return!t&&n?this.localizationService.getLocalizedValue(n):t?this.localizationService.getLocalizedValue(t,e):t},t.convertToLocalizedDateTime=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t.downloadBlobFile=function(e,n){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(e,n);else{var r=window.URL.createObjectURL(e);t.downloadFile(n,r)}},t}(),B=function(){function t(){this.subs=[]}return t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.subs=this.subs.concat(t)},Object.defineProperty(t.prototype,"sink",{set:function(t){this.subs.push(t)},enumerable:!1,configurable:!0}),t.prototype.unsubscribe=function(){this.subs.forEach((function(t){return t&&t.unsubscribe()})),this.subs=[]},t}(),j=function(){function t(){}return t.newGuid=function(){return c.v4()},t}(),q=function(){function t(t,e){this.route=t,this.router=e}return t.prototype.locationReload=function(){window.location.reload()},t}();q.decorators=[{type:n.Injectable}],q.ctorParameters=function(){return[{type:p.ActivatedRoute},{type:p.Router}]};var z=function(){function t(t){this.injector=t}return t.prototype.handleError=function(t){throw this.injector.get(w).logError(t),t},t}();z.decorators=[{type:n.Injectable}],z.ctorParameters=function(){return[{type:n.Injector}]};var L=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,r,o,i,a,l,c=this,p=g.IsCDNEnabled,d=g.CDNSASToken,f=this.loadingService.isFreezed,h=!f,m=t.url.toLowerCase(),y=t.url;if(!f)try{for(var v=S(this.longRunningExceptionsList),b=v.next();!b.done;b=v.next()){var I=b.value;if(m.indexOf(this.longRunningExceptionsList[I])>=0){h=!1;break}}}catch(t){n={error:t}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}if(p)try{for(var x=S(this.autoCDNSASTokenUrls),C=x.next();!C.done;C=x.next()){I=C.value;if(m.indexOf(this.autoCDNSASTokenUrls[I])>=0){t=t.clone({url:y+d});break}}}catch(t){o={error:t}}finally{try{C&&!C.done&&(i=x.return)&&i.call(x)}finally{if(o)throw o.error}}try{for(var w=S(this.externalSiteUrls),P=w.next();!P.done;P=w.next()){I=P.value;if(m.indexOf(this.externalSiteUrls[I])>=0){!0;break}}}catch(t){a={error:t}}finally{try{P&&!P.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}if(m.indexOf("/api/")>-1){var E="",U=(new Date).getTime().toString();E=m.indexOf("?")>-1?y+"&t="+U:y+"?t="+U,t=t.clone({url:E})}return t=t.clone({headers:t.headers.set("Accept","application/json")}),this.onRequestStart(h),e.handle(t).pipe(u.tap((function(t){t instanceof s.HttpResponse&&c.onRequestEnd(h)}),(function(t){c.onRequestEnd(h),c.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();L.decorators=[{type:n.Injectable}],L.ctorParameters=function(){return[{type:U},{type:w}]};var N=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.baseReadUrl="",n.data=[],n}return I(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var o=this;if(this.data.length)return t.prototype.next.call(this,this.data);var i=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(i=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(i).pipe(u.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(o,e),n&&n()}),(function(t){r&&r(t)}))},e}(l.BehaviorSubject);N.decorators=[{type:n.Injectable}],N.ctorParameters=function(){return[{type:s.HttpClient}]};var R=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl="",n}return I(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.remove=function(t,e){var n=this;this.reset(),this.post("remove",t).subscribe((function(){}),(function(){n.read()}),(function(){n.read(),e&&e()}))},e.prototype.post=function(t,e){var n=this.baseUrl+""+t+this.serializeParams(e);return this.http.post(n,e).pipe(u.map((function(t){return t})))},e}(N);R.decorators=[{type:n.Injectable}],R.ctorParameters=function(){return[{type:s.HttpClient}]};var F=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl+="billing/",n}return I(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(t){}),(function(t){e&&e()}),(function(){t&&t()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e}(P);F.decorators=[{type:n.Injectable}],F.ctorParameters=function(){return[{type:s.HttpClient}]};var k=function(){};k.decorators=[{type:n.NgModule,args:[{imports:[a.CommonModule],providers:[F]}]}];var V=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;y.AreYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){y.Success("Access Granted",null,(function(){window.location.reload()}))}))}))},t}();V.decorators=[{type:n.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],V.ctorParameters=function(){return[{type:E},{type:F}]},V.propDecorators={plan:[{type:n.Input}],plantitle:[{type:n.Input}]};var M=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();M.decorators=[{type:n.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],M.ctorParameters=function(){return[{type:E}]},M.propDecorators={plan:[{type:n.Input}],plantitle:[{type:n.Input}]};var G=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;y.AreYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){y.Success("Your request for changing plan has been sent.",null,(function(){window.location.reload()}))}))}))},t}();G.decorators=[{type:n.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],G.ctorParameters=function(){return[{type:F}]},G.propDecorators={currentplantitle:[{type:n.Input}],requestedplan:[{type:n.Input}],requestedplantitle:[{type:n.Input}]};var H=function(){};H.decorators=[{type:n.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],H.ctorParameters=function(){return[]},H.propDecorators={classbtn:[{type:n.Input}]};var K=function(){};K.decorators=[{type:n.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],K.ctorParameters=function(){return[]},K.propDecorators={classbtn:[{type:n.Input}]};var _=function(){};_.decorators=[{type:n.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],_.propDecorators={classbtn:[{type:n.Input}]};var Q=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();Q.decorators=[{type:n.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],Q.propDecorators={title:[{type:n.Input}]};var Y=function(){function t(){}return t.prototype.getQSId=function(){var t=D.getValueByNameInQS("id");return void 0===t||""==t?null:t},t}(),W=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return I(e,t),e.prototype.isActionAdding=function(){var t=D.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e}(Y);W.propDecorators={formGroup:[{type:n.Input}],formSubmitted:[{type:n.Input}]};var J={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},X=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return I(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},J,t),n=g.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(W);X.propDecorators={editorLabelText:[{type:n.Input}],editorOptions:[{type:n.Input}]};var Z=function(t){function e(){return t.call(this)||this}return I(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(X);Z.decorators=[{type:n.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],Z.ctorParameters=function(){return[]};var tt=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return I(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(X);tt.decorators=[{type:n.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],tt.ctorParameters=function(){return[]},tt.propDecorators={editorFormKey:[{type:n.Input}]};var et=function(t){function e(){return t.call(this)||this}return I(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(W),nt=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return I(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,C(t)),this.customerrors.length>0&&e.push.apply(e,C(this.customerrors)),e},e}(et);nt.decorators=[{type:n.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],nt.ctorParameters=function(){return[]},nt.propDecorators={visible:[{type:n.Input}],customerrors:[{type:n.Input}],viewtype:[{type:n.Input}]};var rt=function(t){function e(){return t.call(this)||this}return I(e,t),e}(et);rt.decorators=[{type:n.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],rt.ctorParameters=function(){return[]},rt.propDecorators={controlName:[{type:n.Input}],controlTitle:[{type:n.Input}]};var ot=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();ot.decorators=[{type:n.Directive,args:[{selector:"[formControl], [formControlName]"}]}],ot.ctorParameters=function(){return[{type:n.ElementRef},{type:d.NgControl}]};var it=f.FroalaEditorModule.forRoot(),at=f.FroalaViewModule.forRoot(),st=function(){};st.decorators=[{type:n.NgModule,args:[{imports:[a.CommonModule,d.ReactiveFormsModule,d.FormsModule,it,at],exports:[M,G,V,H,_,K,nt,rt,Z,tt,Q,ot],declarations:[M,G,V,H,_,K,nt,rt,Z,tt,Q,ot]}]}],t.Alerts=y,t.AnatolyCoreModule=A,t.AnatolyDataModule=k,t.AnatolyHttpInterceptor=L,t.AnatolyUIModule=st,t.AppContextService=E,t.AppCoreSettings=g,t.BaseApiService=P,t.BaseComponent=Y,t.BaseEditComponent=W,t.BaseGoService=q,t.BaseGridEditService=R,t.BaseGridReadService=N,t.BillingApiService=F,t.BuyAccessButtonComponent=V,t.ContentHeaderComponent=Q,t.ContextInitState=h,t.FormValidationSummaryComponent=nt,t.FormsHtmlEditorComponent=tt,t.GlobalErrorHandler=z,t.Guid=j,t.HtmlEditorComponent=Z,t.ItemValidationSummaryComponent=rt,t.LoadingService=U,t.LoggingService=w,t.NativeElementDirective=ot,t.SignInButtonComponent=H,t.SignOutButtonComponent=K,t.SignUpButtonComponent=_,t.Subs=B,t.SubscribePlanButtonComponent=M,t.UpgradePlanButtonComponent=G,t.Utils=D,t.ValidationSummaryComponent=et,t.throwIfAlreadyLoaded=m,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */b.decorators=[{type:e.Injectable}],b.ctorParameters=function(){return[{type:n.ActivatedRoute},{type:n.Router}]};var I=function(t,e){return(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function C(t,e){function n(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function P(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}Object.create;var z=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return C(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),1e3)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e}(i.BehaviorSubject);z.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new z},token:z,providedIn:"root"}),z.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],z.ctorParameters=function(){return[]};var L=function(){function t(){}return t.prototype.logError=function(t){console.error(t)},t.prototype.logInformation=function(t){console.info(t)},t}();L.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new L},token:L,providedIn:"root"}),L.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],L.ctorParameters=function(){return[]};var T=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,i,a,s,u,c,l=this,p=v.IsCDNEnabled,d=v.CDNSASToken,f=this.loadingService.isFreezed,h=!f,g=t.url.toLowerCase(),m=t.url;if(!f)try{for(var y=P(this.longRunningExceptionsList),b=y.next();!b.done;b=y.next()){var S=b.value;if(g.indexOf(this.longRunningExceptionsList[S])>=0){h=!1;break}}}catch(t){n={error:t}}finally{try{b&&!b.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}if(p)try{for(var I=P(this.autoCDNSASTokenUrls),C=I.next();!C.done;C=I.next()){S=C.value;if(g.indexOf(this.autoCDNSASTokenUrls[S])>=0){t=t.clone({url:m+d});break}}}catch(t){a={error:t}}finally{try{C&&!C.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}try{for(var w=P(this.externalSiteUrls),x=w.next();!x.done;x=w.next()){S=x.value;if(g.indexOf(this.externalSiteUrls[S])>=0){!0;break}}}catch(t){u={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(u)throw u.error}}if(g.indexOf("/api/")>-1){var z="",L=(new Date).getTime().toString();z=g.indexOf("?")>-1?m+"&t="+L:m+"?t="+L,t=t.clone({url:z})}return t=t.clone({headers:t.headers.set("Accept","application/json")}),this.onRequestStart(h),e.handle(t).pipe(o.tap((function(t){t instanceof r.HttpResponse&&l.onRequestEnd(h)}),(function(t){l.onRequestEnd(h),l.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();T.decorators=[{type:e.Injectable}],T.ctorParameters=function(){return[{type:z},{type:L}]};var O=function(){function t(){}return t.toLocalizedDateTime=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t}(),E=function(){function t(t){this.translate=t,this.setSupportedLanguages(["en"])}return t.prototype.format=function(t,e){return t.replace(/{(\d+)}/g,(function(t,n){return void 0!==e[n]?e[n]:t}))},t.prototype.configureTranslationSettings=function(t){return t.setDefaultLang("en"),"en"},t.prototype.getBrowserLanguage=function(){return this.translate.getBrowserLang()},t.prototype.getDatefnsLocale=function(){var t;switch(this.getBrowserLanguage()){case"en":t={locale:u};break;default:t={locale:u}}return t},t.prototype.setDefaultLanguage=function(t){this.translate.setDefaultLang(t)},t.prototype.setSupportedLanguages=function(t){this.translate.addLangs(t)},t.prototype.updateLanguage=function(t){this.translate.use(t)},t.prototype.getLocalizedValue=function(t,e){var n=this.translate.instant(t);return e&&0!==e.length?this.format(n,e):n},t.prototype.getLocalizedDate=function(t){return s.isValid(new Date(t))?s.format(new Date(t),v.DATE_FORMATS.angular,this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDateTime=function(t){var e=new Date(t);if(s.isValid(e)){var n=O.toLocalizedDateTime(e);return s.format(n,v.DATE_FORMATS.angularWithTime,this.dateFnsLocale)}return"Invalid Date"},t.prototype.getLocalizedDistanceToNowInWords=function(t){return s.isValid(new Date(t))?s.formatDistanceToNow(new Date(t),this.dateFnsLocale):"Invalid Date"},t.prototype.getLocalizedDistanceInWords=function(t,e){return s.isValid(new Date(t))&&s.isValid(new Date(e))?s.formatDistance(new Date(t),new Date(e),this.dateFnsLocale):"Invalid Date"},t}();E.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new E(e.ɵɵinject(a.TranslateService))},token:E,providedIn:"root"}),E.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],E.ctorParameters=function(){return[{type:a.TranslateService}]};var N=function(){function t(t){this.localizeService=t}return t.prototype.transform=function(t,e,n){if(t)return e||(e="t"),"t"===e?this.localizeService.getLocalizedValue(t):"d"===e?this.localizeService.getLocalizedDate(t):"dt"===e?this.localizeService.getLocalizedDateTime(t):"dis2now"===e?this.localizeService.getLocalizedDistanceToNowInWords(t):"dis"===e?this.localizeService.getLocalizedDistanceInWords(t,n):t},t}();function D(t){return new l.TranslateHttpLoader(t,v.resourcesUrl+"/",".json")}function V(t,e,n){return function(){return new Promise((function(r){n.get(c.LOCATION_INITIALIZED,Promise.resolve(null)).then((function(){var n=e.configureTranslationSettings(t);t.use(n).subscribe((function(){}),(function(){r(null)}),(function(){r(null)}))}))}))}}N.decorators=[{type:e.Pipe,args:[{name:"localize"}]}],N.ctorParameters=function(){return[{type:E}]};var U=a.TranslateModule.forRoot({loader:{provide:a.TranslateLoader,useFactory:D,deps:[r.HttpClient]}}),j=function(){};j.decorators=[{type:e.NgModule,args:[{imports:[U],providers:[{provide:e.APP_INITIALIZER,useFactory:V,deps:[a.TranslateService,E,e.Injector],multi:!0}],exports:[]}]}];var A=function(){};A.decorators=[{type:e.NgModule,args:[{imports:[a.TranslateModule],exports:[a.TranslateModule,N],declarations:[N],providers:[]}]}];var B=function(){function t(t){this.injector=t}return t.prototype.handleError=function(t){throw this.injector.get(L).logError(t),t},t}();B.decorators=[{type:e.Injectable}],B.ctorParameters=function(){return[{type:e.Injector}]};var k=function(){function t(t){this.http=t,this.baseUrl=""}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(o.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getById=function(t){return this.get("getById",{id:t})},t.prototype.getAll=function(t){return this.get("getall",t).pipe(o.map((function(t){return t})))},t.prototype.getJsonFile=function(t,e,n){e||(e="/dist/jsons"),n||(n="1.0");var r=e+"/"+t+"?"+n;return this.http.get(r).pipe(o.map((function(t){return t})))},t}();k.decorators=[{type:e.Injectable}],k.ctorParameters=function(){return[{type:r.HttpClient}]};var F=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return C(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return y.isUserSignedIn},e.prototype.isUserAdmin=function(){return y.isUserAdmin},e}(k);F.decorators=[{type:e.Injectable}],F.ctorParameters=function(){return[{type:r.HttpClient}]};var q=function(){function t(){}return t.newGuid=function(){return f.v4()},t}(),M=function(){function t(t){this.toastrService=t,this._sessionNotifications=new i.BehaviorSubject([]),this._serverNotifications=new i.BehaviorSubject([]),this.sessionNotifications$=this._sessionNotifications.asObservable(),this.serverNotifications$=this._serverNotifications.asObservable()}return t.prototype.addSessionNotification=function(t,e){var n={id:q.newGuid(),isNew:!0,isSession:!0,text:t,type:e,createdDate:new Date(Date.now()).toISOString()};this.addSessionNotificationToList(n)},t.prototype.addSessionNotificationToList=function(t){this.sessionNotifications=x([t],this.sessionNotifications)},t.prototype.removeNotification=function(t,e){e?this.sessionNotifications=this.sessionNotifications.filter((function(e){return e.id!==t})):this.serverNotifications=this.serverNotifications.filter((function(e){return e.id!==t}))},t.prototype.success=function(t,e,n,r){void 0===r&&(r=!0),t=G.getLocalizedValue(t,e,"OperationSuccessFull"),n=G.getLocalizedValue(n),this.toastrService.success(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"success")},t.prototype.info=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.warning=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n),this.toastrService.warning(t,n,{timeOut:3e3,progressBar:!0})},t.prototype.error=function(t,e,n,r){void 0===r&&(r=!0),t=G.getLocalizedValue(t,e,"ErrorOccured"),n=G.getLocalizedValue(n),this.toastrService.error(t,n,{timeOut:3e3,progressBar:!0}),r&&this.addSessionNotification(t,"error")},t.prototype.cancel=function(t,e,n){t=G.getLocalizedValue(t,e,"OperationCancelled"),n=G.getLocalizedValue(n),this.toastrService.info(t,n,{timeOut:3e3,progressBar:!0})},Object.defineProperty(t.prototype,"sessionNotifications",{get:function(){return this._sessionNotifications.getValue()},set:function(t){this._sessionNotifications.next(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverNotifications",{get:function(){return this._serverNotifications.getValue()},set:function(t){this._serverNotifications.next(t)},enumerable:!1,configurable:!0}),t}();M.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new M(e.ɵɵinject(d.ToastrService))},token:M,providedIn:"root"}),M.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],M.ctorParameters=function(){return[{type:d.ToastrService}]};var R=function(e,n){this.injector=e,S(n,"AnatolyCoreModule"),t.InjectorInstance=this.injector};R.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule],exports:[],providers:[L,M,F,z]}]}],R.ctorParameters=function(){return[{type:e.Injector},{type:R,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var G=function(){function e(){}return e.getValueByNameInQS=function(t){return e.getValueByName(location.search,t)},e.getValueByName=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},e.copyToClipBoard=function(t,e){t.preventDefault();var n=document.createElement("textarea");n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0",n.value=e,document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n)},e.downloadFile=function(t,e){var n=document.createElement("a");n.download=t,n.href=e,n.click()},Object.defineProperty(e,"localizationService",{get:function(){return t.InjectorInstance.get(E)},enumerable:!1,configurable:!0}),e.getLocalizedValue=function(t,e,n){return!t&&n?this.localizationService.getLocalizedValue(n):t?this.localizationService.getLocalizedValue(t,e):t},e.downloadBlobFile=function(t,n){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,n);else{var r=window.URL.createObjectURL(t);e.downloadFile(n,r)}},e}(),H=function(){function t(){}return t.success=function(t,e,n,r){t=G.getLocalizedValue(t,e,"OperationSuccessFull"),n=G.getLocalizedValue(n,null,"Success"),p.fire({text:t,title:n,icon:"success",confirmButtonText:G.getLocalizedValue("Ok")}).then((function(){r&&r()}))},t.info=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n,null,"Info"),p.fire({text:t,title:n,icon:"info",confirmButtonText:G.getLocalizedValue("Ok")})},t.warning=function(t,e,n){t=G.getLocalizedValue(t,e),n=G.getLocalizedValue(n,null,"Warning"),p.fire({text:t,title:n,icon:"warning",confirmButtonText:G.getLocalizedValue("Ok")})},t.error=function(t,e,n){t=G.getLocalizedValue(t,e,"ErrorOccured"),n=G.getLocalizedValue(n,null,"Error"),p.fire({text:t,title:n,icon:"error",confirmButtonText:G.getLocalizedValue("Ok")})},t.cancel=function(t,e,n){t=G.getLocalizedValue(t,e,"OperationCancelled"),n=G.getLocalizedValue(n,null,"Cancelled"),p.fire({text:t,title:n,icon:"info"})},t.notImplemented=function(){this.warning("Not Implemented Yet")},t.areYouSure=function(t,e,n,r,o,i){t=G.getLocalizedValue(t),e=G.getLocalizedValue(e,null,"AreYouSure"),p.fire({text:t,title:e,icon:"warning",confirmButtonText:G.getLocalizedValue(n),cancelButtonText:G.getLocalizedValue(r),showCancelButton:!0}).then((function(t){t.value?o&&o():t.dismiss!=p.DismissReason.cancel&&t.dismiss!=p.DismissReason.close||i&&i()}))},t}(),_=function(){function t(){this.expired$=new i.Subject}return t.prototype.startWatching=function(t){var e=this;return this.idle$=i.merge(i.fromEvent(document,"mousemove"),i.fromEvent(document,"click"),i.fromEvent(document,"mousedown"),i.fromEvent(document,"keypress"),i.fromEvent(document,"DOMMouseScroll"),i.fromEvent(document,"mousewheel"),i.fromEvent(document,"touchmove"),i.fromEvent(document,"MSPointerMove"),i.fromEvent(window,"mousemove"),i.fromEvent(window,"resize")),this.timeOutMilliSeconds=1e3*t,this.idleSubscription=this.idle$.subscribe((function(t){e.resetTimer()})),this.startTimer(),this.expired$},t.prototype.startTimer=function(){var t=this;this.timer$=i.timer(this.timeOutMilliSeconds,this.timeOutMilliSeconds).subscribe((function(e){t.expired$.next(!0)}))},t.prototype.resetTimer=function(){this.timer$.unsubscribe(),this.startTimer()},t.prototype.stopTimer=function(){this.timer$.unsubscribe(),this.idleSubscription.unsubscribe()},t.prototype.restartIdleTimer=function(){var t=this;this.timer$.unsubscribe(),this.idleSubscription.unsubscribe(),this.idleSubscription=this.idle$.subscribe((function(e){t.resetTimer()})),this.startTimer()},t}();_.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new _},token:_,providedIn:"root"}),_.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var K=function(){function t(t){this.currentClientKey=v.SERVICES_CONF.selectedClientID,this.storage="local"===t||"localStorage"===t?localStorage:sessionStorage}return t.prototype.setItem=function(t,e){this.storage.setItem(this.currentClientKey+t,e)},t.prototype.setObject=function(t,e){this.storage.setItem(this.currentClientKey+t,JSON.stringify(e))},t.prototype.getItem=function(t){return this.storage.getItem(this.currentClientKey+t)},t.prototype.getObject=function(t){return JSON.parse(this.storage.getItem(this.currentClientKey+t)||"{}")},t.prototype.remove=function(t){this.storage.removeItem(this.currentClientKey+t)},t}(),W=function(t){function e(){return t.call(this,"localStorage")||this}return C(e,t),e}(K);W.decorators=[{type:e.Injectable}],W.ctorParameters=function(){return[]};var Y=function(t){function e(){return t.call(this,"sessionStorage")||this}return C(e,t),e}(K);Y.decorators=[{type:e.Injectable}],Y.ctorParameters=function(){return[]};var Q=function(){function t(){this.subs=[]}return t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.subs=this.subs.concat(t)},Object.defineProperty(t.prototype,"sink",{set:function(t){this.subs.push(t)},enumerable:!1,configurable:!0}),t.prototype.unsubscribe=function(){this.subs.forEach((function(t){return t&&t.unsubscribe()})),this.subs=[]},t}(),J=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.baseReadUrl="",n.data=[],n}return C(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var i=this;if(this.data.length)return t.prototype.next.call(this,this.data);var a=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(a=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(a).pipe(o.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(i,e),n&&n()}),(function(t){r&&r(t)}))},e}(i.BehaviorSubject);J.decorators=[{type:e.Injectable}],J.ctorParameters=function(){return[{type:r.HttpClient}]};var X=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl="",n}return C(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.remove=function(t,e){var n=this;this.reset(),this.post("remove",t).subscribe((function(){}),(function(){n.read()}),(function(){n.read(),e&&e()}))},e.prototype.post=function(t,e){var n=this.baseUrl+""+t+this.serializeParams(e);return this.http.post(n,e).pipe(o.map((function(t){return t})))},e}(J);X.decorators=[{type:e.Injectable}],X.ctorParameters=function(){return[{type:r.HttpClient}]};var Z={billingApiPath:"api/billing",notificationsApiPath:"api/notifications"},tt=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=Z.notificationsApiPath,n}return C(e,t),e.prototype.retrieveNotifications=function(){return this.get("retrieveNotifications")},e}(k);tt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new tt(e.ɵɵinject(r.HttpClient))},token:tt,providedIn:"root"}),tt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],tt.ctorParameters=function(){return[{type:r.HttpClient}]};var et=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl=Z.billingApiPath,n}return C(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(t){}),(function(t){e&&e()}),(function(){t&&t()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e}(k);et.decorators=[{type:e.Injectable}],et.ctorParameters=function(){return[{type:r.HttpClient}]};var nt=function(t){S(t,"AnatolyDataModule")};nt.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule],providers:[et]}]}],nt.ctorParameters=function(){return[{type:nt,decorators:[{type:e.Optional},{type:e.SkipSelf}]}]};var rt=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;H.areYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){H.success("Access Granted",null,null,(function(){window.location.reload()}))}))}))},t}();rt.decorators=[{type:e.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],rt.ctorParameters=function(){return[{type:F},{type:et}]},rt.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var ot=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();ot.decorators=[{type:e.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],ot.ctorParameters=function(){return[{type:F}]},ot.propDecorators={plan:[{type:e.Input}],plantitle:[{type:e.Input}]};var it=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;H.areYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){H.success("Your request for changing plan has been sent.",null,null,(function(){window.location.reload()}))}))}))},t}();it.decorators=[{type:e.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],it.ctorParameters=function(){return[{type:et}]},it.propDecorators={currentplantitle:[{type:e.Input}],requestedplan:[{type:e.Input}],requestedplantitle:[{type:e.Input}]};var at=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();at.decorators=[{type:e.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],at.propDecorators={title:[{type:e.Input}]};var st={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},ut=function(){function t(){}return t.prototype.getQSId=function(){var t=G.getValueByNameInQS("id");return void 0===t||""==t?null:t},t}(),ct=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return C(e,t),e.prototype.isActionAdding=function(){var t=G.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e}(ut);ct.propDecorators={formGroup:[{type:e.Input}],formSubmitted:[{type:e.Input}]};var lt=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return C(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},st,t),n=v.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(ct);lt.propDecorators={editorLabelText:[{type:e.Input}],editorOptions:[{type:e.Input}]};var pt=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return C(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(lt);pt.decorators=[{type:e.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],pt.ctorParameters=function(){return[]},pt.propDecorators={editorFormKey:[{type:e.Input}]};var dt=function(t){function e(){return t.call(this)||this}return C(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(lt);dt.decorators=[{type:e.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],dt.ctorParameters=function(){return[]};var ft=function(){};ft.decorators=[{type:e.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],ft.ctorParameters=function(){return[]},ft.propDecorators={classbtn:[{type:e.Input}]};var ht=function(){};ht.decorators=[{type:e.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],ht.ctorParameters=function(){return[]},ht.propDecorators={classbtn:[{type:e.Input}]};var gt=function(){};gt.decorators=[{type:e.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],gt.propDecorators={classbtn:[{type:e.Input}]};var mt=function(){function t(t){this.loadingService=t,this.subs=new Q,this.show=!1}return t.prototype.ngOnInit=function(){var t=this;this.subs.sink=this.loadingService.subscribe((function(e){t.show=e}))},t.prototype.ngOnDestroy=function(){this.subs.unsubscribe()},t}();mt.decorators=[{type:e.Component,args:[{selector:"anatoly-loading",template:'<div *ngIf="show">\r\n <span id="pnlLoading" class="k-icon k-i-loading"></span>\r\n</div>\r\n'}]}],mt.ctorParameters=function(){return[{type:z}]};var yt={spinnerLine:"spinner-line-material",ChasingDots:"spinner-chasing-dots",CubeGrid:"spinner-cube-grid",DoubleBounce:"spinner-double-bounce",RotatingPlane:"spinner-rotationg-plane",SpinnerPulse:"spinner-spinner-pulse",ThreeBounce:"spinner-three-bounce",WanderingCubes:"spinner-wandering-cubes",Wave:"spinner-wave"},vt=function(){function t(t,e){var r=this;this.router=t,this.document=e,this.isSpinnerVisible=!0,this.spinnerSpinKit=yt,this.backgroundColor="#007CB0",this.spinner=yt.spinnerLine,this.router.events.subscribe((function(t){t instanceof n.NavigationStart?r.isSpinnerVisible=!0:(t instanceof n.NavigationEnd||t instanceof n.NavigationCancel||t instanceof n.NavigationError)&&(r.isSpinnerVisible=!1)}),(function(){r.isSpinnerVisible=!1}))}return t.prototype.ngOnDestroy=function(){this.isSpinnerVisible=!1},t}();vt.decorators=[{type:e.Component,args:[{selector:"spinner",template:'<div id="spinner-loader" *ngIf="isSpinnerVisible">\r\n <div class="loader-bg">\r\n <div class="spinner-line-material" [class.colored]="!backgroundColor" *ngIf="spinner === spinnerSpinKit.spinnerLine">\r\n <div class="spinner-child spinner-bounce1" [style.background-color]=\'backgroundColor\'></div>\r\n </div>\r\n </div>\r\n</div>\r\n',encapsulation:e.ViewEncapsulation.None}]}],vt.ctorParameters=function(){return[{type:n.Router},{type:Document,decorators:[{type:e.Inject,args:[c.DOCUMENT]}]}]},vt.propDecorators={backgroundColor:[{type:e.Input}],spinner:[{type:e.Input}]};var bt=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();bt.decorators=[{type:e.Directive,args:[{selector:"[formControl], [formControlName]"}]}],bt.ctorParameters=function(){return[{type:e.ElementRef},{type:h.NgControl}]};var St=function(){function t(){}return t.prototype.transform=function(t,e,n){return t?t.replace(new RegExp(e,"g"),n):t},t}();St.decorators=[{type:e.Pipe,args:[{name:"replaceText"}]}];var It=function(){function t(){this.units=["Bytes","KB","MB","GB","TB","PB"]}return t.prototype.transform=function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=0),isNaN(parseFloat(String(t)))||!isFinite(t))return"";for(var n=0;t>=1024;)t/=1024,n++;return t.toFixed(+e)+" "+this.units[n]},t}();It.decorators=[{type:e.Pipe,args:[{name:"filesize"}]}];var Ct=function(){function t(t){this.sanitized=t}return t.prototype.transform=function(t){return this.sanitized.bypassSecurityTrustHtml(t)},t}();Ct.decorators=[{type:e.Pipe,args:[{name:"safeHtml"}]}],Ct.ctorParameters=function(){return[{type:g.DomSanitizer}]};var Pt=function(t){function e(){return t.call(this)||this}return C(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(ct),wt=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return C(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,x(t)),this.customerrors.length>0&&e.push.apply(e,x(this.customerrors)),e},e}(Pt);wt.decorators=[{type:e.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],wt.ctorParameters=function(){return[]},wt.propDecorators={visible:[{type:e.Input}],customerrors:[{type:e.Input}],viewtype:[{type:e.Input}]};var xt=function(t){function e(){return t.call(this)||this}return C(e,t),e}(Pt);xt.decorators=[{type:e.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],xt.ctorParameters=function(){return[]},xt.propDecorators={controlName:[{type:e.Input}],controlTitle:[{type:e.Input}]};var zt=m.FroalaEditorModule.forRoot(),Lt=m.FroalaViewModule.forRoot(),Tt=function(){};Tt.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule,h.ReactiveFormsModule,h.FormsModule,zt,Lt],exports:[ot,it,rt,ft,gt,ht,wt,xt,dt,pt,at,vt,mt,bt,Ct,St,It],declarations:[ot,it,rt,ft,gt,ht,wt,xt,dt,pt,at,vt,mt,bt,Ct,St,It]}]}],t.Alerts=H,t.AnatolyCoreModule=R,t.AnatolyDataModule=nt,t.AnatolyHttpInterceptor=T,t.AnatolyUIModule=Tt,t.AppContextService=F,t.AppCoreSettings=v,t.BaseApiService=k,t.BaseComponent=ut,t.BaseEditComponent=ct,t.BaseGoService=b,t.BaseGridEditService=X,t.BaseGridReadService=J,t.BaseHtmlEditorComponent=lt,t.BillingApiService=et,t.BuyAccessButtonComponent=rt,t.ContentHeaderComponent=at,t.ContextInitState=y,t.Convert=O,t.DefaultEditorOptions=st,t.FileSizePipe=It,t.FormValidationSummaryComponent=wt,t.FormsHtmlEditorComponent=pt,t.FroalaEditorModuleWithProviders=zt,t.FroalaViewModuleWithProviders=Lt,t.GlobalErrorHandler=B,t.Guid=q,t.HtmlEditorComponent=dt,t.IdleService=_,t.ItemValidationSummaryComponent=xt,t.LoadingComponent=mt,t.LoadingService=z,t.LocalStorageService=W,t.LocalizationModule=A,t.LocalizationService=E,t.LocalizationSettingsModule=j,t.LocalizePipe=N,t.LoggingService=L,t.NativeElementDirective=bt,t.NotificationService=M,t.NotificationsApiService=tt,t.ReplaceTextPipe=St,t.SafeHtmlPipe=Ct,t.SessionStorageService=Y,t.SignInButtonComponent=ft,t.SignOutButtonComponent=ht,t.SignUpButtonComponent=gt,t.SpinnerComponent=vt,t.Subs=Q,t.SubscribePlanButtonComponent=ot,t.TranslateModuleAtRoot=U,t.UpgradePlanButtonComponent=it,t.Urls={notificationsSocketUrl:"/hubs/notifications"},t.Utils=G,t.ValidationSummaryComponent=Pt,t.consts=Z,t.customTranslateLoaderFactory=D,t.localizationInitializerFactory=V,t.throwIfAlreadyLoaded=S,Object.defineProperty(t,"__esModule",{value:!0})}));
17
16
  //# sourceMappingURL=osovitny-anatoly.umd.min.js.map