diff --git a/docs/index.html b/docs/index.html index 0b1dfc8..bf88a73 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -NgxWebcam \ No newline at end of file +NgxWebcam \ No newline at end of file diff --git a/docs/inline.346884ab99674cb3bcef.bundle.js b/docs/inline.346884ab99674cb3bcef.bundle.js new file mode 100644 index 0000000..40f19a7 --- /dev/null +++ b/docs/inline.346884ab99674cb3bcef.bundle.js @@ -0,0 +1 @@ +!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var u,i,f,l=0,s=[];l1?new t(e,r):1===o?new i(e[0],r):new s(r)},t.dispatch=function(e){var t=e.array,n=e.index,r=e.subscriber;n>=e.count?r.complete():(r.next(t[n]),r.closed||(e.index=n+1,this.schedule(e)))},t.prototype._subscribe=function(e){var n=this.array,r=n.length,o=this.scheduler;if(o)return o.schedule(t.dispatch,0,{array:n,index:0,count:r,subscriber:e});for(var i=0;i0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(v);function m(e){return e}t.a=function(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(c=e.pop())):"number"==typeof d&&(c=e.pop()),null===l&&1===e.length&&e[0]instanceof r.a?e[0]:(void 0===(n=c)&&(n=Number.POSITIVE_INFINITY),o=m,i=null,void 0===(s=n)&&(s=Number.POSITIVE_INFINITY),function(e){return"number"==typeof i&&(s=i,i=null),e.lift(new y(o,i,s))})(new u(e,l))}},"6Xbx":function(e,t,n){"use strict";t.b=function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},n.d(t,"a",function(){return o});var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n ");else if("object"==typeof t){var o=[];for(var i in t)if(t.hasOwnProperty(i)){var s=t[i];o.push(i+":"+("string"==typeof s?JSON.stringify(s):T(s)))}r="{"+o.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+e.replace(L,"\n ")}function Q(e,t){return new Error(Z(e,t))}var q="ngDebugContext",G="ngOriginalError",W="ngErrorLogger";function K(e){return e[q]}function Y(e){return e[G]}function J(e){for(var t=[],n=1;n0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+T(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function Ke(e,t){return Array.isArray(t)?t.reduce(Ke,e):Object(r.a)({},e,t)}var Ye=function(){function e(e,t,n,r,a,u){var c=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=u,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ze(),this._zone.onMicrotaskEmpty.subscribe({next:function(){c._zone.run(function(){c.tick()})}});var l=new o.a(function(e){c._stable=c._zone.isStable&&!c._zone.hasPendingMacrotasks&&!c._zone.hasPendingMicrotasks,c._zone.runOutsideAngular(function(){e.next(c._stable),e.complete()})}),d=new o.a(function(e){var t;c._zone.runOutsideAngular(function(){t=c._zone.onStable.subscribe(function(){Ae.assertNotInAngularZone(),x(function(){c._stable||c._zone.hasPendingMacrotasks||c._zone.hasPendingMicrotasks||(c._stable=!0,e.next(!0))})})});var n=c._zone.onUnstable.subscribe(function(){Ae.assertInAngularZone(),c._stable&&(c._stable=!1,c._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(i.a)(l,s.a.call(d))}return e.prototype.bootstrap=function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof pe?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var o=n instanceof we?null:this._injector.get(Ce),i=n.create(O.NULL,[],t||n.selector,o);i.onDestroy(function(){r._unloadComponent(i)});var s=i.injector.get(je,null);return s&&i.injector.get(Ve).registerApplication(i.location.nativeElement,s),this._loadComponent(i),Ze()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),i},e.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,Se(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;Je(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(ue,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),Je(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Te("ApplicationRef#tick()"),e}();function Je(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var $e=function(){},Xe=function(){var e={Important:1,DashCase:2};return e[e.Important]="Important",e[e.DashCase]="DashCase",e}(),et=function(e){this.nativeElement=e},tt=function(){function e(){this.dirty=!0,this._results=[],this.changes=new ke}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[C()]=function(){return this._results[C()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var r=Array.isArray(n)?e(n):n;return t.concat(r)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),nt=function(){},rt=function(){},ot=function(){function e(e,t,n){this._debugContext=n,this.nativeNode=e,t&&t instanceof it?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(e.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),e}(),it=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.properties={},o.attributes={},o.classes={},o.styles={},o.childNodes=[],o.nativeElement=t,o}return Object(r.b)(t,e),t.prototype.addChild=function(e){e&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n,r=this,o=this.childNodes.indexOf(e);-1!==o&&((n=this.childNodes).splice.apply(n,[o+1,0].concat(t)),t.forEach(function(e){e.parent&&e.parent.removeChild(e),e.parent=r}))},t.prototype.insertBefore=function(e,t){var n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))},t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return function e(t,n,r){t.childNodes.forEach(function(t){t instanceof it&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return function e(t,n,r){t instanceof it&&t.childNodes.forEach(function(t){n(t)&&r.push(t),t instanceof it&&e(t,n,r)})}(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(e){return e instanceof t})},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(ot),st=new Map;function at(e){return st.get(e)||null}function ut(e){st.set(e.nativeNode,e)}function ct(e,t){var n=ft(e),r=ft(t);return n&&r?function(t,n,r){for(var o=e[C()](),i=n[C()]();;){var s=o.next(),a=i.next();if(s.done&&a.done)return!0;if(s.done||a.done)return!1;if(!r(s.value,a.value))return!1}}(0,t,ct):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||E(e,t)}var lt=function(){function e(e){this.wrapped=e}return e.wrap=function(t){return new e(t)},e}(),dt=function(){function e(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}return e.prototype.isFirstChange=function(){return this.firstChange},e}();function ft(e){return!!pt(e)&&(Array.isArray(e)||!(e instanceof Map)&&C()in e)}function pt(e){return null!==e&&("function"==typeof e||"object"==typeof e)}var ht=function(){function e(){}return e.prototype.supports=function(e){return ft(e)},e.prototype.create=function(e){return new yt(e)},e}(),vt=function(e,t){return t},yt=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||vt}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,o=null;t||n;){var i=!n||t&&t.currentIndex<_t(n,r,o)?t:n,s=_t(i,r,o),a=i.currentIndex;if(i===n)r--,n=n._nextRemoved;else if(t=t._next,null==i.previousIndex)r++;else{o||(o=[]);var u=s-r,c=a-r;if(u!=c){for(var l=0;l=n.length)&&(t=n.length-1),t<0)return null;var r=n[t];return r.viewContainerParent=null,Bn(n,t),Zt.dirtyParentQueries(r),Un(r),r}function Ln(e,t,n){var r=t?ln(t,t.def.lastRenderRootNode):e.renderElement;mn(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function Un(e){mn(e,3,null,null,void 0)}function zn(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Bn(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var Zn=new Object;function Qn(e,t,n,r,o,i){return new qn(e,t,n,r,o,i)}var qn=function(e){function t(t,n,r,o,i,s){var a=e.call(this)||this;return a.selector=t,a.componentType=n,a._inputs=o,a._outputs=i,a.ngContentSelectors=s,a.viewDefFactory=r,a}return Object(r.b)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){if(!r)throw new Error("ngModule should be provided");var o=gn(this.viewDefFactory),i=o.nodes[0].element.componentProvider.nodeIndex,s=Zt.createRootView(e,t||[],n,o,r,Zn),a=Ut(s,i).instance;return n&&s.renderer.setAttribute(Lt(s,0).renderElement,"ng-version",p.full),new Gn(s,new Kn(s),a)},t}(pe),Gn=function(e){function t(t,n,r){var o=e.call(this)||this;return o._view=t,o._viewRef=n,o._component=r,o._elDef=o._view.def.nodes[0],o.hostView=n,o.changeDetectorRef=n,o.instance=r,o}return Object(r.b)(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new et(Lt(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new $n(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(function(){}),Wn=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new et(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new $n(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=cn(e),e=e.parent;return e?new $n(e,t):new $n(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=Fn(this._data,e);Zt.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Kn(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r},e.prototype.createComponent=function(e,t,n,r,o){var i=n||this.parentInjector;o||e instanceof we||(o=i.get(Ce));var s=e.create(i,r,void 0,o);return this.insert(s.hostView,t),s},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,o,i,s=e;return o=s._view,i=(n=this._data).viewContainer._embeddedViews,null!==(r=t)&&void 0!==r||(r=i.length),o.viewContainerParent=this._view,zn(i,r,o),function(e,t){var n=un(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,t.parentNodeDef)}}(n,o),Zt.dirtyParentQueries(o),Ln(n,r>0?i[r-1]:null,o),s.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,o,i,s,a=this._embeddedViews.indexOf(e._view);return o=t,s=(i=(n=this._data).viewContainer._embeddedViews)[r=a],Bn(i,r),null==o&&(o=i.length),zn(i,o,s),Zt.dirtyParentQueries(s),Un(s),Ln(n,o>0?i[o-1]:null,s),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=Fn(this._data,e);t&&Zt.destroyView(t)},e.prototype.detach=function(e){var t=Fn(this._data,e);return t?new Kn(t):null},e}(),Kn=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return mn(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){on(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{Zt.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){Zt.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Zt.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,Un(this._view),Zt.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}(),Yn=function(e){function t(t,n){var r=e.call(this)||this;return r._parentView=t,r._def=n,r}return Object(r.b)(t,e),t.prototype.createEmbeddedView=function(e){return new Kn(Zt.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new et(Lt(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(nt);function Jn(e,t){return new $n(e,t)}var $n=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=O.THROW_IF_NOT_FOUND),Zt.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:Yt(e)},t)},e}(),Xn=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=En(t),r=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,r),r},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var r=0;r0,r=t.provider;switch(201347067&t.flags){case 512:return hr(e,t.parent,n,r.value,r.deps);case 1024:return function(e,t,n,r,o){var i=o.length;switch(i){case 0:return r();case 1:return r(yr(e,t,n,o[0]));case 2:return r(yr(e,t,n,o[0]),yr(e,t,n,o[1]));case 3:return r(yr(e,t,n,o[0]),yr(e,t,n,o[1]),yr(e,t,n,o[2]));default:for(var s=Array(i),a=0;a0)c=v,Or(v)||(l=v);else for(;c&&h===c.nodeIndex+c.childCount;){var m=c.parent;m&&(m.childFlags|=c.childFlags,m.childMatchedQueries|=c.childMatchedQueries),l=(c=m)&&Or(c)?c.renderParent:c}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:e,nodes:t,updateDirectives:n||Wt,updateRenderer:r||Wt,handleEvent:function(e,n,r,o){return t[n].element.handleEvent(e,r,o)},bindingCount:o,outputCount:i,lastRenderRootNode:p}}function Or(e){return 0!=(1&e.flags)&&null===e.element.name}function Rr(e,t,n){var r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var o=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=o&&t.nodeIndex+t.childCount>o)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function Pr(e,t,n,r){var o=Vr(e.root,e.renderer,e,t,n);return Dr(o,e.component,r),Hr(o),o}function Mr(e,t,n){var r=Vr(e,e.renderer,null,null,t);return Dr(r,n,n),Hr(r),r}function jr(e,t,n,r){var o,i=t.element.componentRendererType;return o=i?e.root.rendererFactory.createRenderer(r,i):e.root.renderer,Vr(e.root,o,e,t.element.componentProvider,n)}function Vr(e,t,n,r,o){var i=new Array(o.nodes.length),s=o.outputCount?new Array(o.outputCount):null;return{def:o,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:i,state:13,root:e,renderer:t,oldValues:new Array(o.bindingCount),disposables:s,initIndex:-1}}function Dr(e,t,n){e.component=t,e.context=n}function Hr(e){var t;dn(e)&&(t=Lt(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n,r,o,i,s,a=e.def,u=e.nodes,c=0;c0&&On(I,N,0,n)&&(U=!0),L>1&&On(I,N,1,O)&&(U=!0),L>2&&On(I,N,2,R)&&(U=!0),L>3&&On(I,N,3,P)&&(U=!0),L>4&&On(I,N,4,M)&&(U=!0),L>5&&On(I,N,5,j)&&(U=!0),L>6&&On(I,N,6,V)&&(U=!0),L>7&&On(I,N,7,D)&&(U=!0),L>8&&On(I,N,8,H)&&(U=!0),L>9&&On(I,N,9,F)&&(U=!0),U;case 2:return function(e,t,n,r,o,i,s,a,u,c,l,d){var f=!1,p=t.bindings,h=p.length;if(h>0&&nn(e,t,0,n)&&(f=!0),h>1&&nn(e,t,1,r)&&(f=!0),h>2&&nn(e,t,2,o)&&(f=!0),h>3&&nn(e,t,3,i)&&(f=!0),h>4&&nn(e,t,4,s)&&(f=!0),h>5&&nn(e,t,5,a)&&(f=!0),h>6&&nn(e,t,6,u)&&(f=!0),h>7&&nn(e,t,7,c)&&(f=!0),h>8&&nn(e,t,8,l)&&(f=!0),h>9&&nn(e,t,9,d)&&(f=!0),f){var v=t.text.prefix;h>0&&(v+=Ir(n,p[0])),h>1&&(v+=Ir(r,p[1])),h>2&&(v+=Ir(o,p[2])),h>3&&(v+=Ir(i,p[3])),h>4&&(v+=Ir(s,p[4])),h>5&&(v+=Ir(a,p[5])),h>6&&(v+=Ir(u,p[6])),h>7&&(v+=Ir(c,p[7])),h>8&&(v+=Ir(l,p[8])),h>9&&(v+=Ir(d,p[9]));var y=Ft(e,t.nodeIndex).renderText;e.renderer.setValue(y,v)}return f}(e,t,n,r,o,i,s,a,u,c,l,d);case 16384:return h=n,v=r,y=o,g=i,m=s,b=a,_=u,w=c,C=l,x=d,T=(E=Ut(f=e,(p=t).nodeIndex)).instance,S=!1,k=void 0,(A=p.bindings.length)>0&&tn(f,p,0,h)&&(S=!0,k=mr(f,E,p,0,h,k)),A>1&&tn(f,p,1,v)&&(S=!0,k=mr(f,E,p,1,v,k)),A>2&&tn(f,p,2,y)&&(S=!0,k=mr(f,E,p,2,y,k)),A>3&&tn(f,p,3,g)&&(S=!0,k=mr(f,E,p,3,g,k)),A>4&&tn(f,p,4,m)&&(S=!0,k=mr(f,E,p,4,m,k)),A>5&&tn(f,p,5,b)&&(S=!0,k=mr(f,E,p,5,b,k)),A>6&&tn(f,p,6,_)&&(S=!0,k=mr(f,E,p,6,_,k)),A>7&&tn(f,p,7,w)&&(S=!0,k=mr(f,E,p,7,w,k)),A>8&&tn(f,p,8,C)&&(S=!0,k=mr(f,E,p,8,C,k)),A>9&&tn(f,p,9,x)&&(S=!0,k=mr(f,E,p,9,x,k)),k&&T.ngOnChanges(k),65536&p.flags&&Ht(f,256,p.nodeIndex)&&T.ngOnInit(),262144&p.flags&&T.ngDoCheck(),S;case 32:case 64:case 128:return function(e,t,n,r,o,i,s,a,u,c,l,d){var f=t.bindings,p=!1,h=f.length;if(h>0&&nn(e,t,0,n)&&(p=!0),h>1&&nn(e,t,1,r)&&(p=!0),h>2&&nn(e,t,2,o)&&(p=!0),h>3&&nn(e,t,3,i)&&(p=!0),h>4&&nn(e,t,4,s)&&(p=!0),h>5&&nn(e,t,5,a)&&(p=!0),h>6&&nn(e,t,6,u)&&(p=!0),h>7&&nn(e,t,7,c)&&(p=!0),h>8&&nn(e,t,8,l)&&(p=!0),h>9&&nn(e,t,9,d)&&(p=!0),p){var v=zt(e,t.nodeIndex),y=void 0;switch(201347067&t.flags){case 32:y=new Array(f.length),h>0&&(y[0]=n),h>1&&(y[1]=r),h>2&&(y[2]=o),h>3&&(y[3]=i),h>4&&(y[4]=s),h>5&&(y[5]=a),h>6&&(y[6]=u),h>7&&(y[7]=c),h>8&&(y[8]=l),h>9&&(y[9]=d);break;case 64:y={},h>0&&(y[f[0].name]=n),h>1&&(y[f[1].name]=r),h>2&&(y[f[2].name]=o),h>3&&(y[f[3].name]=i),h>4&&(y[f[4].name]=s),h>5&&(y[f[5].name]=a),h>6&&(y[f[6].name]=u),h>7&&(y[f[7].name]=c),h>8&&(y[f[8].name]=l),h>9&&(y[f[9].name]=d);break;case 128:var g=n;switch(h){case 1:y=g.transform(n);break;case 2:y=g.transform(r);break;case 3:y=g.transform(r,o);break;case 4:y=g.transform(r,o,i);break;case 5:y=g.transform(r,o,i,s);break;case 6:y=g.transform(r,o,i,s,a);break;case 7:y=g.transform(r,o,i,s,a,u);break;case 8:y=g.transform(r,o,i,s,a,u,c);break;case 9:y=g.transform(r,o,i,s,a,u,c,l);break;case 10:y=g.transform(r,o,i,s,a,u,c,l,d)}}v.value=y}return p}(e,t,n,r,o,i,s,a,u,c,l,d);default:throw"unreachable"}var f,p,h,v,y,g,m,b,_,w,C,x,E,T,S,k,A,I,N,O,R,P,M,j,V,D,H,F,L,U}(e,t,r,o,i,s,a,u,c,l,d,f):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var r=!1,o=0;o0&&rn(p,h,0,r),E>1&&rn(p,h,1,v),E>2&&rn(p,h,2,y),E>3&&rn(p,h,3,g),E>4&&rn(p,h,4,m),E>5&&rn(p,h,5,b),E>6&&rn(p,h,6,_),E>7&&rn(p,h,7,w),E>8&&rn(p,h,8,C),E>9&&rn(p,h,9,x)):function(e,t,n){for(var r=0;r1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(s.a),d=function(e){function t(t,n){e.call(this),this.source=t,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}return Object(r.b)(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new a.a).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed?(this._connection=null,e=a.a.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return u()(this)},t}(i.a).prototype,f={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:d._subscribe},_isComplete:{value:d._isComplete,writable:!0},getSubject:{value:d.getSubject},connect:{value:d.connect},refCount:{value:d.refCount}},p=function(e){function t(t,n){e.call(this,t),this.connectable=n}return Object(r.b)(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(o.b);function h(){return new o.a}t.a=function(){return this,u()((e=h,function(t){var n;n="function"==typeof e?e:function(){return e};var r=Object.create(t,f);return r.source=t,r.subjectFactory=n,r})(this));var e}},V7AE:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("xIGM").a.Symbol,o="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber"},YuZA:function(e,t){function n(e){return Promise.resolve().then(function(){throw new Error("Cannot find module '"+e+"'.")})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="YuZA"},cDNt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("LMZF"),o=function(){},i=n("TO51"),s=function(){function e(){this.trigger=new i.a,this.webcamImage=null}return e.prototype.triggerSnapshot=function(){this.trigger.next()},e.prototype.handleImage=function(e){console.info("received webcam image",e),this.webcamImage=e},Object.defineProperty(e.prototype,"triggerObservable",{get:function(){return this.trigger.asObservable()},enumerable:!0,configurable:!0}),e}(),a=function(){function e(e,t){this._mimeType=null,this._imageAsBase64=null,this._imageAsDataUrl=null,this._mimeType=t,this._imageAsDataUrl=e}return Object.defineProperty(e.prototype,"imageAsBase64",{get:function(){return this._imageAsBase64?this._imageAsBase64:this._imageAsBase64=this.getDataFromDataUrl(this._imageAsDataUrl)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageAsDataUrl",{get:function(){return this._imageAsDataUrl},enumerable:!0,configurable:!0}),e.prototype.getDataFromDataUrl=function(e){return e.replace("data:"+this._mimeType+";base64,","")},e}(),u=(n("AP4T"),function(){function e(){this.width=640,this.height=480,this.imageCapture=new r.i,this.initError=new r.i,this.imageClick=new r.i}return e.prototype.ngAfterViewInit=function(){this.initWebcam()},e.prototype.ngOnDestroy=function(){this.unsubscribeFromSubscriptions()},Object.defineProperty(e.prototype,"trigger",{set:function(e){var t=this;this.triggerSubscription&&this.triggerSubscription.unsubscribe(),this._trigger=e,this.triggerSubscription=this._trigger.subscribe(function(){t.takeSnapshot()})},enumerable:!0,configurable:!0}),e.prototype.takeSnapshot=function(){var e=this.video.nativeElement,t={width:this.width,height:this.height};e.videoWidth&&(t.width=e.videoWidth,t.height=e.videoHeight);var n=this.canvas.nativeElement;n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(this.video.nativeElement,0,0);var r=n.toDataURL("image/jpeg");this.imageCapture.next(new a(r,"image/jpeg"))},e.prototype.initWebcam=function(){var e=this,t=this.video.nativeElement;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(function(e){t.srcObject=e,t.play()}).catch(function(t){e.initError.next({message:t.message,mediaStreamError:t}),console.warn("Error initializing webcam",t)}):this.initError.next({message:"Cannot read UserMedia from MediaDevices."})},e.prototype.unsubscribeFromSubscriptions=function(){this.triggerSubscription&&this.triggerSubscription.unsubscribe()},e}()),c=r.Q({encapsulation:0,styles:[[".webcam-wrapper[_ngcontent-%COMP%]{display:inline-block;line-height:0}.webcam-wrapper[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{display:none}"]],data:{}});function l(e){return r._6(0,[r._3(402653184,1,{video:0}),r._3(402653184,2,{canvas:0}),(e()(),r.S(2,0,null,null,5,"div",[["class","webcam-wrapper"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.imageClick.next()&&r),r},null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(4,0,[[1,0],["video",1]],null,0,"video",[["autoplay",""],["muted",""],["playsinline",""]],[[8,"width",0],[8,"height",0]],null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(6,0,[[2,0],["canvas",1]],null,0,"canvas",[],[[8,"width",0],[8,"height",0]],null,null,null,null)),(e()(),r._5(-1,null,["\n"])),(e()(),r._5(-1,null,["\n"]))],null,function(e,t){var n=t.component;e(t,4,0,n.width,n.height),e(t,6,0,n.width,n.height)})}var d=n("6Xbx"),f=function(){},p=["en",[["a","p"],["AM","PM"]],[["AM","PM"],,],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",,"{1} 'at' {0}"],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],h={},v=function(){var e={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return e[e.Zero]="Zero",e[e.One]="One",e[e.Two]="Two",e[e.Few]="Few",e[e.Many]="Many",e[e.Other]="Other",e}(),y=new r.k("UseV4Plurals"),g=function(){},m=function(e){function t(t,n){var r=e.call(this)||this;return r.locale=t,r.deprecatedPluralFn=n,r}return Object(d.b)(t,e),t.prototype.getPluralCategory=function(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):function(e){var t=e.toLowerCase().replace(/_/g,"-"),n=h[t];if(n)return n;var r=t.split("-")[0];if(n=h[r])return n;if("en"===r)return p;throw new Error('Missing locale data for the locale "'+e+'".')}(t||this.locale)[17](e)){case v.Zero:return"zero";case v.One:return"one";case v.Two:return"two";case v.Few:return"few";case v.Many:return"many";default:return"other"}},t}(g),b=function(){function e(e,t){this._viewContainer=e,this._context=new _,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}return Object.defineProperty(e.prototype,"ngIf",{set:function(e){this._context.$implicit=this._context.ngIf=e,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngIfThen",{set:function(e){this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngIfElse",{set:function(e){this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),e.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},e}(),_=function(){this.$implicit=null,this.ngIf=null},w=function(){},C=new r.k("DocumentToken"),x=r.Q({encapsulation:0,styles:[["#snapshotBtn[_ngcontent-%COMP%]{margin-top:5px;font-size:1.2em}.snapshot[_ngcontent-%COMP%]{text-align:center}ul[_ngcontent-%COMP%]{padding-bottom:20px}"]],data:{}});function E(e){return r._6(0,[(e()(),r.S(0,0,null,null,6,"div",[["class","snapshot"]],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(2,0,null,null,1,"h2",[],null,null,null,null,null)),(e()(),r._5(-1,null,["Nice one!"])),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(5,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(e()(),r._5(-1,null,["\n"]))],null,function(e,t){e(t,5,0,t.component.webcamImage.imageAsDataUrl)})}function T(e){return r._6(0,[(e()(),r.S(0,0,null,null,15,"div",[["style","text-align:center"]],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(2,0,null,null,1,"h1",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n Ngx-Webcam Demo\n "])),(e()(),r._5(-1,null,["\n\n "])),(e()(),r.S(5,0,null,null,9,"div",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(7,0,null,null,1,"webcam",[],null,[[null,"imageCapture"]],function(e,t,n){var r=!0;return"imageCapture"===t&&(r=!1!==e.component.handleImage(n)&&r),r},l,c)),r.R(8,4374528,null,0,u,[],{trigger:[0,"trigger"]},{imageCapture:"imageCapture"}),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(10,0,null,null,0,"br",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(12,0,null,null,1,"button",[["id","snapshotBtn"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.triggerSnapshot()&&r),r},null,null)),(e()(),r._5(-1,null,["Take A Snapshot"])),(e()(),r._5(-1,null,["\n "])),(e()(),r._5(-1,null,["\n"])),(e()(),r._5(-1,null,["\n\n"])),(e()(),r.N(16777216,null,null,1,null,E)),r.R(18,16384,null,0,b,[r.C,r.z],{ngIf:[0,"ngIf"]},null),(e()(),r._5(-1,null,["\n\n\n"])),(e()(),r.S(20,0,null,null,1,"h2",[],null,null,null,null,null)),(e()(),r._5(-1,null,["Like this project on GitHub:"])),(e()(),r._5(-1,null,["\n"])),(e()(),r.S(23,0,null,null,8,"ul",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(25,0,null,null,5,"li",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(27,0,null,null,2,"h2",[],null,null,null,null,null)),(e()(),r.S(28,0,null,null,1,"a",[["href","https://github.com/basst314/ngx-webcam"],["rel","noopener"],["target","_blank"]],null,null,null,null,null)),(e()(),r._5(-1,null,["Ngx-Webcam / GitHub"])),(e()(),r._5(-1,null,["\n "])),(e()(),r._5(-1,null,["\n"])),(e()(),r._5(-1,null,["\n\n"]))],function(e,t){var n=t.component;e(t,8,0,n.triggerObservable),e(t,18,0,n.webcamImage)},null)}var S=r.O("app-root",s,function(e){return r._6(0,[(e()(),r.S(0,0,null,null,1,"app-root",[],null,null,null,T,x)),r.R(1,49152,null,0,s,[],null,null)],null,null)},{},{},[]),k=null;function A(){return k}var I,N={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},O={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},R={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};r.T.Node&&(I=r.T.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))});var P,M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(d.b)(t,e),t.prototype.parse=function(e){throw new Error("parse not implemented")},t.makeCurrent=function(){var e;e=new t,k||(k=e)},t.prototype.hasProperty=function(e,t){return t in e},t.prototype.setProperty=function(e,t,n){e[t]=n},t.prototype.getProperty=function(e,t){return e[t]},t.prototype.invoke=function(e,t,n){var r;(r=e)[t].apply(r,n)},t.prototype.logError=function(e){window.console&&(console.error?console.error(e):console.log(e))},t.prototype.log=function(e){window.console&&window.console.log&&window.console.log(e)},t.prototype.logGroup=function(e){window.console&&window.console.group&&window.console.group(e)},t.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return N},enumerable:!0,configurable:!0}),t.prototype.contains=function(e,t){return I.call(e,t)},t.prototype.querySelector=function(e,t){return e.querySelector(t)},t.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},t.prototype.on=function(e,t,n){e.addEventListener(t,n,!1)},t.prototype.onAndCancel=function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}},t.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},t.prototype.createMouseEvent=function(e){var t=this.getDefaultDocument().createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},t.prototype.createEvent=function(e){var t=this.getDefaultDocument().createEvent("Event");return t.initEvent(e,!0,!0),t},t.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},t.prototype.isPrevented=function(e){return e.defaultPrevented||null!=e.returnValue&&!e.returnValue},t.prototype.getInnerHTML=function(e){return e.innerHTML},t.prototype.getTemplateContent=function(e){return"content"in e&&this.isTemplateElement(e)?e.content:null},t.prototype.getOuterHTML=function(e){return e.outerHTML},t.prototype.nodeName=function(e){return e.nodeName},t.prototype.nodeValue=function(e){return e.nodeValue},t.prototype.type=function(e){return e.type},t.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},t.prototype.firstChild=function(e){return e.firstChild},t.prototype.nextSibling=function(e){return e.nextSibling},t.prototype.parentElement=function(e){return e.parentNode},t.prototype.childNodes=function(e){return e.childNodes},t.prototype.childNodesAsList=function(e){for(var t=e.childNodes,n=new Array(t.length),r=0;r0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r0;a||(a=e[s]=[]);var c=me(t)?Zone.root:Zone.current;if(0===a.length)a.push({zone:c,handler:i});else{for(var l=!1,d=0;d-1},t}(K),Te=["alt","control","meta","shift"],Se={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},ke=function(e){function t(t){return e.call(this,t)||this}return Object(d.b)(t,e),t.prototype.supports=function(e){return null!=t.parseEventName(e)},t.prototype.addEventListener=function(e,n,r){var o=t.parseEventName(n),i=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return A().onAndCancel(e,o.domEventName,i)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var o=t._normalizeKey(n.pop()),i="";if(Te.forEach(function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),i+=e+".")}),i+=o,0!=n.length||0===o.length)return null;var s={};return s.domEventName=r,s.fullKey=i,s},t.getEventFullKey=function(e){var t="",n=A().getEventKey(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Te.forEach(function(r){r!=n&&(0,Se[r])(e)&&(t+=r+".")}),t+=n},t.eventCallback=function(e,n,r){return function(o){t.getEventFullKey(o)===e&&r.runGuarded(function(){return n(o)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t}(K),Ae=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ie=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Ne(e){return(e=String(e)).match(Ae)||e.match(Ie)?e:(Object(r.I)()&&A().log("WARNING: sanitizing unsafe URL value "+e+" (see http://g.co/ng/security#xss)"),"unsafe:"+e)}var Oe=null,Re=null;function Pe(e){for(var t={},n=0,r=e.split(",");n")):this.sanitizedSomething=!0},e.prototype.endElement=function(e){var t=Re.nodeName(e).toLowerCase();Fe.hasOwnProperty(t)&&!je.hasOwnProperty(t)&&(this.buf.push(""))},e.prototype.chars=function(e){this.buf.push(Ge(e))},e}();function Ze(e,t){if(t&&Re.contains(e,t))throw new Error("Failed to sanitize html because the element is clobbered: "+Re.getOuterHTML(e));return t}var Qe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qe=/([^\#-~ |!])/g;function Ge(e){return e.replace(/&/g,"&").replace(Qe,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(qe,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function We(e){Re.attributeMap(e).forEach(function(t,n){"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||Re.removeAttribute(e,n)});for(var t=0,n=Re.childNodesAsList(e);t1?new t(e,r):1===o?new i(e[0],r):new s(r)},t.dispatch=function(e){var t=e.array,n=e.index,r=e.subscriber;n>=e.count?r.complete():(r.next(t[n]),r.closed||(e.index=n+1,this.schedule(e)))},t.prototype._subscribe=function(e){var n=this.array,r=n.length,o=this.scheduler;if(o)return o.schedule(t.dispatch,0,{array:n,index:0,count:r,subscriber:e});for(var i=0;i0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(v);function m(e){return e}t.a=function(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(c=e.pop())):"number"==typeof d&&(c=e.pop()),null===l&&1===e.length&&e[0]instanceof r.a?e[0]:(void 0===(n=c)&&(n=Number.POSITIVE_INFINITY),o=m,i=null,void 0===(s=n)&&(s=Number.POSITIVE_INFINITY),function(e){return"number"==typeof i&&(s=i,i=null),e.lift(new y(o,i,s))})(new u(e,l))}},"6Xbx":function(e,t,n){"use strict";t.b=function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},n.d(t,"a",function(){return o});var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n ");else if("object"==typeof t){var o=[];for(var i in t)if(t.hasOwnProperty(i)){var s=t[i];o.push(i+":"+("string"==typeof s?JSON.stringify(s):T(s)))}r="{"+o.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+e.replace(L,"\n ")}function Q(e,t){return new Error(Z(e,t))}var W="ngDebugContext",q="ngOriginalError",G="ngErrorLogger";function K(e){return e[W]}function Y(e){return e[q]}function J(e){for(var t=[],n=1;n0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+T(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function Ke(e,t){return Array.isArray(t)?t.reduce(Ke,e):Object(r.a)({},e,t)}var Ye=function(){function e(e,t,n,r,a,u){var c=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=u,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Ze(),this._zone.onMicrotaskEmpty.subscribe({next:function(){c._zone.run(function(){c.tick()})}});var l=new o.a(function(e){c._stable=c._zone.isStable&&!c._zone.hasPendingMacrotasks&&!c._zone.hasPendingMicrotasks,c._zone.runOutsideAngular(function(){e.next(c._stable),e.complete()})}),d=new o.a(function(e){var t;c._zone.runOutsideAngular(function(){t=c._zone.onStable.subscribe(function(){Ae.assertNotInAngularZone(),x(function(){c._stable||c._zone.hasPendingMacrotasks||c._zone.hasPendingMicrotasks||(c._stable=!0,e.next(!0))})})});var n=c._zone.onUnstable.subscribe(function(){Ae.assertInAngularZone(),c._stable&&(c._stable=!1,c._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(i.a)(l,s.a.call(d))}return e.prototype.bootstrap=function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof pe?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var o=n instanceof we?null:this._injector.get(Ce),i=n.create(O.NULL,[],t||n.selector,o);i.onDestroy(function(){r._unloadComponent(i)});var s=i.injector.get(je,null);return s&&i.injector.get(Ve).registerApplication(i.location.nativeElement,s),this._loadComponent(i),Ze()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),i},e.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,Se(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;Je(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(ue,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),Je(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Te("ApplicationRef#tick()"),e}();function Je(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var $e=function(){},Xe=function(){var e={Important:1,DashCase:2};return e[e.Important]="Important",e[e.DashCase]="DashCase",e}(),et=function(e){this.nativeElement=e},tt=function(){function e(){this.dirty=!0,this._results=[],this.changes=new ke}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[C()]=function(){return this._results[C()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var r=Array.isArray(n)?e(n):n;return t.concat(r)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),nt=function(){},rt=function(){},ot=function(){function e(e,t,n){this._debugContext=n,this.nativeNode=e,t&&t instanceof it?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(e.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),e}(),it=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.properties={},o.attributes={},o.classes={},o.styles={},o.childNodes=[],o.nativeElement=t,o}return Object(r.b)(t,e),t.prototype.addChild=function(e){e&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n,r=this,o=this.childNodes.indexOf(e);-1!==o&&((n=this.childNodes).splice.apply(n,[o+1,0].concat(t)),t.forEach(function(e){e.parent&&e.parent.removeChild(e),e.parent=r}))},t.prototype.insertBefore=function(e,t){var n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))},t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return function e(t,n,r){t.childNodes.forEach(function(t){t instanceof it&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return function e(t,n,r){t instanceof it&&t.childNodes.forEach(function(t){n(t)&&r.push(t),t instanceof it&&e(t,n,r)})}(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(e){return e instanceof t})},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(ot),st=new Map;function at(e){return st.get(e)||null}function ut(e){st.set(e.nativeNode,e)}function ct(e,t){var n=ft(e),r=ft(t);return n&&r?function(t,n,r){for(var o=e[C()](),i=n[C()]();;){var s=o.next(),a=i.next();if(s.done&&a.done)return!0;if(s.done||a.done)return!1;if(!r(s.value,a.value))return!1}}(0,t,ct):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||E(e,t)}var lt=function(){function e(e){this.wrapped=e}return e.wrap=function(t){return new e(t)},e}(),dt=function(){function e(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}return e.prototype.isFirstChange=function(){return this.firstChange},e}();function ft(e){return!!pt(e)&&(Array.isArray(e)||!(e instanceof Map)&&C()in e)}function pt(e){return null!==e&&("function"==typeof e||"object"==typeof e)}var ht=function(){function e(){}return e.prototype.supports=function(e){return ft(e)},e.prototype.create=function(e){return new yt(e)},e}(),vt=function(e,t){return t},yt=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||vt}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,o=null;t||n;){var i=!n||t&&t.currentIndex<_t(n,r,o)?t:n,s=_t(i,r,o),a=i.currentIndex;if(i===n)r--,n=n._nextRemoved;else if(t=t._next,null==i.previousIndex)r++;else{o||(o=[]);var u=s-r,c=a-r;if(u!=c){for(var l=0;l=n.length)&&(t=n.length-1),t<0)return null;var r=n[t];return r.viewContainerParent=null,Bn(n,t),Zt.dirtyParentQueries(r),Un(r),r}function Ln(e,t,n){var r=t?ln(t,t.def.lastRenderRootNode):e.renderElement;mn(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function Un(e){mn(e,3,null,null,void 0)}function zn(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Bn(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var Zn=new Object;function Qn(e,t,n,r,o,i){return new Wn(e,t,n,r,o,i)}var Wn=function(e){function t(t,n,r,o,i,s){var a=e.call(this)||this;return a.selector=t,a.componentType=n,a._inputs=o,a._outputs=i,a.ngContentSelectors=s,a.viewDefFactory=r,a}return Object(r.b)(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){if(!r)throw new Error("ngModule should be provided");var o=gn(this.viewDefFactory),i=o.nodes[0].element.componentProvider.nodeIndex,s=Zt.createRootView(e,t||[],n,o,r,Zn),a=Ut(s,i).instance;return n&&s.renderer.setAttribute(Lt(s,0).renderElement,"ng-version",p.full),new qn(s,new Kn(s),a)},t}(pe),qn=function(e){function t(t,n,r){var o=e.call(this)||this;return o._view=t,o._viewRef=n,o._component=r,o._elDef=o._view.def.nodes[0],o.hostView=n,o.changeDetectorRef=n,o.instance=r,o}return Object(r.b)(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new et(Lt(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new $n(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(function(){}),Gn=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new et(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new $n(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=cn(e),e=e.parent;return e?new $n(e,t):new $n(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=Fn(this._data,e);Zt.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Kn(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r},e.prototype.createComponent=function(e,t,n,r,o){var i=n||this.parentInjector;o||e instanceof we||(o=i.get(Ce));var s=e.create(i,r,void 0,o);return this.insert(s.hostView,t),s},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,o,i,s=e;return o=s._view,i=(n=this._data).viewContainer._embeddedViews,null!==(r=t)&&void 0!==r||(r=i.length),o.viewContainerParent=this._view,zn(i,r,o),function(e,t){var n=un(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,t.parentNodeDef)}}(n,o),Zt.dirtyParentQueries(o),Ln(n,r>0?i[r-1]:null,o),s.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,o,i,s,a=this._embeddedViews.indexOf(e._view);return o=t,s=(i=(n=this._data).viewContainer._embeddedViews)[r=a],Bn(i,r),null==o&&(o=i.length),zn(i,o,s),Zt.dirtyParentQueries(s),Un(s),Ln(n,o>0?i[o-1]:null,s),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=Fn(this._data,e);t&&Zt.destroyView(t)},e.prototype.detach=function(e){var t=Fn(this._data,e);return t?new Kn(t):null},e}(),Kn=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return mn(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){on(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{Zt.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){Zt.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Zt.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,Un(this._view),Zt.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}(),Yn=function(e){function t(t,n){var r=e.call(this)||this;return r._parentView=t,r._def=n,r}return Object(r.b)(t,e),t.prototype.createEmbeddedView=function(e){return new Kn(Zt.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new et(Lt(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(nt);function Jn(e,t){return new $n(e,t)}var $n=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=O.THROW_IF_NOT_FOUND),Zt.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:Yt(e)},t)},e}(),Xn=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=En(t),r=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,r),r},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var r=0;r0,r=t.provider;switch(201347067&t.flags){case 512:return hr(e,t.parent,n,r.value,r.deps);case 1024:return function(e,t,n,r,o){var i=o.length;switch(i){case 0:return r();case 1:return r(yr(e,t,n,o[0]));case 2:return r(yr(e,t,n,o[0]),yr(e,t,n,o[1]));case 3:return r(yr(e,t,n,o[0]),yr(e,t,n,o[1]),yr(e,t,n,o[2]));default:for(var s=Array(i),a=0;a0)c=v,Or(v)||(l=v);else for(;c&&h===c.nodeIndex+c.childCount;){var m=c.parent;m&&(m.childFlags|=c.childFlags,m.childMatchedQueries|=c.childMatchedQueries),l=(c=m)&&Or(c)?c.renderParent:c}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:e,nodes:t,updateDirectives:n||Gt,updateRenderer:r||Gt,handleEvent:function(e,n,r,o){return t[n].element.handleEvent(e,r,o)},bindingCount:o,outputCount:i,lastRenderRootNode:p}}function Or(e){return 0!=(1&e.flags)&&null===e.element.name}function Rr(e,t,n){var r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var o=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=o&&t.nodeIndex+t.childCount>o)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function Pr(e,t,n,r){var o=Vr(e.root,e.renderer,e,t,n);return Dr(o,e.component,r),Hr(o),o}function Mr(e,t,n){var r=Vr(e,e.renderer,null,null,t);return Dr(r,n,n),Hr(r),r}function jr(e,t,n,r){var o,i=t.element.componentRendererType;return o=i?e.root.rendererFactory.createRenderer(r,i):e.root.renderer,Vr(e.root,o,e,t.element.componentProvider,n)}function Vr(e,t,n,r,o){var i=new Array(o.nodes.length),s=o.outputCount?new Array(o.outputCount):null;return{def:o,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:i,state:13,root:e,renderer:t,oldValues:new Array(o.bindingCount),disposables:s,initIndex:-1}}function Dr(e,t,n){e.component=t,e.context=n}function Hr(e){var t;dn(e)&&(t=Lt(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n,r,o,i,s,a=e.def,u=e.nodes,c=0;c0&&On(I,N,0,n)&&(U=!0),L>1&&On(I,N,1,O)&&(U=!0),L>2&&On(I,N,2,R)&&(U=!0),L>3&&On(I,N,3,P)&&(U=!0),L>4&&On(I,N,4,M)&&(U=!0),L>5&&On(I,N,5,j)&&(U=!0),L>6&&On(I,N,6,V)&&(U=!0),L>7&&On(I,N,7,D)&&(U=!0),L>8&&On(I,N,8,H)&&(U=!0),L>9&&On(I,N,9,F)&&(U=!0),U;case 2:return function(e,t,n,r,o,i,s,a,u,c,l,d){var f=!1,p=t.bindings,h=p.length;if(h>0&&nn(e,t,0,n)&&(f=!0),h>1&&nn(e,t,1,r)&&(f=!0),h>2&&nn(e,t,2,o)&&(f=!0),h>3&&nn(e,t,3,i)&&(f=!0),h>4&&nn(e,t,4,s)&&(f=!0),h>5&&nn(e,t,5,a)&&(f=!0),h>6&&nn(e,t,6,u)&&(f=!0),h>7&&nn(e,t,7,c)&&(f=!0),h>8&&nn(e,t,8,l)&&(f=!0),h>9&&nn(e,t,9,d)&&(f=!0),f){var v=t.text.prefix;h>0&&(v+=Ir(n,p[0])),h>1&&(v+=Ir(r,p[1])),h>2&&(v+=Ir(o,p[2])),h>3&&(v+=Ir(i,p[3])),h>4&&(v+=Ir(s,p[4])),h>5&&(v+=Ir(a,p[5])),h>6&&(v+=Ir(u,p[6])),h>7&&(v+=Ir(c,p[7])),h>8&&(v+=Ir(l,p[8])),h>9&&(v+=Ir(d,p[9]));var y=Ft(e,t.nodeIndex).renderText;e.renderer.setValue(y,v)}return f}(e,t,n,r,o,i,s,a,u,c,l,d);case 16384:return h=n,v=r,y=o,g=i,m=s,b=a,_=u,w=c,C=l,x=d,T=(E=Ut(f=e,(p=t).nodeIndex)).instance,S=!1,k=void 0,(A=p.bindings.length)>0&&tn(f,p,0,h)&&(S=!0,k=mr(f,E,p,0,h,k)),A>1&&tn(f,p,1,v)&&(S=!0,k=mr(f,E,p,1,v,k)),A>2&&tn(f,p,2,y)&&(S=!0,k=mr(f,E,p,2,y,k)),A>3&&tn(f,p,3,g)&&(S=!0,k=mr(f,E,p,3,g,k)),A>4&&tn(f,p,4,m)&&(S=!0,k=mr(f,E,p,4,m,k)),A>5&&tn(f,p,5,b)&&(S=!0,k=mr(f,E,p,5,b,k)),A>6&&tn(f,p,6,_)&&(S=!0,k=mr(f,E,p,6,_,k)),A>7&&tn(f,p,7,w)&&(S=!0,k=mr(f,E,p,7,w,k)),A>8&&tn(f,p,8,C)&&(S=!0,k=mr(f,E,p,8,C,k)),A>9&&tn(f,p,9,x)&&(S=!0,k=mr(f,E,p,9,x,k)),k&&T.ngOnChanges(k),65536&p.flags&&Ht(f,256,p.nodeIndex)&&T.ngOnInit(),262144&p.flags&&T.ngDoCheck(),S;case 32:case 64:case 128:return function(e,t,n,r,o,i,s,a,u,c,l,d){var f=t.bindings,p=!1,h=f.length;if(h>0&&nn(e,t,0,n)&&(p=!0),h>1&&nn(e,t,1,r)&&(p=!0),h>2&&nn(e,t,2,o)&&(p=!0),h>3&&nn(e,t,3,i)&&(p=!0),h>4&&nn(e,t,4,s)&&(p=!0),h>5&&nn(e,t,5,a)&&(p=!0),h>6&&nn(e,t,6,u)&&(p=!0),h>7&&nn(e,t,7,c)&&(p=!0),h>8&&nn(e,t,8,l)&&(p=!0),h>9&&nn(e,t,9,d)&&(p=!0),p){var v=zt(e,t.nodeIndex),y=void 0;switch(201347067&t.flags){case 32:y=new Array(f.length),h>0&&(y[0]=n),h>1&&(y[1]=r),h>2&&(y[2]=o),h>3&&(y[3]=i),h>4&&(y[4]=s),h>5&&(y[5]=a),h>6&&(y[6]=u),h>7&&(y[7]=c),h>8&&(y[8]=l),h>9&&(y[9]=d);break;case 64:y={},h>0&&(y[f[0].name]=n),h>1&&(y[f[1].name]=r),h>2&&(y[f[2].name]=o),h>3&&(y[f[3].name]=i),h>4&&(y[f[4].name]=s),h>5&&(y[f[5].name]=a),h>6&&(y[f[6].name]=u),h>7&&(y[f[7].name]=c),h>8&&(y[f[8].name]=l),h>9&&(y[f[9].name]=d);break;case 128:var g=n;switch(h){case 1:y=g.transform(n);break;case 2:y=g.transform(r);break;case 3:y=g.transform(r,o);break;case 4:y=g.transform(r,o,i);break;case 5:y=g.transform(r,o,i,s);break;case 6:y=g.transform(r,o,i,s,a);break;case 7:y=g.transform(r,o,i,s,a,u);break;case 8:y=g.transform(r,o,i,s,a,u,c);break;case 9:y=g.transform(r,o,i,s,a,u,c,l);break;case 10:y=g.transform(r,o,i,s,a,u,c,l,d)}}v.value=y}return p}(e,t,n,r,o,i,s,a,u,c,l,d);default:throw"unreachable"}var f,p,h,v,y,g,m,b,_,w,C,x,E,T,S,k,A,I,N,O,R,P,M,j,V,D,H,F,L,U}(e,t,r,o,i,s,a,u,c,l,d,f):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var r=!1,o=0;o0&&rn(p,h,0,r),E>1&&rn(p,h,1,v),E>2&&rn(p,h,2,y),E>3&&rn(p,h,3,g),E>4&&rn(p,h,4,m),E>5&&rn(p,h,5,b),E>6&&rn(p,h,6,_),E>7&&rn(p,h,7,w),E>8&&rn(p,h,8,C),E>9&&rn(p,h,9,x)):function(e,t,n){for(var r=0;r1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(s.a),d=function(e){function t(t,n){e.call(this),this.source=t,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}return Object(r.b)(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new a.a).add(this.source.subscribe(new p(this.getSubject(),this))),e.closed?(this._connection=null,e=a.a.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return u()(this)},t}(i.a).prototype,f={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:d._subscribe},_isComplete:{value:d._isComplete,writable:!0},getSubject:{value:d.getSubject},connect:{value:d.connect},refCount:{value:d.refCount}},p=function(e){function t(t,n){e.call(this,t),this.connectable=n}return Object(r.b)(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(o.b);function h(){return new o.a}t.a=function(){return this,u()((e=h,function(t){var n;n="function"==typeof e?e:function(){return e};var r=Object.create(t,f);return r.source=t,r.subjectFactory=n,r})(this));var e}},V7AE:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("xIGM").a.Symbol,o="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber"},YuZA:function(e,t){function n(e){return Promise.resolve().then(function(){throw new Error("Cannot find module '"+e+"'.")})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="YuZA"},cDNt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("LMZF"),o=function(){},i=n("TO51"),s=function(){function e(){this.showWebcam=!0,this.webcamImage=null,this.trigger=new i.a}return e.prototype.triggerSnapshot=function(){this.trigger.next()},e.prototype.toggleWebcam=function(){this.showWebcam=!this.showWebcam},e.prototype.handleImage=function(e){console.info("received webcam image",e),this.webcamImage=e},Object.defineProperty(e.prototype,"triggerObservable",{get:function(){return this.trigger.asObservable()},enumerable:!0,configurable:!0}),e}(),a=function(){function e(e,t){this._mimeType=null,this._imageAsBase64=null,this._imageAsDataUrl=null,this._mimeType=t,this._imageAsDataUrl=e}return Object.defineProperty(e.prototype,"imageAsBase64",{get:function(){return this._imageAsBase64?this._imageAsBase64:this._imageAsBase64=this.getDataFromDataUrl(this._imageAsDataUrl)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageAsDataUrl",{get:function(){return this._imageAsDataUrl},enumerable:!0,configurable:!0}),e.prototype.getDataFromDataUrl=function(e){return e.replace("data:"+this._mimeType+";base64,","")},e}(),u=(n("AP4T"),function(){function e(){this.width=640,this.height=480,this.mediaStream=null,this.imageCapture=new r.i,this.initError=new r.i,this.imageClick=new r.i}return e.prototype.ngAfterViewInit=function(){this.initWebcam()},e.prototype.ngOnDestroy=function(){this.stopMediaTracks(),this.unsubscribeFromSubscriptions()},Object.defineProperty(e.prototype,"trigger",{set:function(e){var t=this;this.triggerSubscription&&this.triggerSubscription.unsubscribe(),this._trigger=e,this.triggerSubscription=this._trigger.subscribe(function(){t.takeSnapshot()})},enumerable:!0,configurable:!0}),e.prototype.takeSnapshot=function(){var e=this.video.nativeElement,t={width:this.width,height:this.height};e.videoWidth&&(t.width=e.videoWidth,t.height=e.videoHeight);var n=this.canvas.nativeElement;n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(this.video.nativeElement,0,0);var r=n.toDataURL("image/jpeg");this.imageCapture.next(new a(r,"image/jpeg"))},e.prototype.initWebcam=function(){var e=this,t=this.video.nativeElement;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(function(n){e.mediaStream=n,t.srcObject=n,t.play()}).catch(function(t){e.initError.next({message:t.message,mediaStreamError:t}),console.warn("Error initializing webcam",t)}):this.initError.next({message:"Cannot read UserMedia from MediaDevices."})},e.prototype.stopMediaTracks=function(){this.mediaStream&&this.mediaStream.getTracks&&this.mediaStream.getTracks().forEach(function(e){return e.stop()})},e.prototype.unsubscribeFromSubscriptions=function(){this.triggerSubscription&&this.triggerSubscription.unsubscribe()},e}()),c=r.Q({encapsulation:0,styles:[[".webcam-wrapper[_ngcontent-%COMP%]{display:inline-block;line-height:0}.webcam-wrapper[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{display:none}"]],data:{}});function l(e){return r._6(0,[r._3(402653184,1,{video:0}),r._3(402653184,2,{canvas:0}),(e()(),r.S(2,0,null,null,5,"div",[["class","webcam-wrapper"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.imageClick.next()&&r),r},null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(4,0,[[1,0],["video",1]],null,0,"video",[["autoplay",""],["muted",""],["playsinline",""]],[[8,"width",0],[8,"height",0]],null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(6,0,[[2,0],["canvas",1]],null,0,"canvas",[],[[8,"width",0],[8,"height",0]],null,null,null,null)),(e()(),r._5(-1,null,["\n"])),(e()(),r._5(-1,null,["\n"]))],null,function(e,t){var n=t.component;e(t,4,0,n.width,n.height),e(t,6,0,n.width,n.height)})}var d=n("6Xbx"),f=function(){},p=["en",[["a","p"],["AM","PM"]],[["AM","PM"],,],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",,"{1} 'at' {0}"],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],h={},v=function(){var e={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return e[e.Zero]="Zero",e[e.One]="One",e[e.Two]="Two",e[e.Few]="Few",e[e.Many]="Many",e[e.Other]="Other",e}(),y=new r.k("UseV4Plurals"),g=function(){},m=function(e){function t(t,n){var r=e.call(this)||this;return r.locale=t,r.deprecatedPluralFn=n,r}return Object(d.b)(t,e),t.prototype.getPluralCategory=function(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):function(e){var t=e.toLowerCase().replace(/_/g,"-"),n=h[t];if(n)return n;var r=t.split("-")[0];if(n=h[r])return n;if("en"===r)return p;throw new Error('Missing locale data for the locale "'+e+'".')}(t||this.locale)[17](e)){case v.Zero:return"zero";case v.One:return"one";case v.Two:return"two";case v.Few:return"few";case v.Many:return"many";default:return"other"}},t}(g),b=function(){function e(e,t){this._viewContainer=e,this._context=new _,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}return Object.defineProperty(e.prototype,"ngIf",{set:function(e){this._context.$implicit=this._context.ngIf=e,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngIfThen",{set:function(e){this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngIfElse",{set:function(e){this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),e.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},e}(),_=function(){this.$implicit=null,this.ngIf=null},w=function(){},C=new r.k("DocumentToken"),x=r.Q({encapsulation:0,styles:[[".actionBtn[_ngcontent-%COMP%]{margin-top:5px;font-size:1.2em}.snapshot[_ngcontent-%COMP%]{text-align:center}ul[_ngcontent-%COMP%]{padding-bottom:20px}"]],data:{}});function E(e){return r._6(0,[(e()(),r.S(0,0,null,null,1,"webcam",[],null,[[null,"imageCapture"]],function(e,t,n){var r=!0;return"imageCapture"===t&&(r=!1!==e.component.handleImage(n)&&r),r},l,c)),r.R(1,4374528,null,0,u,[],{trigger:[0,"trigger"]},{imageCapture:"imageCapture"})],function(e,t){e(t,1,0,t.component.triggerObservable)},null)}function T(e){return r._6(0,[(e()(),r.S(0,0,null,null,6,"div",[["class","snapshot"]],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(2,0,null,null,1,"h2",[],null,null,null,null,null)),(e()(),r._5(-1,null,["Nice one!"])),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(5,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(e()(),r._5(-1,null,["\n"]))],null,function(e,t){e(t,5,0,t.component.webcamImage.imageAsDataUrl)})}function S(e){return r._6(0,[(e()(),r.S(0,0,null,null,18,"div",[["style","text-align:center"]],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(2,0,null,null,1,"h1",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n Ngx-Webcam Demo\n "])),(e()(),r._5(-1,null,["\n\n "])),(e()(),r.S(5,0,null,null,12,"div",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.N(16777216,null,null,1,null,E)),r.R(8,16384,null,0,b,[r.C,r.z],{ngIf:[0,"ngIf"]},null),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(10,0,null,null,0,"br",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(12,0,null,null,1,"button",[["class","actionBtn"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.triggerSnapshot()&&r),r},null,null)),(e()(),r._5(-1,null,["Take A Snapshot"])),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(15,0,null,null,1,"button",[["class","actionBtn"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.toggleWebcam()&&r),r},null,null)),(e()(),r._5(-1,null,["Toggle Webcam"])),(e()(),r._5(-1,null,["\n "])),(e()(),r._5(-1,null,["\n"])),(e()(),r._5(-1,null,["\n\n"])),(e()(),r.N(16777216,null,null,1,null,T)),r.R(21,16384,null,0,b,[r.C,r.z],{ngIf:[0,"ngIf"]},null),(e()(),r._5(-1,null,["\n\n\n"])),(e()(),r.S(23,0,null,null,1,"h2",[],null,null,null,null,null)),(e()(),r._5(-1,null,["Like this project on GitHub:"])),(e()(),r._5(-1,null,["\n"])),(e()(),r.S(26,0,null,null,8,"ul",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(28,0,null,null,5,"li",[],null,null,null,null,null)),(e()(),r._5(-1,null,["\n "])),(e()(),r.S(30,0,null,null,2,"h2",[],null,null,null,null,null)),(e()(),r.S(31,0,null,null,1,"a",[["href","https://github.com/basst314/ngx-webcam"],["rel","noopener"],["target","_blank"]],null,null,null,null,null)),(e()(),r._5(-1,null,["Ngx-Webcam / GitHub"])),(e()(),r._5(-1,null,["\n "])),(e()(),r._5(-1,null,["\n"])),(e()(),r._5(-1,null,["\n\n"]))],function(e,t){var n=t.component;e(t,8,0,n.showWebcam),e(t,21,0,n.webcamImage)},null)}var k=r.O("app-root",s,function(e){return r._6(0,[(e()(),r.S(0,0,null,null,1,"app-root",[],null,null,null,S,x)),r.R(1,49152,null,0,s,[],null,null)],null,null)},{},{},[]),A=null;function I(){return A}var N,O={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},R={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},P={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};r.T.Node&&(N=r.T.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))});var M,j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(d.b)(t,e),t.prototype.parse=function(e){throw new Error("parse not implemented")},t.makeCurrent=function(){var e;e=new t,A||(A=e)},t.prototype.hasProperty=function(e,t){return t in e},t.prototype.setProperty=function(e,t,n){e[t]=n},t.prototype.getProperty=function(e,t){return e[t]},t.prototype.invoke=function(e,t,n){var r;(r=e)[t].apply(r,n)},t.prototype.logError=function(e){window.console&&(console.error?console.error(e):console.log(e))},t.prototype.log=function(e){window.console&&window.console.log&&window.console.log(e)},t.prototype.logGroup=function(e){window.console&&window.console.group&&window.console.group(e)},t.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return O},enumerable:!0,configurable:!0}),t.prototype.contains=function(e,t){return N.call(e,t)},t.prototype.querySelector=function(e,t){return e.querySelector(t)},t.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},t.prototype.on=function(e,t,n){e.addEventListener(t,n,!1)},t.prototype.onAndCancel=function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}},t.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},t.prototype.createMouseEvent=function(e){var t=this.getDefaultDocument().createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},t.prototype.createEvent=function(e){var t=this.getDefaultDocument().createEvent("Event");return t.initEvent(e,!0,!0),t},t.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},t.prototype.isPrevented=function(e){return e.defaultPrevented||null!=e.returnValue&&!e.returnValue},t.prototype.getInnerHTML=function(e){return e.innerHTML},t.prototype.getTemplateContent=function(e){return"content"in e&&this.isTemplateElement(e)?e.content:null},t.prototype.getOuterHTML=function(e){return e.outerHTML},t.prototype.nodeName=function(e){return e.nodeName},t.prototype.nodeValue=function(e){return e.nodeValue},t.prototype.type=function(e){return e.type},t.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},t.prototype.firstChild=function(e){return e.firstChild},t.prototype.nextSibling=function(e){return e.nextSibling},t.prototype.parentElement=function(e){return e.parentNode},t.prototype.childNodes=function(e){return e.childNodes},t.prototype.childNodesAsList=function(e){for(var t=e.childNodes,n=new Array(t.length),r=0;r0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r0;a||(a=e[s]=[]);var c=be(t)?Zone.root:Zone.current;if(0===a.length)a.push({zone:c,handler:i});else{for(var l=!1,d=0;d-1},t}(Y),Se=["alt","control","meta","shift"],ke={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},Ae=function(e){function t(t){return e.call(this,t)||this}return Object(d.b)(t,e),t.prototype.supports=function(e){return null!=t.parseEventName(e)},t.prototype.addEventListener=function(e,n,r){var o=t.parseEventName(n),i=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return I().onAndCancel(e,o.domEventName,i)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var o=t._normalizeKey(n.pop()),i="";if(Se.forEach(function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),i+=e+".")}),i+=o,0!=n.length||0===o.length)return null;var s={};return s.domEventName=r,s.fullKey=i,s},t.getEventFullKey=function(e){var t="",n=I().getEventKey(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Se.forEach(function(r){r!=n&&(0,ke[r])(e)&&(t+=r+".")}),t+=n},t.eventCallback=function(e,n,r){return function(o){t.getEventFullKey(o)===e&&r.runGuarded(function(){return n(o)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t}(Y),Ie=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ne=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Oe(e){return(e=String(e)).match(Ie)||e.match(Ne)?e:(Object(r.I)()&&I().log("WARNING: sanitizing unsafe URL value "+e+" (see http://g.co/ng/security#xss)"),"unsafe:"+e)}var Re=null,Pe=null;function Me(e){for(var t={},n=0,r=e.split(",");n")):this.sanitizedSomething=!0},e.prototype.endElement=function(e){var t=Pe.nodeName(e).toLowerCase();Le.hasOwnProperty(t)&&!Ve.hasOwnProperty(t)&&(this.buf.push(""))},e.prototype.chars=function(e){this.buf.push(Ge(e))},e}();function Qe(e,t){if(t&&Pe.contains(e,t))throw new Error("Failed to sanitize html because the element is clobbered: "+Pe.getOuterHTML(e));return t}var We=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qe=/([^\#-~ |!])/g;function Ge(e){return e.replace(/&/g,"&").replace(We,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(qe,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function Ke(e){Pe.attributeMap(e).forEach(function(t,n){"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||Pe.removeAttribute(e,n)});for(var t=0,n=Pe.childNodesAsList(e);t
- +
- + +
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index c9e31ba..48db085 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -1,4 +1,4 @@ -#snapshotBtn { +.actionBtn { margin-top: 5px; font-size: 1.2em; } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d4cc24f..af494e6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; -import {Subject} from "rxjs/Subject"; -import {Observable} from "rxjs/Observable"; +import {Subject} from 'rxjs/Subject'; +import {Observable} from 'rxjs/Observable'; import {WebcamImage} from "./modules/webcam/domain/webcam-image"; @Component({ @@ -9,16 +9,23 @@ import {WebcamImage} from "./modules/webcam/domain/webcam-image"; styleUrls: ['./app.component.scss'] }) export class AppComponent { - // webcam snapshot trigger - private trigger: Subject = new Subject(); + // toggle webcam on/off + public showWebcam = true; // latest snapshot public webcamImage: WebcamImage = null; + // webcam snapshot trigger + private trigger: Subject = new Subject(); + public triggerSnapshot(): void { this.trigger.next(); } + public toggleWebcam(): void { + this.showWebcam = !this.showWebcam; + } + public handleImage(webcamImage: WebcamImage): void { console.info("received webcam image", webcamImage); this.webcamImage = webcamImage; diff --git a/src/app/modules/webcam/webcam/webcam.component.ts b/src/app/modules/webcam/webcam/webcam.component.ts index a1cddbf..f46ca92 100644 --- a/src/app/modules/webcam/webcam/webcam.component.ts +++ b/src/app/modules/webcam/webcam/webcam.component.ts @@ -19,6 +19,9 @@ export class WebcamComponent implements AfterViewInit, OnDestroy { private _trigger: Observable; private triggerSubscription: Subscription; + /** MediaStream object in use for streaming UserMedia data */ + private mediaStream: MediaStream = null; + /** EventEmitter which fires when an image has been captured */ @Output() public imageCapture: EventEmitter = new EventEmitter(); /** Emits a mediaError if webcam cannot be initialized (e.g. missing user permissions) */ @@ -37,6 +40,7 @@ export class WebcamComponent implements AfterViewInit, OnDestroy { } public ngOnDestroy(): void { + this.stopMediaTracks(); this.unsubscribeFromSubscriptions(); } @@ -90,8 +94,9 @@ export class WebcamComponent implements AfterViewInit, OnDestroy { let _video = this.video.nativeElement; if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { // TODO allow video options as Input() - navigator.mediaDevices.getUserMedia({video: {facingMode: "environment"}}) - .then(stream => { + navigator.mediaDevices.getUserMedia({video: {facingMode: "environment"}}) + .then((stream: MediaStream) => { + this.mediaStream = stream; _video.srcObject = stream; _video.play(); }) @@ -104,6 +109,19 @@ export class WebcamComponent implements AfterViewInit, OnDestroy { } } + /** + * Stops all active media tracks. + * This prevents the webcam from being indicated as active, + * even if it is no longer used by this component. + */ + private stopMediaTracks() { + if (this.mediaStream && this.mediaStream.getTracks) { + // getTracks() returns all media tracks (video+audio) + this.mediaStream.getTracks() + .forEach((track: MediaStreamTrack) => track.stop()); + } + } + /** * Unsubscribe from all open subscriptions */