Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

2 lignes
34 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2255],{62255:function(F,B){"use strict";var l={Identity:function(t){return t},True:function(){return!0},Blank:function(){}},m={Boolean:"boolean",Number:"number",String:"string",Object:typeof{},Undefined:"undefined",Function:"function"},L={"":l.Identity},a={createLambda:function(t){if(t==null)return l.Identity;if(typeof t===m.String){let n=L[t];if(n!=null)return n;if(t.indexOf("=>")===-1){const e=new RegExp("[$]+","g");let r=0,i;for(;(i=e.exec(t))!=null;)i[0].length>r&&(r=i[0].length);const o=[];for(let c=1;c<=r;c++){let p="";for(let h=0;h<c;h++)p+="$";o.push(p)}const f=o.join(",");return n=new Function(f,"return "+t),L[t]=n,n}else{const e=t.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/);return n=new Function(e[1],e[2].match(/\breturn\b/)?e[2]:"return "+e[2]),L[t]=n,n}}return t},defineProperty:function(t,n,e){Object.defineProperty(t,n,{enumerable:!1,configurable:!0,writable:!0,value:e})},compare:function(t,n){return t===n?0:t>n?1:-1},dispose:function(t){t!=null&&t.dispose()},hasNativeIteratorSupport:function(){return typeof Symbol!="undefined"&&typeof Symbol.iterator!="undefined"}},w={Before:0,Running:1,After:2},s=function(t,n,e){var r=new A,i=w.Before;this.current=r.current,this.moveNext=function(){try{switch(i){case w.Before:i=w.Running,t();case w.Running:return n.apply(r)?!0:(this.dispose(),!1);case w.After:return!1}}catch(o){throw this.dispose(),o}},this.dispose=function(){if(i==w.Running)try{e()}finally{i=w.After}}},A=function(){var t=null;this.current=function(){return t},this.yieldReturn=function(n){return t=n,!0},this.yieldBreak=function(){return!1}},u=function(t){this.getEnumerator=t};u.Utils={},u.Utils.createLambda=function(t){return a.createLambda(t)},u.Utils.createEnumerable=function(t){return new u(t)},u.Utils.createEnumerator=function(t,n,e){return new s(t,n,e)},u.Utils.extendTo=function(t){var n=t.prototype,e;t===Array?(e=d.prototype,a.defineProperty(n,"getSource",function(){return this})):(e=u.prototype,a.defineProperty(n,"getEnumerator",function(){return u.from(this).getEnumerator()}));for(let r in e){const i=e[r];n[r]!=i&&(n[r]!=null&&(r=r+"ByLinq",n[r]==i)||i instanceof Function&&a.defineProperty(n,r,i))}},u.Utils.recallFrom=function(t){var n=t.prototype,e;t===Array?(e=d.prototype,delete n.getSource):(e=u.prototype,delete n.getEnumerator);for(const r in e){const i=e[r];n[r+"ByLinq"]?delete n[r+"ByLinq"]:n[r]==i&&i instanceof Function&&delete n[r]}},u.choice=function(){var t=arguments;return new u(function(){return new s(function(){t=t[0]instanceof Array?t[0]:t[0].getEnumerator!=null?t[0].toArray():t},function(){return this.yieldReturn(t[Math.floor(Math.random()*t.length)])},l.Blank)})},u.cycle=function(){var t=arguments;return new u(function(){var n=0;return new s(function(){t=t[0]instanceof Array?t[0]:t[0].getEnumerator!=null?t[0].toArray():t},function(){return n>=t.length&&(n=0),this.yieldReturn(t[n++])},l.Blank)})},u.empty=function(){return new u(function(){return new s(l.Blank,function(){return!1},l.Blank)})},u.from=function(t){if(t==null)return u.empty();if(t instanceof u)return t;if(typeof t==m.Number||typeof t==m.Boolean)return u.repeat(t,1);if(typeof t==m.String)return new u(function(){var n=0;return new s(l.Blank,function(){return n<t.length?this.yieldReturn(t.charAt(n++)):!1},l.Blank)});if(typeof t!=m.Function){if(typeof t.length==m.Number)return new d(t);if(typeof Symbol!="undefined"&&typeof t[Symbol.iterator]!="undefined")return new u(function(){return new s(l.Blank,function(){var n=t.next();return n.done?!1:this.yieldReturn(n.value)},l.Blank)})}return new u(function(){var n=[],e=0;return new s(function(){for(const r in t){const i=t[r];!(i instanceof Function)&&Object.prototype.hasOwnProperty.call(t,r)&&n.push({key:r,value:i})}},function(){return e<n.length?this.yieldReturn(n[e++]):!1},l.Blank)})},u.make=function(t){return u.repeat(t,1)},u.matches=function(t,n,e){return e==null&&(e=""),n instanceof RegExp&&(e+=n.ignoreCase?"i":"",e+=n.multiline?"m":"",n=n.source),e.indexOf("g")===-1&&(e+="g"),new u(function(){var r;return new s(function(){r=new RegExp(n,e)},function(){var i=r.exec(t);return i?this.yieldReturn(i):!1},l.Blank)})},u.range=function(t,n,e){return e==null&&(e=1),new u(function(){var r,i=0;return new s(function(){r=t-e},function(){return i++<n?this.yieldReturn(r+=e):this.yieldBreak()},l.Blank)})},u.rangeDown=function(t,n,e){return e==null&&(e=1),new u(function(){var r,i=0;return new s(function(){r=t+e},function(){return i++<n?this.yieldReturn(r-=e):this.yieldBreak()},l.Blank)})},u.rangeTo=function(t,n,e){return e==null&&(e=1),t<n?new u(function(){var r;return new s(function(){r=t-e},function(){var i=r+=e;return i<=n?this.yieldReturn(i):this.yieldBreak()},l.Blank)}):new u(function(){var r;return new s(function(){r=t+e},function(){var i=r-=e;return i>=n?this.yieldReturn(i):this.yieldBreak()},l.Blank)})},u.repeat=function(t,n){return n!=null?u.repeat(t).take(n):new u(function(){return new s(l.Blank,function(){return this.yieldReturn(t)},l.Blank)})},u.repeatWithFinalize=function(t,n){return t=a.createLambda(t),n=a.createLambda(n),new u(function(){var e;return new s(function(){e=t()},function(){return this.yieldReturn(e)},function(){e!=null&&(n(e),e=null)})})},u.generate=function(t,n){return n!=null?u.generate(t).take(n):(t=a.createLambda(t),new u(function(){return new s(l.Blank,function(){return this.yieldReturn(t())},l.Blank)}))},u.toInfinity=function(t,n){return t==null&&(t=0),n==null&&(n=1),new u(function(){var e;return new s(function(){e=t-n},function(){return this.yieldReturn(e+=n)},l.Blank)})},u.toNegativeInfinity=function(t,n){return t==null&&(t=0),n==null&&(n=1),new u(function(){var e;return new s(function(){e=t+n},function(){return this.yieldReturn(e-=n)},l.Blank)})},u.unfold=function(t,n){return n=a.createLambda(n),new u(function(){var e=!0,r;return new s(l.Blank,function(){return e?(e=!1,r=t,this.yieldReturn(r)):(r=n(r),this.yieldReturn(r))},l.Blank)})},u.defer=function(t){return new u(function(){var n;return new s(function(){n=u.from(t()).getEnumerator()},function(){return n.moveNext()?this.yieldReturn(n.current()):this.yieldBreak()},function(){a.dispose(n)})})},u.prototype.traverseBreadthFirst=function(t,n){var e=this;return t=a.createLambda(t),n=a.createLambda(n),new u(function(){var r,i=0,o=[];return new s(function(){r=e.getEnumerator()},function(){for(;;){if(r.moveNext())return o.push(r.current()),this.yieldReturn(n(r.current(),i));const f=u.from(o).selectMany(function(c){return t(c)});if(f.any())i++,o=[],a.dispose(r),r=f.getEnumerator();else return!1}},function(){a.dispose(r)})})},u.prototype.traverseDepthFirst=function(t,n){var e=this;return t=a.createLambda(t),n=a.createLambda(n),new u(function(){var r=[],i;return new s(function(){i=e.getEnumerator()},function(){for(;;){if(i.moveNext()){const o=n(i.current(),r.length);return r.push(i),i=u.from(t(i.current())).getEnumerator(),this.yieldReturn(o)}if(r.length<=0)return!1;a.dispose(i),i=r.pop()}},function(){try{a.dispose(i)}finally{u.from(r).forEach(function(o){o.dispose()})}})})},u.prototype.flatten=function(){var t=this;return new u(function(){var n,e=null;return new s(function(){n=t.getEnumerator()},function(){for(;;){if(e!=null){if(e.moveNext())return this.yieldReturn(e.current());e=null}if(n.moveNext())if(n.current()instanceof Array){a.dispose(e),e=u.from(n.current()).selectMany(l.Identity).flatten().getEnumerator();continue}else return this.yieldReturn(n.current());return!1}},function(){try{a.dispose(n)}finally{a.dispose(e)}})})},u.prototype.pairwise=function(t){var n=this;return t=a.createLambda(t),new u(function(){var e;return new s(function(){e=n.getEnumerator(),e.moveNext()},function(){var r=e.current();return e.moveNext()?this.yieldReturn(t(r,e.current())):!1},function(){a.dispose(e)})})},u.prototype.scan=function(t,n){var e;n==null?(n=a.createLambda(t),e=!1):(n=a.createLambda(n),e=!0);var r=this;return new u(function(){var i,o,f=!0;return new s(function(){i=r.getEnumerator()},function(){if(f){if(f=!1,e)return this.yieldReturn(o=t);if(i.moveNext())return this.yieldReturn(o=i.current())}return i.moveNext()?this.yieldReturn(o=n(o,i.current())):!1},function(){a.dispose(i)})})},u.prototype.select=function(t){if(t=a.createLambda(t),t.length<=1)return new b(this,null,t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?this.yieldReturn(t(e.current(),r++)):!1},function(){a.dispose(e)})})},u.prototype.selectMany=function(t,n){var e=this;return t=a.createLambda(t),n==null&&(n=function(r,i){return i}),n=a.createLambda(n),new u(function(){var r,i=void 0,o=0;return new s(function(){r=e.getEnumerator()},function(){if(i===void 0&&!r.moveNext())return!1;do{if(i==null){const f=t(r.current(),o++);i=u.from(f).getEnumerator()}if(i.moveNext())return this.yieldReturn(n(r.current(),i.current()));a.dispose(i),i=null}while(r.moveNext());return!1},function(){try{a.dispose(r)}finally{a.dispose(i)}})})},u.prototype.where=function(t){if(t=a.createLambda(t),t.length<=1)return new E(this,t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();)if(t(e.current(),r++))return this.yieldReturn(e.current());return!1},function(){a.dispose(e)})})},u.prototype.choose=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();){const i=t(e.current(),r++);if(i!=null)return this.yieldReturn(i)}return this.yieldBreak()},function(){a.dispose(e)})})},u.prototype.ofType=function(t){var n;switch(t){case Number:n=m.Number;break;case String:n=m.String;break;case Boolean:n=m.Boolean;break;case Function:n=m.Function;break;default:n=null;break}return n===null?this.where(function(e){return e instanceof t}):this.where(function(e){return typeof e===n})},u.prototype.zip=function(){var t=arguments,n=a.createLambda(arguments[arguments.length-1]),e=this;if(arguments.length==2){const r=arguments[0];return new u(function(){var i,o,f=0;return new s(function(){i=e.getEnumerator(),o=u.from(r).getEnumerator()},function(){return i.moveNext()&&o.moveNext()?this.yieldReturn(n(i.current(),o.current(),f++)):!1},function(){try{a.dispose(i)}finally{a.dispose(o)}})})}else return new u(function(){var r,i=0;return new s(function(){var o=u.make(e).concat(u.from(t).takeExceptLast().select(u.from)).select(function(f){return f.getEnumerator()}).toArray();r=u.from(o)},function(){if(r.all(function(o){return o.moveNext()})){const o=r.select(function(f){return f.current()}).toArray();return o.push(i++),this.yieldReturn(n.apply(null,o))}else return this.yieldBreak()},function(){u.from(r).forEach(a.dispose)})})},u.prototype.merge=function(){var t=arguments,n=this;return new u(function(){var e,r=-1;return new s(function(){e=u.make(n).concat(u.from(t).select(u.from)).select(function(i){return i.getEnumerator()}).toArray()},function(){for(;e.length>0;){r=r>=e.length-1?0:r+1;const i=e[r];if(i.moveNext())return this.yieldReturn(i.current());i.dispose(),e.splice(r--,1)}return this.yieldBreak()},function(){u.from(e).forEach(a.dispose)})})},u.prototype.join=function(t,n,e,r,i){n=a.createLambda(n),e=a.createLambda(e),r=a.createLambda(r),i=a.createLambda(i);var o=this;return new u(function(){var f,c,p=null,h=0;return new s(function(){f=o.getEnumerator(),c=u.from(t).toLookup(e,l.Identity,i)},function(){for(;;){if(p!=null){let v=p[h++];if(v!==void 0)return this.yieldReturn(r(f.current(),v));v=null,h=0}if(f.moveNext()){const v=n(f.current());p=c.get(v).toArray()}else return!1}},function(){a.dispose(f)})})},u.prototype.leftJoin=function(t,n,e,r,i){n=a.createLambda(n),e=a.createLambda(e),r=a.createLambda(r),i=a.createLambda(i);var o=this;return new u(function(){var f,c,p=null,h=0;return new s(function(){f=o.getEnumerator(),c=u.from(t).toLookup(e,l.Identity,i)},function(){for(;;){if(p!=null){let v=p[h++];if(v!==void 0)return this.yieldReturn(r(f.current(),v));v=null,h=0}if(f.moveNext()){const v=n(f.current());if(p=c.get(v).toArray(),p==null||p.length==0)return this.yieldReturn(r(f.current(),null))}else return!1}},function(){a.dispose(f)})})},u.prototype.groupJoin=function(t,n,e,r,i){n=a.createLambda(n),e=a.createLambda(e),r=a.createLambda(r),i=a.createLambda(i);var o=this;return new u(function(){var f=o.getEnumerator(),c=null;return new s(function(){f=o.getEnumerator(),c=u.from(t).toLookup(e,l.Identity,i)},function(){if(f.moveNext()){const p=c.get(n(f.current()));return this.yieldReturn(r(f.current(),p))}return!1},function(){a.dispose(f)})})},u.prototype.all=function(t){t=a.createLambda(t);var n=!0;return this.forEach(function(e){if(!t(e))return n=!1,!1}),n},u.prototype.any=function(t){t=a.createLambda(t);var n=this.getEnumerator();try{if(arguments.length==0)return n.moveNext();for(;n.moveNext();)if(t(n.current()))return!0;return!1}finally{a.dispose(n)}},u.prototype.isEmpty=function(){return!this.any()},u.prototype.concat=function(){var t=this;if(arguments.length==1){const n=arguments[0];return new u(function(){var e,r;return new s(function(){e=t.getEnumerator()},function(){if(r==null){if(e.moveNext())return this.yieldReturn(e.current());r=u.from(n).getEnumerator()}return r.moveNext()?this.yieldReturn(r.current()):!1},function(){try{a.dispose(e)}finally{a.dispose(r)}})})}else{const n=arguments;return new u(function(){var e;return new s(function(){e=u.make(t).concat(u.from(n).select(u.from)).select(function(r){return r.getEnumerator()}).toArray()},function(){for(;e.length>0;){const r=e[0];if(r.moveNext())return this.yieldReturn(r.current());r.dispose(),e.splice(0,1)}return this.yieldBreak()},function(){u.from(e).forEach(a.dispose)})})}},u.prototype.insert=function(t,n){var e=this;return new u(function(){var r,i,o=0,f=!1;return new s(function(){r=e.getEnumerator(),i=u.from(n).getEnumerator()},function(){return o==t&&i.moveNext()?(f=!0,this.yieldReturn(i.current())):r.moveNext()?(o++,this.yieldReturn(r.current())):!f&&i.moveNext()?this.yieldReturn(i.current()):!1},function(){try{a.dispose(r)}finally{a.dispose(i)}})})},u.prototype.alternate=function(t){var n=this;return new u(function(){var e,r,i,o;return new s(function(){t instanceof Array||t.getEnumerator!=null?i=u.from(u.from(t).toArray()):i=u.make(t),r=n.getEnumerator(),r.moveNext()&&(e=r.current())},function(){for(;;){if(o!=null){if(o.moveNext())return this.yieldReturn(o.current());o=null}if(e==null&&r.moveNext()){e=r.current(),o=i.getEnumerator();continue}else if(e!=null){const f=e;return e=null,this.yieldReturn(f)}return this.yieldBreak()}},function(){try{a.dispose(r)}finally{a.dispose(o)}})})},u.prototype.contains=function(t,n){n=a.createLambda(n);var e=this.getEnumerator();try{for(;e.moveNext();)if(n(e.current())===t)return!0;return!1}finally{a.dispose(e)}},u.prototype.defaultIfEmpty=function(t){var n=this;return t===void 0&&(t=null),new u(function(){var e,r=!0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?(r=!1,this.yieldReturn(e.current())):r?(r=!1,this.yieldReturn(t)):!1},function(){a.dispose(e)})})},u.prototype.distinct=function(t){return this.except(u.empty(),t)},u.prototype.distinctUntilChanged=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e,r,i;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();){const o=t(e.current());if(i)return i=!1,r=o,this.yieldReturn(e.current());if(r!==o)return r=o,this.yieldReturn(e.current())}return this.yieldBreak()},function(){a.dispose(e)})})},u.prototype.except=function(t,n){n=a.createLambda(n);var e=this;return new u(function(){var r,i;return new s(function(){r=e.getEnumerator(),i=new k(n),u.from(t).forEach(function(o){i.add(o)})},function(){for(;r.moveNext();){const o=r.current();if(!i.contains(o))return i.add(o),this.yieldReturn(o)}return!1},function(){a.dispose(r)})})},u.prototype.intersect=function(t,n){n=a.createLambda(n);var e=this;return new u(function(){var r,i,o;return new s(function(){r=e.getEnumerator(),i=new k(n),u.from(t).forEach(function(f){i.add(f)}),o=new k(n)},function(){for(;r.moveNext();){const f=r.current();if(!o.contains(f)&&i.contains(f))return o.add(f),this.yieldReturn(f)}return!1},function(){a.dispose(r)})})},u.prototype.sequenceEqual=function(t,n){n=a.createLambda(n);var e=this.getEnumerator();try{const r=u.from(t).getEnumerator();try{for(;e.moveNext();)if(!r.moveNext()||n(e.current())!==n(r.current()))return!1;return!r.moveNext()}finally{a.dispose(r)}}finally{a.dispose(e)}},u.prototype.union=function(t,n){n=a.createLambda(n);var e=this;return new u(function(){var r,i,o;return new s(function(){r=e.getEnumerator(),o=new k(n)},function(){var f;if(i===void 0){for(;r.moveNext();)if(f=r.current(),!o.contains(f))return o.add(f),this.yieldReturn(f);i=u.from(t).getEnumerator()}for(;i.moveNext();)if(f=i.current(),!o.contains(f))return o.add(f),this.yieldReturn(f);return!1},function(){try{a.dispose(r)}finally{a.dispose(i)}})})},u.prototype.orderBy=function(t,n){return new g(this,t,n,!1)},u.prototype.orderByDescending=function(t,n){return new g(this,t,n,!0)},u.prototype.reverse=function(){var t=this;return new u(function(){var n,e;return new s(function(){n=t.toArray(),e=n.length},function(){return e>0?this.yieldReturn(n[--e]):!1},l.Blank)})},u.prototype.shuffle=function(){var t=this;return new u(function(){var n;return new s(function(){n=t.toArray()},function(){if(n.length>0){const e=Math.floor(Math.random()*n.length);return this.yieldReturn(n.splice(e,1)[0])}return!1},l.Blank)})},u.prototype.weightedSample=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.choose(function(i){var o=t(i);return o<=0?null:(r+=o,{value:i,bound:r})}).toArray()},function(){if(e.length>0){const i=Math.floor(Math.random()*r)+1;let o=-1,f=e.length;for(;f-o>1;){const c=Math.floor((o+f)/2);e[c].bound>=i?f=c:o=c}return this.yieldReturn(e[f].value)}return this.yieldBreak()},l.Blank)})},u.prototype.groupBy=function(t,n,e,r){var i=this;return t=a.createLambda(t),n=a.createLambda(n),e!=null&&(e=a.createLambda(e)),r=a.createLambda(r),new u(function(){var o;return new s(function(){o=i.toLookup(t,n,r).toEnumerable().getEnumerator()},function(){for(;o.moveNext();)return e==null?this.yieldReturn(o.current()):this.yieldReturn(e(o.current().key(),o.current()));return!1},function(){a.dispose(o)})})},u.prototype.partitionBy=function(t,n,e,r){var i=this;t=a.createLambda(t),n=a.createLambda(n),r=a.createLambda(r);var o;return e==null?(o=!1,e=function(f,c){return new R(f,c)}):(o=!0,e=a.createLambda(e)),new u(function(){var f,c,p,h=[];return new s(function(){f=i.getEnumerator(),f.moveNext()&&(c=t(f.current()),p=r(c),h.push(n(f.current())))},function(){for(var v;(v=f.moveNext())==!0&&p===r(t(f.current()));)h.push(n(f.current()));if(h.length>0){const y=o?e(c,u.from(h)):e(c,h);return v?(c=t(f.current()),p=r(c),h=[n(f.current())]):h=[],this.yieldReturn(y)}return!1},function(){a.dispose(f)})})},u.prototype.buffer=function(t){var n=this;return new u(function(){var e;return new s(function(){e=n.getEnumerator()},function(){for(var r=[],i=0;e.moveNext();)if(r.push(e.current()),++i>=t)return this.yieldReturn(r);return r.length>0?this.yieldReturn(r):!1},function(){a.dispose(e)})})},u.prototype.aggregate=function(t,n,e){return e=a.createLambda(e),e(this.scan(t,n,e).last())},u.prototype.average=function(t){t=a.createLambda(t);var n=0,e=0;return this.forEach(function(r){n+=t(r),++e}),n/e},u.prototype.count=function(t){t=t==null?l.True:a.createLambda(t);var n=0;return this.forEach(function(e,r){t(e,r)&&++n}),n},u.prototype.max=function(t){return t==null&&(t=l.Identity),this.select(t).aggregate(function(n,e){return n>e?n:e})},u.prototype.min=function(t){return t==null&&(t=l.Identity),this.select(t).aggregate(function(n,e){return n<e?n:e})},u.prototype.maxBy=function(t){return t=a.createLambda(t),this.aggregate(function(n,e){return t(n)>t(e)?n:e})},u.prototype.minBy=function(t){return t=a.createLambda(t),this.aggregate(function(n,e){return t(n)<t(e)?n:e})},u.prototype.sum=function(t){return t==null&&(t=l.Identity),this.select(t).aggregate(0,function(n,e){return n+e})},u.prototype.elementAt=function(t){var n,e=!1;if(this.forEach(function(r,i){if(i==t)return n=r,e=!0,!1}),!e)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return n},u.prototype.elementAtOrDefault=function(t,n){n===void 0&&(n=null);var e,r=!1;return this.forEach(function(i,o){if(o==t)return e=i,r=!0,!1}),r?e:n},u.prototype.first=function(t){if(t!=null)return this.where(t).first();var n,e=!1;if(this.forEach(function(r){return n=r,e=!0,!1}),!e)throw new Error("first:No element satisfies the condition.");return n},u.prototype.firstOrDefault=function(t,n){if(t!==void 0){if(typeof t===m.Function||typeof a.createLambda(t)===m.Function)return this.where(t).firstOrDefault(void 0,n);n=t}var e,r=!1;return this.forEach(function(i){return e=i,r=!0,!1}),r?e:n},u.prototype.last=function(t){if(t!=null)return this.where(t).last();var n,e=!1;if(this.forEach(function(r){e=!0,n=r}),!e)throw new Error("last:No element satisfies the condition.");return n},u.prototype.lastOrDefault=function(t,n){if(t!==void 0){if(typeof t===m.Function||typeof a.createLambda(t)===m.Function)return this.where(t).lastOrDefault(void 0,n);n=t}var e,r=!1;return this.forEach(function(i){r=!0,e=i}),r?e:n},u.prototype.single=function(t){if(t!=null)return this.where(t).single();var n,e=!1;if(this.forEach(function(r){if(!e)e=!0,n=r;else throw new Error("single:sequence contains more than one element.")}),!e)throw new Error("single:No element satisfies the condition.");return n},u.prototype.singleOrDefault=function(t,n){if(n===void 0&&(n=null),t!=null)return this.where(t).singleOrDefault(null,n);var e,r=!1;return this.forEach(function(i){if(!r)r=!0,e=i;else throw new Error("single:sequence contains more than one element.")}),r?e:n},u.prototype.skip=function(t){var n=this;return new u(function(){var e,r=0;return new s(function(){for(e=n.getEnumerator();r++<t&&e.moveNext(););},function(){return e.moveNext()?this.yieldReturn(e.current()):!1},function(){a.dispose(e)})})},u.prototype.skipWhile=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e,r=0,i=!1;return new s(function(){e=n.getEnumerator()},function(){for(;!i;)if(e.moveNext()){if(!t(e.current(),r++))return i=!0,this.yieldReturn(e.current());continue}else return!1;return e.moveNext()?this.yieldReturn(e.current()):!1},function(){a.dispose(e)})})},u.prototype.take=function(t){var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return r++<t&&e.moveNext()?this.yieldReturn(e.current()):!1},function(){a.dispose(e)})})},u.prototype.takeWhile=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()&&t(e.current(),r++)?this.yieldReturn(e.current()):!1},function(){a.dispose(e)})})},u.prototype.takeExceptLast=function(t){t==null&&(t=1);var n=this;return new u(function(){if(t<=0)return n.getEnumerator();var e,r=[];return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();){if(r.length==t)return r.push(e.current()),this.yieldReturn(r.shift());r.push(e.current())}return!1},function(){a.dispose(e)})})},u.prototype.takeFromLast=function(t){if(t<=0||t==null)return u.empty();var n=this;return new u(function(){var e,r,i=[];return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();)i.length==t&&i.shift(),i.push(e.current());return r==null&&(r=u.from(i).getEnumerator()),r.moveNext()?this.yieldReturn(r.current()):!1},function(){a.dispose(r)})})},u.prototype.indexOf=function(t){var n=null;return typeof t===m.Function?this.forEach(function(e,r){if(t(e,r))return n=r,!1}):this.forEach(function(e,r){if(e===t)return n=r,!1}),n!==null?n:-1},u.prototype.lastIndexOf=function(t){var n=-1;return typeof t===m.Function?this.forEach(function(e,r){t(e,r)&&(n=r)}):this.forEach(function(e,r){e===t&&(n=r)}),n},u.prototype.cast=function(){return this},u.prototype.asEnumerable=function(){return u.from(this)},u.prototype.toArray=function(){var t=[];return this.forEach(function(n){t.push(n)}),t},u.prototype.toLookup=function(t,n,e){t=a.createLambda(t),n=a.createLambda(n),e=a.createLambda(e);var r=new k(e);return this.forEach(function(i){var o=t(i),f=n(i),c=r.get(o);c!==void 0?c.push(f):r.add(o,[f])}),new O(r)},u.prototype.toObject=function(t,n){t=a.createLambda(t),n=a.createLambda(n);var e={};return this.forEach(function(r){e[t(r)]=n(r)}),e},u.prototype.toDictionary=function(t,n,e){t=a.createLambda(t),n=a.createLambda(n),e=a.createLambda(e);var r=new k(e);return this.forEach(function(i){r.add(t(i),n(i))}),r},u.prototype.toJSONString=function(t,n){if(typeof JSON===m.Undefined||JSON.stringify==null)throw new Error("toJSONString can't find JSON.stringify. This works native JSON support Browser or include json2.js");return JSON.stringify(this.toArray(),t,n)},u.prototype.toJoinedString=function(t,n){return t==null&&(t=""),n==null&&(n=l.Identity),this.select(n).toArray().join(t)},u.prototype.doAction=function(t){var n=this;return t=a.createLambda(t),new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?(t(e.current(),r++),this.yieldReturn(e.current())):!1},function(){a.dispose(e)})})},u.prototype.forEach=function(t){t=a.createLambda(t);var n=0,e=this.getEnumerator();try{for(;e.moveNext()&&t(e.current(),n++)!==!1;);}finally{a.dispose(e)}},u.prototype.force=function(){var t=this.getEnumerator();try{for(;t.moveNext(););}finally{a.dispose(t)}},u.prototype.letBind=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e;return new s(function(){e=u.from(t(n)).getEnumerator()},function(){return e.moveNext()?this.yieldReturn(e.current()):!1},function(){a.dispose(e)})})},u.prototype.share=function(){var t=this,n,e=!1;return new N(function(){return new s(function(){n==null&&(n=t.getEnumerator())},function(){if(e)throw new Error("enumerator is disposed");return n.moveNext()?this.yieldReturn(n.current()):!1},l.Blank)},function(){e=!0,a.dispose(n)})},u.prototype.memoize=function(){var t=this,n,e,r=!1;return new N(function(){var i=-1;return new s(function(){e==null&&(e=t.getEnumerator(),n=[])},function(){if(r)throw new Error("enumerator is disposed");return i++,n.length<=i?e.moveNext()?this.yieldReturn(n[i]=e.current()):!1:this.yieldReturn(n[i])},l.Blank)},function(){r=!0,a.dispose(e),n=null})},a.hasNativeIteratorSupport()&&(u.prototype[Symbol.iterator]=function(){return{enumerator:this.getEnumerator(),next:function(){return this.enumerator.moveNext()?{done:!1,value:this.enumerator.current()}:{done:!0}}}}),u.prototype.catchError=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e;return new s(function(){e=n.getEnumerator()},function(){try{return e.moveNext()?this.yieldReturn(e.current()):!1}catch(r){return t(r),!1}},function(){a.dispose(e)})})},u.prototype.finallyAction=function(t){t=a.createLambda(t);var n=this;return new u(function(){var e;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?this.yieldReturn(e.current()):!1},function(){try{a.dispose(e)}finally{t()}})})},u.prototype.log=function(t){return t=a.createLambda(t),this.doAction(function(n){typeof console!==m.Undefined&&console.log(t(n))})},u.prototype.trace=function(t,n){return t==null&&(t="Trace"),n=a.createLambda(n),this.doAction(function(e){typeof console!==m.Undefined&&console.log(t,n(e))})};var g=function(t,n,e,r,i){this.source=t,this.keySelector=a.createLambda(n),this.descending=r,this.parent=i,e&&(this.comparer=a.createLambda(e))};g.prototype=new u,g.prototype.createOrderedEnumerable=function(t,n,e){return new g(this.source,t,n,e,this)},g.prototype.thenBy=function(t,n){return this.createOrderedEnumerable(t,n,!1)},g.prototype.thenByDescending=function(t,n){return this.createOrderedEnumerable(t,n,!0)},g.prototype.getEnumerator=function(){var t=this,n,e,r=0;return new s(function(){n=[],e=[],t.source.forEach(function(o,f){n.push(o),e.push(f)});var i=x.create(t,null);i.GenerateKeys(n),e.sort(function(o,f){return i.compare(o,f)})},function(){return r<e.length?this.yieldReturn(n[e[r++]]):!1},l.Blank)};var x=function(t,n,e,r){this.keySelector=t,this.descending=e,this.child=r,this.comparer=n,this.keys=null};x.create=function(t,n){var e=new x(t.keySelector,t.comparer,t.descending,n);return t.parent!=null?x.create(t.parent,e):e},x.prototype.GenerateKeys=function(t){var n=t.length,e=this.keySelector,r=new Array(n);for(let i=0;i<n;i++)r[i]=e(t[i]);this.keys=r,this.child!=null&&this.child.GenerateKeys(t)},x.prototype.compare=function(t,n){var e=this.comparer?this.comparer(this.keys[t],this.keys[n]):a.compare(this.keys[t],this.keys[n]);return e==0?this.child!=null?this.child.compare(t,n):a.compare(t,n):this.descending?-e:e};var N=function(t,n){this.dispose=n,u.call(this,t)};N.prototype=new u;var d=function(t){this.getSource=function(){return t}};d.prototype=new u,d.prototype.any=function(t){return t==null?this.getSource().length>0:u.prototype.any.apply(this,arguments)},d.prototype.count=function(t){return t==null?this.getSource().length:u.prototype.count.apply(this,arguments)},d.prototype.elementAt=function(t){var n=this.getSource();return 0<=t&&t<n.length?n[t]:u.prototype.elementAt.apply(this,arguments)},d.prototype.elementAtOrDefault=function(t,n){n===void 0&&(n=null);var e=this.getSource();return 0<=t&&t<e.length?e[t]:n},d.prototype.first=function(t){var n=this.getSource();return t==null&&n.length>0?n[0]:u.prototype.first.apply(this,arguments)},d.prototype.firstOrDefault=function(t,n){if(t!==void 0)return u.prototype.firstOrDefault.apply(this,arguments);n=t;var e=this.getSource();return e.length>0?e[0]:n},d.prototype.last=function(t){var n=this.getSource();return t==null&&n.length>0?n[n.length-1]:u.prototype.last.apply(this,arguments)},d.prototype.lastOrDefault=function(t,n){if(t!==void 0)return u.prototype.lastOrDefault.apply(this,arguments);n=t;var e=this.getSource();return e.length>0?e[e.length-1]:n},d.prototype.skip=function(t){var n=this.getSource();return new u(function(){var e;return new s(function(){e=t<0?0:t},function(){return e<n.length?this.yieldReturn(n[e++]):!1},l.Blank)})},d.prototype.takeExceptLast=function(t){return t==null&&(t=1),this.take(this.getSource().length-t)},d.prototype.takeFromLast=function(t){return this.skip(this.getSource().length-t)},d.prototype.reverse=function(){var t=this.getSource();return new u(function(){var n;return new s(function(){n=t.length},function(){return n>0?this.yieldReturn(t[--n]):!1},l.Blank)})},d.prototype.sequenceEqual=function(t,n){return(t instanceof d||t instanceof Array)&&n==null&&u.from(t).count()!=this.count()?!1:u.prototype.sequenceEqual.apply(this,arguments)},d.prototype.toJoinedString=function(t,n){var e=this.getSource();return n!=null||!(e instanceof Array)?u.prototype.toJoinedString.apply(this,arguments):(t==null&&(t=""),e.join(t))},d.prototype.getEnumerator=function(){var t=this.getSource(),n=-1;return{current:function(){return t[n]},moveNext:function(){return++n<t.length},dispose:l.Blank}};var E=function(t,n){this.prevSource=t,this.prevPredicate=n};E.prototype=new u,E.prototype.where=function(t){if(t=a.createLambda(t),t.length<=1){const n=this.prevPredicate,e=function(r){return n(r)&&t(r)};return new E(this.prevSource,e)}else return u.prototype.where.call(this,t)},E.prototype.select=function(t){return t=a.createLambda(t),t.length<=1?new b(this.prevSource,this.prevPredicate,t):u.prototype.select.call(this,t)},E.prototype.getEnumerator=function(){var t=this.prevPredicate,n=this.prevSource,e;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();)if(t(e.current()))return this.yieldReturn(e.current());return!1},function(){a.dispose(e)})};var b=function(t,n,e){this.prevSource=t,this.prevPredicate=n,this.prevSelector=e};b.prototype=new u,b.prototype.where=function(t){return t=a.createLambda(t),t.length<=1?new E(this,t):u.prototype.where.call(this,t)},b.prototype.select=function(t){if(t=a.createLambda(t),t.length<=1){const n=this.prevSelector,e=function(r){return t(n(r))};return new b(this.prevSource,this.prevPredicate,e)}else return u.prototype.select.call(this,t)},b.prototype.getEnumerator=function(){var t=this.prevPredicate,n=this.prevSelector,e=this.prevSource,r;return new s(function(){r=e.getEnumerator()},function(){for(;r.moveNext();)if(t==null||t(r.current()))return this.yieldReturn(n(r.current()));return!1},function(){a.dispose(r)})};var k=function(){var t=function(o,f){return Object.prototype.hasOwnProperty.call(o,f)},n=function(o){return o===null?"null":o===void 0?"undefined":typeof o.toString===m.Function?o.toString():Object.prototype.toString.call(o)},e=function(o,f){this.key=o,this.value=f,this.prev=null,this.next=null},r=function(){this.first=null,this.last=null};r.prototype={addLast:function(o){this.last!=null?(this.last.next=o,o.prev=this.last,this.last=o):this.first=this.last=o},replace:function(o,f){o.prev!=null?(o.prev.next=f,f.prev=o.prev):this.first=f,o.next!=null?(o.next.prev=f,f.next=o.next):this.last=f},remove:function(o){o.prev!=null?o.prev.next=o.next:this.first=o.next,o.next!=null?o.next.prev=o.prev:this.last=o.prev}};var i=function(o){this.countField=0,this.entryList=new r,this.buckets={},this.compareSelector=o==null?l.Identity:o};return i.prototype={add:function(o,f){var c=this.compareSelector(o),p=n(c),h=new e(o,f);if(t(this.buckets,p)){const v=this.buckets[p];for(let y=0;y<v.length;y++)if(this.compareSelector(v[y].key)===c){this.entryList.replace(v[y],h),v[y]=h;return}v.push(h)}else this.buckets[p]=[h];this.countField++,this.entryList.addLast(h)},get:function(o){var f=this.compareSelector(o),c=n(f);if(!!t(this.buckets,c)){var p=this.buckets[c];for(let h=0;h<p.length;h++){const v=p[h];if(this.compareSelector(v.key)===f)return v.value}}},set:function(o,f){var c=this.compareSelector(o),p=n(c);if(t(this.buckets,p)){const h=this.buckets[p];for(let v=0;v<h.length;v++)if(this.compareSelector(h[v].key)===c){const y=new e(o,f);return this.entryList.replace(h[v],y),h[v]=y,!0}}return!1},contains:function(o){var f=this.compareSelector(o),c=n(f);if(!t(this.buckets,c))return!1;var p=this.buckets[c];for(let h=0;h<p.length;h++)if(this.compareSelector(p[h].key)===f)return!0;return!1},clear:function(){this.countField=0,this.buckets={},this.entryList=new r},remove:function(o){var f=this.compareSelector(o),c=n(f);if(!!t(this.buckets,c)){var p=this.buckets[c];for(let h=0;h<p.length;h++)if(this.compareSelector(p[h].key)===f){this.entryList.remove(p[h]),p.splice(h,1),p.length==0&&delete this.buckets[c],this.countField--;return}}},count:function(){return this.countField},toEnumerable:function(){var o=this;return new u(function(){var f;return new s(function(){f=o.entryList.first},function(){if(f!=null){const c={key:f.key,value:f.value};return f=f.next,this.yieldReturn(c)}return!1},l.Blank)})}},i}(),O=function(t){this.count=function(){return t.count()},this.get=function(n){return u.from(t.get(n))},this.contains=function(n){return t.contains(n)},this.toEnumerable=function(){return t.toEnumerable().select(function(n){return new R(n.key,n.value)})}},R=function(t,n){this.key=function(){return t},d.call(this,n)};R.prototype=new d,B.Z=u}}]);