text: function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf(t);if(e){var o=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"1NkQ":function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i,o=n("+KbT"),r=n("Iab2"),a=n("fXoL"),c=((i=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"saveFile",value:function(t,e,n){var i={};n&&(i.type=n);var o=new Blob([t],i);Object(r.saveAs)(o,e,{autoBOM:!0})}},{key:"validateFileName",value:function(t){return new RegExp(/^[^\\\/\?%\*:\|\"\<\>]*[^\.]+$/i).test(t)}},{key:"convertTo8859_15",value:function(t){for(var e=new Uint8Array(new ArrayBuffer(t.length)),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}}]),t}()).\u0275fac=function(t){return new(t||i)},i.\u0275prov=a.Pb({token:i,factory:i.\u0275fac,providedIn:"root"}),i),s=n("sYmb");function l(t){return void 0!==t.property}function u(t){return void 0!==t.map&&void 0!==t.label}var b,f=((b=function(){function t(e,n,i){_classCallCheck(this,t),this.exporter=e,this.translate=n,this.config=i}return _createClass(t,[{key:"export",value:function(t,e,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=o.lineSeparator,a=void 0===r?"\r\n":r,c=o.columnSeparator,s=void 0===c?this.config.instant("general_csv_separator"):c,b=o.encoding,f=void 0===b?this.config.instant("general_csv_encoding"):b,p=[];if(a===s)throw new Error("lineseparator and columnseparator must differ from each other");var d=e.map((function(t){var e;return l(t)?e=t.label?t.label:t.property:u(t)&&(e=t.label),e=i.capitalizeTranslate(e)}));p.push(d);var m=(p=p.concat(t.map((function(t){return e.map((function(e){var n;if(l(e)){var o=t[e.property];n="number"==typeof o?o.toString(10):o?!0===o?"1":!1===o?"0":o.toString():""}else u(e)&&(n=e.map(t));return i.checkCsvTextSafety(n)}))})))).map((function(t){return t.join(s)})).join(a),h="text/csv;charset="+f;this.exporter.saveFile("iso-8859-15"===f?this.exporter.convertTo8859_15(m):m,n,h)}},{key:"checkCsvTextSafety",value:function(t){return t?'"'+t.replace(/"/g,'""').replace(/(\r\n\t|\n|\r\t)/gm,"")+'"':""}},{key:"capitalizeTranslate",value:function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);return this.translate.instant(e)}},{key:"dummyCSVExport",value:function(t,e,n){var i=this,o=this.config.instant("general_csv_separator"),r=[t.map((function(t){return i.translate.instant(t)})).join(o)],a=e.map((function(t){return t.map((function(t){var e="";return t||(e=""),e="number"==typeof t?t.toString(10):"boolean"==typeof t?t?"1":"0":t,i.checkCsvTextSafety(e)})).join(o)})),c=r.concat(a).join("\r\n"),s=this.config.instant("general_csv_encoding");this.exporter.saveFile("iso-8859-15"===s?this.exporter.convertTo8859_15(c):c,n,"text/csv")}}]),t}()).\u0275fac=function(t){return new(t||b)(a.dc(c),a.dc(s.k),a.dc(o.a))},b.\u0275prov=a.Pb({token:b,factory:b.\u0275fac,providedIn:"root"}),b)},ePZ9:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n("pSLD"),o=n("+B0n"),r=n("dOok"),a=n("+KbT"),c=n("1NkQ"),s=n("a9XT"),l=n("rHPv"),u=n("jDC6"),b=n("3Y4h"),f=n("fXoL"),p=n("sYmb"),d=function(){var t=function(){function t(e,n,i,o,r,a,c){_classCallCheck(this,t),this.csvExport=e,this.translate=n,this.configService=i,this.linenumberingService=o,this.changeRecoRepo=r,this.motionRepo=a,this.commentRepo=c}return _createClass(t,[{key:"createText",value:function(t,e){var n=this.configService.instant("motions_line_length"),i=Object.assign([],this.changeRecoRepo.getChangeRecoOfMotion(t.id)),o=this.motionRepo.getAmendmentsInstantly(t.id);if(o){var r,a=_createForOfIteratorHelper(o);try{for(a.s();!(r=a.n()).done;){var c,s=r.value,l=this.changeRecoRepo.getChangeRecoOfMotion(s.id).filter((function(t){return t.showInFinalView()})),u=_createForOfIteratorHelper(this.motionRepo.getAmendmentAmendedParagraphs(s,n,l));try{for(u.s();!(c=u.n()).done;){var b=c.value;i.push(b)}}catch(p){u.e(p)}finally{u.f()}}}catch(p){a.e(p)}finally{a.f()}}i.sort((function(t,e){return t.getLineFrom()-e.getLineFrom()}));var f=this.motionRepo.formatMotion(t.id,e,i,n);return this.linenumberingService.stripLineNumbers(f)}},{key:"exportMotionList",value:function(t,e,n,i){var o=this;i||(i=this.configService.instant("motions_recommendation_text_mode"));var r=Object(b.j)(["identifier","title"].concat(e)).map((function(t){return"recommendation"===t?{label:"recommendation",map:function(t){return o.motionRepo.getExtendedRecommendationLabel(t)}}:"state"===t?{label:"state",map:function(t){return o.motionRepo.getExtendedStateLabel(t)}}:"text"===t?{label:"Text",map:function(t){return o.createText(t,i)}}:"motion_block"===t?{label:"Motion block",map:function(t){return t.motion_block?t.motion_block.getTitle():""}}:{property:t}}));r.push.apply(r,_toConsumableArray(n.map((function(t){return{label:o.commentRepo.getViewModel(t).getTitle(),map:function(e){var n=o.commentRepo.getViewModel(t),i=e.getCommentForSection(n);return i&&i.comment?Object(l.a)(Object(u.a)(i.comment)):""}}})))),this.csvExport.export(t,r,this.translate.instant("Motions")+".csv")}},{key:"exportCallList",value:function(t){var e=this;this.csvExport.export(t,[{label:"Called",map:function(t){return t.sort_parent_id?"":t.identifierOrTitle}},{label:"Called with",map:function(t){return t.sort_parent_id?t.identifierOrTitle:""}},{label:"submitters",map:function(t){return t.submittersAsUsers.map((function(t){return t.short_name})).join(",")}},{property:"title"},{label:"recommendation",map:function(t){return t.recommendation?e.motionRepo.getExtendedRecommendationLabel(t):""}},{property:"motion_block",label:"Motion block"}],this.translate.instant("Call list")+".csv")}},{key:"exportDummyMotion",value:function(){this.csvExport.dummyCSVExport(["Identifier","Submitters","Title","Text","Reason","Category","Tags","Motion block","Origin"],[["A1","Submitter A","Title 1","Text 1","Reason 1","Category A","Tag 1, Tag 2","Block A","Last Year Conference A"],["B1","Submitter B","Title 2","Text 2","Reason 2","Category B",null,"Block A","Origin B"],["C2",null,"Title 3","Text 3",null,null,null,null,null]],this.translate.instant("motions-example")+".csv")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(f.dc(c.a),f.dc(p.k),f.dc(a.a),f.dc(s.a),f.dc(i.a),f.dc(r.a),f.dc(o.a))},t.\u0275prov=f.Pb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},mksl:function(t,e,n){"use strict";n.d(e,"a",(function(){return Y}));var i=n("fXoL"),o=n("VR2Q"),r=n("7dBR"),a=n("gsQk"),c=n("KL36"),s=n("tyNb"),l=n("/t3+"),u=n("ofXK"),b=n("bTqV"),f=n("NFeN"),p=n("Qu3c"),d=n("sYmb");function m(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",12),i.hc("click",(function(){return i.Ic(n),i.lc().clickHamburgerMenu()})),i.Zb(1,"mat-icon"),i.Sc(2,"menu"),i.Yb(),i.Yb()}}function h(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",12),i.hc("click",(function(){return i.Ic(n),i.lc().onBackButton()})),i.Zb(1,"mat-icon"),i.Sc(2,"arrow_back"),i.Yb(),i.Yb()}}function g(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",12),i.hc("click",(function(){i.Ic(n);var t=i.lc();return t.isCancelEditUsed?t.sendCancelEditEvent():t.sendMainEvent()})),i.Zb(1,"mat-icon"),i.Sc(2,"close"),i.Yb(),i.Yb()}}function v(t,e){1&t&&(i.Zb(0,"div",13),i.rc(1,1),i.Yb())}function y(t,e){1&t&&i.Ub(0,"div",6)}function C(t,e){1&t&&(i.Zb(0,"div",14),i.rc(1,2),i.Yb())}function k(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",12),i.hc("click",(function(){return i.Ic(n),i.lc().openSearch()})),i.Zb(1,"mat-icon"),i.Sc(2,"search"),i.Yb(),i.Yb()}}function _(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",15),i.hc("click",(function(){return i.Ic(n),i.lc().sendMainEvent()})),i.mc(1,"translate"),i.Zb(2,"mat-icon"),i.Sc(3),i.Yb(),i.Yb()}if(2&t){var o=i.lc();i.uc("matTooltip",i.nc(1,3,o.mainActionTooltip)),i.tc("disabled",!o.isMainButtonEnabled),i.Gb(3),i.Tc(o.mainButtonIcon)}}function x(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",16),i.hc("click",(function(){return i.Ic(n),i.lc().save()})),i.Zb(1,"strong",17),i.Sc(2),i.mc(3,"translate"),i.Yb(),i.Yb()}if(2&t){var o=i.lc();i.tc("disabled",!o.isSaveButtonEnabled),i.Gb(2),i.Tc(i.nc(3,2,o.saveText))}}function S(t,e){1&t&&i.rc(0,3,["*ngIf","!editMode"])}function T(t,e){1&t&&(i.Zb(0,"mat-icon"),i.Sc(1," add "),i.Yb())}function O(t,e){if(1&t&&(i.Zb(0,"mat-icon"),i.Sc(1),i.Yb()),2&t){var n=i.lc(2);i.Gb(1),i.Uc(" ",n.mainButtonIcon," ")}}function M(t,e){if(1&t){var n=i.ac();i.Zb(0,"button",18),i.hc("click",(function(){return i.Ic(n),i.lc().sendMainEvent()})),i.mc(1,"translate"),i.Qc(2,T,2,0,"mat-icon",10),i.Qc(3,O,2,1,"mat-icon",10),i.Yb()}if(2&t){var o=i.lc();i.uc("matTooltip",i.nc(1,4,o.mainActionTooltip)),i.tc("disabled",!o.isMainButtonEnabled),i.Gb(2),i.tc("ngIf","add_circle"===o.mainButtonIcon),i.Gb(1),i.tc("ngIf","add_circle"!==o.mainButtonIcon)}}var w=[[["",8,"extra-controls-slot"]],[["",8,"title-slot"]],[["",8,"central-info-slot"]],[["",8,"menu-slot"]]],F=[".extra-controls-slot",".title-slot",".central-info-slot",".menu-slot"],Y=function(){var t=function(){function t(e,n,o,r,a,c){_classCallCheck(this,t),this.vp=e,this.menu=n,this.router=o,this.route=r,this.routingState=a,this.overlayService=c,this.nav=!0,this.mainButtonIcon="add_circle",this.saveText="Save",this.editMode=!1,this.isSearchEnabled=!0,this.isSaveButtonEnabled=!0,this.multiSelectMode=!1,this.hasMainButton=!1,this.isMainButtonEnabled=!0,this.goBack=!1,this.prevUrl="../",this.mainEvent=new i.p,this.cancelEditEvent=new i.p,this.isCancelEditUsed=!1,this.saveEvent=new i.p}return _createClass(t,[{key:"ngOnInit",value:function(){this.isCancelEditUsed=this.cancelEditEvent.observers.length>0}},{key:"sendMainEvent",value:function(){this.mainEvent.next()}},{key:"sendCancelEditEvent",value:function(){this.cancelEditEvent.next()}},{key:"clickHamburgerMenu",value:function(){this.menu.toggleMenu()}},{key:"save",value:function(){this.saveEvent.next(!0)}},{key:"openSearch",value:function(){this.overlayService.showSearch()}},{key:"onBackButton",value:function(){this.goBack?this.routingState.goBack():this.router.navigate(this.routingState.customOrigin&&this.routingState.customOrigin!==this.router.url?[this.routingState.customOrigin]:[this.prevUrl],{relativeTo:this.route})}},{key:"showBackButton",get:function(){return!this.nav&&!this.multiSelectMode&&(this.routingState.isSafePrevUrl||!this.goBack)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Tb(c.a),i.Tb(o.a),i.Tb(s.f),i.Tb(s.a),i.Tb(a.a),i.Tb(r.a))},t.\u0275cmp=i.Nb({type:t,selectors:[["os-head-bar"]],inputs:{nav:"nav",mainButtonIcon:"mainButtonIcon",saveText:"saveText",editMode:"editMode",isSearchEnabled:"isSearchEnabled",isSaveButtonEnabled:"isSaveButtonEnabled",multiSelectMode:"multiSelectMode",hasMainButton:"hasMainButton",isMainButtonEnabled:"isMainButtonEnabled",goBack:"goBack",prevUrl:"prevUrl",mainActionTooltip:"mainActionTooltip"},outputs:{mainEvent:"mainEvent",cancelEditEvent:"cancelEditEvent",saveEvent:"saveEvent"},ngContentSelectors:F,decls:16,vars:12,consts:[["color","primary",1,"sticky-toolbar",3,"ngClass"],[1,"toolbar-left"],["mat-icon-button","",3,"click",4,"ngIf"],["class","toolbar-left-text",4,"ngIf"],["class","spacer",4,"ngIf"],["class","toolbar-centered",4,"ngIf"],[1,"spacer"],[1,"toolbar-right"],["mat-icon-button","",3,"disabled","matTooltip","click",4,"ngIf"],["mat-button","",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["mat-fab","","class","head-button",3,"disabled","matTooltip","click",4,"ngIf"],["mat-icon-button","",3,"click"],[1,"toolbar-left-text"],[1,"toolbar-centered"],["mat-icon-button","",3,"disabled","matTooltip","click"],["mat-button","",3,"disabled","click"],[1,"upper"],["mat-fab","",1,"head-button",3,"disabled","matTooltip","click"]],template:function(t,e){1&t&&(i.sc(w),i.Zb(0,"mat-toolbar",0),i.Zb(1,"div",1),i.Qc(2,m,3,0,"button",2),i.Qc(3,h,3,0,"button",2),i.Qc(4,g,3,0,"button",2),i.Qc(5,v,2,0,"div",3),i.Yb(),i.Qc(6,y,1,0,"div",4),i.Qc(7,C,2,0,"div",5),i.Ub(8,"div",6),i.Qc(9,k,3,0,"button",2),i.Zb(10,"div",7),i.rc(11),i.Qc(12,_,4,5,"button",8),i.Qc(13,x,4,4,"button",9),i.Qc(14,S,1,0,void 0,10),i.Yb(),i.Yb(),i.Qc(15,M,4,6,"button",11)),2&t&&(i.tc("ngClass",e.multiSelectMode?"multi-select":""),i.Gb(2),i.tc("ngIf",e.vp.isMobile&&!e.showBackButton&&!e.editMode),i.Gb(1),i.tc("ngIf",e.showBackButton&&!e.editMode),i.Gb(1),i.tc("ngIf",e.editMode),i.Gb(1),i.tc("ngIf",!e.multiSelectMode),i.Gb(1),i.tc("ngIf",!e.multiSelectMode),i.Gb(1),i.tc("ngIf",e.multiSelectMode),i.Gb(2),i.tc("ngIf",!e.editMode&&e.isSearchEnabled),i.Gb(3),i.tc("ngIf",e.hasMainButton&&!e.editMode&&!e.vp.isMobile&&!e.multiSelectMode),i.Gb(1),i.tc("ngIf",e.editMode),i.Gb(1),i.tc("ngIf",!e.editMode),i.Gb(1),i.tc("ngIf",e.hasMainButton&&!e.editMode&&e.vp.isMobile&&!e.multiSelectMode))},directives:[l.a,u.q,u.t,b.b,f.a,p.c],pipes:[d.j],styles:[".head-button{position:fixed;z-index:10;right:20px;bottom:55px}.sticky-toolbar{top:0;z-index:5;position:-webkit-sticky;position:sticky;height:64px!important}.sticky-toolbar .toolbar-left{display:-ms-flexbox;display:flex;max-width:calc(100% - 100px)}.sticky-toolbar .toolbar-left button{margin:12px 0}.sticky-toolbar .toolbar-left .toolbar-left-text{margin-left:10px;width:100%;overflow:hidden}.sticky-toolbar .toolbar-left .toolbar-left-text .title-slot{margin:16px 0;display:block}.sticky-toolbar .toolbar-left .toolbar-left-text .title-slot h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sticky-toolbar .toolbar-centered{margin:auto;vertical-align:baseline}.sticky-toolbar .toolbar-right,.sticky-toolbar .toolbar-right .extra-controls-slot{display:-ms-flexbox;display:flex}mat-toolbar.multi-select{background-color:#757575!important}"],encapsulation:2}),t}()},rHPv:function(t,e,n){"use strict";function i(t){return t.replace(/&auml;|&#228;/g,"\xe4").replace(/&Auml;|&#196;/g,"\xc4").replace(/&ouml;|&#246;/g,"\xf6").replace(/&Ouml;|&#214;/g,"\xd6").replace(/&uuml;/g,"\xfc").replace(/&Uuml;/g,"\xdc").replace(/&aring;|&#229;/g,"\xe5").replace(/&Aring;|&#197;/g,"\xc5").replace(/&szlig;|&#223;/g,"\xdf")}n.d(e,"a",(function(){return i}))},ssNq:function(t,e,n){"use strict";n.r(e),n.d(e,"CallListModule",(function(){return N}));var i=n("ofXK"),o=n("PCNd"),r=n("tyNb"),a=n("+QJK"),c=n("mrSG"),s=n("2Vo4"),l=n("iTQr"),u=n("dOok"),b=n("lv9T"),f=n("F48D"),p=n("Qy/R"),d=n("ePZ9"),m=n("y50V"),h=n("fXoL"),g=n("jhN1"),v=n("sYmb"),y=n("dNgK"),C=n("mksl"),k=n("bTqV"),_=n("STbY"),x=n("NFeN"),S=n("Wp6s"),T=n("/tkw"),O=n("f0Cb"),M=n("TU8p");function w(t,e){if(1&t){var n=h.ac();h.Zb(0,"div",17),h.Zb(1,"div"),h.Zb(2,"span"),h.Sc(3),h.mc(4,"translate"),h.Yb(),h.Sc(5,":\xa0 "),h.Yb(),h.Zb(6,"div"),h.Zb(7,"button",18),h.hc("click",(function(){return h.Ic(n),h.lc().resetFilters()})),h.Zb(8,"mat-icon",19),h.Sc(9,"cancel"),h.Yb(),h.Zb(10,"span"),h.Sc(11),h.mc(12,"translate"),h.Yb(),h.Yb(),h.Yb(),h.Yb()}2&t&&(h.Gb(3),h.Tc(h.nc(4,2,"Active filters")),h.Gb(8),h.Tc(h.nc(12,4,"Clear all")))}function F(t,e){if(1&t&&(h.Zb(0,"div"),h.Zb(1,"button",20),h.Zb(2,"span",21),h.Sc(3),h.mc(4,"translate"),h.Yb(),h.Yb(),h.Yb()),2&t){var n=h.lc(),i=h.Ec(23);h.Gb(1),h.tc("matMenuTriggerFor",i),h.Gb(1),h.tc("matBadge",n.activeCatFilterCount>0?n.activeCatFilterCount:null)("matBadgeOverlap",!1),h.Gb(1),h.Uc(" ",h.nc(4,4,"Categories")," ")}}function Y(t,e){if(1&t&&(h.Zb(0,"div"),h.Zb(1,"button",20),h.Zb(2,"span",21),h.Sc(3),h.mc(4,"translate"),h.Yb(),h.Yb(),h.Yb()),2&t){var n=h.lc(),i=h.Ec(26);h.Gb(1),h.tc("matMenuTriggerFor",i),h.Gb(1),h.tc("matBadge",n.activeTagFilterCount>0?n.activeTagFilterCount:null)("matBadgeOverlap",!1),h.Gb(1),h.Uc(" ",h.nc(4,4,"Tags")," ")}}function E(t,e){1&t&&(h.Zb(0,"mat-icon"),h.Sc(1,"checked"),h.Yb())}function Z(t,e){if(1&t){var n=h.ac();h.Zb(0,"div"),h.Zb(1,"button",16),h.hc("click",(function(){h.Ic(n);var t=e.$implicit;return h.lc().onFilterChange("category",t.id)})),h.Qc(2,E,2,0,"mat-icon",8),h.Zb(3,"span"),h.Sc(4),h.Yb(),h.Yb(),h.Yb()}if(2&t){var i=e.$implicit;h.Gb(2),h.tc("ngIf",i.state),h.Gb(2),h.Tc(i.label)}}function I(t,e){1&t&&(h.Zb(0,"mat-icon"),h.Sc(1,"checked"),h.Yb())}function B(t,e){if(1&t){var n=h.ac();h.Zb(0,"div"),h.Zb(1,"button",16),h.hc("click",(function(){h.Ic(n);var t=e.$implicit;return h.lc().onFilterChange("tag",t.id)})),h.Qc(2,I,2,0,"mat-icon",8),h.Zb(3,"span"),h.Sc(4),h.Yb(),h.Yb(),h.Yb()}if(2&t){var i=e.$implicit;h.Gb(2),h.tc("ngIf",i.state),h.Gb(2),h.Tc(i.label)}}function P(t,e){if(1&t&&(h.Zb(0,"span"),h.Zb(1,"mat-icon",19),h.Sc(2,"local_offer"),h.Yb(),h.Sc(3),h.Yb()),2&t){var n=e.$implicit;h.Gb(3),h.Uc(" ",n.getTitle()," ")}}function R(t,e){if(1&t&&(h.Zb(0,"div",22),h.Zb(1,"div",23),h.Sc(2),h.Yb(),h.Zb(3,"div",24),h.Qc(4,P,4,1,"span",10),h.Yb(),h.Yb()),2&t){var n=e.item,i=h.lc();h.Gb(2),h.Uc(" ",n.getTitle()," "),h.Gb(2),h.tc("ngForOf",i.getTags(n))}}var G,A,j,Q=[{path:"",component:(G=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,o,r,a,c,l,u,b){var f;return _classCallCheck(this,n),(f=e.call(this,t,i,o,b)).translate=i,f.motionRepo=r,f.motionCsvExport=a,f.motionPdfExport=c,f.tagRepo=l,f.categoryRepo=u,f.motions=[],f.hasChanged=!1,f.tagFilterOptions=[],f.activeTagFilterCount=0,f.categoryFilterOptions=[],f.activeCatFilterCount=0,f.activeTagFilters=new s.a([]),f.activeCatFilters=new s.a([]),f.motionsObservable=f.motionRepo.getViewModelListObservable(),f.motionsObservable.subscribe((function(t){f.motions=t.map((function(t){return t})).sort((function(t,e){return t.weight-e.weight}))})),f}return _createClass(n,[{key:"ngOnInit",value:function(){var t=this;this.subscriptions.push(this.activeTagFilters.subscribe((function(e){return t.onSubscribedFilterChange("tag",e)}))),this.subscriptions.push(this.activeCatFilters.subscribe((function(e){return t.onSubscribedFilterChange("category",e)}))),this.subscriptions.push(this.tagRepo.getViewModelListBehaviorSubject().subscribe((function(e){e&&e.length?(t.tagFilterOptions=e.map((function(e){return{label:e.name,id:e.id,state:t.tagFilterOptions&&t.tagFilterOptions.some((function(t){return t.id===e.id&&!0===t.state}))}})),t.tagFilterOptions.push({label:t.translate.instant("No tags"),id:0,state:t.tagFilterOptions&&t.tagFilterOptions.some((function(t){return 0===t.id&&!0===t.state}))})):t.tagFilterOptions=[]}))),this.subscriptions.push(this.categoryRepo.getViewModelListBehaviorSubject().subscribe((function(e){e&&e.length?(t.categoryFilterOptions=e.map((function(e){return{label:e.prefixedName,id:e.id,state:t.categoryFilterOptions&&t.categoryFilterOptions.some((function(t){return t.id===e.id&&!0===t.state}))}})),t.categoryFilterOptions.push({label:t.translate.instant("No category"),id:0,state:t.categoryFilterOptions&&t.categoryFilterOptions.some((function(t){return 0===t.id&&!0===t.state}))})):t.categoryFilterOptions=[]})))}},{key:"onSave",value:function(){return Object(c.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.motionRepo.sortMotions(this.osSortTree.getTreeData()).then((function(){return e.osSortTree.setSubscription()}),this.raiseError);case 2:case"end":return t.stop()}}),t,this)})))}},{key:"onCancel",value:function(){return Object(c.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.canDeactivate();case 2:if(t.t0=t.sent,!t.t0){t.next=5;break}this.osSortTree.setSubscription();case 5:case"end":return t.stop()}}),t,this)})))}},{key:"receiveChanges",value:function(t){this.hasChanged=t}},{key:"csvExportCallList",value:function(){this.motionCsvExport.exportCallList(this.motions)}},{key:"pdfExportCallList",value:function(){this.motionPdfExport.exportPdfCallList(this.motions)}},{key:"getTags",value:function(t){var e=this.motionRepo.getViewModel(t.id);return e?e.tags:[]}},{key:"onFilterChange",value:function(t,e){var n="tag"===t?this.activeTagFilters.value:this.activeCatFilters.value;n.includes(e)?n.splice(n.indexOf(e),1):n.push(e),"tag"===t?this.activeTagFilters.next(n):this.activeCatFilters.next(n)}},{key:"resetFilters",value:function(){this.activeTagFilters.next([]),this.activeCatFilters.next([])}},{key:"sortMotionsByIdentifier",value:function(){return Object(c.a)(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.translate.instant("Do you really want to go ahead?"),n=this.translate.instant("This will reset all made changes and sort the call list."),t.next=3,this.promptService.open(e,n);case 3:if(t.t0=t.sent,!t.t0){t.next=6;break}this.forceSort.emit("identifier");case 6:case"end":return t.stop()}}),t,this)})))}},{key:"onSubscribedFilterChange",value:function(t,e){"tag"===t?(this.activeTagFilterCount=e.length,this.tagFilterOptions.forEach((function(t){t.state=e&&e.some((function(e){return e===t.id}))}))):(this.activeCatFilterCount=e.length,this.categoryFilterOptions.forEach((function(t){t.state=e&&e.some((function(e){return e===t.id}))}))),this.hasActiveFilter=this.activeCatFilterCount>0||this.activeTagFilterCount>0;var n=this.tagFilterOptions.filter((function(t){return!0===t.state})),i=this.categoryFilterOptions.filter((function(t){return!0===t.state}));this.changeFilter.emit((function(t){if(n.length)if(t.tags&&t.tags.length){if(!t.tags.some((function(t){return n.some((function(e){return e.id===t.id}))})))return!0}else if(!n.some((function(t){return 0===t.id})))return!0;if(i.length){var e=t.category_id||0;return!i.some((function(t){return t.id===e}))}return!1}))}}]),n}(p.a),G.\u0275fac=function(t){return new(t||G)(h.Tb(g.d),h.Tb(v.k),h.Tb(y.a),h.Tb(u.a),h.Tb(d.a),h.Tb(m.a),h.Tb(b.a),h.Tb(l.a),h.Tb(f.a))},G.\u0275cmp=h.Nb({type:G,selectors:[["os-call-list"]],features:[h.Db],decls:54,vars:28,consts:[["prevUrl","../..",3,"nav","editMode","mainEvent","saveEvent"],[1,"title-slot"],[1,"menu-slot"],["type","button","mat-icon-button","",3,"matMenuTriggerFor"],[1,"custom-table-header","flex-spaced"],[1,"filter-count"],["class","current-filters",4,"ngIf"],[1,"flex-spaced","margin-right-5"],[4,"ngIf"],["catFilterMenu","matMenu"],[4,"ngFor","ngForOf"],["tagFilterMenu","matMenu"],["parentKey","sort_parent_id","weightKey","weight",3,"model","filterChange","sortingDefinition","visibleNodes","hasChanged"],["osSortedTree",""],["innerNode",""],["mainMenu","matMenu"],["mat-menu-item","",3,"click"],[1,"current-filters"],["mat-button","",3,"click"],["inline",""],["mat-button","",3,"matMenuTriggerFor"],["matBadgeColor","accent",1,"upper",3,"matBadge","matBadgeOverlap"],[1,"line"],[1,"left"],[1,"right"]],template:function(t,e){if(1&t&&(h.Zb(0,"os-head-bar",0),h.hc("mainEvent",(function(){return e.onCancel()}))("saveEvent",(function(){return e.onSave()})),h.Zb(1,"div",1),h.Zb(2,"h2"),h.Sc(3),h.mc(4,"translate"),h.Yb(),h.Yb(),h.Zb(5,"div",2),h.Zb(6,"button",3),h.Zb(7,"mat-icon"),h.Sc(8,"more_vert"),h.Yb(),h.Yb(),h.Yb(),h.Yb(),h.Zb(9,"div",4),h.Zb(10,"div",5),h.Zb(11,"span"),h.Sc(12),h.Yb(),h.Zb(13,"span"),h.Sc(14),h.mc(15,"translate"),h.Yb(),h.Zb(16,"span"),h.Sc(17),h.Yb(),h.Yb(),h.Qc(18,w,13,6,"div",6),h.Zb(19,"div",7),h.Qc(20,F,5,6,"div",8),h.Qc(21,Y,5,6,"div",8),h.Yb(),h.Yb(),h.Zb(22,"mat-menu",null,9),h.Qc(24,Z,5,2,"div",10),h.Yb(),h.Zb(25,"mat-menu",null,11),h.Qc(27,B,5,2,"div",10),h.Yb(),h.Zb(28,"mat-card"),h.Zb(29,"os-sorting-tree",12,13),h.hc("visibleNodes",(function(t){return e.onChangeAmountOfItems(t)}))("hasChanged",(function(t){return e.receiveChanges(t)})),h.Qc(31,R,5,2,"ng-template",null,14,h.Rc),h.Yb(),h.Yb(),h.Zb(33,"mat-menu",null,15),h.Zb(35,"button",16),h.hc("click",(function(){return e.sortMotionsByIdentifier()})),h.Zb(36,"mat-icon"),h.Sc(37,"sort"),h.Yb(),h.Zb(38,"span"),h.Sc(39),h.mc(40,"translate"),h.Yb(),h.Yb(),h.Ub(41,"mat-divider"),h.Zb(42,"button",16),h.hc("click",(function(){return e.pdfExportCallList()})),h.Zb(43,"mat-icon"),h.Sc(44,"picture_as_pdf"),h.Yb(),h.Zb(45,"span"),h.Sc(46),h.mc(47,"translate"),h.Yb(),h.Yb(),h.Zb(48,"button",16),h.hc("click",(function(){return e.csvExportCallList()})),h.Zb(49,"mat-icon"),h.Sc(50,"archive"),h.Yb(),h.Zb(51,"span"),h.Sc(52),h.mc(53,"translate"),h.Yb(),h.Yb(),h.Yb()),2&t){var n=h.Ec(34);h.tc("nav",!1)("editMode",e.hasChanged),h.Gb(3),h.Tc(h.nc(4,18,"Call list")),h.Gb(3),h.tc("matMenuTriggerFor",n),h.Gb(6),h.Uc(" ",e.seenNodes[0],"\xa0"),h.Gb(2),h.Tc(h.nc(15,20,"of")),h.Gb(3),h.Uc("\xa0",e.seenNodes[1],""),h.Gb(1),h.tc("ngIf",e.hasActiveFilter),h.Gb(2),h.tc("ngIf",e.categoryFilterOptions.length),h.Gb(1),h.tc("ngIf",e.tagFilterOptions.length),h.Gb(3),h.tc("ngForOf",e.categoryFilterOptions),h.Gb(3),h.tc("ngForOf",e.tagFilterOptions),h.Gb(2),h.tc("model",e.motionsObservable)("filterChange",e.changeFilter)("sortingDefinition",e.forceSort),h.Gb(10),h.Tc(h.nc(40,22,"Sort by identifier")),h.Gb(7),h.Tc(h.nc(47,24,"Export as PDF")),h.Gb(6),h.Tc(h.nc(53,26,"Export as CSV"))}},directives:[C.a,k.b,_.e,x.a,i.t,_.f,i.s,S.a,T.a,_.c,O.a,M.a],pipes:[v.j],styles:[".line[_ngcontent-%COMP%]{display:table;width:100%;font-size:14px;min-height:50px;margin-bottom:5px}.line[_ngcontent-%COMP%]   .left[_ngcontent-%COMP%]{max-width:100%}.line[_ngcontent-%COMP%]   .left[_ngcontent-%COMP%], .line[_ngcontent-%COMP%]   .right[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.line[_ngcontent-%COMP%]   .right[_ngcontent-%COMP%]{padding-right:10px;width:auto;white-space:nowrap}.margin-right-5[_ngcontent-%COMP%]{margin-right:5px!important}",".filter-menu-head[_ngcontent-%COMP%]{padding-left:5px}.filter-menu-head[_ngcontent-%COMP%]   .mat-button[_ngcontent-%COMP%]{margin:0 auto}.filter-menu-head[_ngcontent-%COMP%]:hover{cursor:pointer}.action-buttons[_ngcontent-%COMP%]{display:-ms-flexbox;display:flex}.action-buttons[_ngcontent-%COMP%]   os-rounded-input[_ngcontent-%COMP%]{margin:0 10px}@media (max-width:500px){.action-buttons[_ngcontent-%COMP%]   os-rounded-input[_ngcontent-%COMP%]{display:none}}.active-filter[_ngcontent-%COMP%]{white-space:pre}span.right-with-margin[_ngcontent-%COMP%]{margin-right:25px}.filter-count[_ngcontent-%COMP%]{font-style:italic;margin-left:24px;margin-right:5px}.current-filters[_ngcontent-%COMP%]{width:100%;display:-ms-flexbox;display:flex}.current-filters[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inherit}.current-filters[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding:5px;margin:auto 5px;font-size:75%}.current-filters[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{font-size:12px;height:12px;width:12px}"]}),G),pathMatch:"full",canDeactivate:[a.a]}],L=((j=function t(){_classCallCheck(this,t)}).\u0275mod=h.Rb({type:j}),j.\u0275inj=h.Qb({factory:function(t){return new(t||j)},imports:[[r.j.forChild(Q)],r.j]}),j),N=((A=function t(){_classCallCheck(this,t)}).\u0275mod=h.Rb({type:A}),A.\u0275inj=h.Qb({factory:function(t){return new(t||A)},imports:[[i.c,L,o.a]]}),A)}}]);