!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-bootstrap/utils",["exports","@angular/core"],e):e(((t=t||self)["ngx-bootstrap"]=t["ngx-bootstrap"]||{},t["ngx-bootstrap"].utils={}),t.ng.core)}(this,function(t,e){"use strict";var n=function(){function t(t,e){this.open=t,this.close=e||t}return t.prototype.isManual=function(){return"manual"===this.open||"manual"===this.close},t}(),r={hover:["mouseover","mouseout"],focus:["focusin","focusout"]};function i(t,e){void 0===e&&(e=r);var i=(t||"").trim();if(0===i.length)return[];var o=i.split(/\s+/).map(function(t){return t.split(":")}).map(function(t){var r=e[t[0]]||t;return new n(r[0],r[1])}),s=o.filter(function(t){return t.isManual()});if(s.length>1)throw new Error("Triggers parse error: only one manual trigger is allowed");if(1===s.length&&o.length>1)throw new Error("Triggers parse error: manual trigger can't be mixed with other triggers");return o} /** * @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 o,s="undefined"!=typeof window&&window||{},u=s.document;s.location,s.gc,s.performance&&s.performance,s.Event,s.MouseEvent,s.KeyboardEvent,s.EventTarget,s.History,s.Location,s.EventListener;var a=function(){function t(){this.length=0,this.asArray=[]}return t.prototype.get=function(t){if(!(0===this.length||t<0||t>=this.length)){for(var e=this.head,n=0;nthis.length)throw new Error("Position is out of the list");var n={value:t,next:void 0,previous:void 0};if(0===this.length)this.head=n,this.tail=n,this.current=n;else if(0===e)n.next=this.head,this.head.previous=n,this.head=n;else if(e===this.length)this.tail.next=n,n.previous=this.tail,this.tail=n;else{var r=this.getNode(e-1),i=r.next;r.next=n,i.previous=n,n.previous=r,n.next=i}this.length++,this.createInternalArrayRepresentation()},t.prototype.remove=function(t){if(void 0===t&&(t=0),0===this.length||t<0||t>=this.length)throw new Error("Position is out of the list");if(0===t)this.head=this.head.next,this.head?this.head.previous=void 0:this.tail=void 0;else if(t===this.length-1)this.tail=this.tail.previous,this.tail.next=void 0;else{var e=this.getNode(t);e.next.previous=e.previous,e.previous.next=e.next}this.length--,this.createInternalArrayRepresentation()},t.prototype.set=function(t,e){if(0===this.length||t<0||t>=this.length)throw new Error("Position is out of the list");this.getNode(t).value=e,this.createInternalArrayRepresentation()},t.prototype.toArray=function(){return this.asArray},t.prototype.findAll=function(t){for(var e=this.head,n=[],r=0;r=this.length)throw new Error("Position is out of the list");for(var e=this.head,n=0;n