"use strict";(self.webpackChunklernplattform_frontend=self.webpackChunklernplattform_frontend||[]).push([[17374],{"common/aurelia-components/content-editor/universal-block/universal-block.html":function(e,t,o){o.r(t),t.default='<template class="universal-block universal-block--${ isPresentation ? \'presentation\' : \'course\' }\n                ${ hasVideoBlock || hasTemplateBlock ? \'universal-block--full-height\' : \'\' }\n                ${ isNonInteractivePreview ? \'universal-block--non-interactive-preview\' : \'\' }">\n  <course-lecture-block if.to-view="isPresentation === true && !hasTemplateBlock"\n                        context-identifier.to-view="contextIdentifier"\n                        block-id.to-view="blockId"\n                        is-non-interactive-preview.to-view="isNonInteractivePreview"\n                        dnd-active.to-view="dndActive"></course-lecture-block>\n  <course-block if.to-view="isPresentation === false && !hasTemplateBlock"\n                context-identifier.to-view="contextIdentifier"\n                block-id.to-view="blockId"\n                nav-preview.to-view="navPreview"\n                is-non-interactive-preview.to-view="isNonInteractivePreview"></course-block>\n  <template-preview-block if.to-view="hasTemplateBlock"\n                          class="universal-block__template-preview-block"\n                          block-type.to-view="block.type"></template-preview-block>\n</template>'},"common/aurelia-components/content-editor/universal-layout-container/universal-layout-container.html":function(e,t,o){o.r(t),t.default='<template class="universal-layout-container ${styleClasses}"\n          style.to-view="{ \'--universal-layout-container-block-ratio\': blockInfo.ratio != null ? `${blockInfo.ratio} / 1` : \'auto\' }"\n          css="--intrinsic-scale-factor: ${INTRINSIC_SCALE_FACTOR};\n               --layout-container-default-margin: ${DEFAULT_MARGIN}px;\n               --layout-container-style-h-align: ${layoutContainer.style.horizontalAlignment};\n               --layout-container-style-v-align: ${layoutContainer.style.verticalAlignment};">\n  <x-picture if.to-view="layoutContainer.style.backgroundImage != null"\n             class="universal-layout-container__background-image\n                   ${ greyOut ? \'universal-layout-container__background-image--grey-out\' : \'\' }"\n             picture.to-view="layoutContainer.style.backgroundImage"></x-picture>\n  <div class="universal-layout-container__content"\n       style.to-view="layoutStyles"\n       ref="contentElement">\n    <compose if.to-view="mode === \'block\'\n                          && layoutContainer.blockId != null\n                          && contextIdentifier != null\n                          && isNonInteractivePreview != null"\n             class="universal-layout-container__block"\n             view-model.to-view="blockViewModel"\n             model.bind="{\n                          blockId: layoutContainer.blockId,\n                          layoutContainerId: layoutContainer.id,\n                          contextIdentifier,\n                          isNonInteractivePreview,\n                          navPreview,\n                        }"></compose>\n    <compose if.to-view="mode === \'children\'\n                          && contextIdentifier != null\n                          && isNonInteractivePreview != null\n                          && orderedChildIds != null"\n             repeat.for="childId of orderedChildIds"\n             class="universal-layout-container__child"\n             view-model.to-view="layoutContainerViewModel"\n             model.bind="{\n                          layoutContainerId: childId,\n                          contextIdentifier,\n                          isNonInteractivePreview,\n                          navPreview,\n                        }">\n      <div if.to-view="layoutContainer.style.separator && !$first"\n           class="universal-layout-container__separator\n                 universal-layout-container__separator--${layoutContainer.layout.direction}\n                 ${ layoutContainer.style.spacing ? `universal-layout-container__separator--${layoutContainer.layout.direction}-with-spacing` : \'\' }">\n      </div>\n    </compose>\n  </div>\n</template>'},"common/aurelia-components/content-editor/index":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.configure=void 0,o("aurelia-framework"),t.configure=function(e){e.globalResources("common/aurelia-components/content-editor/universal-block/universal-block"),e.globalResources("common/aurelia-components/content-editor/universal-layout-container/universal-layout-container"),e.globalResources("common/aurelia-components/content-editor/content-editor-presentation-slide/content-editor-presentation-slide"),e.globalResources("common/aurelia-components/content-editor/content-editor-preview/preview-layout-container")}},"common/aurelia-components/content-editor/universal-block/universal-block":function(e,t,o){var n,i=this&&this.__decorate||function(e,t,o,n){var i,l=arguments.length,r=l<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(l<3?i(r):l>3?i(t,o,r):i(t,o))||r);return l>3&&r&&Object.defineProperty(t,o,r),r},l=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.UniversalBlock=void 0;const r=o("aurelia-framework"),s=o(855180),a=o(254821),c=o(934610),u=o(198156);let d=n=class{constructor(){this.contextIdentifier=null,this.blockId=null,this.isNonInteractivePreview=!0,this.navPreview=!1,this.dndActive=!1}get hasVideoBlock(){return!!this.block&&[c.BlockType.VIDEO,c.BlockType.VIMEO,c.BlockType.YOUTUBE].includes(this.block.type)}get hasTemplateBlock(){return!!this.block&&u.BlockUtils.isTemplateBlock(this.block)}};i([(0,r.bindable)(),l("design:type",Object)],d.prototype,"contextIdentifier",void 0),i([(0,r.bindable)(),l("design:type",Object)],d.prototype,"blockId",void 0),i([(0,r.bindable)(),l("design:type",Object)],d.prototype,"isNonInteractivePreview",void 0),i([(0,r.bindable)(),l("design:type",Object)],d.prototype,"navPreview",void 0),i([(0,r.bindable)(),l("design:type",Object)],d.prototype,"dndActive",void 0),i([(0,s.selectState)(n,a.isPresentationSelectorCreator,["contextIdentifier"]),l("design:type",Object)],d.prototype,"isPresentation",void 0),i([(0,s.selectState)(n,a.blockByIdSelectorCreator,["contextIdentifier","blockId"]),l("design:type",Object)],d.prototype,"block",void 0),i([(0,r.computedFrom)("block.type"),l("design:type",Boolean),l("design:paramtypes",[])],d.prototype,"hasVideoBlock",null),i([(0,r.computedFrom)("block.type","block.picture","block.text","block.fileUrl","block.videoUrl"),l("design:type",Boolean),l("design:paramtypes",[])],d.prototype,"hasTemplateBlock",null),d=n=i([(0,r.useView)("./universal-block.html"),(0,r.autoinject)()],d),t.UniversalBlock=d},"common/aurelia-components/content-editor/universal-layout-container/universal-layout-container":function(e,t,o){var n,i,l,r,s,a,c,u=this&&this.__decorate||function(e,t,o,n){var i,l=arguments.length,r=l<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(l<3?i(r):l>3?i(t,o,r):i(t,o))||r);return l>3&&r&&Object.defineProperty(t,o,r),r},d=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.UniversalLayoutContainer=void 0;const h=o("aurelia-framework"),y=o(441688),v=o(733132),p=o(855180),b=o(729769),m=o(147098),f=o(934610),k=o(188916),C=o(918583),I=o(254821),g=o(598088),w=o(283616),O=o(431940),S=null!==(n=window.ResizeObserver)&&void 0!==n?n:O.ResizeObserver;var M;!function(e){e.Block="block",e.Children="children"}(M||(M={}));let R=i=class{constructor(e,t,o){this.storeService=o,this.contextIdentifier=null,this.layoutContainerId=null,this.layoutContainerViewModel=v.ComposableLayoutContainer,this.blockViewModel=y.ComposableBlock,this.isNonInteractivePreview=null,this.childSizes=[],this.navPreview=!1,this.greyOut=!1,this.mouseOver=!1,this.layoutContainer=null,this.blockInfo=null,this.orderedChildInfos=[],this.mode=null,this.ownRatio=null,this.layoutStyles=null,this.contentElement=null,this.isAttached=!1,this.mutationObserver=null,this.resizeObserver=null,this.extrinsicScaleFactor=null,this.DEFAULT_MARGIN=26,this.INTRINSIC_SCALE_FACTOR=.5,this.domElement=e,this.subscriptionManager=t.createSubscriptionManager()}attached(){this.isAttached=!0,this.subscribeToState(),this.subscribeToResize(),this.setupChildObservers()}detached(){var e,t;this.isAttached=!1,this.subscriptionManager.disposeSubscriptions(),this.storeService.disposeAllSubscriptions(this),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect()}contextIdentifierChanged(){this.subscribeToState()}layoutContainerIdChanged(){var e,t;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.storeService.disposeAllSubscriptions(this),this.mode=null,this.orderedChildInfos=[],this.blockInfo=null,this.ownRatio=null,this.layoutStyles=null,this.subscribeToState()}contentLayoutModeChanged(){this.layoutStyles=this.recalculateLayoutStyles()}contentElementChanged(){this.setupChildObservers()}modeChanged(){this.setupChildObservers()}setupChildObservers(){var e,t;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.mode===M.Children&&this.isAttached&&null!=this.contentElement&&(this.mutationObserver=new MutationObserver(this.handleChildMutations.bind(this)),this.resizeObserver=new S(this.handleChildResize.bind(this)),this.mutationObserver.observe(this.contentElement,{childList:!0}))}handleChildMutations(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=new S(this.handleChildResize.bind(this)),(0,w.assertNotNullOrUndefined)(this.contentElement,"contentElement cannot be null or undefined");for(const e of Array.from(this.contentElement.children))this.resizeObserver.observe(e)}handleChildResize(){if((0,w.assertNotNullOrUndefined)(this.contentElement,"contentElement cannot be null or undefined"),null==this.layoutContainer||null==this.contentLayoutMode||this.contentLayoutMode===C.ContentLayoutMode.Extrinsic&&null==this.extrinsicScaleFactor)return;const e=this.contentLayoutMode===C.ContentLayoutMode.Intrinsic?.5:this.extrinsicScaleFactor;if(null==e)return;const t=this.layoutContainer.style.spacing?26*e:0;if(this.layoutContainer.layout.direction===k.LayoutContainerDirection.Horizontal){const e=Array.from(this.contentElement.children).map((e=>e.clientWidth));e[0]+=t,e[e.length-1]+=t,this.childSizes=e}else{const e=Array.from(this.contentElement.children).map((e=>e.clientHeight));e[0]+=t,e[e.length-1]+=t,this.childSizes=e}}subscribeToState(){const{contextIdentifier:e,layoutContainerId:t}=this;this.isAttached&&null!=e&&null!=t&&(this.storeService.disposeAllSubscriptions(this),this.storeService.subscribeMemoized(this,g.layoutContainerByIdSelectorCreator,(e=>{this.layoutContainer=e,null==this.layoutContainer?this.mode=null:null!=this.layoutContainer.blockId?this.mode=M.Block:this.mode=M.Children,this.updateStyleVars(),this.layoutStyles=this.recalculateLayoutStyles()}),{contextIdentifier:e,layoutContainerId:t}),this.storeService.subscribeMemoized(this,g.layoutContainerChildInfoOrderedSelectorCreator,(e=>{this.orderedChildInfos=e,this.layoutStyles=this.recalculateLayoutStyles()}),{contextIdentifier:e,layoutContainerId:t}),this.storeService.subscribeMemoized(this,g.layoutContainerBlockInfoSelectorCreator,(e=>{this.blockInfo=e,this.layoutStyles=this.recalculateLayoutStyles(),this.updateRatio(this.domElement.getBoundingClientRect())}),{contextIdentifier:e,layoutContainerId:t}),this.storeService.subscribeToDetailedChanges(this,[e=>{var t;return null===(t=e.contentEditor)||void 0===t?void 0:t.extrinsicScaleFactor}],(e=>{var t,o;this.extrinsicScaleFactor=null!==(o=null===(t=e.contentEditor)||void 0===t?void 0:t.extrinsicScaleFactor)&&void 0!==o?o:null})))}subscribeToResize(){this.subscriptionManager.subscribeToElementResize(this.domElement,this.updateRatio.bind(this))}updateRatio(e){var t,o;this.ownRatio=(null!==(t=e.width)&&void 0!==t?t:1)/(null!==(o=e.height)&&void 0!==o?o:1)}get styleClasses(){var e,t;const o=[];if(o.push(`universal-layout-container--content-mode-${this.mode}`),null!=this.layoutContainer){const{border:e,shadow:t,spacing:n,corner:i,horizontalAlignment:l,verticalAlignment:r,blockSize:s,backgroundImage:a}=this.layoutContainer.style,c="universal-layout-container--style";e&&o.push(`${c}-border`),t&&o.push(`${c}-shadow`),n&&o.push(`${c}-spacing`),i===k.CornerStyle.Rounded&&o.push(`${c}-rounded-corners`),null!=a&&o.push(`${c}-background-image`),o.push(`${c}-h-align-${l}`),o.push(`${c}-v-align-${r}`),o.push(`${c}-block-size-${s}`)}if(null!=this.contentLayoutMode){const t="universal-layout-container--block";this.contentLayoutMode===C.ContentLayoutMode.Intrinsic||null!=this.blockInfo&&null==this.blockInfo.ratio?o.push(`${t}-horizontal`):null!=(null===(e=this.blockInfo)||void 0===e?void 0:e.ratio)&&null!=this.ownRatio&&this.ownRatio>this.blockInfo.ratio?o.push(`${t}-vertical`):o.push(`${t}-horizontal`)}return null!=this.contentLayoutMode&&o.push(`universal-layout-container--layout-mode-${this.contentLayoutMode}`),(null===(t=this.blockInfo)||void 0===t?void 0:t.isTemplate)&&o.push("universal-layout-container--is-template"),null==this.blockInfo||this.blockInfo.type!==f.BlockType.TEXT&&this.blockInfo.type!==f.BlockType.MP_INTERACTIVE_TEXT||!this.mouseOver||o.push("universal-layout-container--mouse-over"),o.join(" ")}recalculateLayoutStyles(){if(null==this.layoutContainer||null==this.contentLayoutMode)return null;const{blockId:e,layout:{direction:t}}=this.layoutContainer,o=t===k.LayoutContainerDirection.Horizontal;if(null!=e)return null;const n=this.orderedChildInfos.map((e=>o||this.contentLayoutMode!==C.ContentLayoutMode.Intrinsic?`minmax(0, ${Math.abs(e.itemSize).toFixed(0)}fr)`:e.blockType===f.BlockType.TEXT?"min-content":"auto")).join(" ");return{"grid-template-columns":o?n:"1fr","grid-template-rows":o?"1fr":n}}updateStyleVars(){if(!this.isAttached)return;if((0,w.assertNotNullOrUndefined)(this.domElement,"domElement cannot be null or undefined"),null==this.layoutContainer)return;const{backgroundColor:e}=this.layoutContainer.style;this.domElement.style.setProperty("--universal-layout-container-background-color",null!=e?e:"transparent")}};u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"contextIdentifier",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"layoutContainerId",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"layoutContainerViewModel",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"blockViewModel",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"isNonInteractivePreview",void 0),u([(0,h.bindable)(),d("design:type","function"==typeof(a="undefined"!=typeof Array&&Array)?a:Object)],R.prototype,"childSizes",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"navPreview",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"greyOut",void 0),u([(0,h.bindable)(),d("design:type",Object)],R.prototype,"mouseOver",void 0),u([(0,p.selectState)(i,I.contentLayoutModeSelectorCreator,["contextIdentifier","layoutContainerId"]),d("design:type",Object)],R.prototype,"contentLayoutMode",void 0),u([(0,p.selectState)(i,g.layoutContainerChildIdsOrderedSelectorCreator,["contextIdentifier","layoutContainerId"]),d("design:type","function"==typeof(c="undefined"!=typeof Array&&Array)?c:Object)],R.prototype,"orderedChildIds",void 0),u([(0,h.observable)(),d("design:type",Object)],R.prototype,"mode",void 0),u([(0,h.observable)(),d("design:type",Object)],R.prototype,"contentElement",void 0),u([(0,h.computedFrom)("layoutContainer.style","blockInfo.ratio","blockInfo.isTemplate","blockInfo.type","ownRatio","mode","contentLayoutMode","mouseOver"),d("design:type",String),d("design:paramtypes",[])],R.prototype,"styleClasses",null),R=i=u([(0,h.useView)("./universal-layout-container.html"),(0,h.autoinject)(),d("design:paramtypes",["function"==typeof(l="undefined"!=typeof Element&&Element)?l:Object,"function"==typeof(r=void 0!==m.SubscriptionManagerService&&m.SubscriptionManagerService)?r:Object,"function"==typeof(s=void 0!==b.StoreService&&b.StoreService)?s:Object])],R),t.UniversalLayoutContainer=R}}]);