| ***************************************************************************** */var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):function e(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(s,u)}c((r=r.apply(t,e||[])).next())}))}function o(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function c(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function i(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var c,a=new e.BehaviorSubject({isDisabled:!1});function l(t){var e;null===(e=t.onDetectChangesNow)||void 0===e||e.call(t)}function f(t){h(),c=a.subscribe(t)}function h(){null==c||c.unsubscribe(),c=null}function p(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return a.getValue().isDisabled?[4,t()]:[3,2];case 1:return[2,n.sent()];case 2:return c||f(l),e?[4,new Promise((function(t){return a.next({isDisabled:!0,onDetectChangesNow:t})}))]:[3,9];case 3:n.sent(),n.label=4;case 4:return n.trys.push([4,,6,8]),[4,t()];case 5:return[2,n.sent()];case 6:return[4,new Promise((function(t){return a.next({isDisabled:!1,onDetectChangesNow:t})}))];case 7:return n.sent(),[7];case 8:return[3,13];case 9:a.next({isDisabled:!0}),n.label=10;case 10:return n.trys.push([10,,12,13]),[4,t()];case 11:return[2,n.sent()];case 12:return a.next({isDisabled:!1}),[7];case 13:return[2]}}))}))}function d(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,p((function(){return Promise.all(t())}),!0)]}))}))}var v=function(){function t(t){this.locatorFactory=t}return t.prototype.host=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.rootElement]}))}))},t.prototype.documentRootLocatorFactory=function(){return this.locatorFactory.documentRootLocatorFactory()},t.prototype.locatorFor=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.locatorFactory).locatorFor.apply(t,u(e))},t.prototype.locatorForOptional=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.locatorFactory).locatorForOptional.apply(t,u(e))},t.prototype.locatorForAll=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.locatorFactory).locatorForAll.apply(t,u(e))},t.prototype.forceStabilize=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.forceStabilize()]}))}))},t.prototype.waitForTasksOutsideAngular=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.waitForTasksOutsideAngular()]}))}))},t}(),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.getChildLoader=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getChildLoader(t)]}}))}))},e.prototype.getAllChildLoaders=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getAllChildLoaders(t)]}}))}))},e.prototype.getHarness=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getHarness(t)]}}))}))},e.prototype.getAllHarnesses=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.getRootHarnessLoader()];case 1:return[2,e.sent().getAllHarnesses(t)]}}))}))},e.prototype.getRootHarnessLoader=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.locatorFactory.rootHarnessLoader()]}))}))},e}(v),g=function(){function t(t,e){this.harnessType=t,this._predicates=[],this._descriptions=[],this._addBaseOptions(e)}return t.stringMatches=function(t,e){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,t];case 1:return t=n.sent(),null===e?[2,null===t]:null===t?[2,!1]:[2,"string"==typeof e?t===e:e.test(t)]}}))}))},t.prototype.add=function(t,e){return this._descriptions.push(t),this._predicates.push(e),this},t.prototype.addOption=function(t,e,n){return void 0!==e&&this.add(t+" = "+function r(t){if(void 0===t)return"undefined";try{return JSON.stringify(t,(function(t,e){return e instanceof RegExp?"/"+e.toString()+"/":"string"==typeof e?e.replace("///g","\\/"):e})).replace(/"\/\//g,"\\/").replace(/\/\/"/g,"\\/").replace(/\\\//g,"/")}catch(t){return"{...}"}}(e),(function(t){return n(t,e)})),this},t.prototype.filter=function(t){return r(this,void 0,void 0,(function(){var e,n=this;return o(this,(function(r){switch(r.label){case 0:return 0===t.length?[2,[]]:[4,d((function(){return t.map((function(t){return n.evaluate(t)}))}))];case 1:return e=r.sent(),[2,t.filter((function(t,n){return e[n]}))]}}))}))},t.prototype.evaluate=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,d((function(){return e._predicates.map((function(e){return e(t)}))}))];case 1:return[2,n.sent().reduce((function(t,e){return t&&e}),!0)]}}))}))},t.prototype.getDescription=function(){return this._descriptions.join(", ")},t.prototype.getSelector=function(){if(!this._ancestor)return(this.harnessType.hostSelector||"").trim();var t=s(m(this._ancestor),2),e=t[0],n=t[1],r=s(m(this.harnessType.hostSelector||""),2),o=r[0],i=r[1],u=[];return e.forEach((function(t){var e=E(t,n);return o.forEach((function(t){return u.push(e+" "+E(t,i))}))})),u.join(", ")},t.prototype._addBaseOptions=function(t){var e=this;this._ancestor=t.ancestor||"",this._ancestor&&this._descriptions.push('has ancestor matching selector "'+this._ancestor+'"');var n=t.selector;void 0!==n&&this.add('host matches selector "'+n+'"',(function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,t.host()];case 1:return[2,e.sent().matchesSelector(n)]}}))}))}))},t}();function m(t){var e=[];return[t.replace(/(["'][^["']*["'])/g,(function(t,n){var r="__cdkPlaceholder-"+e.length+"__";return e.push(n),r})).split(",").map((function(t){return t.trim()})),e]}function E(t,e){return t.replace(/__cdkPlaceholder-(\d+)__/g,(function(t,n){return e[+n]}))}var b,w=function(){function t(t){this.rawRootElement=t,this.rootElement=this.createTestElement(t)}return t.prototype.documentRootLocatorFactory=function(){return this.createEnvironment(this.getDocumentRoot())},t.prototype.locatorFor=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){return A(t._getAllHarnessesAndTestElements(e),_(e))}},t.prototype.locatorForOptional=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){return r(t,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this._getAllHarnessesAndTestElements(e)];case 1:return[2,t.sent()[0]||null]}}))}))}},t.prototype.locatorForAll=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(){return t._getAllHarnessesAndTestElements(e)}},t.prototype.rootHarnessLoader=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this]}))}))},t.prototype.harnessLoaderFor=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=this.createEnvironment,[4,A(this.getAllRawElements(t),[R(t)])];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},t.prototype.harnessLoaderForOptional=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getAllRawElements(t)];case 1:return[2,(e=n.sent())[0]?this.createEnvironment(e[0]):null]}}))}))},t.prototype.harnessLoaderForAll=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,this.getAllRawElements(t)];case 1:return[2,n.sent().map((function(t){return e.createEnvironment(t)}))]}}))}))},t.prototype.getHarness=function(t){return this.locatorFor(t)()},t.prototype.getAllHarnesses=function(t){return this.locatorForAll(t)()},t.prototype.getChildLoader=function(t){return r(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=this.createEnvironment,[4,A(this.getAllRawElements(t),[R(t)])];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},t.prototype.getAllChildLoaders=function(t){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,this.getAllRawElements(t)];case 1:return[2,n.sent().map((function(t){return e.createEnvironment(t)}))]}}))}))},t.prototype.createComponentHarness=function(t,e){return new t(this.createEnvironment(e))},t.prototype._getAllHarnessesAndTestElements=function(t){return r(this,void 0,void 0,(function(){var e,n,s,c,a,l,f,h,p=this;return o(this,(function(v){switch(v.label){case 0:return e=function y(t){var e,n,r=[],o=[],s=[],u=new Set;try{for(var c=i(t),a=c.next();!a.done;a=c.next()){var l=a.value;if("string"==typeof l)r.push(l),s.push(l);else{var f=l instanceof g?l:new g(l,{});r.push(f),o.push(f),u.add(f.harnessType)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}return{allQueries:r,harnessQueries:o,elementQueries:s,harnessTypes:u}}(t),n=e.allQueries,a=e.harnessTypes,[4,this.getAllRawElements(u(c=e.elementQueries,(s=e.harnessQueries).map((function(t){return t.getSelector()}))).join(","))];case 1:return l=v.sent(),f=0===c.length&&1===a.size||0===s.length,[4,d((function(){return l.map((function(t){return r(p,void 0,void 0,(function(){var e,r=this;return o(this,(function(o){switch(o.label){case 0:return e=this.createTestElement(t),[4,d((function(){return n.map((function(n){return r._getQueryResultForElement(n,t,e,f)}))}))];case 1:return[2,F(o.sent())]}}))}))}))}))];case 2:return h=v.sent(),[2,[].concat.apply([],u(h))]}}))}))},t.prototype._getQueryResultForElement=function(t,e,n,i){return void 0===i&&(i=!1),r(this,void 0,void 0,(function(){var r,s,u;return o(this,(function(o){switch(o.label){case 0:return"string"!=typeof t?[3,3]:(r=i)?[3,2]:[4,n.matchesSelector(t)];case 1:r=o.sent(),o.label=2;case 2:return[2,r?n:null];case 3:return(s=i)?[3,5]:[4,n.matchesSelector(t.getSelector())];case 4:s=o.sent(),o.label=5;case 5:return s?(u=this.createComponentHarness(t.harnessType,e),[4,t.evaluate(u)]):[3,7];case 6:return[2,o.sent()?u:null];case 7:return[2,null]}}))}))},t}();function F(t){return r(this,void 0,void 0,(function(){var e,n,r,s,u,c,a,l;return o(this,(function(o){e=!1,n=new Set,r=[];try{for(s=i(t),u=s.next();!u.done;u=s.next())(c=u.value)&&(c instanceof v?n.has(c.constructor)||(n.add(c.constructor),r.push(c)):e||(e=!0,r.push(c)))}catch(t){a={error:t}}finally{try{u&&!u.done&&(l=s.return)&&l.call(s)}finally{if(a)throw a.error}}return[2,r]}))}))}function A(t,e){return r(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,t];case 1:if(null==(n=r.sent()[0]))throw Error("Failed to find element matching one of the following queries:\n"+e.map((function(t){return"("+t+")"})).join(",\n"));return[2,n]}}))}))}function _(t){return t.map((function(t){return"string"==typeof t?function e(t){return'TestElement for element matching selector: "'+t+'"'}(t):function n(t){var e=t instanceof g?t:new g(t,{}),n=e.harnessType;return n.name+' with host element matching selector: "'+n.hostSelector+'"'+(e.getDescription()?" satisfying the constraints: "+e.getDescription():"")}(t)}))}function R(t){return'HarnessLoader for element matching selector: "'+t+'"'} |