angular-weblineindia-swipe
Version:
An AngularJS based Swipe List component which provides swipe effects in your Angular application. It also allows you to change button options like you can place delete / edit / info buttons as per your requirements.
85 lines (83 loc) • 49.2 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("swipe-angular-list",["exports","@angular/core","@angular/common"],e):e((t=t||self)["swipe-angular-list"]={},t.ng.core,t.ng.common)}(this,(function(t,e,n){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e){return function(n,o){e(n,o,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}
/**
* @license Angular v8.2.14
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var p=null;function l(){return p}var d,f=function(t){function e(){var e=t.call(this)||this;e._animationPrefix=null,e._transitionEnd=null;try{var n=e.createElement("div",document);if(null!=e.getStyle(n,"animationName"))e._animationPrefix="";else for(var o=["Webkit","Moz","O","ms"],r=0;r<o.length;r++)if(null!=e.getStyle(n,o[r]+"AnimationName")){e._animationPrefix="-"+o[r].toLowerCase()+"-";break}var i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(i).forEach((function(t){null!=e.getStyle(n,t)&&(e._transitionEnd=i[t])}))}catch(t){e._animationPrefix=null,e._transitionEnd=null}return e}return r(e,t),e.prototype.getDistributedNodes=function(t){return t.getDistributedNodes()},e.prototype.resolveAndSetHref=function(t,e,n){t.href=null==n?e:e+"/../"+n},e.prototype.supportsDOMEvents=function(){return!0},e.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},e.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},e.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},e.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},e}(function(){function t(){this.resourceLoaderType=null}return Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(t){this._attrToPropMap=t},enumerable:!0,configurable:!0}),t}()),h={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},y={"\b":"Backspace","\t":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},m={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","":"NumLock"},g=function(){if(e.ɵglobal.Node)return e.ɵglobal.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))}}(),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.parse=function(t){throw new Error("parse not implemented")},e.makeCurrent=function(){var t;t=new e,p||(p=t)},e.prototype.hasProperty=function(t,e){return e in t},e.prototype.setProperty=function(t,e,n){t[e]=n},e.prototype.getProperty=function(t,e){return t[e]},e.prototype.invoke=function(t,e,n){var o;(o=t)[e].apply(o,function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}(n))},e.prototype.logError=function(t){window.console&&(console.error?console.error(t):console.log(t))},e.prototype.log=function(t){window.console&&window.console.log&&window.console.log(t)},e.prototype.logGroup=function(t){window.console&&window.console.group&&window.console.group(t)},e.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return h},enumerable:!0,configurable:!0}),e.prototype.contains=function(t,e){return g.call(t,e)},e.prototype.querySelector=function(t,e){return t.querySelector(e)},e.prototype.querySelectorAll=function(t,e){return t.querySelectorAll(e)},e.prototype.on=function(t,e,n){t.addEventListener(e,n,!1)},e.prototype.onAndCancel=function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}},e.prototype.dispatchEvent=function(t,e){t.dispatchEvent(e)},e.prototype.createMouseEvent=function(t){var e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e},e.prototype.createEvent=function(t){var e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e},e.prototype.preventDefault=function(t){t.preventDefault(),t.returnValue=!1},e.prototype.isPrevented=function(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue},e.prototype.getInnerHTML=function(t){return t.innerHTML},e.prototype.getTemplateContent=function(t){return"content"in t&&this.isTemplateElement(t)?t.content:null},e.prototype.getOuterHTML=function(t){return t.outerHTML},e.prototype.nodeName=function(t){return t.nodeName},e.prototype.nodeValue=function(t){return t.nodeValue},e.prototype.type=function(t){return t.type},e.prototype.content=function(t){return this.hasProperty(t,"content")?t.content:t},e.prototype.firstChild=function(t){return t.firstChild},e.prototype.nextSibling=function(t){return t.nextSibling},e.prototype.parentElement=function(t){return t.parentNode},e.prototype.childNodes=function(t){return t.childNodes},e.prototype.childNodesAsList=function(t){for(var e=t.childNodes,n=new Array(e.length),o=0;o<e.length;o++)n[o]=e[o];return n},e.prototype.clearNodes=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.appendChild=function(t,e){t.appendChild(e)},e.prototype.removeChild=function(t,e){t.removeChild(e)},e.prototype.replaceChild=function(t,e,n){t.replaceChild(e,n)},e.prototype.remove=function(t){return t.parentNode&&t.parentNode.removeChild(t),t},e.prototype.insertBefore=function(t,e,n){t.insertBefore(n,e)},e.prototype.insertAllBefore=function(t,e,n){n.forEach((function(n){return t.insertBefore(n,e)}))},e.prototype.insertAfter=function(t,e,n){t.insertBefore(n,e.nextSibling)},e.prototype.setInnerHTML=function(t,e){t.innerHTML=e},e.prototype.getText=function(t){return t.textContent},e.prototype.setText=function(t,e){t.textContent=e},e.prototype.getValue=function(t){return t.value},e.prototype.setValue=function(t,e){t.value=e},e.prototype.getChecked=function(t){return t.checked},e.prototype.setChecked=function(t,e){t.checked=e},e.prototype.createComment=function(t){return this.getDefaultDocument().createComment(t)},e.prototype.createTemplate=function(t){var e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e},e.prototype.createElement=function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)},e.prototype.createElementNS=function(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)},e.prototype.createTextNode=function(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)},e.prototype.createScriptTag=function(t,e,n){var o=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return o.setAttribute(t,e),o},e.prototype.createStyleElement=function(t,e){var n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n},e.prototype.createShadowRoot=function(t){return t.createShadowRoot()},e.prototype.getShadowRoot=function(t){return t.shadowRoot},e.prototype.getHost=function(t){return t.host},e.prototype.clone=function(t){return t.cloneNode(!0)},e.prototype.getElementsByClassName=function(t,e){return t.getElementsByClassName(e)},e.prototype.getElementsByTagName=function(t,e){return t.getElementsByTagName(e)},e.prototype.classList=function(t){return Array.prototype.slice.call(t.classList,0)},e.prototype.addClass=function(t,e){t.classList.add(e)},e.prototype.removeClass=function(t,e){t.classList.remove(e)},e.prototype.hasClass=function(t,e){return t.classList.contains(e)},e.prototype.setStyle=function(t,e,n){t.style[e]=n},e.prototype.removeStyle=function(t,e){t.style[e]=""},e.prototype.getStyle=function(t,e){return t.style[e]},e.prototype.hasStyle=function(t,e,n){var o=this.getStyle(t,e)||"";return n?o==n:o.length>0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,o=0;o<n.length;o++){var r=n.item(o);e.set(r.name,r.value)}return e},e.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},e.prototype.hasAttributeNS=function(t,e,n){return t.hasAttributeNS(e,n)},e.prototype.getAttribute=function(t,e){return t.getAttribute(e)},e.prototype.getAttributeNS=function(t,e,n){return t.getAttributeNS(e,n)},e.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},e.prototype.setAttributeNS=function(t,e,n,o){t.setAttributeNS(e,n,o)},e.prototype.removeAttribute=function(t,e){t.removeAttribute(e)},e.prototype.removeAttributeNS=function(t,e,n){t.removeAttributeNS(e,n)},e.prototype.templateAwareRoot=function(t){return this.isTemplateElement(t)?this.content(t):t},e.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},e.prototype.getDefaultDocument=function(){return document},e.prototype.getBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},e.prototype.getTitle=function(t){return t.title},e.prototype.setTitle=function(t,e){t.title=e||""},e.prototype.elementMatches=function(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))},e.prototype.isTemplateElement=function(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName},e.prototype.isTextNode=function(t){return t.nodeType===Node.TEXT_NODE},e.prototype.isCommentNode=function(t){return t.nodeType===Node.COMMENT_NODE},e.prototype.isElementNode=function(t){return t.nodeType===Node.ELEMENT_NODE},e.prototype.hasShadowRoot=function(t){return null!=t.shadowRoot&&t instanceof HTMLElement},e.prototype.isShadowRoot=function(t){return t instanceof DocumentFragment},e.prototype.importIntoDoc=function(t){return document.importNode(this.templateAwareRoot(t),!0)},e.prototype.adoptNode=function(t){return document.adoptNode(t)},e.prototype.getHref=function(t){return t.getAttribute("href")},e.prototype.getEventKey=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&m.hasOwnProperty(e)&&(e=m[e]))}return y[e]||e},e.prototype.getGlobalEventTarget=function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null},e.prototype.getHistory=function(){return window.history},e.prototype.getLocation=function(){return window.location},e.prototype.getBaseHref=function(t){var e=function(){if(!w&&!(w=document.querySelector("base")))return null;return w.getAttribute("href")}();return null==e?null:function(t){d||(d=document.createElement("a"));return d.setAttribute("href",t),"/"===d.pathname.charAt(0)?d.pathname:"/"+d.pathname}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(e)},e.prototype.resetBaseElement=function(){w=null},e.prototype.getUserAgent=function(){return window.navigator.userAgent},e.prototype.setData=function(t,e,n){this.setAttribute(t,"data-"+e,n)},e.prototype.getData=function(t,e){return this.getAttribute(t,"data-"+e)},e.prototype.getComputedStyle=function(t){return getComputedStyle(t)},e.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},e.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},e.prototype.supportsCookies=function(){return!0},e.prototype.getCookie=function(t){return n.ɵparseCookieValue(document.cookie,t)},e.prototype.setCookie=function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)},e}(f),w=null;
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function b(){return!!window.history.pushState}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var E=function(t){function o(e){var n=t.call(this)||this;return n._doc=e,n._init(),n}return r(o,t),o.prototype._init=function(){this.location=l().getLocation(),this._history=l().getHistory()},o.prototype.getBaseHrefFromDOM=function(){return l().getBaseHref(this._doc)},o.prototype.onPopState=function(t){l().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)},o.prototype.onHashChange=function(t){l().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)},Object.defineProperty(o.prototype,"href",{get:function(){return this.location.href},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"protocol",{get:function(){return this.location.protocol},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hostname",{get:function(){return this.location.hostname},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"port",{get:function(){return this.location.port},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pathname",{get:function(){return this.location.pathname},set:function(t){this.location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),o.prototype.pushState=function(t,e,n){b()?this._history.pushState(t,e,n):this.location.hash=n},o.prototype.replaceState=function(t,e,n){b()?this._history.replaceState(t,e,n):this.location.hash=n},o.prototype.forward=function(){this._history.forward()},o.prototype.back=function(){this._history.back()},o.prototype.getState=function(){return this._history.state},o=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],o)}(n.PlatformLocation),C=new e.InjectionToken("TRANSITION_ID");
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var T=[{provide:e.APP_INITIALIZER,useFactory:function(t,n,o){return function(){o.get(e.ApplicationInitStatus).donePromise.then((function(){var e=l();Array.prototype.slice.apply(e.querySelectorAll(n,"style[ng-transition]")).filter((function(n){return e.getAttribute(n,"ng-transition")===t})).forEach((function(t){return e.remove(t)}))}))}},deps:[C,n.DOCUMENT,e.Injector],multi:!0}],S=function(){function t(){}return t.init=function(){e.setTestabilityGetter(new t)},t.prototype.addToWindow=function(t){e.ɵglobal.getAngularTestability=function(e,n){void 0===n&&(n=!0);var o=t.findTestabilityInTree(e,n);if(null==o)throw new Error("Could not find testability for element.");return o},e.ɵglobal.getAllAngularTestabilities=function(){return t.getAllTestabilities()},e.ɵglobal.getAllAngularRootElements=function(){return t.getAllRootElements()};e.ɵglobal.frameworkStabilizers||(e.ɵglobal.frameworkStabilizers=[]),e.ɵglobal.frameworkStabilizers.push((function(t){var n=e.ɵglobal.getAllAngularTestabilities(),o=n.length,r=!1,i=function(e){r=r||e,0==--o&&t(r)};n.forEach((function(t){t.whenStable(i)}))}))},t.prototype.findTestabilityInTree=function(t,e,n){if(null==e)return null;var o=t.getTestability(e);return null!=o?o:n?l().isShadowRoot(e)?this.findTestabilityInTree(t,l().getHost(e),!0):this.findTestabilityInTree(t,l().parentElement(e),!0):null},t}();
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function _(t,n){"undefined"!=typeof COMPILED&&COMPILED||((e.ɵglobal.ng=e.ɵglobal.ng||{})[t]=n)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var N={ApplicationRef:e.ApplicationRef,NgZone:e.NgZone};function k(t){return e.getDebugNode(t)}var A=[{provide:e.APP_INITIALIZER,useFactory:function(t){return _("probe",k),_("coreTokens",i({},N,(t||[]).reduce((function(t,e){return t[e.name]=e.token,t}),{}))),function(){return k}},deps:[[e.NgProbeToken,new e.Optional]],multi:!0}],I=new e.InjectionToken("EventManagerPlugins"),M=function(){function t(t,e){var n=this;this._zone=e,this._eventNameToPlugin=new Map,t.forEach((function(t){return t.manager=n})),this._plugins=t.slice().reverse()}return t.prototype.addEventListener=function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)},t.prototype.addGlobalEventListener=function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)},t.prototype.getZone=function(){return this._zone},t.prototype._findPluginFor=function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,o=0;o<n.length;o++){var r=n[o];if(r.supports(t))return this._eventNameToPlugin.set(t,r),r}throw new Error("No event manager plugin found for event "+t)},t=a([e.Injectable(),s(0,e.Inject(I)),u("design:paramtypes",[Array,e.NgZone])],t)}(),O=function(){function t(t){this._doc=t}return t.prototype.addGlobalEventListener=function(t,e,n){var o=l().getGlobalEventTarget(this._doc,t);if(!o)throw new Error("Unsupported event target "+o+" for event "+e);return this.addEventListener(o,e,n)},t}(),D=function(){function t(){this._stylesSet=new Set}return t.prototype.addStyles=function(t){var e=this,n=new Set;t.forEach((function(t){e._stylesSet.has(t)||(e._stylesSet.add(t),n.add(t))})),this.onStylesAdded(n)},t.prototype.onStylesAdded=function(t){},t.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},t=a([e.Injectable()],t)}(),P=function(t){function o(e){var n=t.call(this)||this;return n._doc=e,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(e.head),n}return r(o,t),o.prototype._addStylesToHost=function(t,e){var n=this;t.forEach((function(t){var o=n._doc.createElement("style");o.textContent=t,n._styleNodes.add(e.appendChild(o))}))},o.prototype.addHost=function(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)},o.prototype.removeHost=function(t){this._hostNodes.delete(t)},o.prototype.onStylesAdded=function(t){var e=this;this._hostNodes.forEach((function(n){return e._addStylesToHost(t,n)}))},o.prototype.ngOnDestroy=function(){this._styleNodes.forEach((function(t){return l().remove(t)}))},o=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],o)}(D),L={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},x=/%COMP%/g,R="_nghost-%COMP%",j="_ngcontent-%COMP%";function H(t,e,n){for(var o=0;o<e.length;o++){var r=e[o];Array.isArray(r)?H(t,r,n):(r=r.replace(x,t),n.push(r))}return n}function V(t){return function(e){!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}var U=function(){function t(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new B(t)}return t.prototype.createRenderer=function(t,n){if(!t||!n)return this.defaultRenderer;switch(n.encapsulation){case e.ViewEncapsulation.Emulated:var o=this.rendererByCompId.get(n.id);return o||(o=new Z(this.eventManager,this.sharedStylesHost,n,this.appId),this.rendererByCompId.set(n.id,o)),o.applyToHost(t),o;case e.ViewEncapsulation.Native:case e.ViewEncapsulation.ShadowDom:return new G(this.eventManager,this.sharedStylesHost,t,n);default:if(!this.rendererByCompId.has(n.id)){var r=H(n.id,n.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(n.id,this.defaultRenderer)}return this.defaultRenderer}},t.prototype.begin=function(){},t.prototype.end=function(){},t=a([e.Injectable(),s(2,e.Inject(e.APP_ID)),u("design:paramtypes",[M,P,String])],t)}(),B=function(){function t(t){this.eventManager=t,this.data=Object.create(null)}return t.prototype.destroy=function(){},t.prototype.createElement=function(t,e){return e?document.createElementNS(L[e]||e,t):document.createElement(t)},t.prototype.createComment=function(t){return document.createComment(t)},t.prototype.createText=function(t){return document.createTextNode(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.insertBefore=function(t,e,n){t&&t.insertBefore(e,n)},t.prototype.removeChild=function(t,e){t&&t.removeChild(e)},t.prototype.selectRootElement=function(t,e){var n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error('The selector "'+t+'" did not match any elements');return e||(n.textContent=""),n},t.prototype.parentNode=function(t){return t.parentNode},t.prototype.nextSibling=function(t){return t.nextSibling},t.prototype.setAttribute=function(t,e,n,o){if(o){e=o+":"+e;var r=L[o];r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)},t.prototype.removeAttribute=function(t,e,n){if(n){var o=L[n];o?t.removeAttributeNS(o,e):t.removeAttribute(n+":"+e)}else t.removeAttribute(e)},t.prototype.addClass=function(t,e){t.classList.add(e)},t.prototype.removeClass=function(t,e){t.classList.remove(e)},t.prototype.setStyle=function(t,n,o,r){r&e.RendererStyleFlags2.DashCase?t.style.setProperty(n,o,r&e.RendererStyleFlags2.Important?"important":""):t.style[n]=o},t.prototype.removeStyle=function(t,n,o){o&e.RendererStyleFlags2.DashCase?t.style.removeProperty(n):t.style[n]=""},t.prototype.setProperty=function(t,e,n){F(e,"property"),t[e]=n},t.prototype.setValue=function(t,e){t.nodeValue=e},t.prototype.listen=function(t,e,n){return F(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,V(n)):this.eventManager.addEventListener(t,e,V(n))},t}(),z="@".charCodeAt(0);function F(t,e){if(t.charCodeAt(0)===z)throw new Error("Found the synthetic "+e+" "+t+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var Z=function(t){function e(e,n,o,r){var i=t.call(this,e)||this;i.component=o;var a,s=H(r+"-"+o.id,o.styles,[]);return n.addStyles(s),i.contentAttr=(a=r+"-"+o.id,j.replace(x,a)),i.hostAttr=function(t){return R.replace(x,t)}(r+"-"+o.id),i}return r(e,t),e.prototype.applyToHost=function(e){t.prototype.setAttribute.call(this,e,this.hostAttr,"")},e.prototype.createElement=function(e,n){var o=t.prototype.createElement.call(this,e,n);return t.prototype.setAttribute.call(this,o,this.contentAttr,""),o},e}(B),G=function(t){function n(n,o,r,i){var a=t.call(this,n)||this;a.sharedStylesHost=o,a.hostEl=r,a.component=i,i.encapsulation===e.ViewEncapsulation.ShadowDom?a.shadowRoot=r.attachShadow({mode:"open"}):a.shadowRoot=r.createShadowRoot(),a.sharedStylesHost.addHost(a.shadowRoot);for(var s=H(i.id,i.styles,[]),u=0;u<s.length;u++){var c=document.createElement("style");c.textContent=s[u],a.shadowRoot.appendChild(c)}return a}return r(n,t),n.prototype.nodeOrShadowRoot=function(t){return t===this.hostEl?this.shadowRoot:t},n.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},n.prototype.appendChild=function(e,n){return t.prototype.appendChild.call(this,this.nodeOrShadowRoot(e),n)},n.prototype.insertBefore=function(e,n,o){return t.prototype.insertBefore.call(this,this.nodeOrShadowRoot(e),n,o)},n.prototype.removeChild=function(e,n){return t.prototype.removeChild.call(this,this.nodeOrShadowRoot(e),n)},n.prototype.parentNode=function(e){return this.nodeOrShadowRoot(t.prototype.parentNode.call(this,this.nodeOrShadowRoot(e)))},n}(B),K="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},q=K("addEventListener"),J=K("removeEventListener"),W={},$="__zone_symbol__propagationStopped",X=function(){var t="undefined"!=typeof Zone&&Zone[K("BLACK_LISTED_EVENTS")];if(t){var e={};return t.forEach((function(t){e[t]=t})),e}}(),Y=function(t){return!!X&&X.hasOwnProperty(t)},Q=function(t){var e=W[t.type];if(e){var n=this[e];if(n){var o=[t];if(1===n.length)return(a=n[0]).zone!==Zone.current?a.zone.run(a.handler,this,o):a.handler.apply(this,o);for(var r=n.slice(),i=0;i<r.length&&!0!==t[$];i++){var a;(a=r[i]).zone!==Zone.current?a.zone.run(a.handler,this,o):a.handler.apply(this,o)}}}},tt=function(t){function o(e,o,r){var i=t.call(this,e)||this;return i.ngZone=o,r&&n.isPlatformServer(r)||i.patchEvent(),i}return r(o,t),o.prototype.patchEvent=function(){if("undefined"!=typeof Event&&Event&&Event.prototype&&!Event.prototype.__zone_symbol__stopImmediatePropagation){var t=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[$]=!0),t&&t.apply(this,arguments)}}},o.prototype.supports=function(t){return!0},o.prototype.addEventListener=function(t,n,o){var r=this,i=t[q],a=o;if(!i||e.NgZone.isInAngularZone()&&!Y(n))t.addEventListener(n,a,!1);else{var s=W[n];s||(s=W[n]=K("ANGULAR"+n+"FALSE"));var u=t[s],c=u&&u.length>0;u||(u=t[s]=[]);var p=Y(n)?Zone.root:Zone.current;if(0===u.length)u.push({zone:p,handler:a});else{for(var l=!1,d=0;d<u.length;d++)if(u[d].handler===a){l=!0;break}l||u.push({zone:p,handler:a})}c||t[q](n,Q,!1)}return function(){return r.removeEventListener(t,n,a)}},o.prototype.removeEventListener=function(t,e,n){var o=t[J];if(!o)return t.removeEventListener.apply(t,[e,n,!1]);var r=W[e],i=r&&t[r];if(!i)return t.removeEventListener.apply(t,[e,n,!1]);for(var a=!1,s=0;s<i.length;s++)if(i[s].handler===n){a=!0,i.splice(s,1);break}a?0===i.length&&o.apply(t,[e,Q,!1]):t.removeEventListener.apply(t,[e,n,!1])},o=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),s(2,e.Optional()),s(2,e.Inject(e.PLATFORM_ID)),u("design:paramtypes",[Object,e.NgZone,Object])],o)}(O),et={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},nt=new e.InjectionToken("HammerGestureConfig"),ot=new e.InjectionToken("HammerLoader"),rt=function(){function t(){this.events=[],this.overrides={}}return t.prototype.buildHammer=function(t){var e=new Hammer(t,this.options);for(var n in e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0}),this.overrides)e.get(n).set(this.overrides[n]);return e},t=a([e.Injectable()],t)}(),it=function(t){function o(e,n,o,r){var i=t.call(this,e)||this;return i._config=n,i.console=o,i.loader=r,i}return r(o,t),o.prototype.supports=function(t){return!(!et.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t))&&(!(!window.Hammer&&!this.loader)||(this.console.warn('The "'+t+'" event cannot be bound because Hammer.JS is not loaded and no custom loader has been specified.'),!1))},o.prototype.addEventListener=function(t,e,n){var o=this,r=this.manager.getZone();if(e=e.toLowerCase(),!window.Hammer&&this.loader){var i=!1,a=function(){i=!0};return this.loader().then((function(){if(!window.Hammer)return o.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present."),void(a=function(){});i||(a=o.addEventListener(t,e,n))})).catch((function(){o.console.warn('The "'+e+'" event cannot be bound because the custom Hammer.JS loader failed.'),a=function(){}})),function(){a()}}return r.runOutsideAngular((function(){var i=o._config.buildHammer(t),a=function(t){r.runGuarded((function(){n(t)}))};return i.on(e,a),function(){i.off(e,a),"function"==typeof i.destroy&&i.destroy()}}))},o.prototype.isCustomEvent=function(t){return this._config.events.indexOf(t)>-1},o=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),s(1,e.Inject(nt)),s(3,e.Optional()),s(3,e.Inject(ot)),u("design:paramtypes",[Object,rt,e.ɵConsole,Object])],o)}(O),at=["alt","control","meta","shift"],st={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},ut=function(t){function o(e){return t.call(this,e)||this}var i;return r(o,t),i=o,o.prototype.supports=function(t){return null!=i.parseEventName(t)},o.prototype.addEventListener=function(t,e,n){var o=i.parseEventName(e),r=i.eventCallback(o.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular((function(){return l().onAndCancel(t,o.domEventName,r)}))},o.parseEventName=function(t){var e=t.toLowerCase().split("."),n=e.shift();if(0===e.length||"keydown"!==n&&"keyup"!==n)return null;var o=i._normalizeKey(e.pop()),r="";if(at.forEach((function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),r+=t+".")})),r+=o,0!=e.length||0===o.length)return null;var a={};return a.domEventName=n,a.fullKey=r,a},o.getEventFullKey=function(t){var e="",n=l().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),at.forEach((function(o){o!=n&&((0,st[o])(t)&&(e+=o+"."))})),e+=n},o.eventCallback=function(t,e,n){return function(o){i.getEventFullKey(o)===t&&n.runGuarded((function(){return e(o)}))}},o._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},o=i=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],o)}(O),ct=function(){},pt=function(t){function o(e){var n=t.call(this)||this;return n._doc=e,n}return r(o,t),o.prototype.sanitize=function(t,n){if(null==n)return null;switch(t){case e.SecurityContext.NONE:return n;case e.SecurityContext.HTML:return n instanceof dt?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"HTML"),e.ɵ_sanitizeHtml(this._doc,String(n)));case e.SecurityContext.STYLE:return n instanceof ft?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"Style"),e.ɵ_sanitizeStyle(n));case e.SecurityContext.SCRIPT:if(n instanceof ht)return n.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(n,"Script"),new Error("unsafe value used in a script context");case e.SecurityContext.URL:return n instanceof mt||n instanceof yt?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"URL"),e.ɵ_sanitizeUrl(String(n)));case e.SecurityContext.RESOURCE_URL:if(n instanceof mt)return n.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(n,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+t+" (see http://g.co/ng/security#xss)")}},o.prototype.checkNotSafeValue=function(t,e){if(t instanceof lt)throw new Error("Required a safe "+e+", got a "+t.getTypeName()+" (see http://g.co/ng/security#xss)")},o.prototype.bypassSecurityTrustHtml=function(t){return new dt(t)},o.prototype.bypassSecurityTrustStyle=function(t){return new ft(t)},o.prototype.bypassSecurityTrustScript=function(t){return new ht(t)},o.prototype.bypassSecurityTrustUrl=function(t){return new yt(t)},o.prototype.bypassSecurityTrustResourceUrl=function(t){return new mt(t)},o=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],o)}(ct),lt=function(){function t(t){this.changingThisBreaksApplicationSecurity=t}return t.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},t}(),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"HTML"},e}(lt),ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"Style"},e}(lt),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"Script"},e}(lt),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"URL"},e}(lt),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getTypeName=function(){return"ResourceURL"},e}(lt),gt=n.ɵPLATFORM_BROWSER_ID,vt=[{provide:e.PLATFORM_ID,useValue:gt},{provide:e.PLATFORM_INITIALIZER,useValue:function(){v.makeCurrent(),S.init()},multi:!0},{provide:n.PlatformLocation,useClass:E,deps:[n.DOCUMENT]},{provide:n.DOCUMENT,useFactory:function(){return document},deps:[]}],wt=[{provide:e.Sanitizer,useExisting:ct},{provide:ct,useClass:pt,deps:[n.DOCUMENT]}];e.createPlatformFactory(e.platformCore,"browser",vt);var bt=[wt,{provide:e.ɵAPP_ROOT,useValue:!0},{provide:e.ErrorHandler,useFactory:function(){return new e.ErrorHandler},deps:[]},{provide:I,useClass:tt,multi:!0,deps:[n.DOCUMENT,e.NgZone,e.PLATFORM_ID]},{provide:I,useClass:ut,multi:!0,deps:[n.DOCUMENT]},{provide:I,useClass:it,multi:!0,deps:[n.DOCUMENT,nt,e.ɵConsole,[new e.Optional,ot]]},{provide:nt,useClass:rt,deps:[]},{provide:U,useClass:U,deps:[M,P,e.APP_ID]},{provide:e.RendererFactory2,useExisting:U},{provide:D,useExisting:P},{provide:P,useClass:P,deps:[n.DOCUMENT]},{provide:e.Testability,useClass:e.Testability,deps:[e.NgZone]},{provide:M,useClass:M,deps:[I,e.NgZone]},A];!function(){function t(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}var o;o=t,t.withServerTransition=function(t){return{ngModule:o,providers:[{provide:e.APP_ID,useValue:t.appId},{provide:C,useExisting:e.APP_ID},T]}},t=o=a([e.NgModule({providers:bt,exports:[n.CommonModule,e.ApplicationModule]}),s(0,e.Optional()),s(0,e.SkipSelf()),s(0,e.Inject(o)),u("design:paramtypes",[Object])],t)}();function Et(){return new Ct(e.ɵɵinject(n.DOCUMENT))}var Ct=function(){function t(t){this._doc=t,this._dom=l()}return t.prototype.addTag=function(t,e){return void 0===e&&(e=!1),t?this._getOrCreateElement(t,e):null},t.prototype.addTags=function(t,e){var n=this;return void 0===e&&(e=!1),t?t.reduce((function(t,o){return o&&t.push(n._getOrCreateElement(o,e)),t}),[]):[]},t.prototype.getTag=function(t){return t&&this._dom.querySelector(this._doc,"meta["+t+"]")||null},t.prototype.getTags=function(t){if(!t)return[];var e=this._dom.querySelectorAll(this._doc,"meta["+t+"]");return e?[].slice.call(e):[]},t.prototype.updateTag=function(t,e){if(!t)return null;e=e||this._parseSelector(t);var n=this.getTag(e);return n?this._setMetaElementAttributes(t,n):this._getOrCreateElement(t,!0)},t.prototype.removeTag=function(t){this.removeTagElement(this.getTag(t))},t.prototype.removeTagElement=function(t){t&&this._dom.remove(t)},t.prototype._getOrCreateElement=function(t,e){if(void 0===e&&(e=!1),!e){var n=this._parseSelector(t),o=this.getTag(n);if(o&&this._containsAttributes(t,o))return o}var r=this._dom.createElement("meta");this._setMetaElementAttributes(t,r);var i=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(i,r),r},t.prototype._setMetaElementAttributes=function(t,e){var n=this;return Object.keys(t).forEach((function(o){return n._dom.setAttribute(e,o,t[o])})),e},t.prototype._parseSelector=function(t){var e=t.name?"name":"property";return e+'="'+t[e]+'"'},t.prototype._containsAttributes=function(t,e){var n=this;return Object.keys(t).every((function(o){return n._dom.getAttribute(e,o)===t[o]}))},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:Et,token:t,providedIn:"root"}),t=a([e.Injectable({providedIn:"root",useFactory:Et,deps:[]}),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],t)}();function Tt(){return new St(e.ɵɵinject(n.DOCUMENT))}var St=function(){function t(t){this._doc=t}return t.prototype.getTitle=function(){return l().getTitle(this._doc)},t.prototype.setTitle=function(t){l().setTitle(this._doc,t)},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:Tt,token:t,providedIn:"root"}),t=a([e.Injectable({providedIn:"root",useFactory:Tt,deps:[]}),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],t)}(),_t="undefined"!=typeof window&&window||{},Nt=function(t,e){this.msPerTick=t,this.numTicks=e};
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/!function(){function t(t){this.appRef=t.injector.get(e.ApplicationRef)}t.prototype.timeChangeDetection=function(t){var e=t&&t.record,n=null!=_t.console.profile;e&&n&&_t.console.profile("Change Detection");for(var o=l().performanceNow(),r=0;r<5||l().performanceNow()-o<500;)this.appRef.tick(),r++;var i=l().performanceNow();e&&n&&_t.console.profileEnd("Change Detection");var a=(i-o)/r;return _t.console.log("ran "+r+" change detection cycles"),_t.console.log(a.toFixed(2)+" ms per check"),new Nt(a,r)}}();var kt=function(){function t(){this.store={},this.onSerializeCallbacks={}}var n;return n=t,t.init=function(t){var e=new n;return e.store=t,e},t.prototype.get=function(t,e){return void 0!==this.store[t]?this.store[t]:e},t.prototype.set=function(t,e){this.store[t]=e},t.prototype.remove=function(t){delete this.store[t]},t.prototype.hasKey=function(t){return this.store.hasOwnProperty(t)},t.prototype.onSerialize=function(t,e){this.onSerializeCallbacks[t]=e},t.prototype.toJson=function(){for(var t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(t){console.warn("Exception in onSerialize callback: ",t)}return JSON.stringify(this.store)},t=n=a([e.Injectable()],t)}();function At(t,e){var n,o,r=t.getElementById(e+"-state"),i={};if(r&&r.textContent)try{i=JSON.parse((n=r.textContent,o={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"},n.replace(/&[^;]+;/g,(function(t){return o[t]}))))}catch(t){console.warn("Exception while restoring TransferState for app "+e,t)}return kt.init(i)}(function(){function t(){}t=a([e.NgModule({providers:[{provide:kt,useFactory:At,deps:[n.DOCUMENT,e.APP_ID]}]})],t)})(),function(){function t(){}t.all=function(){return function(){return!0}},t.css=function(t){return function(e){return null!=e.nativeElement&&l().elementMatches(e.nativeElement,t)}},t.directive=function(t){return function(e){return-1!==e.providerTokens.indexOf(t)}}}(),new e.Version("8.2.14")
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/;var It=function(){function t(){}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Mt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:e.Component,args:[{selector:"sw-swipe-angular-list",template:"\n <p>\n swipe-angular-list works!\n </p>\n "}]}],t.ctorParameters=function(){return[]},t}(),Ot=function(){function t(){this.swipeObserver=new e.EventEmitter}return t.prototype.closeAll=function(t){this.swipeObserver.emit(t)},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var Dt=function(){function t(t,n){var o=this;this.swService=n,this.alive=!0,this.selfElement=null,this.idElement=null,this.disabledMark=!1,this.showMark=!1,this.itemClass="",this.callback=new e.EventEmitter,this.swClick=new e.EventEmitter,this.random=function(){return(new Date).getTime()},this.swipeleft=function(t){o.swService.closeAll(o.selfElement.id),o.disabledMark||(o.result=t.deltaX<0)},this.clickItem=function(t){return o.swClick.emit(t)},this.action=function(t){void 0===t&&(t="");try{o.result=!1;var e=o.inside.id;"edit"===t?o.callback.emit({action:"edit",value:e}):"trash"===t&&o.callback.emit({action:"trash",value:e})}catch(t){console.error("Debes definir ID de edit, y trash")}},this.render=function(){if(console.log("INIT"),o.showMark){if(o.inside.mark&&!o.markTemplate){var t=o.defaultMark.createEmbeddedView(null);o.viewContainerMark.insert(t)}else if(o.inside.mark&&o.markTemplate){t=o.markTemplate.createEmbeddedView(null);o.viewContainerMark.insert(t)}if(o.inside.mark||o.notMarkTemplate){if(!o.inside.mark&&o.notMarkTemplate){t=o.notMarkTemplate.createEmbeddedView(null);o.viewContainerMark.insert(t)}}else{var t=o.defaultNotMark.createEmbeddedView(null);o.viewContainerMark.insert(t)}}if(o.editTemplate){var e=o.editTemplate.createEmbeddedView(null);o.viewContainerEdit&&o.viewContainerEdit.insert(e)}else if(null!==o.editTemplate){e=o.defaultEdit.createEmbeddedView(null);o.viewContainerEdit.insert(e)}if(o.trashTemplate){var n=o.trashTemplate.createEmbeddedView(null);o.viewContainerTrash&&o.viewContainerTrash.insert(n)}else if(null!==o.trashTemplate){n=o.defaultTrash.createEmbeddedView(null);o.viewContainerTrash.insert(n)}setTimeout((function(){if(o.customTemplate){var t=i({},o.inside,{touch:o.selfElement.id});(e=o.customTemplate.createEmbeddedView({item:t,id:o.selfElement.id}))&&o.viewContainerCustom.insert(e)}else{var e=o.defaultCustom.createEmbeddedView(null);o.viewContainerCustom.insert(e)}}),10)},this.selfElement=t.nativeElement,this.idElement="list-swipe-"+this.random(),this.selfElement.setAttribute("data-id",this.idElement),this.selfElement.id=this.idElement,this.swService.swipeObserver.subscribe((function(t){t!==o.selfElement.id&&(o.result=!1)}))}return t.prototype.clickOut=function(t){this.selfElement.contains(t.target)||(this.result=!1)},t.prototype.ngAfterViewInit=function(){this.render()},t.prototype.ngOnInit=function(){},t.decorators=[{type:e.Component,args:[{selector:"sw-item-list",template:'<div class="{{itemClass}}" (swipeleft)="swipeleft($event)" (swipe)="swipeleft($event)" >\n <ng-template #defaultEdit>\n edit\n </ng-template>\n <ng-template #defaultTrash>\n trash\n </ng-template>\n <ng-template #defaultMark>\n <div class="yes-marker"></div>\n </ng-template>\n <ng-template #defaultNotMark>\n <div class="not-marker"></div>\n </ng-template>\n\n <ng-template #defaultCustom>\n <div data-id="{{idElement}}" class="text truncate">{{inside?.title}}</div>\n <div data-id="{{idElement}}" class="small truncate">{{inside?.subTitle}}</div>\n </ng-template>\n\n\n <div [ngClass]="{\'active\':(result)}" data-id="{{idElement}}"\n class=" options-btn swipe-d-flex justify-content-between">\n <div (click)="action(\'edit\')" class="option-list" *ngIf="editTemplate !== null">\n <ng-template let-show="show" #viewContainerEdit></ng-template>\n </div>\n <div (click)="action(\'trash\')" class="option-list" *ngIf="trashTemplate !== null">\n <ng-template let-show="show" #viewContainerTrash></ng-template>\n </div>\n </div>\n <div [ngClass]="{\'left-swipe\':(result)}" data-id="{{idElement}}" class="list-swipe swipe-d-flex">\n\n <div *ngIf="showMark" class="swipe-w-10">\n <ng-container #viewContainerMark></ng-container>\n </div>\n\n <div (click)="clickItem($event)" [ngClass]="{\'swipe-w-90\':showMark, \'swipe-w-100\':!showMark}">\n <div *ngIf="customTemplate" data-id="{{idElement}}">\n <ng-template #viewContainerCustom>\n </ng-template>\n </div>\n\n <div *ngIf="!customTemplate">\n <ng-template #viewContainerCustom></ng-template>\n </div>\n\n </div>\n <div class="mark"></div>\n </div>\n</div>\n',styles:[":host{display:block;font-family:Arial,serif}.not-marker{background:red;width:1rem;height:1rem;border-radius:3rem}.yes-marker{background:green;width:1rem;height:1rem;border-radius:3rem}.swipe-d-flex{display:flex}.swipe-w-10{width:10%}.swipe-w-100{width:100%}.swipe-w-90{width:90%}.options-btn.active{display:flex;transform:translate(66vw,0)}.list-swipe{box-shadow:0 5px 7px rgba(181,181,181,.18);border-radius:.25em;padding:.75em;font-weight:500;font-size:16px;line-height:19px;z-index:9;margin:.75rem 0;transition:50ms ease-out}.left-swipe{transform:translate(-29vw,0);transition:50ms ease-out;box-shadow:6px 0 7px rgba(181,181,181,.31)}.options-btn{position:absolute;display:none;transform:translate(100vw,0);padding:.5rem 0;width:28vw}.list-swipe .text{color:#313131}.list-swipe .small{font-weight:500;font-size:16px;line-height:19px;color:#9b9b9b;padding:1rem 0 0}.list-swipe .mark{background:#fff;height:2rem;margin-top:.75rem;margin-right:-.3rem;border-right:.175rem solid #f96060}.option-list{width:100%;min-height:3.75rem;line-height:3.75rem;border-right:1px solid rgba(0,0,0,.1);text-align:center}.option-list:last-child{border-right:0}.truncate{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:Ot}]},t.propDecorators={inside:[{type:e.Input}],disabledMark:[{type:e.Input,args:["disable-mark"]}],showMark:[{type:e.Input,args:["show-mark"]}],itemClass:[{type:e.Input,args:["item-class"]}],defaultEdit:[{type:e.ViewChild,args:["defaultEdit"]}],defaultTrash:[{type:e.ViewChild,args:["defaultTrash"]}],defaultMark:[{type:e.ViewChild,args:["defaultMark"]}],defaultNotMark:[{type:e.ViewChild,args:["defaultNotMark"]}],defaultCustom:[{type:e.ViewChild,args:["defaultCustom"]}],customTemplate:[{type:e.Input,args:["customTemplate"]}],editTemplate:[{type:e.Input,args:["editTemplate"]}],trashTemplate:[{type:e.Input,args:["trashTemplate"]}],markTemplate:[{type:e.Input,args:["markTemplate"]}],notMarkTemplate:[{type:e.Input,args:["notMarkTemplate"]}],callback:[{type:e.Output}],swClick:[{type:e.Output}],viewContainerEdit:[{type:e.ViewChild,args:["viewContainerEdit",{static:!1,read:e.ViewContainerRef}]}],viewContainerTrash:[{type:e.ViewChild,args:["viewContainerTrash",{static:!1,read:e.ViewContainerRef}]}],viewContainerMark:[{type:e.ViewChild,args:["viewContainerMark",{static:!1,read:e.ViewContainerRef}]}],viewContainerCustom:[{type:e.ViewChild,args:["viewContainerCustom",{static:!1,read:e.ViewContainerRef}]}],clickOut:[{type:e.HostListener,args:["document:click",["$event"]]}]},t}();var Pt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.overrides={pinch:{enable:!1},rotate:{enable:!1}},e}return r(e,t),e}(rt);var Lt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[Mt,Dt],imports:[n.CommonModule],providers:[{provide:nt,useClass:Pt}],exports:[Mt,Dt]}]}],t}();t.HammerConfig=Pt,t.SwipeAngularListComponent=Mt,t.SwipeAngularListModule=Lt,t.SwipeAngularListService=It,t.ɵa=Dt,t.ɵb=Ot,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=swipe-angular-list.umd.min.js.map