diff --git a/dist/entry.js b/dist/entry.js index be9c8296ed..5476cd6355 100644 --- a/dist/entry.js +++ b/dist/entry.js @@ -10681,6 +10681,7 @@ var MediaPipeUtils = /** @class */ (function () { this.isInitPoseLandmarker = false; this.alreadyInitPoseLandmarkerOffscreenCanvas = false; this.isPrevFaceLandmarker = false; + this.isRunWorkerFaceLandmarker = false; this.isRunningFaceLandmarker = false; this.isDrawDetectedFaceLandmarker = false; this.isInitFaceLandmarker = false; @@ -11292,6 +11293,12 @@ var MediaPipeUtils = /** @class */ (function () { } _this.sendImageBitmapForFaceLandmarker(); } + else if (data.action === 'run_start_face_landmarker') { + _this.isRunWorkerFaceLandmarker = true; + } + else if (data.action === 'run_stop_face_landmarker') { + _this.isRunWorkerFaceLandmarker = false; + } else if (data.action === 'start_face_landmarker') { _this.isPrevFaceLandmarker = true; Entry.engine.fireEvent('when_face_landmarker'); @@ -11548,7 +11555,7 @@ var MediaPipeUtils = /** @class */ (function () { }, [this.faceLandmarkerOffscreenCanvas]); this.alreadyInitFaceLandmarkerOffscreenCanvas = true; } - else { + else if (!this.isRunWorkerFaceLandmarker) { this.faceLandmarkerWorker.postMessage({ action: 'face_landmarker_restart', }); @@ -11721,6 +11728,7 @@ var MediaPipeUtils = /** @class */ (function () { }); this.isRunningFaceLandmarker = false; this.isPrevFaceLandmarker = false; + this.isRunWorkerFaceLandmarker = false; this.countDetectedFace = 0; return [2 /*return*/]; }); diff --git a/dist/entry.min.js b/dist/entry.min.js index c3718045ac..8a8d4e39ca 100644 --- a/dist/entry.min.js +++ b/dist/entry.min.js @@ -1,2 +1,2 @@ /*! For license information please see entry.min.js.LICENSE.txt */ -(()=>{var __webpack_modules__={63155:(e,t,r)=>{"use strict";r.r(t)},64113:(e,t,r)=>{"use strict";r.r(t)},67207:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var o=r(33789),n=new Map,a=function(){function e(e,t,r,o){if(this.padding=10,this.border=2,!e.isEngineStop){e.dialog&&e.dialog.remove(!0),e.dialog=this,this.parent=e;var n="number"==typeof t?String(t):t;Entry.console&&Entry.console.print(t,r),n=n.match(/.{1,15}/g).join("\n"),this.message_=n,this.mode_=r,"speak"!==r&&"ask"!==r&&"think"!==r&&"yell"!==r||this.generateSpeak(r),o||Entry.stage.loadDialog(this)}}return e.prototype.getNotchType=function(e){var t=this.parent.object,r=t.entity,o=n.get(t.id)||{},a=o.x,i=o.y,s=o.notchType;return r.x==a&&r.y==i||(s=e.y-20-this.border>-135?"n":"s",e.x+e.width/2<0?s+="e":s+="w",n.set(t.id,{notchType:s,x:r.x,y:r.y})),s},e.prototype.setNotchPositionForPixi=function(e){var t=this.getNotchType(e);return t.includes("n")?this.object.y=Math.max(e.y-this.height/2-20-this.padding,this.height/2-135+this.padding):this.object.y=Math.min(e.y+e.height+this.height/2+20+this.padding,135-this.height/2-this.padding),t.includes("e")?this.object.x=Math.min(e.x+e.width+this.width/2,240-this.width/2-this.padding):this.object.x=Math.max(e.x-this.width/2,this.width/2-240+this.padding),t},e.prototype.setNotchPositionForCreateJs=function(e){var t="";return e.y-20-this.border>-135?(this.object.y=Math.max(e.y-this.height/2-20-this.padding,this.height/2-135+this.padding),t+="n"):(this.object.y=Math.min(e.y+e.height+this.height/2+20+this.padding,135-this.height/2-this.padding),t+="s"),e.x+e.width/2<0?(this.object.x=Math.min(e.x+e.width+this.width/2,240-this.width/2-this.padding),t+="e"):(this.object.x=Math.max(e.x-this.width/2,this.width/2-240+this.padding),t+="w"),t},e.prototype.update=function(){var e=this.parent.object,t=o.GEHelper.calcParentBound(e);if(!t&&"textBox"===this.parent.type){if(this._isNoContentTried)return void delete this._isNoContentTried;this.parent.setText(" "),t=o.GEHelper.calcParentBound(e),this._isNoContentTried=!0}if(this.object){var r="";r=o.GEHelper.isWebGL?this.setNotchPositionForPixi(t):this.setNotchPositionForCreateJs(t),this.notch&&this.notch.type!=r&&(this.object.removeChild(this.notch),"think"===this.mode_?(this.notch=this.createThinkkNotch(r),this.object.addChild(this.notch)):"speak"!==this.mode_&&"ask"!==this.mode_||(this.notch=this.createSpeakNotch(r),this.object.addChild(this.notch))),this._isNoContentTried&&this.parent.setText(""),Entry.requestUpdate=!0}},e.prototype.remove=function(e){e||n.clear(),Entry.stage.unloadDialog(this),this.parent.dialog=null,Entry.requestUpdate=!0},e.prototype.createSpeakNotch=function(e){var t=o.GEHelper.newGraphic();t.type=e;var r=EntryStatic.colorSet.canvas||{},n=this.height+this.padding,a=this.padding,i=this.width;return"ne"===e?t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(3,n).lt(11,n).ss(2,1,1).s(r.dialog||"#4f80ff").mt(2,n).lt(2,n+9).lt(12,n):"nw"===e?t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(i-3,n).lt(i-11,n).ss(2,1,1).s(r.dialog||"#4f80ff").mt(i-2,n).lt(i-2,n+9).lt(i-12,n):"se"===e?t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(3,-a).lt(11,-a).ss(2,1,1).s(r.dialog||"#4f80ff").mt(2,-a).lt(2,-a-9).lt(12,-a):"sw"===e&&t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(i-3,-a).lt(i-11,-a).ss(2,1,1).s(r.dialog||"#4f80ff").mt(this.width-2,-a).lt(i-2,-a-9).lt(i-12,-a),t},e.prototype.createThinkkNotch=function(e){var t=o.GEHelper.newGraphic();t.type=e;var r=EntryStatic.colorSet.canvas||{},n=this.height+this.padding,a=this.padding,i=this.width;return"ne"===e?t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(3,n).lt(11,n).ss(2,1,1).s(r.dialog||"#4f80ff").mt(2,n).qt(2,n+9,12,n).de(2,n+9,5,4):"nw"===e?t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(i-3,n).lt(i-11,n).ss(2,1,1).s(r.dialog||"#4f80ff").mt(i,n).qt(i,n+9,i-12,n).de(i-3,n+9,5,4):"se"===e?t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(3,-a).lt(11,-a).ss(2,1,1).s(r.dialog||"#4f80ff").mt(2,-a).qt(2,-a-9,12,-a).de(0,-a-12,5,4):"sw"===e&&t.graphics.f("#ffffff").ss(3,2).s("#ffffff").mt(i-3,-a).lt(i-11,-a).ss(2,1,1).s(r.dialog||"#4f80ff").mt(this.width-2,-a).qt(i-2,-a-9,i-12,-a).de(i-6,-a-12,5,4),t},e.prototype.drawZigZagLineX=function(e){var t=e.ctx,r=e.x1,o=e.y1,n=e.x2,a=e.y2,i=e.padding,s=e.zigzagSpacing,l=e.oneZigZagLength,c=0;t.moveTo(r+i,o);for(var u=0;c=10?t.width:17,s=EntryStatic.colorSet.canvas||{};if("yell"===e){var l=this.drawZigZagRect({x:-this.padding,y:-this.padding,w:i+2*this.padding,h:a+2*this.padding,fillColor:s.dialogBG||"#ffffff",borderColor:s.dialog||"#4f80ff"});this.object.addChild(l)}else{(l=o.GEHelper.newGraphic()).graphics.f(s.dialogBG||"#ffffff").ss(2,"round").s(s.dialog||"#4f80ff").rr(-this.padding,-this.padding,i+2*this.padding,a+2*this.padding,this.padding),this.object.addChild(l)}this.object.regX=i/2,this.object.regY=a/2,this.width=i,this.height=a,"think"===e?(this.notch=this.createThinkkNotch("nw"),this.object.addChild(this.notch)):"speak"!==e&&"ask"!==e||(this.notch=this.createSpeakNotch("nw"),this.object.addChild(this.notch)),this.update(),this.object.addChild(n),Entry.requestUpdate=!0},e}();const i=a;Entry.Dialog=a},20078:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var o=r(94389),n=r.n(o),a=r(77823),i=r.n(a),s=function(e,t,r,o){return new(r||(r=Promise))((function(n,a){function i(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((o=o.apply(e,t||[])).next())}))},l=function(e,t){var r,o,n,a,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_=function(e,t,r){if(r||2===arguments.length)for(var o,n=0,a=t.length;n-1}}))}),Entry.hw.setExternalModule(e),Entry.dispatchEvent("hwChanged")}},e.prototype.removePrevModuleBlock=function(e){var t,r,o=0;try{for(var n=u(Object.keys(Entry.block)),a=n.next();!a.done;a=n.next()){var i=a.value;if(e.indexOf(i)>-1&&(delete Entry.block[i],o++),o==e.length)break}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.registerHardwareLiteModule=function(e){return s(this,void 0,void 0,(function(){var t,r;return l(this,(function(o){return e.getBlocks&&e.blockMenuBlocks?(Entry.hwLite.banClassAllHardwareLite(),this.setLanguageTemplates(e),t=e.getBlocks(),r=e.blockMenuBlocks,this.loadBlocks({categoryName:"arduino",blockSchemas:Object.entries(t).map((function(e){var t=c(e,2),o=t[0];return{blockName:o,block:t[1],isBlockShowBlockMenu:r.indexOf(o)>-1}}))}),Entry.hwLite.setExternalModule(e),[2]):[2]}))}))},e.prototype.registerBlockModule=function(e){var t=e.name,r=e.title,o=e.description,n=e.getBlocks,a=[];r&&a.push(this.createTextBlock(t,r.ko)),o&&a.push(this.createTextBlock(t,o)),n&&a.push.apply(a,_([],c(Object.entries(n()).map((function(e){var t=c(e,2);return{blockName:t[0],block:t[1],isBlockShowBlockMenu:!0}}))),!1)),this.loadBlocks({categoryName:"expansion",blockSchemas:a})},e.prototype.loadBlocks=function(e){var t,r=this,o=e.categoryName,n=e.blockSchemas,a=null===(t=Entry.getMainWS())||void 0===t?void 0:t.blockMenu;n.forEach((function(e){r.applyDefaultProperties(e);var t=e.blockName,n=e.block,i=e.isBlockShowBlockMenu;n.category||(n.category=o),Entry.block[t]=n,i&&a&&a.addCategoryData(o,t)})),a&&a.reDraw()},e.prototype.createTextBlock=function(e,t){var r="".concat(e,"_").concat(Math.random());return{blockName:r,block:{color:EntryStatic.colorSet.common.TRANSPARENT,skeleton:"basic_text",class:e,template:"%1",params:[{type:"Text",text:t,color:EntryStatic.colorSet.common.TEXT,align:"center"}],def:{type:r},isNotFor:[e],events:{}}}},e.prototype.setLanguageTemplates=function(e){if(e.setLanguage){var t=e.setLanguage(),r=t[Lang.type]||t[Lang.fallbackType];for(var o in r)Object.assign(Lang[o],r[o])}},e.prototype.applyDefaultProperties=function(e){var t=e.blockName,r=e.block;r.color||(r.color=EntryStatic.colorSet.block.default.EXPANSION,r.outerLine=EntryStatic.colorSet.block.darken.EXPANSION),r.type||(r.type=t)},e}());const d=p;Entry.moduleManager=p,Entry.loadExternalModules=function(e){return void 0===e&&(e={}),s(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(o){switch(o.label){case 0:return t=e.externalModules,r=void 0===t?[]:t,[4,Promise.all(r.map(p.loadModuleFromLocalOrOnline.bind(p)))];case 1:return o.sent(),[2]}}))}))},Entry.loadLiteExternalModules=function(e){return void 0===e&&(e={}),s(void 0,void 0,void 0,(function(){var t,r;return l(this,(function(o){switch(o.label){case 0:return t=e.externalModulesLite,r=void 0===t?[]:t,Entry.externalModulesLite=r,[4,Promise.all(r.map(p.registerHardwareLiteModule.bind(p)))];case 1:return o.sent(),[2]}}))}))},Entry.loadLiteTestModule=function(e,t){return s(void 0,void 0,void 0,(function(){var r;return l(this,(function(o){switch(o.label){case 0:return[4,e.text()];case 1:return r=o.sent(),[4,Entry.moduleManager.loadScript(t,r,!0)];case 2:return o.sent(),[2]}}))}))},Entry.loadLiteTestModuleUploader=function(){var e=document.querySelector("section"),t=document.createElement("input");t.type="file";var r=document.createElement("input");r.type="text";var o=document.createElement("button");o.innerText="적용";o.onclick=function(){return s(void 0,void 0,void 0,(function(){var e;return l(this,(function(o){switch(o.label){case 0:return e=t.files[0],t.value=null,[4,Entry.loadLiteTestModule(e,r.value)];case 1:return o.sent(),[2]}}))}))},e.prepend(o),e.prepend(t),e.prepend(r)}},26639:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});var o='';const n=function(){function e(e){var t=this;this.svgDom=Entry.Dom($(o)),this.changeOffset=0,this.scale=.5,this._listPortViews={},this._hwModule=e,Entry.addEventListener("windowResized",(function(){var e=t._hwModule.monitorTemplate.mode;"both"==e&&(t.resize(),t.resizeList()),"list"==e?t.resizeList():t.resize()})),Entry.addEventListener("hwModeChange",(function(){t.changeMode()}))}return e.prototype.initView=function(){this.svgDom=Entry.Dom($(o))},e.prototype.generateViewByMode=function(){this._template="function"==typeof this._hwModule.monitorTemplate?this._hwModule.monitorTemplate():this._hwModule.monitorTemplate;var e=this._template;"both"===e.mode?(this.generateListView(),this.generateView()):"list"===e.mode?this.generateListView():this.generateView()},e.prototype.generateView=function(){this.snap=Entry.SVG("hwMonitor"),this._svgGroup=this.snap.elem("g"),this._portMap={n:[],e:[],s:[],w:[]};var e=this._template,t={href:e.imgPath?Entry.mediaFilePath+e.imgPath:void 0,x:-e.width/2,y:-e.height/2,width:e.width,height:e.height};this._portViews={},t.href&&(this.hwView=this._svgGroup.elem("image"),this.hwView=this.hwView.attr(t));var r=e.ports;this.pathGroup=null,this.pathGroup=this._svgGroup.elem("g");var o=[];for(var n in r){var a=r[n],i=this.generatePortView(a,"_svgGroup");this._portViews[n]=i,o.push(i)}o.sort((function(e,t){return e.box.x-t.box.x}));var s=this._portMap;o.map((function(e){((Math.atan2(-e.box.y,e.box.x)/Math.PI+2)%2<1?s.n:s.s).push(e)})),this.resize()},e.prototype.toggleMode=function(e){var t=this._hwModule.monitorTemplate;"list"===e?(t.TempPort=null,this._hwModule.monitorTemplate.ports&&(this._hwModule.monitorTemplate.TempPort=this._hwModule.monitorTemplate.ports,this._hwModule.monitorTemplate.listPorts=this.addPortEle(this._hwModule.monitorTemplate.listPorts,this._hwModule.monitorTemplate.ports)),$(this._svglistGroup).remove(),this._svgGroup&&$(this._svgGroup).remove(),$(this._pathGroup).remove(),this._hwModule.monitorTemplate.mode="list",this.generateListView()):(this._hwModule.monitorTemplate.TempPort&&(this._hwModule.monitorTemplate.ports=this._hwModule.monitorTemplate.TempPort,this._hwModule.monitorTemplate.listPorts=this.removePortEle(this._hwModule.monitorTemplate.listPorts,this._hwModule.monitorTemplate.ports)),$(this._svglistGroup).remove(),this._hwModule.monitorTemplate.mode="both",this.generateListView(),this.generateView())},e.prototype.setHwModule=function(e){this._hwModule=e},e.prototype.changeMode=function(){"both"===this._hwModule.monitorTemplate.mode?this.toggleMode("list"):"list"===this._hwModule.monitorTemplate.mode&&this.toggleMode("both")},e.prototype.addPortEle=function(e,t){if("object"!=typeof t)return e;for(var r in t)e[r]=t[r];return e},e.prototype.removePortEle=function(e,t){if("object"!=typeof t)return e;for(var r in t)delete e[r];return e},e.prototype.generateListView=function(){this._portMapList={n:[]},this._svglistGroup=null,this.listsnap=Entry.SVG("hwMonitor"),this._svglistGroup=this.listsnap.elem("g");var e=this._template.listPorts;this.pathGroup=this._svglistGroup.elem("g");var t=[];for(var r in e){var o=e[r],n=this.generatePortView(o,"_svglistGroup");this._listPortViews[r]=n,t.push(n)}var a=this._portMapList;t.map((function(e){a.n.push(e)})),this.resizeList()},e.prototype.generatePortView=function(e,t){var r=this[t].elem("g");r.addClass("hwComponent");var o;o=this.pathGroup.elem("path").attr({d:"m0,0",fill:"none",stroke:"input"===e.type?"#00CFCA":"#CA7DFF","stroke-width":3});var n=r.elem("rect").attr({x:0,y:0,width:150,height:22,rx:4,ry:4,fill:"#fff",stroke:"#a0a1a1"}),a=r.elem("text").attr({x:4,y:12,fill:"#000",class:"hwComponentName","alignment-baseline":"central"});a.textContent=e.name;var i=a.getComputedTextLength(),s=(r.elem("rect").attr({x:i+8,y:2,width:30,height:18,rx:9,ry:9,fill:"input"===e.type?"#00CFCA":"#CA7DFF"}),r.elem("text").attr({x:i+13,y:12,fill:"#fff",class:"hwComponentValue","alignment-baseline":"central"}));return s.textContent=0,i+=40,n.attr({width:i}),{group:r,value:s,type:e.type,path:o,box:{x:e.pos.x-this._template.width/2,y:e.pos.y-this._template.height/2,width:i},width:i}},e.prototype.getView=function(){return this.svgDom},e.prototype.update=function(e,t){var r=this._template.mode,o=this._template.keys||[],n=[];if("list"==r)n=this._listPortViews;else if("both"==r&&this._portViews)for(var a in n=this._listPortViews,this._portViews)n[a]=this._portViews[a];else n=this._portViews;if(t)for(var a in t)0!=t[a]&&n[a]&&(n[a].type="output");var i=function(r){var a=n[r];if("input"==a.type){var i=e[r];o.length>0?($.each(o,(function(e,t){if(!$.isPlainObject(i))return!1;i=i[t]||0})),a.value.textContent=i||0,a.group.getElementsByTagName("rect")[1].attr({fill:"#00CFCA"})):(a.value.textContent=i||0,a.group.getElementsByTagName("rect")[1].attr({fill:"#00CFCA"}))}else{var s=t?t[r]:e[r];o.length>0?($.each(o,(function(e,t){if(!$.isPlainObject(s))return!1;s=s[t]||0})),a.value.textContent=s||0,a.group.getElementsByTagName("rect")[1].attr({fill:"#CA7DFF"})):(a.value.textContent=s||0,a.group.getElementsByTagName("rect")[1].attr({fill:"#CA7DFF"}))}};for(var s in n)i(s)},e.prototype.resize=function(){if(this.svgDom){var e=this.svgDom.get(0).getBoundingClientRect();this._svgGroup.attr({transform:"translate(".concat(e.width/2,",").concat(e.height/1.8,")")}),this._rect=e,this._template.height<=0||e.height<=0||(this.scale=this._template.height*(e.height/this._template.height)/1e3,this.hwView&&this.scale&&this.hwView.attr({transform:"scale(".concat(this.scale,")")}),this.align())}},e.prototype.resizeList=function(){var e=this.svgDom.get(0).getBoundingClientRect();this._svglistGroup.attr({transform:"translate(".concat(e.width/2,",").concat(e.height/2,")")}),this._rect=e,this.alignList()},e.prototype.align=function(){this._alignNS(this._portMap.s.concat(),this._template.height*(this.scale/3)+5,27),this._alignNS(this._portMap.n.concat(),-this._template.height*this.scale/3-32,-27)},e.prototype.alignList=function(){for(var e=this._hwModule.monitorTemplate.listPorts||{},t=e.length,r=0;r1;){var l=e.shift(),c=e.pop(),u=o,_=n,p=r;i<=n-o?(o+=l.width+5,n-=c.width+5,p=0):0===e.length?n=(o=(o+n)/2-3)+6:(o=Math.max(o,-a/2+l.width)+15,n=Math.min(n,a/2-c.width)-15),this._movePort(l,o,t,u),this._movePort(c,n,t,_),i-=l.width+c.width+10,t+=p}e.length&&this._movePort(e[0],(n+o-e[0].width)/2,t,100)},e.prototype._alignNSList=function(e,t){e.length;for(var r=this._rect.width,o=(this._rect.height,-this._rect.width/2+10),n=-this._rect.height/2+10,a=0;ar-(u.width+_.width/2.2)&&(i+=1,o=l,s=0)}},e.prototype._movePort=function(e,t,r,o){var n,a=t,i=e.box.x*this.scale,s=e.box.y*this.scale;t>o?(a=t-e.width,n=t>i&&i>o?"M".concat(i,",").concat(r,"L").concat(i,",").concat(s):"M".concat((t+o)/2,",").concat(r,"l0,").concat(s>r?28:-3,"H").concat(i,"L").concat(i,",").concat(s)):n=tr?28:-3,"H").concat(i,"L").concat(i,",").concat(s),e.group.attr({transform:"translate(".concat(a,",").concat(r,")")}),e.path.attr({d:n})},e}()},85717:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var o=r(31141),n=r.n(o),a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},i=function(e,t,r){if(r||2===arguments.length)for(var o,n=0,a=t.length;n0||navigator.userAgent.indexOf("Trident")>0)if(void 0!==navigator.msLaunchUri)r=e,navigator.msLaunchUri(r,(function(){}),(function(){t()}));else{(document.documentMode>0?document.documentMode:navigator.userAgent.match(/(?:MSIE) ([0-9.]+)/)[1])<9?alert(Lang.msgs.not_support_browser):this.init(e,(function(e){!1===e&&t()}))}else navigator.userAgent.indexOf("Firefox")>0?function(e){var r=document.createElement("iframe");r.src="about:blank",r.setAttribute("style","display:none"),document.getElementsByTagName("body")[0].appendChild(r);var o=setTimeout((function(){var n=!1;try{r.contentWindow.location.href=e,n=!0}catch(e){"NS_ERROR_UNKNOWN_PROTOCOL"===e.name&&(n=!1)}n||t(),document.getElementsByTagName("body")[0].removeChild(r),clearTimeout(o)}),500)}(e):navigator.userAgent.indexOf("Chrome")>0?function(e){var r=!1;window.focus(),$(window).one("blur",(function(){r=!0})),Entry.dispatchEvent("workspaceUnbindUnload",!0),location.assign(encodeURI(e)),setTimeout((function(){Entry.dispatchEvent("workspaceBindUnload",!0)}),100),setTimeout((function(){!1===r&&t(),window.onblur=null}),3e3)}(e):navigator.userAgent.indexOf("Safari")>0?function(e){var r,o=document.createElement("iframe");o.src="about:blank",o.setAttribute("style","display:none"),document.getElementsByTagName("body")[0].appendChild(o);try{o.contentWindow.location.href=e,r=!0}catch(e){r=!1}r||t();setTimeout((function(){document.getElementsByTagName("body")[0].removeChild(o)}),500)}(e):alert(Lang.msgs.not_support_browser);var r},e.prototype.set=function(){this.programNotInstalled=!0},e.prototype.init=function(e,t){var r=this,o=this.getLoadingViewStyle();this.loadingView=window.open("/views/hwLoading.html","entry_hw_launcher",o);var n=void 0;n=setTimeout((function(){r.runViewer(e,t),clearInterval(n)}),1e3)},e.prototype.runViewer=function(e,t){var r=this;this.loadingView.document.write(""));var o=0,n=void 0;n=setInterval((function(){try{r.loadingView.location.href}catch(e){r.programNotInstalled=!0}if(o>10){clearInterval(n);var e=0,a=void 0;a=setInterval((function(){e++,r.loadingView.closed||e>2?clearInterval(a):r.loadingView.close(),r.programNotInstalled=!1,o=0}),5e3),t(!r.programNotInstalled)}o++}),100)},e.prototype.getLoadingViewStyle=function(){var e=window.screenLeft,t=window.screenTop;return"width=".concat(220,", height=").concat(225,", top=").concat(t,", left=").concat(e)},e}();var _,p,d=function(){return d=Object.assign||function(e){for(var t,r=1,o=arguments.length;r0&&n[n.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i};!function(e){e.builtIn="builtin",e.module="module"}(_||(_={})),function(e){e.disconnected="disconnected",e.socketConnected="socketConnected",e.hardwareConnected="hardwareConnected"}(p||(p={}));var m=function(){function e(){this.socketConnectionRetryCount=3;var e=localStorage.getItem(this.cloudRoomIdKey);this.sessionRoomId=e||this._createRandomRoomId(),e||localStorage.setItem(this.cloudRoomIdKey,this.sessionRoomId),this.programConnected=!1,this.communicationType="auto",this.portData={},this.sendQueue={},this.hwModuleType=_.builtIn,this._initHardwareObject(),this._addEntryEventListener()}return Object.defineProperty(e.prototype,"httpsServerAddress",{get:function(){return"https://hw.playentry.org:23518"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpsServerAddress2",{get:function(){return"https://hardware.playentry.org:23518"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpServerAddress",{get:function(){return"http://127.0.0.1:23518"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cloudRoomIdKey",{get:function(){return"entryhwRoomId"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"socketConnectOption",{get:function(){return{transports:["websocket","polling"],query:{client:!0,roomId:this.sessionRoomId}}},enumerable:!1,configurable:!0}),e.prototype._loadExternalHardwareBlock=function(e){return f(this,void 0,void 0,(function(){var t;return h(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Entry.moduleManager.loadModuleFromLocalOrOnline(e.name)];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),console.log(t),Entry.toast.alert(Lang.Msgs.hw_module_load_fail_title,"".concat(e.name," ").concat(Lang.Msgs.hw_module_load_fail_desc)),[3,3];case 3:return[2]}}))}))},e.prototype.retryConnect=function(){this._initSocket()},e.prototype.openHardwareProgram=function(e){var t=this;this._alertUnderVersionUsed().then((function(){t._executeHardware(e),t.socket&&t.socket.connected||setTimeout((function(){t._initSocket()}),1e3)}))},e.prototype.setExternalModule=function(e){this.hwModule=e,this.hwModuleType=_.module,this._banClassAllHardware(),Entry.dispatchEvent("hwChanged")},e.prototype.refreshHardwareBlockMenu=function(){if("disconnected"===Entry.hwLite.status){var e=Entry.getMainWS(),t=e&&e.blockMenu;if(t){this.hwModule||this._banClassAllHardware();var r=p.disconnected,o=p.socketConnected,n=p.hardwareConnected;this.programConnected?this.hwModule?(t.unbanClass(this.hwModule.name),this._setHardwareDefaultMenu(n)):this._setHardwareDefaultMenu(o):this._setHardwareDefaultMenu(r),t.hwCodeOutdated=!0,t._generateHwCode(!0),t.reDraw()}}else console.log("canel refreshHardwareBlockMenu() for HwLITE")},e.prototype.disconnectSocket=function(){this.programConnected&&(Entry.propertyPanel&&Entry.propertyPanel.removeMode("hw"),this.programConnected=!1,this.currentDeviceKey=void 0,this.hwModuleType===_.builtIn&&(this.hwModule=void 0),this.socket&&this.socket.close(),this.socket=void 0,Entry.dispatchEvent("hwChanged"),Entry.toast.alert(Lang.Msgs.hw_connection_termination_title,Lang.Msgs.hw_connection_termination_desc,!1))},e.prototype.setDigitalPortValue=function(e,t){console.warn("this function will be deprecated. please use Entry.hw.sendQueue directly."),this.sendQueue[e]=t,this.removePortReadable(e)},e.prototype.getAnalogPortValue=function(e){return console.warn("this function will be deprecated. please use Entry.hw.portData directly."),this.programConnected&&this.hwModule?this.portData["a".concat(e)]:0},e.prototype.getDigitalPortValue=function(e){return console.warn("this function will be deprecated. please use Entry.hw.portData directly."),this.programConnected&&this.hwModule?(this.setPortReadable(e),void 0!==this.portData[e]?this.portData[e]:0):0},e.prototype.setPortReadable=function(e){console.warn("this function will be deprecated. please control port state directly."),this.sendQueue.readablePorts||(this.sendQueue.readablePorts=[]);var t=!1;for(var r in this.sendQueue.readablePorts)if(this.sendQueue.readablePorts[r]==e){t=!0;break}t||this.sendQueue.readablePorts.push(e)},e.prototype.removePortReadable=function(e){if(console.warn("this function will be deprecated. please use Entry.hw.sendQueue directly."),this.sendQueue.readablePorts||Array.isArray(this.sendQueue.readablePorts)){var t;for(var r in this.sendQueue.readablePorts)if(this.sendQueue.readablePorts[r]==e){t=Number(r);break}null!=t&&(this.sendQueue.readablePorts=this.sendQueue.readablePorts.slice(0,t).concat(this.sendQueue.readablePorts.slice(t+1,this.sendQueue.readablePorts.length)))}},e.prototype.update=function(){this.socket&&!this.socket.disconnected&&(this.hwModule&&this.hwModule.sendMessage?this.hwModule.sendMessage(this):this._sendSocketMessage({data:JSON.stringify(this.sendQueue),mode:this.socketMode,type:"utf8"}),this.hwModule&&this.hwModule.afterSend&&this.hwModule.afterSend(this.sendQueue))},e.prototype.closeConnection=function(){var e;null===(e=this.socket)||void 0===e||e.close()},e.prototype.downloadConnector=function(){Entry.dispatchEvent("hwDownload","hardware")},e.prototype.downloadGuide=function(){Entry.dispatchEvent("hwDownload","manual")},e.prototype.downloadSource=function(){Entry.dispatchEvent("hwDownload","ino")},e.prototype.setZero=function(){var e;null===(e=this.hwModule)||void 0===e||e.setZero()},e.prototype.checkDevice=function(e){if(void 0!==e.company){var t="".concat(this._convertHexToString(e.company),".").concat(this._convertHexToString(e.model));this.currentDeviceKey&&t===this.currentDeviceKey?this.hwModule&&this.hwModule.dataHandler&&this.hwModule.dataHandler(e):(this.currentDeviceKey=t,this.hwModule=Entry.HARDWARE_LIST[t],this.hwModule&&(this.communicationType=this.hwModule.communicationType||"auto",this._banClassAllHardware(),Entry.dispatchEvent("hwChanged"),Entry.propertyPanel&&this.hwModule.monitorTemplate&&this._setHardwareMonitorTemplate(),Entry.toast.success(Lang.Msgs.hw_connection_success,Lang.Msgs.hw_connection_success_desc2)))}},e.prototype.openHardwareDownloadPopup=function(){Entry.events_.openHardWareDownloadModal?Entry.dispatchEvent("openHardWareDownloadModal"):this.popupHelper.show("hwDownload",!0)},e.prototype._initHardwareObject=function(){var e,t,r=this,o=Entry.hardwareEnable;this.popupHelper=(e=function(){r.downloadConnector()},(t=window.popupHelper||new c.default(!0)).addPopup("hwDownload",{type:"confirm",title:Lang.Msgs.not_install_title,setPopupLayout:function(r){var o=Entry.Dom("div",{class:"contentArea"}),n=Entry.Dom("div",{class:"textArea",parent:o}),a=Entry.Dom("div",{class:"text1",parent:n}),i=Entry.Dom("div",{class:"text2",parent:n}),s=Entry.Dom("div",{class:"text3",parent:n}),l=Entry.Dom("div",{class:"text4",parent:n}),c=Entry.Dom("div",{classes:["popupCancelBtn","popupDefaultBtn"],parent:o}),u=Entry.Dom("div",{classes:["popupOkBtn","popupDefaultBtn"],parent:o});a.text(Lang.Msgs.hw_download_text1),i.html(Lang.Msgs.hw_download_text2),s.text(Lang.Msgs.hw_download_text3),l.text(Lang.Msgs.hw_download_text4),c.text(Lang.Buttons.cancel),u.html(Lang.Msgs.hw_download_btn),o.bindOnClick(".popupDefaultBtn",(function(){$(this).hasClass("popupOkBtn")&&e(),t.hide()})),r.append(o)}}),t),o&&this._initSocket()},e.prototype._addEntryEventListener=function(){Entry.addEventListener("hwChanged",this.refreshHardwareBlockMenu.bind(this)),Entry.addEventListener("stop",this.setZero.bind(this))},e.prototype._createRandomRoomId=function(){return"xxxxxxxxyx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},e.prototype._trySocketConnect=function(e){var t=this;return new Promise((function(r,o){var n=io.connect(e,t.socketConnectOption);n.io.reconnectionAttempts(t.socketConnectionRetryCount),n.io.reconnectionDelayMax(1e3),n.io.timeout(1e3),n.on("connect",(function(){t._handleSocketConnected(n),r()})),n.on("reconnect_failed",(function(){o()}))}))},e.prototype._handleSocketConnected=function(e){var t=this;e.removeEventListener("reconnect_failed"),e.removeEventListener("connect"),this.socket=e,this._setSocketConnected(),Entry.playground&&Entry.playground.object&&Entry.playground.setMenu(Entry.playground.object.objectType),e.on("connect",(function(){t._setSocketConnected()})),e.on("mode",(function(e){0===t.socketMode&&1===e&&t._disconnectHardware(),t.socketMode=e}));var r=new s(e);r.addEventListener("init",this._loadExternalHardwareBlock.bind(this)),r.addEventListener("state",(function(e,r){return f(t,void 0,void 0,(function(){return h(this,(function(t){switch(t.label){case 0:switch(e){case"disconnectHardware":return[3,1];case"connected":return[3,2]}return[3,4];case 1:return this._disconnectHardware(),[3,5];case 2:return[4,this._loadExternalHardwareBlock(r)];case 3:return t.sent(),[3,5];case 4:return[3,5];case 5:return[2]}}))}))})),r.addEventListener("disconnect",this._disconnectHardware.bind(this)),r.addEventListener("data",(function(e){t.portData=e,t.checkDevice(e),t._updatePortData(e),t.hwModule&&t.hwModule.afterReceive&&t.hwModule.afterReceive(e)})),e.on("disconnect",(function(){t._setSocketClosed(),t.reconnectionTimeout=setTimeout((function(){t._initSocket()}),1500)})),e.on("reconnect_failed",(function(){t._setSocketClosed()}))},e.prototype._setSocketConnected=function(){this.programConnected=!0,console.log("Hardware Program Connected"),Entry.dispatchEvent("hwChanged")},e.prototype._setSocketClosed=function(e){void 0===e&&(e=!0),this.programConnected=!1,this.hwModule=void 0,this.currentDeviceKey=void 0,e&&Entry.dispatchEvent("hwChanged")},e.prototype._initSocket=function(){var e=this;if(this.socket)this.reconnectionTimeout&&(clearTimeout(this.reconnectionTimeout),this.reconnectionTimeout=void 0),this.socket.io.reconnection(!0),this.socket.connect();else{var t=[this.httpsServerAddress,this.httpsServerAddress2];["http:","file:"].indexOf(location.protocol)>-1?t.unshift(this.httpServerAddress):t.push(this.httpServerAddress),t.reduce((function(t,r){return f(e,void 0,void 0,(function(){return h(this,(function(e){switch(e.label){case 0:return[4,t];case 1:if(e.sent())return[2,!0];if("disconnected"!==Entry.hwLite.status)return console.log("canel connectionTry for HwLITE"),[2];e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this._trySocketConnect(r)];case 3:return e.sent(),[2,!0];case 4:return e.sent(),[2,!(!this.programConnected&&!this.socket)];case 5:return[2]}}))}))}),void 0).then((function(t){t||(console.warn("All hardware socket connection failed"),e._setSocketClosed())})).catch((function(){console.error("Error occurred while try to connect hardware socket")}))}},e.prototype._setHardwareDefaultMenu=function(e){var t,r=Entry.getMainWS(),o=r&&r.blockMenu;if(o){var n=p.disconnected,a=p.socketConnected,i=p.hardwareConnected;switch(e){case n:o.unbanClass("arduinoDisconnected",!0),o.banClass("arduinoConnected",!0),o.banClass("arduinoConnect",!0),(null===(t=Entry.hwLite)||void 0===t?void 0:t.isHwLiteSupportAgent())?o.unbanClass("arduinoLiteSupported",!0):o.banClass("arduinoLiteSupported",!0);break;case a:o.banClass("arduinoLiteSupported",!0),o.banClass("arduinoDisconnected",!0),o.banClass("arduinoConnected",!0),o.unbanClass("arduinoConnect",!0);break;case i:o.banClass("arduinoLiteSupported",!0),o.banClass("arduinoDisconnected",!0),o.unbanClass("arduinoConnected",!0),o.banClass("arduinoConnect",!0)}}},e.prototype._banClassAllHardware=function(){var e=Entry.getMainWS(),t=e&&e.blockMenu;t&&Object.values(Entry.HARDWARE_LIST||{}).forEach((function(e){t.banClass(e.name,!0)}))},e.prototype._disconnectHardware=function(){this.hwModule&&(Entry.propertyPanel&&Entry.propertyPanel.removeMode("hw"),this.currentDeviceKey=void 0,this.hwModule=void 0,Entry.dispatchEvent("hwChanged"),Entry.toast.alert(Lang.Msgs.hw_connection_termination_title,Lang.Msgs.hw_connection_termination_desc,!1))},e.prototype._sendSocketMessage=function(e){this.programConnected&&this.socket&&!this.socket.disconnected&&this.socket.emit("message",e)},e.prototype._updatePortData=function(e){this.hwMonitor&&Entry.propertyPanel&&"hw"===Entry.propertyPanel.selected&&this.hwMonitor.update(e,this.sendQueue)},e.prototype._setHardwareMonitorTemplate=function(){this.hwMonitor?(this.hwMonitor.setHwModule(this.hwModule),this.hwMonitor.initView()):this.hwMonitor=new l.Z(this.hwModule),Entry.propertyPanel.addMode("hw",this.hwMonitor),this.hwMonitor.generateViewByMode()},e.prototype._alertUnderVersionUsed=function(){return new Promise((function(e){if(localStorage.getItem("skipNoticeHWOldVersion"))e(null);else{var t=Lang.Msgs.hardware_need_update_title,r=Lang.Msgs.hardware_need_update_content;Entry.modal.alert(r,t,{withDontShowAgain:!0}).then((function(t){(t||{}).dontShowChecked&&localStorage.setItem("skipNoticeHWOldVersion","true"),e(null)}))}}))},e.prototype._executeHardware=function(e){var t=this;this.programLauncher=new u;var r=Object.entries(d({roomId:this.sessionRoomId},e)).reduce((function(e,t){var r=g(t,2),o=r[0],n=r[1];return""===e?"".concat(o,":").concat(n):"".concat(e,"&").concat(o,":").concat(n)}),""),o="entryhw://?".concat(r);console.log("request Hardware using url custom schema.. : ",o),this.programLauncher.executeUrl(o,(function(){return t.openHardwareDownloadPopup()}))},e.prototype._convertHexToString=function(e){return"string"==typeof e?e.toUpperCase():e.toString(16).toUpperCase()},e}();const y=m;Entry.HW=m},20570:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var o,n=r(66162),a=r.n(n),i=r(11935),s=r.n(i),l=r(26639),c=function(e,t,r,o){return new(r||(r=Promise))((function(n,a){function i(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((o=o.apply(e,t||[])).next())}))},u=function(e,t){var r,o,n,a,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]{"use strict";r.r(t),r.d(t,{default:()=>n});var o=function(){function e(){this.modes={},this.selected=void 0}return e.prototype.generateView=function(e){this.view_=e,this.view_.addClass("entryPlaygroundIntro")},e.prototype.setView=function(e){this.view_.firstChild&&this.view_.removeChild(this.view_.firstChild),this.view_.addClass("active"),e.appendTo(this.view_)},e.prototype.removeView=function(){this.view_.firstChild&&this.view_.removeChild(this.view_.firstChild),this.view_.removeClass("active")},e}();const n=o;Entry.Intro=o},239:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var o=r(93880),n=r(81014),a=function(){return a=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";r.r(t),r.d(t,{CommonUtil:()=>i,default:()=>s});var o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},n=function(e,t,r){if(r||2===arguments.length)for(var o,n=0,a=t.length;n{"use strict";r.r(t),r.d(t,{default:()=>u,fromJson:()=>c});var o=r(64637),n=r.n(o),a=function(e,t,r,o){return new(r||(r=Promise))((function(n,a){function i(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((o=o.apply(e,t||[])).next())}))},i=function(e,t){var r,o,n,a,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]{"use strict";r.d(t,{A:()=>o});var o=function(){function e(e,t,r,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===o&&(o=0),this.x=e,this.y=t,this.width=r,this.height=o}return e.Collide=function(e,t){return e.collide(t)},e.Contain=function(e,t){return e.contain(t)},e.prototype.area=function(){return this.width*this.height},e.prototype.collide=function(e){return!(e.x>=this.x+this.width||e.x+e.width<=this.x||e.y>=this.y+this.height||e.y+e.height<=this.y)},e.prototype.contain=function(e){return e.x>=this.x&&e.y>=this.y&&e.x+e.width<=this.x+this.width&&e.y+e.height<=this.y+this.height},e}()},86088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var o=function(){function e(e){this.generateView(e)}return e.prototype.generateView=function(e){var t=Entry.createElement("div","entryPdfWorkspace");t.addClass("entryRemove");var r="/pdfjs/web/viewer.html";e&&""!==e&&(r+="?file=".concat(e));var o=Entry.createElement("iframe","entryPdfIframeWorkspace");o.setAttribute("id","pdfViewIframe"),o.setAttribute("frameborder","0"),o.setAttribute("src",r),t.appendChild(o),this._view=t},e.prototype.getView=function(){return this._view},e.prototype.resize=function(){var e=document.getElementById("entryContainerWorkspaceId"),t=document.getElementById("pdfViewIframe"),r=e.offsetWidth;t.width="".concat(r,"px"),t.height="".concat(9*r/16,"px")},e}();const n=o;Entry.Pdf=o},62020:(e,t,r)=>{"use strict";r.d(t,{v:()=>_});var o,n,a=r(64939),i=r(89792),s=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},c=function(e,t,r){if(r||2===arguments.length)for(var o,n=0,a=t.length;nt.width||o>t.height)&&(n.fit(t,a,n.ScaleMode.INSIDE,n.AlignMode.TL),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),a.scaleFactor=r/a.width,a.scaleFactorX=r/a.width,a.scaleFactorY=o/a.height),a},e}())},13255:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PIXIAtlasManager:()=>N});var o,n,a=r(67277),i=r(32285),s=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=function(e){function t(t,r){var o=e.call(this,t,r)||this;return o._isEmptyTexture=!0,o.imageRectForPacking=r,o}return s(t,e),Object.defineProperty(t.prototype,"isEmptyTexture",{get:function(){return this._isEmptyTexture},enumerable:!1,configurable:!0}),t.prototype.getBaseTexture=function(){return this.baseTexture},t.prototype.drawImageAtBaseTexture=function(e,t){if(!this._isEmptyTexture){var r=e.source(),o=this.getBaseTexture().getCtx(),n=this.frame,a=n.width,i=n.height,s=n.x,l=n.y,c=e.srcWidth,u=e.srcHeight;o.drawImage(r,0,0,c,u,s,l,a,i),t&&(o.save(),o.imageSmoothingEnabled=!1,o.drawImage(r,0,0,c,1,s,l-t,a,t),o.drawImage(r,0,u-1,c,1,s,l+i,a,t),o.drawImage(r,0,0,1,u,s-t,l,t,i),o.drawImage(r,c-1,0,1,u,s+a,l,t,i),o.restore())}},t.prototype.updateBaseAndUVs=function(e){this._isEmptyTexture=!1,this.baseTexture=e,this.frame.x==this.imageRectForPacking.x&&this.frame.y==this.imageRectForPacking.y||(this.frame.x=this.imageRectForPacking.x,this.frame.y=this.imageRectForPacking.y,this._updateUvs())},t}(i.n),c=r(65575),u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),_=function(e){function t(t,r){var o=e.call(this,null,{scaleMode:r})||this;return o._viewer=t,o}return u(t,e),Object.defineProperty(t.prototype,"activated",{get:function(){return this._activated},enumerable:!1,configurable:!0}),t.prototype.setCanvas=function(e){var t=new c.resources.CanvasResource(e);this.setResource(t),this._canvas=e,this._ctx=e.getContext("2d")},t.prototype.getCanvas=function(){return this._canvas},t.prototype.cleanCanvas=function(){this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)},t.prototype.activate=function(e){this._activated=!0,this._canvas.width=e,this._canvas.height=e,this._viewer.add(this._canvas)},t.prototype.deactivate=function(){this._activated=!1,this._canvas.width=1,this._canvas.height=1,this.dispose()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._canvas=null,this._ctx=null},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._viewer&&this._viewer.removeCanvas(this._canvas)},t.prototype.getCtx=function(){return this._ctx},t}(c.BaseTexture),p=r(6631),d=r.n(p),f=function(){function e(){this._map={}}return e.prototype.add=function(e,t){this._map[e]=t},e.prototype.getValue=function(e){return this._map[e]},e.prototype.hasValue=function(e){return Boolean(this._map[e])},e.prototype.remove=function(e){var t=this._map[e];return delete this._map[e],t},e.prototype.destroy=function(){this._map=null},e.prototype.each=function(e){d()(this._map,e)},e}(),h=r(62020),g=r(24482),m=function(){function e(t,r,o,n){this.sceneID=t,this._option=r,this._loader=o,this._viewer=n,this._packedRects=[],this._notPackedRects=[],this._arrBaseTexture=[],this._path_tex_map=new f,this._timer=new g._,e.initEmptyTex(r.atlasOption.atlasSize),this._packer=r.atlasOption.newPacker()}return e.initEmptyTex=function(e){if(!n){var t=new _;n=t,t.setRealSize(e,e),t.setSize(e,e);var r=t,o=function(){};r.destroy=o,r.on=o,r.once=o,r.emit=o}},e.prototype.addPicInfo=function(e){var t=this,r=h.v.getRawPath(e);if(!this._path_tex_map.hasValue(r)){var o=h.v.getNewImageRect(e,this._option.texMaxRect);this._loader.load(e,o);var n=this._newTexture(r,o);o.data={path:r,tex:n},this._notPackedRects.push(o),this._activated&&(this._timer.isRunning||(console.log("pack scheduled"),this._timer.timeout(250,(function(){t._imageRemoved?(console.log("삭제된 이미지가 있어서 invalidate"),t._invalidate()):(console.log("just packing"),t._pack())}))))}},e.prototype._newTexture=function(e,t){var r=new l(n,t);return this._path_tex_map.add(e,r),r},e.prototype._pack=function(){var e=this;if(this._notPackedRects.length){var t=this._notPackedRects.length,r=(new Date).getTime();this._packer.addArray(this._notPackedRects);var o=[];this._notPackedRects.forEach((function(t){var r=e._getBaseTexture(t.binIndex);t.data.tex.updateBaseAndUVs(r);var n=e._loader.getImageInfo(t.data.path);n.isReady&&(e.putImage(n,!1),-1==o.indexOf(r)&&o.push(r))})),o.forEach((function(e){e.update()})),this._destroyBaseTextureAfter(this._packer.bins.length),this._packedRects=this._packedRects.concat(this._notPackedRects),this._notPackedRects=[],r=(new Date).getTime()-r,console.log("pack ".concat(t," items. time:").concat(r))}},e.prototype.activate=function(){var e=this;this._activated=!0,this._invalidate();var t=this._option.atlasOption.atlasSize;d()(this._packer.bins,(function(r,o){var n=e._arrBaseTexture[o];n.activate(t),n.update()}));var r=this._option.atlasOption.extrudeSize;this._path_tex_map.each((function(t,o){var n=e._loader.getImageInfo(o);n&&n.isReady&&t.drawImageAtBaseTexture(n,r)}))},e.prototype._getBaseTexture=function(e){var t=this._arrBaseTexture[e];if(t)return t;var r=this._option;return(t=new _(this._viewer,r.scaleMode)).setCanvas(a.Z.getOffScreenCanvas()),t.setRealSize(r.atlasOption.atlasSize,r.atlasOption.atlasSize),t.setSize(r.atlasOption.atlasSize,r.atlasOption.atlasSize),t.mipmap=r.mipmap,this._arrBaseTexture[e]=t,t},e.prototype.deactivate=function(){this._timer.reset(),this._activated=!1,d()(this._arrBaseTexture,(function(e){e.deactivate()}))},e.prototype.getTexture=function(e){return this._path_tex_map.getValue(e)},e.prototype.putImage=function(e,t){if(void 0===t&&(t=!0),e){var r=this.getTexture(e.path);if(r&&!r.isEmptyTexture){var o=this._option.atlasOption,n=r.getBaseTexture();n.activated||n.activate(o.atlasSize),r.drawImageAtBaseTexture(e,o.extrudeSize),t&&n.update(),Entry.requestUpdate=!0}}},e.prototype._invalidate=function(){var e=this;if(this._activated){this._imageRemoved=!1;var t=h.v.getScenePathSet(this.sceneID);this._notPackedRects.length=0,this._packedRects.length=0;var r=[];this._path_tex_map.each((function(o,n){t&&t.hasValue(n)?e._notPackedRects.push(e._path_tex_map.getValue(n).imageRectForPacking):r.push(n)})),console.log("unusedPath",r),r.forEach((function(t){e._path_tex_map.remove(t).destroy(!1)})),this._packer.empty(),this._cleanCanvas(),this._pack()}},e.prototype._cleanCanvas=function(){for(var e=this._arrBaseTexture.length,t=0;t\n .atlas-canvas-container {\n position: absolute;\n width: 100%;\n pointer-events: none;\n display: none;\n }\n .atlas-canvas {\n width: auto; height: ".concat(e,"px; float: right; border: 1px solid red;\n }\n")}(e)),this.$container=$("
")}return e.prototype.attachToBody=function(){var e=this;this.attached||(this.attached=!0,setTimeout((function(){e.$container.click((function(){return!1})),$("head").append(e.$style),$("body").append(e.$container)}),500))},e.prototype.add=function(e){if(e instanceof HTMLCanvasElement){this.attachToBody();var t=$(e);this.$container.append(t),t.addClass("atlas-canvas")}},e.prototype.removeCanvas=function(e){e&&$(e).remove()},e.prototype.empty=function(){this.$container.empty()},e.prototype.toggleVisible=function(){this.$container.toggle()},e}(),b=r(69509),v=r(89792),E=function(){function e(){}return e.prototype.pushRect=function(e,t){e.binIndex=this.index,e.oversized=t,this.rects.push(e)},e}(),k=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),S=function(e){function t(t,r,o,n,a,i){void 0===r&&(r=w),void 0===o&&(o=w),void 0===n&&(n=0),void 0===a&&(a=0),void 0===i&&(i={smart:!0,pot:!0,square:!0});var s=e.call(this)||this;return s.index=t,s.maxWidth=r,s.maxHeight=o,s.border=n,s.padding=a,s.options=i,s.freeRects=[],s.rects=[],s.verticalExpand=!1,s.width=s.options.smart?0:r,s.height=s.options.smart?0:o,s.freeRects.push(new v.A(n,n,s.maxWidth+2*s.padding-s.border,s.maxHeight+2*s.padding-s.border)),s.stage=new v.A(0,0,s.width,s.height),s}return k(t,e),t.prototype.add=function(e){var t=2*this.padding,r=e.width,o=e.height,n=this.findNode(r+t,o+t);if(n){this.updateBinSize(n);for(var a=this.freeRects.length,i=0;ithis.height,e.x=n.x,e.y=n.y,this.pushRect(e,!1),!0}if(this.verticalExpand){if(this.updateBinSize(new v.A(0,this.height+t,r+t,o+t))||this.updateBinSize(new v.A(this.width+t,0,r+t,o+t)))return this.add(e)}else if(this.updateBinSize(new v.A(this.width+t,0,r+this.padding,o+t))||this.updateBinSize(new v.A(0,this.height+t,r+t,o+t)))return this.add(e)},t.prototype.findNode=function(e,t){var r,o,n,a=Number.MAX_VALUE;for(var i in this.freeRects)(o=this.freeRects[i]).width>=e&&o.height>=t&&(r=o.width*o.height-e*t)e.x){if(t.y>e.y&&t.ye.y){if(t.x>e.x&&t.xthis.maxWidth+t||o>this.maxHeight+t)&&(this.expandFreeRects(r+t,o+t),this.width=this.stage.width=r,this.height=this.stage.height=o,!0)},t.prototype.expandFreeRects=function(e,t){var r=this,o=2*this.padding;this.freeRects.forEach((function(n,a){n.x+n.width>=Math.min(r.width+o,e)&&(n.width=e-n.x),n.y+n.height>=Math.min(r.height+o,t)&&(n.height=t-n.y)}),this),this.freeRects.push(new v.A(this.width+o,0,e-this.width-o,t)),this.freeRects.push(new v.A(0,this.height+o,e,t-this.height-o)),this.freeRects.forEach((function(e,t){(e.width<=0||e.height<=0)&&r.freeRects.splice(t,1)}),this),this.pruneFreeList()},t}(E),R=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),A=function(e){function t(t,r){var o=e.call(this)||this;return o.index=t,o.rects=[],o.freeRects=[],o.maxWidth=r.width,o.maxHeight=r.height,o.options={smart:!1,pot:!1,square:!1},o.pushRect(r,!0),o}return R(t,e),t.prototype.add=function(e){return!1},t}(E),w=4096,D=function(){function e(e,t,r,o,n){void 0===e&&(e=w),void 0===t&&(t=w),void 0===r&&(r=0),void 0===o&&(o=0),void 0===n&&(n={smart:!0,pot:!0,square:!0}),this.width=e,this.height=t,this.border=r,this.padding=o,this.options=n,this.bins=[]}return e.prototype.add=function(e){var t=e.width,r=e.height,o=this.bins.length;if(t>this.width||r>this.height)this.bins.push(new A(o,e));else{var n=this.bins.find((function(t){return t.add(e)}));if(!n){var a=new S(o,this.width,this.height,this.border,this.padding,this.options);a.add(e),this.bins.push(a)}}},e.prototype.addArray=function(e){var t=this;this.sort(e).forEach((function(e){return t.add(e)}))},e.prototype.sort=function(e){return e.slice().sort((function(e,t){return Math.max(t.width,t.height)-Math.max(e.width,e.height)}))},e.prototype.empty=function(){this.bins.length=0},e}(),T=r(41231),x=function(){function e(e,t){this._USE_ATLAS=!1,this.scaleMode=c.SCALE_MODES.LINEAR,this.mipmap=c.MIPMAP_MODES.OFF,this._USE_ATLAS=this._isSpriteSheetEnabled(),this.GPU_TEX_MAX_SIZE=this.computeMaxTextureSize(4096),this._texStageRatio=1,this.texMaxRect=this.getTexRect(e,t,this._texStageRatio,this.GPU_TEX_MAX_SIZE),this.atlasOption={extrudeSize:2,atlasSize:this.GPU_TEX_MAX_SIZE,newPacker:this.newPacker.bind(this)}}return Object.defineProperty(e.prototype,"USE_ATLAS",{get:function(){return this._USE_ATLAS},enumerable:!1,configurable:!0}),e.prototype.newPacker=function(){var e=this.atlasOption.atlasSize;return new D(e,e,2,6,{smart:!1,pot:!0,square:!1})},e.prototype.getTexRect=function(e,t,r,o){return new c.Rectangle(0,0,Math.min(Math.round(e*r),o),Math.min(Math.round(t*r),o))},e.prototype.computeMaxTextureSize=function(e){var t=a.Z.getOffScreenCanvas(!0),r=t.getContext("webgl")||t.getContext("experimental-webgl"),o=r?r.getParameter(r.MAX_TEXTURE_SIZE):2048;return o=Math.min(o,e),(0,T.$)("Max texture size : ".concat(o)),o},e.prototype._isSpriteSheetEnabled=function(){var e=window.location.href.split("?")[1];if(!e)return!1;for(var t=e.split("&"),r=0;r{"use strict";r.d(t,{U:()=>p});var o,n=r(62020),a=r(67277),i=r(41231);!function(e){e[e.NONE=1]="NONE",e[e.LOADING=2]="LOADING",e[e.COMPLETE=3]="COMPLETE",e[e.DESTROYED=4]="DESTROYED"}(o||(o={}));var s=function(){function e(e,t,r){this._imgRect=t,this._onLoadCallback=r,this.loadState=o.NONE,this._triedCnt=0,this._subCallback=[],this._realPath=this._getImageSrc(e),this._rawPath=n.v.getRawPath(e),this._picName=e.name}return e.prototype.source=function(){return this._img||this._canvas},e.prototype.addCallback=function(e){e&&!this.isReady&&this._subCallback.push(e)},e.prototype.load=function(){var e=this;if(this.loadState==o.NONE){this.loadState=o.LOADING;var t=new Image;this._img=t,t.onload=function(){Entry.Loader.removeQueue(),e.loadState!=o.DESTROYED&&(e.loadState=o.COMPLETE,e._canvas=e._resizeIfNotValidSize(),e._canvas&&e._destroyImage(),e._onLoadCallback(e),e._onLoadCallback=null,e._subCallback.forEach((function(t){t(e)})),e._subCallback=null)},t.onerror=function(r){Entry.Loader.removeQueue(),e.loadState!=o.DESTROYED&&(e._triedCnt?e._triedCnt<3?(e._triedCnt++,e._loadPath("".concat(Entry.mediaFilePath,"_1x1.png"))):t.onerror=null:("invisible"!==Entry.type&&console.log("err=",e._picName,"load failed"),e._triedCnt=1,e._loadPath(e._realPath)))},this._loadPath(this._realPath)}},e.prototype._loadPath=function(e){this.loadState!=o.DESTROYED&&(Entry.Loader.addQueue(),this._img.src=e)},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.loadState==o.COMPLETE},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._rawPath},enumerable:!1,configurable:!0}),e.prototype._getImageSrc=function(e){if(e.fileurl)return e.fileurl;var t=e.filename;return"".concat(Entry.defaultPath,"/uploads/").concat(t.substring(0,2),"/").concat(t.substring(2,4),"/image/").concat(t,".png")},e.prototype.destroy=function(){this.loadState=o.DESTROYED,this._destroyImage(),this._canvas&&(this._canvas=null),this._subCallback=null,this._rawPath=this._realPath=null},e.prototype._destroyImage=function(){this._img&&(this._img.onload=this._img.onerror=null,this._img=null)},e.prototype._resizeIfNotValidSize=function(){var e=this._img,t=e.naturalWidth||e.width,r=e.naturalHeight||e.height;this.srcWidth=t,this.srcHeight=r;var o=this._imgRect,n=1==o.scaleFactorX&&1==o.scaleFactorY,s=o.dataWidth==t&&o.dataHeight==r;if(n&&s)return null;s||(0,i.b)("Image size not match. data(w=".concat(o.dataWidth,",h=").concat(o.dataHeight,"), real(w=").concat(t,",h=").concat(r,")"));var l=a.Z.getOffScreenCanvas();this.srcWidth=l.width=o.width,this.srcHeight=l.height=o.height;var c=l.getContext("2d");return c.imageSmoothingEnabled=!0,c.drawImage(e,0,0,o.width,o.height),l},e}(),l=r(64939),c=r(24482),u=r(6631),_=r.n(u),p=function(){function e(e){this._onLoadCallback=e,this._path_info_map={},this._timer=new c._}return e.prototype.load=function(e,t){var r=n.v.getRawPath(e),o=this._path_info_map[r];o||(o=new s(e,t,this._onLoadCallback),this._path_info_map[r]=o,o.load())},e.prototype.getImageInfo=function(e){return this._path_info_map[e]},e.prototype._syncWithEntryObjects=function(){var e=this;this._syncRequested=!1;for(var t,r,o,n=Entry.container.getAllObjects(),a=new l.C,s=n.length,c=0;c0&&(0,i.$)("".concat(p," image item(s) deleted"))},e.prototype.empty=function(){this._timer.reset(),this._syncRequested=!1,_()(this._path_info_map,(function(e,t){e.destroy()})),this._path_info_map={}},e.prototype.requestSync=function(){var e=this;this._syncRequested||(this._syncRequested=!0,this._timer.timeout(1e3,(function(){e._syncWithEntryObjects()})))},e}()},64939:(e,t,r)=>{"use strict";r.d(t,{C:()=>a});var o=r(6631),n=r.n(o),a=function(){function e(){this._map={}}return e.prototype.hasValue=function(e){return this._map[e]},e.prototype.put=function(e){this._map[e]=!0},e.prototype.remove=function(e){delete this._map[e]},e.prototype.each=function(e){n()(this._map,(function(t,r){e(r)}))},e}()},32285:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});var o,n=r(65575),a=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(t,r){var o=this,a=new n.Rectangle(0,0,r.width,r.height);return(o=e.call(this,t,a)||this).textureScaleFactorX=r.scaleFactorX,o.textureScaleFactorY=r.scaleFactorY,o}return a(t,e),t.prototype.assignTextureScaleFactor=function(e){if(e){var t=e;t.textureScaleFactorX=this.textureScaleFactorX,t.textureScaleFactorY=this.textureScaleFactorY}},t}(n.Texture)},91233:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});var o=r(65575),n=function(){function e(){}return e.init=function(){this.point1=new o.Point,this.point2=new o.Point,this.rect1=new o.Rectangle,this.rect2=new o.Rectangle,this.matrix1=new o.Matrix,this.matrix2=new o.Matrix},e}()},67277:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var o,n=r(65575),a=r(32285),i=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){function e(){}return e.prototype.setOrgTex=function(e){this._orgTex=e},e.prototype.isSameRenderTex=function(e){return e==this._renderTex},Object.defineProperty(e.prototype,"orgTex",{get:function(){return this._orgTex},enumerable:!1,configurable:!0}),e.prototype.getRenderTexture=function(e,t){if(!this._renderTex)return this._renderTex=n.RenderTexture.create({width:e,height:t}),this._renderTex;var r=this._renderTex;return r.width!=e||r.height!=t?(this.destroyRenderTexture(),this.getRenderTexture(e,t)):this._renderTex},e.prototype.destroyRenderTexture=function(){this._renderTex&&(this._renderTex.destroy(!0),this._renderTex=null)},e.prototype.destroy=function(){this.destroyRenderTexture(),this._orgTex=null,this.filters=null},e}(),l=new n.Sprite,c=new n.Matrix,u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.internal_getOriginalTex=function(){return this._filterData&&this._filterData.orgTex||this.texture},t.prototype.setFilterAndCache=function(e){e&&e.length?(this._filterData?this._filterData.isSameRenderTex(this.texture)||this._filterData.setOrgTex(this.texture):(this._filterData=new s,this._filterData.setOrgTex(this.texture)),this._filterData.filters=e,this._filterData.invalidate=!0):this._filterData&&(this.texture=this._filterData.orgTex,this._filterData.destroy(),this._filterData=null)},t.prototype.refreshFilter=function(){this._filterData&&this._filterData.filters&&this.setFilterAndCache(this._filterData.filters)},t.prototype.destroy=function(t){e.prototype.destroy.call(this,t),this._filterData&&(this._filterData.destroy(),this._filterData=null)},t.prototype.render=function(t){this._filterData&&this._filterData.invalidate&&(this._filterData.invalidate=!1,this._initFilterCache(t)),e.prototype.render.call(this,t)},t.prototype._initFilterCache=function(e){var t=this._filterData,r=t.orgTex,o=r.orig.width,n=r.orig.height,i=t.getRenderTexture(o,n);if(i){t.orgTex instanceof a.n&&t.orgTex.assignTextureScaleFactor(i);var s=l;s.filters=this._filterData.filters,s.texture=r;var u=e.renderTexture.current;e.batch.flush(),e.render(s,i,!0,c,!1),e.renderTexture.bind(u),this.texture=i,s.texture=null}},t}(n.Sprite),_=r(91233),p=r(38946),d=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.destroyed=!1,t}return d(t,e),t.prototype.destroy=function(t){this.destroyed=!0,e.prototype.destroy.call(this,t)},t}(n.Graphics);const h=function(){function e(){}return e.sprite=function(e,t){return new u(t)},e.container=function(e){return new n.Container},e.text=function(e,t,r,o,n){var a=/((\d+)(pt|sp|px))?\s*(.+)/gi.exec(t)||[],i=a[4]||"NanumGothic, 'Nanum Gothic'",s=a[1]||"10pt",l=parseInt(r.replace("#","0x"))||0;return new p.$(e,{fontFamily:i,fontSize:s,fill:l,textBaseline:"middle",align:n||"left",miterLimit:2.5,padding:5})},e.getOffScreenCanvas=function(e){void 0===e&&(e=!1),e=!0;var t=window;return!e&&"OffscreenCanvas"in t?new t.OffscreenCanvas(1,1):document.createElement("canvas")},e.colorToUint=function(e){return e?Number(e.replace("#","0x")):void 0},e.todo=function(e){},e.newPIXIGraphics=function(){return new f(!1)},e.randomRGBAString=function(e){void 0===e&&(e=.3);var t=this._rand255;return"rgba(".concat(t(),",").concat(t(),",").concat(t(),",").concat(e,")")},e._rand255=function(){return Math.floor(255*Math.random())},e.getTransformBound=function(e){var t=e.getLocalBounds(_.i.rect1),r=t.x,o=t.y,n=t.width,a=t.height,i=_.i.matrix1;if(e.localTransform.copyTo(i),r||o){var s=_.i.matrix2.identity().translate(-r,-o);i.append(s)}var l=n*i.a,c=n*i.b,u=a*i.c,p=a*i.d,d=i.tx,f=i.ty,h=d,g=d,m=f,y=f;return(r=l+d)g&&(g=r),(r=l+u+d)g&&(g=r),(r=u+d)g&&(g=r),(o=c+f)y&&(y=o),(o=c+p+f)y&&(y=o),(o=p+f)y&&(y=o),t.x=h,t.y=m,t.width=g-h,t.height=y-m,t},e}()},49338:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PIXIGlobal:()=>f});var o=r(65575),n=r(22627),a=(r(87991),r(13255)),i=r(3529),s=r(91233),l=r(29031),c=r(56587),u=r(73558),_="fontLoaded",p=function(){function e(){this._items=[],this._handleFontLoaded=this._handleFontLoaded.bind(this),this._listen()}return e.prototype._listen=function(){window.fontLoaded?this._fontLoaded=!0:Entry.addEventListener(_,this._handleFontLoaded)},e.prototype._handleFontLoaded=function(){this._fontLoaded=!0,Entry.removeEventListener(_,this._handleFontLoaded),o.TextMetrics.clearMetrics(null),this._items.forEach((function(e){e.updateText(!1)})),Entry.requestUpdate=!0,this._items=null},e.prototype.manage=function(e){this._fontLoaded||this._items.push(e)},e.prototype.unmanage=function(e){if(!this._fontLoaded){var t=this._items,r=t.indexOf(e);-1!=r&&t.splice(r,1)}},e}(),d=r(39607),f=new(function(){function e(){}return e.prototype.initOnce=function(){this._init||(this._init=!0,this._isWebGLSupported(),this.fontLoadChecker=new p,n.h.initTempObject(),window.ndgmr=n.h,s.i.init(),this.atlasManager=new a.PIXIAtlasManager,(0,c.O)(),(0,d.f)(),(0,i.x)(),(0,l.a)(),(0,u.i)())},e.prototype.getNewApp=function(e){o.utils.skipHello();var t=new o.Application({view:e,width:e.width,height:e.height,autoStart:!1,antialias:!0,transparent:!0});return t.stage.canvas=e,t},e.prototype._isWebGLSupported=function(){if(!o.utils.isWebGLSupported())throw new Error("webgl not supported")},e}())},20159:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var o,n=r(65575),a=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});const i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._cancelLine=!1,t._underLine=!1,t._maxHeight=-1,t.styleID=0,t}return a(t,e),Object.defineProperty(t.prototype,"cancelLine",{get:function(){return this._cancelLine},set:function(e){this._cancelLine!==e&&(this._cancelLine=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordBreakAll",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"underLine",{get:function(){return this._underLine},set:function(e){this._underLine!==e&&(this._underLine=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxHeight",{get:function(){return this._maxHeight},set:function(e){this._maxHeight!==e&&(this._maxHeight=e,this.styleID++)},enumerable:!1,configurable:!0}),t}(n.TextStyle)},24482:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var o=function(){function e(){}return e.prototype.timeout=function(e,t){var r=this;this.reset(),this._id=window.setTimeout((function(){t(),r._id=0}),e)},Object.defineProperty(e.prototype,"isRunning",{get:function(){return Boolean(this._id)},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this._id&&(clearTimeout(this._id),this._id=0)},e}()},41231:(e,t,r)=>{"use strict";r.d(t,{$:()=>n,b:()=>a});var o=function(){for(var e=[],t=0;t{"use strict";r.r(t),r.d(t,{default:()=>n}),r(25309);var o=function(){function e(e){var t=this;this.popupList={},this.nextPopupList=[],this.nowContent=void 0,e&&($(".entryPopup.popupHelper").remove(),window.popupHelper=null),Entry.assert(!window.popupHelper,"Popup exist");var r=["confirm","spinner"],o=["entryPopupHelperTopSpan","entryPopupHelperBottomSpan","entryPopupHelperLeftSpan","entryPopupHelperRightSpan"];this.body_=Entry.Dom("div",{classes:["entryPopup","hiddenPopup","popupHelper"]});this.body_.bindOnClick((function(e){if(!(t.nowContent&&r.indexOf(t.nowContent.prop("type"))>-1)){var n=$(e.target);o.forEach((function(e){n.hasClass(e)&&t.hide()})),e.target==t&&t.hide()}})),window.popupHelper=this,this.body_.prop("popup",this),Entry.Dom("div",{class:"entryPopupHelperTopSpan",parent:this.body_});var n=Entry.Dom("div",{class:"entryPopupHelperMiddleSpan",parent:this.body_});Entry.Dom("div",{class:"entryPopupHelperBottomSpan",parent:this.body_}),Entry.Dom("div",{class:"entryPopupHelperLeftSpan",parent:n}),this.window_=Entry.Dom("div",{class:"entryPopupHelperWindow",parent:n}),Entry.Dom("div",{class:"entryPopupHelperRightSpan",parent:n}),$("body").append(this.body_)}return e.prototype.clearPopup=function(){for(var e=this.popupWrapper_.children.length-1;e>2;e--)this.popupWrapper_.removeChild(this.popupWrapper_.children[e])},e.prototype.addPopup=function(e,t){var r=this,o=Entry.Dom("div"),n=Entry.Dom("div",{class:"entryPopupHelperCloseButton"});n.bindOnClick((function(){t.closeEvent&&t.closeEvent(r),r.hide()}));var a=Entry.Dom("div",{class:"entryPopupHelperWrapper"});if(a.append(n),t.title){var i=Entry.Dom("div",{class:"entryPopupHelperTitle"});a.append(i),i.text(t.title)}o.addClass(e),o.append(a),o.popupWrapper_=a,o.prop("type",t.type),"function"==typeof t.setPopupLayout&&t.setPopupLayout(o),o._obj=t,this.popupList[e]=o},e.prototype.hasPopup=function(e){return!!this.popupList[e]},e.prototype.remove=function(e){e?this.window_.find("> .".concat(e)).remove():this.window_.children().length>0&&this.window_.children().remove(),delete this.popupList[e],this.nowContent&&this.nowContent.hasClass(e)&&(this.nowContent=void 0,this.body_.addClass("hiddenPopup"),this.nextPopupList.length>0&&this.show(this.nextPopupList.shift()))},e.prototype.resize=function(e){},e.prototype.show=function(e,t){var r=this;function o(e){r.window_.append(r.popupList[e]),r.nowContent=r.popupList[e],r.body_.removeClass("hiddenPopup")}t&&this.window_.children().length>0?this.nextPopupList.push(e):(this.window_.children().detach(),o(e)),this.nowContent&&this.nowContent._obj&&this.nowContent._obj.onShow&&this.nowContent._obj.onShow()},e.prototype.hide=function(){var e=this.nowContent&&this.nowContent._obj;e&&"closeEvent"in e&&e.closeEvent(this),this.nowContent=void 0,this.body_.addClass("hiddenPopup"),this.window_.children().detach(),this.nextPopupList.length>0&&this.show(this.nextPopupList.shift())},e.prototype.addClass=function(e){e&&this.body_.addClass(e)},e}();const n=o;Entry.popupHelper=o},35117:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var o=function(){function e(){this.modes={},this.selected=void 0}return e.prototype.generateView=function(e){var t=$(e);this._view=Entry.Dom("div",{class:"propertyPanel",parent:t}),this._tabView=Entry.Dom("div",{class:"propertyTab",parent:this._view}),this._contentView=Entry.Dom("div",{class:"propertyContent",parent:this._view}),this._cover=Entry.Dom("div",{classes:["propertyPanelCover","entryRemove"],parent:this._view});var r=Entry.Dom("div",{class:"entryObjectSelectedImgWorkspace",parent:t});this._initializeSplitter(r)},e.prototype.addMode=function(e,t){var r=this;this.modes[e]&&this.removeMode(e);var o=t.getView();o=Entry.Dom(o,{parent:this._contentView});var n=Entry.Dom("
".concat(Lang.Menus[e],"
"),{classes:["propertyTabElement","propertyTab".concat(e)],parent:this._tabView});n.bind("click",(function(){r.select(e)})),"console"===e&&t.codeMirror.refresh(),this._removeDom(e),this.modes[e]={obj:t,tabDom:n,contentDom:o},"hw"===e&&$(".propertyTabhw").bind("dblclick",(function(){Entry.dispatchEvent("hwModeChange")}))},e.prototype.removeMode=function(e){this._removeDom(e);var t=Object.keys(this.modes);t&&t.length>0&&this.select(t[0])},e.prototype.resize=function(e){var t=this.selected;if(t){var r=9*e/16;this._view.css({width:"".concat(e,"px"),top:"".concat(r+35+40+48-22,"px")}),e>=430?this._view.removeClass("collapsed"):this._view.addClass("collapsed"),Entry.dispatchEvent("windowResized");var o=this.modes[t].obj;"hw"===t&&this.modes.hw.obj.listPorts?o.resizeList():o.resize&&o.resize()}},e.prototype.select=function(e){for(var t in this.modes){var r=this.modes[t];r.tabDom.removeClass("selected"),r.contentDom.addClass("entryRemove"),$(r.contentDom).detach(),r.obj.visible=!1}var o=this.modes[e];$(this._contentView).append(o.contentDom),o.tabDom.addClass("selected"),o.contentDom.removeClass("entryRemove"),o.obj.resize&&o.obj.resize(),o.obj.visible=!0,this.selected=e},e.prototype._initializeSplitter=function(e){var t=this;e.bind("mousedown touchstart",(function(e){e.preventDefault(),Entry.disposeEvent&&Entry.disposeEvent.notify();var r=Entry.container;t._cover.removeClass("entryRemove"),t._cover._isVisible=!0,r.splitterEnable=!0,Entry.documentMousemove&&(r.resizeEvent=Entry.documentMousemove.attach(t,(function(e){r.splitterEnable&&Entry.resizeElement({canvasWidth:e.clientX||e.x})}))),$(document).bind("mouseup.container:splitter touchend.container:splitter",(function(){var e=Entry.container,r=e.resizeEvent;r&&(e.splitterEnable=!1,r.destroy(),delete e.resizeEvent),t._cover._isVisible&&(t._cover._isVisible=!1,t._cover.addClass("entryRemove")),$(document).unbind(".container:splitter")}))}))},e.prototype._removeDom=function(e){this.modes[e]&&(this.modes[e].tabDom.remove(),this.modes[e].contentDom.remove(),"hw"===e&&($(this.modes).removeClass(".propertyTabhw"),$(".propertyTabhw").unbind("dblclick")))},e}();const n=o;Entry.PropertyPanel=o},38063:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var o=function(e,t){var r;return r=e instanceof HTMLElement?$(e):e instanceof jQuery?e:"string"==typeof e&&/<(\w+)>/.test(e)?$(e):$("<".concat(e,">")),void 0===t||(t.id&&r.attr("id",t.id),t.class&&r.addClass(t.class),t.classes&&t.classes.forEach(r.addClass.bind(r)),t.text&&r.text(t.text),t.src&&r.attr("src",t.src),t.href&&r.attr("href",t.href),t.parent&&t.parent.append(r),r.bindOnClick=function(){var e,t,r=function(e){e.stopImmediatePropagation(),e.handled||(e.handled=!0,t.call(this,e))};return arguments.length>1?(t=arguments[1]instanceof Function?arguments[1]:function(){},e="string"==typeof arguments[0]?arguments[0]:""):t=arguments[0]instanceof Function?arguments[0]:function(){},e?$(this).on("click tab",e,r):$(this).on("click tab",r),this}),r};const n=o;Entry.Dom=o},82997:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GEDragHelper:()=>o});var o=new(function(){function e(){}return e.prototype.INIT=function(e){this._isWebGL=e,this.types=e?{UP:"__pointerdown",DOWN:"__pointermove",MOVE:"__pointerup",OVER:"pointerover"}:{UP:"pressup",DOWN:"mousedown",MOVE:"pressmove",OVER:"mouseover"},e?(this.types={UP:"__pointerdown",DOWN:"__pointermove",MOVE:"__pointerup",OVER:"pointerover"},this.handleDrag=this._handleDragPIXI):(this.types={UP:"pressup",DOWN:"mousedown",MOVE:"pressmove",OVER:"mouseover"},this.handleDrag=this._handleCreateJs)},e.prototype._handleDragPIXI=function(e){var t=this.types,r=this._convertPIXIEventToCreateJsStyle;function o(o){e.emit(t.MOVE,r(o))}function n(o){e.emit(t.UP,r(o)),e.removeAllListeners("pointermove"),e.removeAllListeners("pointerup"),e.removeAllListeners("pointerupoutside")}e.on("pointerdown",(function(a){e.emit(t.DOWN,r(a)),e.on("pointermove",o),e.on("pointerupoutside",(function(){n(a)})),e.on("pointerup",n)}))},e.prototype._convertPIXIEventToCreateJsStyle=function(e){var t=e.data.global;return{target:e.target,currentTarget:e.currentTarget,stageX:t.x,stageY:t.y,rawX:t.x,rawY:t.y}},e.prototype._handleCreateJs=function(e){},e}())},33789:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GEHelper:()=>I,GEHelperBase:()=>B});var o,n,a=r(65575),i=r(67277),s=r(49338),l=r(82997),c=r(69509),u=r(62020),_=function(){function e(){this._MAX_TEX_RECT={x:0,y:0,width:99999,height:99999}}return e.prototype.INIT=function(){this._imgLoader=new c.U(this._onImageLoad.bind(this))},e.prototype._onImageLoad=function(e){},e.prototype.imageRemoved=function(e){this._imgLoader.requestSync()},e.prototype.activateScene=function(e){},e.prototype.reqResource=function(e,t,r,o){var n=this._imgLoader,a=u.v.getRawPath(r),i=n.getImageInfo(a);if(!i){var s=u.v.getNewImageRect(r,this._MAX_TEX_RECT);n.load(r,s),i=n.getImageInfo(a)}e&&(e.image=i.source()),i.isReady?o&&o(i):i.addCallback(o)},e.prototype.clearProject=function(){this._imgLoader.empty()},e.prototype.removeScene=function(e){this._imgLoader.requestSync()},e}(),p=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},d=function(){function e(){this._alpha=1,this.position={x:0,y:0}}return e.prototype.endStroke=function(){},e.prototype.beginStroke=function(e){this._parseRGBCssStyleColor(e),this._setStyle()},e.prototype.beginStrokeFast=function(e,t){this._color=e,this._alpha=t,this._setStyle()},e.prototype.endFill=function(){this._shape&&!this._shape.destroyed&&this._shape.closePath()},e.prototype.beginFill=function(e){this._parseRGBCssStyleColor(e),this._setStyle()},e.prototype.beginFillFast=function(e,t){this._color=e,this._alpha=t,this._setStyle()},e.prototype.setStrokeStyle=function(e){this._thickness=e,this._setStyle()},e.prototype.moveTo=function(e,t){this._shape&&!this._shape.destroyed&&(this._shape.moveTo(Number(e),Number(t)),this.position={x:Number(e),y:Number(t)})},e.prototype.lineTo=function(e,t){this._shape&&!this._shape.destroyed&&(this._shape.moveTo(this.position.x,this.position.y),this._shape.lineTo(Number(e),Number(t)),this.position={x:Number(e),y:Number(t)},this._shape.geometry.invalidate())},e.prototype.internalSetShape=function(e){this._shape=e,this._setStyle()},e.prototype._setStyle=function(){this._shape&&!this._shape.destroyed&&this._shape.lineStyle(this._thickness,this._color,this._alpha)},e.prototype._parseRGBCssStyleColor=function(e){var t,r=e.replace("/s/","");if("#"!=r[0])return(t=/^rgba\((\d+),(\d+),(\d+),(\d+(\.?\d*))\)$/i.exec(r))?(this._color=this._RGBToNumber(t),void(this._alpha=Number(t[4]))):void((t=/^rgb\((\d+),(\d+),(\d+)\)$/i.exec(r))&&(this._color=this._RGBToNumber(t)));this._color=parseInt(r.replace("#",""),16)},e.prototype._RGBToNumber=function(e){var t=p(e,4),r=(t[0],t[1]),o=t[2],n=t[3];return(r<<16)+(o<<8)+Number(n)},e.prototype.clear=function(){var e=this.entity||{},t=e.x,r=void 0===t?0:t,o=e.y,n=void 0===o?0:o;this._shape.clear(),this._shape.moveTo(r,-n)},e}(),f=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},h=function(){function e(){this._alpha=1}return e.prototype.endFill=function(){this._shape&&!this._shape.destroyed&&(this.currentPath=null,this._shape.closePath())},e.prototype.beginFill=function(e){this._parseRGBCssStyleColor(e),this._shape.beginFill(this._color,this._alpha)},e.prototype.beginFillFast=function(e,t){this._color=e,this._alpha=t,this._shape.beginFill(e,t)},e.prototype.moveTo=function(e,t){this._shape&&!this._shape.destroyed&&(this._shape.moveTo(Number(e),Number(t)),this.currentPath=this._shape.currentPath)},e.prototype.lineTo=function(e,t){if(this._shape&&!this._shape.destroyed){this.currentPath||(this._shape.moveTo(0,0),this.currentPath=this._shape.currentPath);var r=this.currentPath.points,o=r[r.length-2],n=r[r.length-1];o===e&&n===t||r.push(Number(e),Number(t)),this._shape.currentPath=this.currentPath,this._shape.lineTo(Number(e),Number(t)),this._shape.geometry.invalidate()}},e.prototype.internalSetShape=function(e){this._shape=e,this._setStyle()},e.prototype._setStyle=function(){this._shape&&!this._shape.destroyed&&this._shape.lineStyle(this._thickness,this._color,this._alpha)},e.prototype._parseRGBCssStyleColor=function(e){var t,r=e.replace("/s/","");if("#"!=r[0])return(t=/^rgba\((\d+),(\d+),(\d+),(\d+(\.?\d*))\)$/i.exec(r))?(this._color=this._RGBToNumber(t),void(this._alpha=Number(t[4]))):void((t=/^rgb\((\d+),(\d+),(\d+)\)$/i.exec(r))&&(this._color=this._RGBToNumber(t)));this._color=parseInt(r.replace("#",""),16)},e.prototype._RGBToNumber=function(e){var t=f(e,4),r=(t[0],t[1]),o=t[2],n=t[3];return(r<<16)+(o<<8)+Number(n)},e.prototype.clear=function(){var e=this.entity||{},t=e.x,r=void 0===t?0:t,o=e.y,n=void 0===o?0:o;this._shape.clear(),this._shape.moveTo(r,-n)},e}(),g=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});!function(e){e.factory=function(e){var t=new(e instanceof a.Sprite?y:m);return t._internal_init(e),t}}(n||(n={}));var m=function(){function e(){}return e.prototype._internal_init=function(e){this._target=e,this.scale=new b(e.scale,"scale"),this.pivot=new b(e.pivot,"pivot")},e.prototype.updateScaleFactor=function(){},e.prototype.destroy=function(){this.pivot.destroy(),this.scale.destroy(),this._target=null,this.pivot=null,this.scale=null},e}(),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.updateScaleFactor=function(){var e=this._target.texture,t=e.textureScaleFactorX,r=e.textureScaleFactorY;t&&r&&(this.scale.internal_setScaleFactor(t,r),this.pivot.internal_setScaleFactor(1/t,1/r))},t}(m),b=function(){function e(e,t){this._point=e,this.name=t,this._scaleX=1,this._scaleY=1,this._x=0,this._y=0}return e.prototype.internal_setScaleFactor=function(e,t){this._scaleX=e,this._scaleY=t,this.set(this._x,this._y)},e.prototype.setX=function(e){this._x=e,this._point.x=e*this._scaleX},e.prototype.setY=function(e){this._y=e,this._point.y=e*this._scaleY},e.prototype.set=function(e,t){this._x=e,this._y=t||(0!=t?e:0),this._point.set(this._x*this._scaleX,this._y*this._scaleY)},e.prototype.destroy=function(){this._point=null},e}(),v=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),E=function(e,t,r,o){return new(r||(r=Promise))((function(n,a){function i(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}l((o=o.apply(e,t||[])).next())}))},k=function(e,t){var r,o,n,a,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,o&&(n=2&s[0]?o.return:s[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;switch(o=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]0;){var t=e.getChildAt(0);e.removeChild(t)}},t.prototype.resetHandlers=function(){this.faceIndicatorGraphic&&this.poseIndicatorGraphic&&this.objectIndicatorGraphic&&(this.isWebGL?(this.faceIndicatorGraphic.clear(),this.poseIndicatorGraphic.clear(),this.objectIndicatorGraphic.clear(),this.removeAllChildInHandler(this.objectIndicatorGraphic),this.removeAllChildInHandler(this.poseIndicatorGraphic),this.removeAllChildInHandler(this.faceIndicatorGraphic)):(this.faceIndicatorGraphic.graphics.clear(),this.poseIndicatorGraphic.graphics.clear(),this.objectIndicatorGraphic.graphics.clear()))},t.prototype.drawHumanPoints=function(e,t){return E(this,void 0,void 0,(function(){var r,o,n=this;return k(this,(function(a){if(5,r=this.poseIndicatorGraphic,this._isWebGL)for(;r.children.length>0;)o=r.getChildAt(0),r.removeChild(o);else r=this.poseIndicatorGraphic.graphics;return r.clear(),e.map((function(e,o){var a=e.keypoints[3].position,s=a.x,l=a.y;if(n._isWebGL){var c=i.Z.text("".concat(Lang.Blocks.video_human,"-").concat(o+1),"20px Nanum Gothic","","middle","center");c.x=s-20,c.y=l-20,r.addChild(c)}else r.append({exec:function(e){e.font="20px Nanum Gothic",e.color="blue",e.fillText("".concat(Lang.Blocks.video_human,"-").concat(o+1),s-20,l-20)}});e.keypoints.map((function(e){var o=e.position,n=o.x,a=o.y,i=t.vertical?R-a:a;r.beginFill(255),r.drawCircle(n,i,5),r.endFill()}))})),[2]}))}))},t.prototype.drawHumanSkeletons=function(e,t){return E(this,void 0,void 0,(function(){var r,o;return k(this,(function(n){return r=[],o=this.poseIndicatorGraphic,e.forEach((function(e){e.forEach((function(e){var o=e[0].position,n=e[1].position;t.vertical&&(o.y=R-o.y,n.y=R-n.y),r.push({start:o,end:n})}))})),this._isWebGL?o.lineStyle(5,255):(o=o.graphics).setStrokeStyle(8,"round").beginStroke("blue"),r.forEach((function(e){var t=e.start,r=e.end;o.moveTo(t.x,t.y).lineTo(r.x,r.y)})),[2]}))}))},t.prototype.drawFaceEdges=function(e,t){return E(this,void 0,void 0,(function(){var r,o,n=this;return k(this,(function(a){if(r=this.faceIndicatorGraphic,this._isWebGL){for(r.clear();r.children.length>0;)o=r.getChildAt(0),r.removeChild(o);r.lineStyle(2,16711680)}else(r=r.graphics).clear(),r.setStrokeStyle(2,"round").beginStroke("red");return e.forEach((function(e,o){var a=e.landmarks._positions;a.forEach((function(o,a){if(0!==a&&17!==a&&27!==a&&31!==a&&36!==a&&42!==a&&48!==a){var i=e.landmarks._positions[a-1];n.drawEdge(i,o,r,t)}})),n.drawEdge(a[42],a[47],r,t),n.drawEdge(a[41],a[36],r,t),n.drawEdge(a[60],a[67],r,t),n.drawEdge(a[0],a[17],r,t),n.drawEdge(a[16],a[26],r,t),n.drawEdge(a[27],a[31],r,t),n.drawEdge(a[27],a[35],r,t),n.drawEdge(a[30],a[31],r,t),n.drawEdge(a[30],a[35],r,t);var s=a[57],l=s._x,c=s._y,u=S,_=R;if(t.horizontal&&(l=u-l),t.vertical&&(c=_-c),n._isWebGL){var p=i.Z.text("".concat(Lang.Blocks.video_face,"-").concat(o+1),"20px Nanum Gothic","","middle","center");p.x=l,p.y=c-10,r.addChild(p)}else r.append({exec:function(e){e.font="20px Nanum Gothic",e.color="#0000ff",e.fillText("".concat(Lang.Blocks.video_face,"-").concat(o+1),l,c-10)}})})),[2]}))}))},t.prototype.drawEdge=function(e,t,r,o){var n=S,a=R,i=t._x,s=t._y,l=e._x,c=e._y;o.horizontal&&(i=n-i,l=n-l),o.vertical&&(s=a-s,c=a-c),r.moveTo(l,c).lineTo(i,s)},t.prototype.drawObjectBox=function(e,t){return E(this,void 0,void 0,(function(){var r,o,n;return k(this,(function(a){if(r=[],e.forEach((function(e){var o=e.bbox,n=e.class?"".concat(Lang.Blocks.video_object,"-").concat(Lang.video_object_params[e.class]):"",a=o[0],i=o[1],s=o[2],l=o[3];t.horizontal&&(a=S-a-s),t.vertical&&(i=R-i-l);var c={x:a+20,y:i+20};r.push({textpoint:c,name:n,x:a,y:i,width:s,height:l})})),o=this.objectIndicatorGraphic,this._isWebGL){for(o.clear();o.children.length>0;)n=o.getChildAt(0),o.removeChild(n);o.lineStyle(5,16711680),r.forEach((function(e,t){var r=e.textpoint,n=e.name,a=e.x,s=e.y,l=e.width,c=e.height;if(n){var u=i.Z.text("".concat(n,"-").concat(t+1),"20px Nanum Gothic","","middle","center");u.x=r.x,u.y=r.y,o.addChild(u)}o.drawRect(a,s,l,c)}))}else(o=o.graphics).clear(),r.forEach((function(e,t){var r=e.textpoint,n=e.name,a=e.x,i=e.y,s=e.width,l=e.height;n&&o.append({exec:function(e){e.font="20px Nanum Gothic",e.fillText("".concat(n,"-").concat(t+1),r.x-5,r.y+5)}}),o.setStrokeStyle(8,"round").beginStroke("red").drawRect(a,i,s,l)}));return[2]}))}))},t.prototype.getTransformedBounds=function(e){return this._isWebGL?e.getBounds(!1):e.getTransformedBounds()},t.prototype.calcParentBound=function(e){return this._isWebGL?i.Z.getTransformBound(e):e.getTransformedBounds()},t.prototype.newContainer=function(e){return this._isWebGL?i.Z.container(e):new createjs.Container},t.prototype.newWallTexture=function(e){if(this._isWebGL)return a.Texture.from(e);var t=new Image;return t.src=e,t},t.prototype.newWallSprite=function(e){return this._isWebGL?new a.Sprite(e):new createjs.Bitmap(e)},t.prototype.newEmptySprite=function(){return this._isWebGL?i.Z.sprite():new createjs.Bitmap},t.prototype.newSpriteWithCallback=function(e,t){var r=new Image;if(t){var o=function(){r.removeEventListener("load",o),t()};r.addEventListener("load",o)}if(r.src=e,this._isWebGL){var n=a.Texture.from(r);return a.Sprite.from(n)}return new createjs.Bitmap(r)},t.prototype.newGraphic=function(){return this._isWebGL?new a.Graphics:new createjs.Shape},t.prototype.newAScaleAdaptor=function(e){return this._isWebGL?n.factory(e):null},t}(B)),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return v(t,e),t.prototype.hue=function(e){var t;return this._isWebGL?(t=new a.filters.ColorMatrixFilter).hue(e):((t=new createjs.ColorMatrix).adjustColor(0,0,0,e),new createjs.ColorMatrixFilter(t))},t.prototype.brightness=function(e){this._isWebGL&&(e/=255);var t=[1,0,0,0,e,0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1];return this.newColorMatrixFilter(t)},t.prototype.newColorMatrixFilter=function(e){if(this._isWebGL){e.length=20;var t=new a.filters.ColorMatrixFilter;return t._loadMatrix(e,!1),t}var r=new createjs.ColorMatrix;return r.copy(e),new createjs.ColorMatrixFilter(r)},t.prototype.setCache=function(e,t){this._isWebGL||(t?e.cache():e.object.uncache())},t}(B),M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return v(t,e),t.prototype.setColor=function(e,t){this._isWebGL?e.style.fill=t:e.color=t},t.prototype.newText=function(e,t,r,o,n){if(this._isWebGL)return i.Z.text(e,t,r,o,n);var a=new createjs.Text(e,t,r);return o&&(a.textBaseline=o),n&&(a.textAlign=n),a},t}(B),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return v(t,e),t.prototype.newBrush=function(){return this._isWebGL?new d:new createjs.Graphics},t.prototype.newPaint=function(){return this._isWebGL?new h:new createjs.Graphics},t.prototype.newShape=function(e){if(this._isWebGL){var t=i.Z.newPIXIGraphics();return e.internalSetShape(t),t}return t=new createjs.Shape(e)},t}(B)},94225:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F});var o=r(24384),n=r.n(o),a=r(32491),i=r.n(a),s=r(89537),l=r.n(s),c=r(6631),u=r.n(c),_=r(28706),p=r.n(_),d=r(46795),f=r.n(d),h=r(91506),g=r.n(h),m=r(14882),y=r.n(m),b=r(38702),v=r.n(b),E=r(77651),k=r.n(E),S=r(55663),R=r.n(S);const A=function(){function e(e,t){this.observers=[],this.schema=e,this.generateSchema(),(void 0===t||t)&&Object.seal(this)}return e.prototype.generateSchema=function(){var e=this,t=this.schema;if(void 0!==t){try{t=JSON.parse(JSON.stringify(t))}catch(e){console.log(t),console.error(e)}this.data={},Object.keys(t).forEach((function(r){e.data[r]=t[r],Object.defineProperty(e,r,{get:function(){return this.data[r]}})}))}},e.prototype.set=function(e,t){var r={},o=Object.keys(e);for(var n in this.data)void 0!==e[n]&&(e[n]===this.data[n]?o.splice(o.indexOf(n),1):(r[n]=this.data[n],e[n]instanceof Array?this.data[n]=e[n].concat():this.data[n]=e[n]));!t&&this.notify(o,r)},e.prototype.observe=function(e,t,r,o){var n=new Entry.Observer(this.observers,e,t,r);return!1!==o&&e[t]([]),n},e.prototype.unobserve=function(e){e.destroy()},e.prototype.notify=function(e,t){var r=this,o="string"==typeof e?[e]:e,n=this.observers;n.length&&n.forEach((function(e){var n=o;void 0!==e.attrs&&(n=R()(e.attrs,o)),n.length&&e.object[e.funcName](n.forEach((function(e){return{name:e,object:r,oldValue:t[e]}})))}))},e.prototype._toJSON=function(){var e={};for(var t in this.data)e[t]=this.data[t];return e},e}();var w,D=r(36459),T=r.n(D),x=(w=function(e,t){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},w(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),L=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},O=function(e,t,r){if(r||2===arguments.length)for(var o,n=0,a=t.length;n0&&(o+=p.marginBottom||0),o+=p.height+15}})),this.updateSplitters(),this.workspace)switch(this.workspace.getMode()){case Entry.Workspace.MODE_BOARD:case Entry.Workspace.MODE_OVERLAYBOARD:this.renderBlock(a);break;case Entry.Workspace.MODE_VIMBOARD:this.renderText(a);break;default:this.renderBlock(a)}"func"!==u&&(this._renderedCategories[u]=!0),this.changeEvent.notify()}},t.prototype.cloneToGlobal=function(e){var t=this.dragBlock;if(this._boardBlockView||null===t)this.widthBackup&&this.foldBlockMenu();else{var r=Entry.GlobalSvg,o=this.workspace,n=o.getMode(),a=Entry.Workspace,i=a.MODE_BOARD,s=a.MODE_OVERLAYBOARD,l=this._svgWidth,c=o.selectedBoard,u=t.mouseDownCoordinate||{},_=u.x,p=void 0===_?0:_,d=u.y,f=void 0===d?0:d,h=e.pageX-p,g=e.pageY-f;if(!c||n!==i&&n!==s)r.setView(t,n)&&(r.adjust(h,g),r.addControl(e));else{if(!c.code)return!Entry.toast||this.objectAlert&&Entry.toast.isOpen(this.objectAlert)||(this.objectAlert=Entry.toast.alert(Lang.Workspace.add_object_alert,Lang.Workspace.add_object_alert_msg)),void(this.selectedBlockView&&(this.selectedBlockView.removeSelected(),this.set({selectedBlockView:null,dragBlock:null})));var m=t.block,y=m.getThread();if(m&&y){var b=this.offset().top-c.offset().top-$(window).scrollTop(),E=y.toJSON(!0),k=v()(E);k.x=k.x-l+(h||0),k.y=k.y+b+(g||0);var S=Entry.do("addThreadFromBlockMenu",E).value.getFirstBlock(),R=null==S?void 0:S.view;if(!R)return void(null==S||S.destory());this._boardBlockView=R,R.onMouseDown.call(R,e),R.dragInstance&&R.dragInstance.set({isNew:!0}),r.setView(R,n)}}}},t.prototype.terminateDrag=function(){var e=this._boardBlockView;if(e){this._boardBlockView=null;var t=Entry.GlobalSvg,r=t.left,o=t.width;return r0&&(n.removeClass("entryRemoveCategory"),n.removeClass("entryRemove"))}},t.prototype.banClass=function(e,t){var r=this._bannedClass;y()(r,e)||(r.push(e),!0!==t&&this.align())},t.prototype.unbanClass=function(e,t){var r=this._bannedClass,o=r.indexOf(e);o>-1&&(r.splice(o,1),!0!==t&&this.align())},t.prototype.checkBanClass=function(e){var t=(void 0===e?{}:e).isNotFor,r=void 0===t?[]:t;if(p()(r))return!1;for(var o=this._bannedClass,n=r.filter(f()),a=0;a$(window).height()-10&&this._scroller.scrollByPx(r.view.y-20)}},t.prototype.shouldGenerateHwCode=function(e){return this.hwCodeOutdated||0===e.length},t.prototype.getThreadByBlockKey=function(e){return this._threadsMap[e]},t.prototype._buildCategoryCodes=function(e,t){return e.reduce((function(e,r){var o=Entry.block[r];return o&&o.def?(o.defs||[o.def]).reduce((function(e,r){return O(O([],L(e),!1),[[Object.assign(r,{category:t})]],!1)}),e):O(O([],L(e),!1),[[{type:r,category:t}]],!1)}),[])},t.prototype.enableTrashcan=function(){var e,t,r=this;this.blockMenuWrapperForTrashcan=Entry.Dom("div",{class:"blockMenuWrapper blockMenuTrashcan entryRemove",parent:this.blockMenuContainer}).on("pointerenter",(function(){return r.blockMenuWrapperForTrashcan.addClass("open")})).on("pointerleave",(function(){return r.blockMenuWrapperForTrashcan.removeClass("open")})),Entry.Dom("span").text(Lang.Workspace.drag_to_remove).appendTo(this.blockMenuWrapperForTrashcan),null===(t=null===(e=this.workspace)||void 0===e?void 0:e.board)||void 0===t||t.observe(this,"_handleBoardDragBlock",["dragBlock"])},t.prototype.changeTypeThreadByBlockKey=function(e){var t;null===(t=this.getThreadByBlockKey(e))||void 0===t||t.getFirstBlock().changeType()},t.prototype._generateView=function(e){var t=this;e&&this._generateCategoryView(e),this.blockMenuContainer=Entry.Dom("div",{class:"blockMenuContainer",parent:this.view}).css({position:"relative"}),Entry.Utils.disableContextmenu(this.blockMenuContainer),this.blockMenuWrapper=Entry.Dom("div",{class:"blockMenuWrapper",parent:this.blockMenuContainer}),this.svgDom=Entry.Dom($('')),{parent:this.blockMenuWrapper}),this.svgDom.mouseenter((function(){var e;null===(e=t._scroller)||void 0===e||e.setOpacity(.8);var r=t.workspace.selectedBlockView;if(Entry.playground&&!Entry.playground.resizing&&(null==r?void 0:r.dragMode)!==Entry.DRAG_MODE_DRAG&&!Entry.GlobalSvg.isShow){var o=t.svgGroup.getBBox(),n=t.hasCategory()?64:0,a=o.width+o.x+n+2,i=Entry.interfaceState.menuWidth;a>i&&(t.widthBackup=i-n-2,$(t.blockMenuWrapper).css("width",a-n))}})),this.svgDom.mouseleave((function(){t.foldBlockMenu()})),Entry.Utils.bindBlockViewHoverEvent(this,this.svgDom),$(window).scroll(this.updateOffset.bind(this))},t.prototype._clearSplitters=function(){for(;this._splitters.length;)this._splitters.pop().remove()},t.prototype._convertSelector=function(e){if(!Entry.Utils.isNumber(e))return e;for(var t=Number(e),r=this._categories,o=this._categoryElems,n=0;n48&&r<58&&(e.preventDefault(),setTimeout((function(){t._cancelDynamic(!0),t._dSelectMenu(r,!0)}),200))},t.prototype._clearCategory=function(){var e;this._generateCodesTimer&&(clearTimeout(this._generateCodesTimer),this._generateCodesTimer=null),this._selectedCategoryView=null,this._categories=[],this._threadsMap={},u()(this._categoryElems,(function(e){return e.remove()})),this._categoryElems={};var t=this.code;(null==t?void 0:t.constructor)==Entry.Code&&t.clear(),null===(e=this._categoryCol)||void 0===e||e.remove(),this._categoryData=null},t.prototype._generateCategoryView=function(e){var t,r=this;if(e){null===(t=this._categoryCol)||void 0===t||t.remove(),this.categoryWrapper?this.categoryWrapper.textContent="":this.categoryWrapper=Entry.Dom("div",{class:"entryCategoryListWorkspace"}),this._categoryCol=Entry.Dom("ul",{class:"entryCategoryList",parent:this.categoryWrapper}),this.view.prepend(this.categoryWrapper);var o=document.createDocumentFragment();e.forEach((function(e){var t=e.category,n=e.visible;return o.appendChild(r._generateCategoryElement(t,n)[0])})),this.firstSelector=v()(e).category,this._categoryCol[0].appendChild(o),this.makeScrollIndicator()}},t.prototype._generateCategoryElement=function(e,t){var r=this;return this._categoryElems[e]=Entry.Dom("li",{id:"entryCategory".concat(e),classes:["entryCategoryElementWorkspace","entryRemove",!1===t?"entryRemoveCategory":""]}).bindOnClick((function(){r._cancelDynamic(!0,(function(){r.selectMenu(e,void 0,!0),r.align()}))})).text(Lang.Blocks[e.toUpperCase()]),N.includes(e)&&this._categoryElems[e][0].appendChild(Entry.Dom("div",{id:"entryCategory".concat(e,"BetaTag"),classes:["entryCategoryBetaTag"]})[0]),this._categoryElems[e]},t.prototype._isNotVisible=function(e){return this.checkCategory(e)||this.checkBanClass(e)},t.prototype._getSortedBlocks=function(){var e,t,r=this,o=[],n=i()(this.code.getThreads().map((function(e){return e.getFirstBlock()})));if(this._selectDynamic){var a=this._threadsMap;o=this._dynamicThreads.reduce((function(e,r){return(t=a[r].getFirstBlock())&&e.push(t),e}),[]),e=n}else e=[],n.forEach((function(t){r._isNotVisible(Entry.block[t.type])?e.push(t):o.push(t)}));return[o,e]},t.prototype._isOn=function(){return"none"!==this.view.css("display")},t.prototype._registerThreadsMap=function(e,t){e&&(null==t?void 0:t.getFirstBlock())&&(this._threadsMap[e]=t)},t.prototype._deleteThreadsMap=function(e){var t=null==e?void 0:e.getFirstBlock();t&&delete this._threadsMap[t.type]},t.prototype._createThread=function(e,t,r){"string"!=typeof r&&(r=void 0),r=r||e[0].type;var o=this.code.createThread(e,t);return this._registerThreadsMap(r,o),o},t.prototype._getCategoryBlocks=function(e){var t=k()(this._categoryData,{category:e});return null==t?void 0:t.blocks},t}(A);const F=M;Entry.BlockMenu=M},94394:()=>{Entry.skeleton.basic={executable:!0,path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(28,r+2),t=Math.max(0,t+6-r/2);var o=r/2;return"M 0 0\n l 6 6\n l 6 -6\n h ".concat(t,"\n a ").concat(o," ").concat(o," 0 0 1 0 ").concat(r,"\n h -").concat(t,"\n l -6 6\n l -6 -6\n z")},box:function(e){var t=e?e.contentWidth:150,r=e?e.contentHeight:28;return{offsetX:-8,offsetY:0,width:t+30,height:Math.max(28,r+2),marginBottom:0}},magnets:function(e){return{previous:{x:0,y:0},next:{x:0,y:(e?Math.max(e.height,28):28)+e.offsetY}}},contentPos:function(e){return{x:14,y:Math.max(e.contentHeight,28)/2}}},Entry.skeleton.basic_without_next={executable:!0,outerLine:"#13bf68",box:Entry.skeleton.basic.box,contentPos:Entry.skeleton.basic.contentPos,path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(28,r+2),t=Math.max(0,t+6-r/2);var o=r/2;return"m 0 0\n l 6 6\n l 6 -6\n h ".concat(t,"\n a ").concat(o," ").concat(o," 0 0 1 0 ").concat(r,"\n H 0\n z")},magnets:function(){return{previous:{x:0,y:0}}}}},58627:()=>{Entry.skeleton.basic_boolean_field={path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(20,r),t=Math.max(0,t-r+19);var o=r/2,n=.4*r;return"m ".concat(o," 0\n l -").concat(n," ").concat(o,"\n l ").concat(n," ").concat(o,"\n h ").concat(t,"\n l ").concat(n," -").concat(o,"\n l -").concat(n," -").concat(o,"\n z")},color:"#FFF",outerLine:"#1b3ad8",fontSize:10,box:function(e){var t=e?e.contentWidth:5,r=e?e.contentHeight:18;return{offsetX:0,offsetY:0,width:t+19,height:Math.max(r,20),marginBottom:0}},magnets:function(){return{boolean:{}}},contentPos:function(e){return{x:10,y:Math.max(e.contentHeight,20)/2}}}},15323:()=>{Entry.skeleton.basic_button={path:function(){return"m 6 0\n h 150\n a 6 6 0 0 1 6 6\n v 28\n a 6 6 0 0 1 -6 6\n h -150\n a 6 6 0 0 1 -6 -6\n v -28\n a 6 6 0 0 1 6 -6\n z"},box:function(){return{offsetX:-5,offsetY:0,width:162,height:40,marginBottom:3}},contentPos:function(){return{x:81,y:20}},movable:!1,readOnly:!0,nextShadow:!0,fontSize:14,classes:["basicButtonView"]}},74421:()=>{Entry.skeleton.basic_button_disabled={path:function(){return"m 6 0\n h 150\n a 6 6 0 0 1 6 6\n v 28\n a 6 6 0 0 1 -6 6\n h -150\n a 6 6 0 0 1 -6 -6\n v -28\n a 6 6 0 0 1 6 -6\n z"},box:function(){return{offsetX:-5,offsetY:0,width:162,height:40,marginBottom:3}},contentPos:function(){return{x:81,y:20}},movable:!1,readOnly:!0,nextShadow:!0,fontSize:14,classes:["basicButtonDisabledView"]}},71757:()=>{Entry.skeleton.basic_create={executable:!0,path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(28,r),t=Math.max(0,t+4);var o=e._statements[0]?e._statements[0].height:20;o=Math.max(o,20);var n=t-20,a=r/2;return"m 0 0\n V 1\n h ".concat(t,"\n a ").concat(a," ").concat(a," 0 0 1 0 ").concat(r,"\n H 26\n l -6 6\n l -6 -6\n v ").concat(o,"\n l 6 6\n l 6 -6\n h ").concat(n,"\n a 7.5 7.5 0 0 1 0 15\n H 0\n z")},magnets:function(e){return{}},box:function(e){var t=e?e.contentWidth:150,r=e?e.contentHeight:28;return{offsetX:-8,offsetY:0,width:t+30,height:Math.max(30,r+2),marginBottom:0}},statementPos:function(e){return[{x:14,y:Math.max(30,e.contentHeight%1e6+2)+1-3}]},contentPos:function(e){return{x:14,y:Math.max(e.contentHeight%1e6,28)/2+1}}}},51203:(e,t,r)=>{"use strict";r.r(t);var o=r(74382),n=r.n(o),a=r(169),i=r.n(a);Entry.skeleton.basic_create_value={executable:!0,path:function(e){var t=e.contentHeight%1e6;t=Math.max(30,t+2);var r=e._statements,o=r[0]?r[0].height:20,a=t/2;return o=Math.max(o,20),"M 0 0 \n V 1\n h ".concat(function(e){return n()(e._contents,3).reduce((function(e,t){return e+t.box.width}),20)}(e),"\n a 14 14 0 0 1 0 28\n H 26\n l -6 6\n l -6 -6\n v ").concat(o,"\n l 6 6\n l 6 -6\n h ").concat(function(e){return i()(e._contents,3).reduce((function(e,t){return e+t.box.width}),20)}(e)-15,"\n a ").concat(a," ").concat(a," 0 0 1 0 ").concat(t,"\n H 0\n z")},magnets:function(e){return{}},box:function(e){var t=e?e.contentWidth:150,r=e?e.height:28;return{offsetX:-8,offsetY:0,width:t+30,height:Math.max(30,r),marginBottom:0}},statementPos:function(e){return[{x:14,y:Math.max(30,e.contentHeight%1e6+2)+1-3}]},contentPos:function(e){return{x:14,y:Math.max(e.contentHeight%1e6,28)/2+1}}}},58880:()=>{Entry.skeleton.basic_define={executable:!0,path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(30,r+2),t=Math.max(0,t+9-r/2);var o=e._statements[0]?e._statements[0].height:30;return o=Math.max(o,20),"m -8,0 l 16,0 h %w a %h,%h 0 0,1 0,%wh H 24 l -8,8 -8,-8 h -0.4 v%sh h 0.4 l 8,8 8,-8 h %bw a 8,8 0 0,1 0,16 H -8 z".replace(/%wh/gi,r).replace(/%w/gi,t).replace(/%h/gi,r/2).replace(/%bw/gi,t-8).replace(/%sh/gi,o+1)},magnets:function(){return{}},box:function(e){return{offsetX:0,offsetY:0,width:e.contentWidth,height:Math.max(e.contentHeight,25)+46,marginBottom:0}},statementPos:function(e){return[{x:16,y:Math.max(30,e.contentHeight+2)}]},contentPos:function(){return{x:14,y:15}}}},58290:()=>{Entry.skeleton.basic_double_loop={executable:!0,path:function(e){var t=e.contentWidth,r=e.contentHeight%1e6;r=Math.max(30,r+2),t=Math.max(0,t+2-r/2);var o=e._statements,n=o[0]?o[0].height:20,a=o[1]?o[1].height:20,i=t-8;return n=Math.max(n,20),a=Math.max(a,20),"m 0 0\n l 6 6\n l 6 -6\n h ".concat(t,"\n a 14 14 0 0 1 0 28\n H 26\n l -6 6\n l -6 -6\n v ").concat(n,"\n l 6 6\n l 6 -6\n h ").concat(i-6,"\n a 14 14 0 0 1 0 28\n H 26\n l -6 6\n l -6 -6\n v ").concat(a,"\n l 6 6\n l 6 -6\n h ").concat(i,"\n a 7.5 7.5 0 0 1 0 15\n H 12\n l -6 6\n l -6 -6\n z")},magnets:function(e){var t=Math.max(e.contentHeight%1e6+2,30),r=Math.max(Math.floor(e.contentHeight/1e6)+2,30),o=e._statements[0]?e._statements[0].height:20,n=e._statements[1]?e._statements[1].height:20;return{previous:{x:0,y:0},next:{x:0,y:(o=Math.max(o,20))+(n=Math.max(n,20))+t+r+11+e.offsetY}}},box:function(e){var t=e.contentWidth,r=Math.max(Math.floor(e.contentHeight/1e6)+2,30),o=Math.max(e.contentHeight%1e6+2,30),n=e._statements[0]?e._statements[0].height%1e6:20,a=e._statements[1]?e._statements[1].height:20;return{offsetX:-8,offsetY:0,width:t+30,height:r+o+(n=Math.max(n,20))+(a=Math.max(a,20))+17,marginBottom:0,topFieldHeight:r}},statementPos:function(e){var t=e._statements[0]?e._statements[0].height%1e6:20,r=Math.max(30,e.contentHeight%1e6+2)+1;return[{x:14,y:r-3},{x:14,y:r+Math.max(t,20)+Math.max(Math.floor(e.contentHeight/1e6)+2,30)+1-6}]},contentPos:function(e){return{x:14,y:Math.max(e.contentHeight%1e6,28)/2}}}},12187:()=>{Entry.skeleton.basic_event={executable:!0,path:function(e){var t=e.contentWidth+20;return t=Math.max(0,t),"m 24 34\n h ".concat(t-=30,"\n a 14 14 0 0 0 0 -28\n H 30\n A 17 17 0 0 0 18 1\n C 8.611 1 1 8.611 1 18\n c 0 7.2 4.5 13.5 11 16\n l 6 6\n l 6 -6\n z")},box:function(e){return{topFieldHeight:40,offsetX:0,offsetY:-2,width:e.contentWidth+30,height:30,marginBottom:0}},magnets:function(e){return{next:{x:12,y:(e?Math.max(e.height+e.offsetY+7,30):30)-1}}},contentPos:function(){return{x:18,y:20}}}},33811:()=>{Entry.skeleton.basic_loop={executable:!0,path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(28,r),t=Math.max(0,t+6-r/2);var o=e._statements[0]?e._statements[0].height:20;o=Math.max(o,20);var n=t-8,a=r/2;return"m 0 0\n l 6 6\n l 6 -6\n h ".concat(t,"\n a ").concat(a," ").concat(a," 0 0 1 0 ").concat(r,"\n H 26\n l -6 6\n l -6 -6\n v ").concat(o,"\n l 6 6\n l 6 -6\n h ").concat(n,"\n a 7.5 7.5 0 0 1 0 15\n H 12\n l -6 6\n l -6 -6\n z")},magnets:function(e){var t=Math.max(e.contentHeight+2,28),r=e._statements[0]?e._statements[0].height:20;return{previous:{x:0,y:0},next:{x:0,y:(r=Math.max(r,20))+t+15+e.offsetY}}},box:function(e){var t=e.contentWidth,r=Math.max(e.contentHeight+2,28),o=e._statements[0]?e._statements[0].height:20;return{topFieldHeight:r,offsetX:-8,offsetY:0,width:t+30,height:r+(o=Math.max(o,20))+17,marginBottom:0}},statementPos:function(e){return[{x:14,y:Math.max(30,e.contentHeight+2)-2}]},contentPos:function(e){return{x:14,y:Math.max(e.contentHeight,28)/2}}}},95412:()=>{Entry.skeleton.basic_param={path:function(e){var t=e.contentWidth,r=e._contents[e._contents.length-1];return r&&(t-=r.box.width+Entry.BlockView.PARAM_SPACE-2),t=Math.max(0,t),"m 2 0\n h ".concat(t+11,"\n a 3 3 0 0 1 3 3\n h 2.2\n a 2 2 0 0 1 2 2\n v 12\n a 2 2 0 0 1 -2 2\n h -2.2\n a 3 3 0 0 1 -3 3\n H 3\n a 3 3 0 0 1 -3 -3\n h 2\n a 2 2 0 0 0 2 -2\n V 5\n a 2 2 0 0 0 -2 -2\n H 0\n a 3 3 0 0 1 3 -3\n z")},box:function(e){return{offsetX:-8,offsetY:0,width:(e?e.contentWidth:5)+11,height:22,marginBottom:0}},magnets:function(){return{param:{}}},contentPos:function(){return{x:11,y:11}}}},80875:()=>{Entry.skeleton.basic_string_field={path:function(e){var t=e.contentWidth<10?e.contentWidth:e.contentWidth+2,r=e.contentHeight;r=Math.max(20,r),t=Math.max(0,t-r+12);var o=r/2;return"m ".concat(o," 0\n h ").concat(t,"\n a ").concat(o," ").concat(o," 0 1 1 0 ").concat(r,"\n H ").concat(o,"\n a ").concat(o," ").concat(o," 0 0 1 0 -").concat(r,"\n z")},color:"#FFF",outerLine:"#FF9C00",fontSize:10,box:function(e){var t=e?e.contentWidth:5,r=e?e.contentHeight:0;return{offsetX:-8,offsetY:0,width:t+15,height:Math.max(r,20),marginBottom:0}},magnets:function(){return{string:{}}},contentPos:function(e){return{x:7,y:Math.max(e.contentHeight,20)/2}}}},9354:(e,t,r)=>{"use strict";r.r(t);var o=r(94048),n=r.n(o);Entry.skeleton.basic_text={path:function(e){var t=n()(e,["_schema","params","0","text"],"").match(/[\r\n]/g),r=t?t.length+1:1,o=e.contentWidth,a=e.contentHeight;a=Math.max(18,a+2)*r,o=Math.max(0,o-a+12);var i=a/2;return"m ".concat(i,",0 h ").concat(o," a ").concat(i,",").concat(i," 0 1,1 0,").concat(a)+"H ".concat(i," A ").concat(i,",").concat(i," 0 1,1 ").concat(i,",0 z")},box:function(e){var t=n()(e,["_schema","params","0","text"],"").match(/[\r\n]/g),r=t?t.length+1:1,o=e?e.contentWidth:5,a=(e?e.contentHeight:18)*r,i=e._schema.skeletonOptions,s=(void 0===i?{}:i).box,l=void 0===s?{}:s;return Object.assign({offsetX:0,offsetY:0,width:o+12,height:Math.max(a+2,18),marginBottom:0},l)},contentPos:function(e){var t=Math.max(e.contentHeight,16),r=Math.max(e.contentWidth,16),o=e._schema.skeletonOptions,n=(void 0===o?{}:o).contentPos,a=void 0===n?{}:n;return Object.assign({x:r/2+5,y:t/2+1},a)},movable:!1,readOnly:!0,nextShadow:!1,classes:["basicText"]}},16243:(e,t,r)=>{"use strict";r.r(t);var o=r(94048),n=r.n(o);Entry.skeleton.basic_text_light={path:function(e){var t=n()(e,["_schema","params","0","text"],"").match(/[\r\n]/g),r=t?t.length+1:1,o=e.contentWidth,a=e.contentHeight;a=Math.max(18,a+2)*r,o=Math.max(0,o-a+12);var i=a/2;return"m ".concat(i,",0 h ").concat(o," a ").concat(i,",").concat(i," 0 1,1 0,").concat(a)+"H ".concat(i," A ").concat(i,",").concat(i," 0 1,1 ").concat(i,",0 z")},box:function(e){var t=n()(e,["_schema","params","0","text"],"").match(/[\r\n]/g),r=t?t.length+1:1,o=e?e.contentWidth:5,a=(e?e.contentHeight:18)*r,i=e._schema.skeletonOptions,s=(void 0===i?{}:i).box,l=void 0===s?{}:s;return Object.assign({offsetX:0,offsetY:0,width:o+12,height:Math.max(a+2,18),marginBottom:0},l)},contentPos:function(e){var t=Math.max(e.contentHeight,16);return{x:Math.max(e.contentWidth,16)/2+5,y:t/2+1}},movable:!1,readOnly:!0,nextShadow:!1,classes:["basicTextLight"]}},24560:()=>{Entry.skeleton.clickable_text={path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(18,r+2),t=Math.max(0,t-r+12);var o=r/2;return"m ".concat(o,",0 h ").concat(t," a ").concat(o,",").concat(o," 0 1,1 0,").concat(r)+"H ".concat(o," A ").concat(o,",").concat(o," 0 1,1 ").concat(o,",0 z")},box:function(e){var t=e?e.contentWidth:5,r=e?e.contentHeight:18,o=e._schema.skeletonOptions,n=(void 0===o?{}:o).box,a=void 0===n?{}:n;return Object.assign({offsetX:0,offsetY:0,width:t+12,height:Math.max(r+2,18),marginBottom:0},a)},contentPos:function(e){var t=Math.max(e.contentHeight,16);return{x:Math.max(e.contentWidth,16)/2+5,y:t/2+1}},movable:!1,readOnly:!0,nextShadow:!1,classes:["clickableText"]}},69809:()=>{Entry.skeleton.comment={executable:!1,path:function(e){var t=e.contentWidth,r=e.contentHeight;r=Math.max(30,r+2),t=Math.max(0,t+9-r/2);var o=r/2;return"m -8,0 l 8,8 8,-8 h ".concat(t," a ").concat(o,",").concat(o," 0 0,1 0,").concat(r)+"h -".concat(t," l -8,8 -8,-8 v -").concat(r," z")},box:function(e){var t=e?e.contentWidth:150,r=e?e.contentHeight:28;return{offsetX:-8,offsetY:0,width:t+30,height:Math.max(30,r+2),marginBottom:0}},magnets:function(e){return{previous:{x:0,y:0},next:{x:0,y:(e?Math.max(e.height,30):30)+1+e.offsetY}}},contentPos:function(e){return{x:14,y:Math.max(e.contentHeight,28)/2+1}}}},90390:(e,t,r)=>{Entry.skeleton={};var o=r(37730);o.keys().forEach(o)},60954:()=>{Entry.skeleton.pebble_basic={executable:!0,fontSize:15,morph:["prev","next"],path:function(){return"m 0,9 a 9,9 0 0,0 9,-9 h 28 q 25,0 25,25q 0,25 -25,25h -28 a 9,9 0 0,1 -18,0 h -28 q -25,0 -25,-25q 0,-25 25,-25h 28 a 9,9 0 0,0 9,9 z"},magnets:function(e){return{previous:{x:0,y:0},next:{x:0,y:(e?Math.max(e.height,51):51)+e.offsetY}}},box:function(){return{offsetX:-62,offsetY:0,width:124,height:50,marginBottom:0}},contentPos:function(){return{x:-46,y:25}}}},16613:()=>{Entry.skeleton.pebble_event={executable:!0,path:function(){return"m 0,0 a 25,25 0 0,1 9,48.3 a 9,9 0 0,1 -18,0 a 25,25 0 0,1 9,-48.3 z"},box:function(){return{offsetX:-25,offsetY:0,width:50,height:48.3,marginBottom:0}},magnets:function(e){return{next:{x:0,y:(e?Math.max(e.height,49.3):49.3)+e.offsetY}}},contentPos:function(){return{x:0,y:25}}}},72868:()=>{Entry.skeleton.pebble_loop={executable:!0,fontSize:16,dropdownHeight:23,path:function(e){var t=Math.max(e._statements[0]?e._statements[0].height:50,50);return"M 0,9 a 9,9 0 0,0 9,-9 h %cw q 25,0 25,25 v%ch q 0,25 -25,25 h -%cw a 9,9 0 0,1 -18,0 h -%cw q -25,0 -25,-25 v -%ch q 0,-25 25,-25 h %cw a 9,9 0 0,0 9,9 M 0,49 a 9,9 0 0,1 -9,-9 h -28 a 25,25 0 0,0 -25,25 v%cih a 25,25 0 0,0 25,25 h 28 a 9,9 0 0,0 18,0 h 28 a 25,25 0 0,0 25,-25 v -%cih a 25,25 0 0,0 -25,-25 h -28 a 9,9 0 0,1 -9,9 z".replace(/%cw/gi,41).replace(/%ch/gi,t+4).replace(/%cih/gi,t-50)},magnets:function(e){var t=Math.max(e.contentHeight+2,41),r=e._statements[0]?e._statements[0].height:20;return{previous:{x:0,y:0},next:{x:0,y:(r=Math.max(r,51))+t+13+e.offsetY}}},box:function(e){var t=e.contentWidth,r=Math.max(e.contentHeight+2,41),o=e._statements[0]?e._statements[0].height:20;return{topFieldHeight:r,offsetX:-(t/2+13),offsetY:0,width:t+30,height:r+(o=Math.max(o,51))+13,marginBottom:0}},statementPos:function(e){return[{x:0,y:Math.max(39,e.contentHeight+2)+1.5}]},contentPos:function(){return{x:-46,y:25}}}},69744:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Destroyer:()=>o});var o=function(){function e(){this._items=[]}return e.prototype.add=function(e){if(e==this)throw new Error("Can't add self.");this._items.push(e)},e.prototype.remove=function(e){var t=this._items.indexOf(e);-1!=t&&this._items.splice(t,1)},e.prototype.destroy=function(){for(var e=this._items.length,t=0;t{"use strict";r.r(t),r.d(t,{default:()=>o});const o=function(){var e="color:#48D57C;font-weight:bold;",t="color:#6B8DF5;font-weight:bold;",r="color:#7B46E6;font-weight:bold;",o="color:#F5CE10;font-weight:bold;",n="color:#EF583C;font-weight:bold;",a="color:black;font-weight:bold;";function i(e){return navigator.userAgent.toLowerCase().indexOf(e)>-1}if("object"==typeof console&&console.log&&"function"==typeof console.log)if(i("chrome")&&!i("edge")){console.log("\n%c███████╗%c███╗ ██╗%c████████╗%c██████╗ %c██╗ ██╗ %c\n%c██╔════╝%c████╗ ██║%c╚══██╔══╝%c██╔══██╗%c╚██╗ ██╔╝ %c _ \n%c█████╗ %c██╔██╗ ██║%c ██║ %c██████╔╝%c ╚████╔╝ %c |_|___ \n%c██╔══╝ %c██║╚██╗██║%c ██║ %c██╔══██╗%c ╚██╔╝ %c | |_ -|\n%c███████╗%c██║ ╚████║%c ██║ %c██║ ██║%c ██║ %c _| |___|\n%c╚══════╝%c╚═╝ ╚═══╝%c ╚═╝ %c╚═╝ ╚═╝%c ╚═╝ %c|___|",e,t,r,o,n,a,e,t,r,o,n,a,e,t,r,o,n,a,e,t,r,o,n,a,e,t,r,o,n,a,e,t,r,o,n,a)}else console.log("\n███████╗███╗ ██╗████████╗██████╗ ██╗ ██╗\n██╔════╝████╗ ██║╚══██╔══╝██╔══██╗╚██╗ ██╔╝ _\n█████╗ ██╔██╗ ██║ ██║ ██████╔╝ ╚████╔╝ |_|___\n██╔══╝ ██║╚██╗██║ ██║ ██╔══██╗ ╚██╔╝ | |_ -|\n███████╗██║ ╚████║ ██║ ██║ ██║ ██║ _| |___|\n╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ |___|")}},27374:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D,flipState:()=>S,getInputList:()=>E});var o=r(37195),n=r(33789),a=r(10203),i=r(48165),s=r(94048),l=r.n(s),c=r(20477),u=r.n(c);function _(){return u()("/******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 592:\n/***/ ((module) => {\n\n\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ 680:\n/***/ ((module) => {\n\n\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ 660:\n/***/ ((module, exports, __webpack_require__) => {\n\n/* module decorator */ module = __webpack_require__.nmd(module);\nvar __WEBPACK_AMD_DEFINE_RESULT__;var _interopRequireDefault=__webpack_require__(592);var _typeof2=_interopRequireDefault(__webpack_require__(680));/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */;(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined;/** Used as the semantic version number. */var VERSION='4.17.21';/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Error message constants. */var CORE_ERROR_TEXT='Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',FUNC_ERROR_TEXT='Expected a function',INVALID_TEMPL_VAR_ERROR_TEXT='Invalid `variable` option passed into `_.template`';/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;/** Used as the internal argument placeholder. */var PLACEHOLDER='__lodash_placeholder__';/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;/** Used to compose bitmasks for function metadata. */var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;/** Used as default options for `_.truncate`. */var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION='...';/** Used to detect hot functions by number of calls within a span of milliseconds. */var HOT_COUNT=800,HOT_SPAN=16;/** Used to indicate the type of lazy iteratees. */var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e+308,NAN=0/0;/** Used as references for the maximum length and index of an array. */var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;/** Used to associate wrap methods with their bit flags. */var wrapFlags=[['ary',WRAP_ARY_FLAG],['bind',WRAP_BIND_FLAG],['bindKey',WRAP_BIND_KEY_FLAG],['curry',WRAP_CURRY_FLAG],['curryRight',WRAP_CURRY_RIGHT_FLAG],['flip',WRAP_FLIP_FLAG],['partial',WRAP_PARTIAL_FLAG],['partialRight',WRAP_PARTIAL_RIGHT_FLAG],['rearg',WRAP_REARG_FLAG]];/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',asyncTag='[object AsyncFunction]',boolTag='[object Boolean]',dateTag='[object Date]',domExcTag='[object DOMException]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',nullTag='[object Null]',objectTag='[object Object]',promiseTag='[object Promise]',proxyTag='[object Proxy]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',undefinedTag='[object Undefined]',weakMapTag='[object WeakMap]',weakSetTag='[object WeakSet]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/** Used to match empty string literals in compiled template source. */var reEmptyStringLeading=/\\b__p \\+= '';/g,reEmptyStringMiddle=/\\b(__p \\+=) '' \\+/g,reEmptyStringTrailing=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;/** Used to match HTML entities and HTML characters. */var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>\"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);/** Used to match template delimiters. */var reEscape=/<%-([\\s\\S]+?)%>/g,reEvaluate=/<%([\\s\\S]+?)%>/g,reInterpolate=/<%=([\\s\\S]+?)%>/g;/** Used to match property names within property paths. */var reIsDeepProp=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,reIsPlainProp=/^\\w*$/,rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */var reRegExpChar=/[\\\\^$.*+?()[\\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);/** Used to match leading whitespace. */var reTrimStart=/^\\s+/;/** Used to match a single whitespace character. */var reWhitespace=/\\s/;/** Used to match wrap detail comments. */var reWrapComment=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,reWrapDetails=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,reSplitDetails=/,? & /;/** Used to match words composed of alphanumeric characters. */var reAsciiWord=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;/**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */var reForbiddenIdentifierChars=/[()=,{}\\[\\]\\/\\s]/;/** Used to match backslashes in property paths. */var reEscapeChar=/\\\\(\\\\)?/g;/**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */var reEsTemplate=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;/** Used to match `RegExp` flags from their coerced string values. */var reFlags=/\\w*$/;/** Used to detect bad signed hexadecimal string values. */var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;/** Used to detect binary string values. */var reIsBinary=/^0b[01]+$/i;/** Used to detect host constructors (Safari). */var reIsHostCtor=/^\\[object .+?Constructor\\]$/;/** Used to detect octal string values. */var reIsOctal=/^0o[0-7]+$/i;/** Used to detect unsigned integer values. */var reIsUint=/^(?:0|[1-9]\\d*)$/;/** Used to match Latin Unicode letters (excluding mathematical operators). */var reLatin=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;/** Used to ensure capturing order of template delimiters. */var reNoMatch=/($^)/;/** Used to match unescaped characters in compiled string literals. */var reUnescapedString=/['\\n\\r\\u2028\\u2029\\\\]/g;/** Used to compose unicode character classes. */var rsAstralRange=\"\\\\ud800-\\\\udfff\",rsComboMarksRange=\"\\\\u0300-\\\\u036f\",reComboHalfMarksRange=\"\\\\ufe20-\\\\ufe2f\",rsComboSymbolsRange=\"\\\\u20d0-\\\\u20ff\",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange=\"\\\\u2700-\\\\u27bf\",rsLowerRange='a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',rsMathOpRange='\\\\xac\\\\xb1\\\\xd7\\\\xf7',rsNonCharRange='\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',rsPunctuationRange=\"\\\\u2000-\\\\u206f\",rsSpaceRange=\" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",rsUpperRange='A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',rsVarRange=\"\\\\ufe0e\\\\ufe0f\",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange;/** Used to compose unicode capture groups. */var rsApos=\"['\\u2019]\",rsAstral='['+rsAstralRange+']',rsBreak='['+rsBreakRange+']',rsCombo='['+rsComboRange+']',rsDigits='\\\\d+',rsDingbat='['+rsDingbatRange+']',rsLower='['+rsLowerRange+']',rsMisc='[^'+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+']',rsFitz=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",rsModifier='(?:'+rsCombo+'|'+rsFitz+')',rsNonAstral='[^'+rsAstralRange+']',rsRegional=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",rsSurrPair=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",rsUpper='['+rsUpperRange+']',rsZWJ=\"\\\\u200d\";/** Used to compose unicode regexes. */var rsMiscLower='(?:'+rsLower+'|'+rsMisc+')',rsMiscUpper='(?:'+rsUpper+'|'+rsMisc+')',rsOptContrLower='(?:'+rsApos+'(?:d|ll|m|re|s|t|ve))?',rsOptContrUpper='(?:'+rsApos+'(?:D|LL|M|RE|S|T|VE))?',reOptMod=rsModifier+'?',rsOptVar='['+rsVarRange+']?',rsOptJoin='(?:'+rsZWJ+'(?:'+[rsNonAstral,rsRegional,rsSurrPair].join('|')+')'+rsOptVar+reOptMod+')*',rsOrdLower='\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',rsOrdUpper='\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji='(?:'+[rsDingbat,rsRegional,rsSurrPair].join('|')+')'+rsSeq,rsSymbol='(?:'+[rsNonAstral+rsCombo+'?',rsCombo,rsRegional,rsSurrPair,rsAstral].join('|')+')';/** Used to match apostrophes. */var reApos=RegExp(rsApos,'g');/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */var reComboMark=RegExp(rsCombo,'g');/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */var reUnicode=RegExp(rsFitz+'(?='+rsFitz+')|'+rsSymbol+rsSeq,'g');/** Used to match complex or compound words. */var reUnicodeWord=RegExp([rsUpper+'?'+rsLower+'+'+rsOptContrLower+'(?='+[rsBreak,rsUpper,'$'].join('|')+')',rsMiscUpper+'+'+rsOptContrUpper+'(?='+[rsBreak,rsUpper+rsMiscLower,'$'].join('|')+')',rsUpper+'?'+rsMiscLower+'+'+rsOptContrLower,rsUpper+'+'+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join('|'),'g');/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */var reHasUnicode=RegExp('['+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+']');/** Used to detect strings that need a more robust regexp to match words. */var reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;/** Used to assign default `context` object properties. */var contextProps=['Array','Buffer','DataView','Date','Error','Float32Array','Float64Array','Function','Int8Array','Int16Array','Int32Array','Map','Math','Object','Promise','RegExp','Set','String','Symbol','TypeError','Uint8Array','Uint8ClampedArray','Uint16Array','Uint32Array','WeakMap','_','clearTimeout','isFinite','parseInt','setTimeout'];/** Used to make template sourceURLs easier to identify. */var templateCounter=-1;/** Used to identify `toStringTag` values of typed arrays. */var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;/** Used to identify `toStringTag` values supported by `_.clone`. */var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;/** Used to map Latin Unicode letters to basic Latin letters. */var deburredLetters={// Latin-1 Supplement block.\n'\\xc0':'A','\\xc1':'A','\\xc2':'A','\\xc3':'A','\\xc4':'A','\\xc5':'A','\\xe0':'a','\\xe1':'a','\\xe2':'a','\\xe3':'a','\\xe4':'a','\\xe5':'a','\\xc7':'C','\\xe7':'c','\\xd0':'D','\\xf0':'d','\\xc8':'E','\\xc9':'E','\\xca':'E','\\xcb':'E','\\xe8':'e','\\xe9':'e','\\xea':'e','\\xeb':'e','\\xcc':'I','\\xcd':'I','\\xce':'I','\\xcf':'I','\\xec':'i','\\xed':'i','\\xee':'i','\\xef':'i','\\xd1':'N','\\xf1':'n','\\xd2':'O','\\xd3':'O','\\xd4':'O','\\xd5':'O','\\xd6':'O','\\xd8':'O','\\xf2':'o','\\xf3':'o','\\xf4':'o','\\xf5':'o','\\xf6':'o','\\xf8':'o','\\xd9':'U','\\xda':'U','\\xdb':'U','\\xdc':'U','\\xf9':'u','\\xfa':'u','\\xfb':'u','\\xfc':'u','\\xdd':'Y','\\xfd':'y','\\xff':'y','\\xc6':'Ae','\\xe6':'ae','\\xde':'Th','\\xfe':'th','\\xdf':'ss',// Latin Extended-A block.\n\"\\u0100\":'A',\"\\u0102\":'A',\"\\u0104\":'A',\"\\u0101\":'a',\"\\u0103\":'a',\"\\u0105\":'a',\"\\u0106\":'C',\"\\u0108\":'C',\"\\u010A\":'C',\"\\u010C\":'C',\"\\u0107\":'c',\"\\u0109\":'c',\"\\u010B\":'c',\"\\u010D\":'c',\"\\u010E\":'D',\"\\u0110\":'D',\"\\u010F\":'d',\"\\u0111\":'d',\"\\u0112\":'E',\"\\u0114\":'E',\"\\u0116\":'E',\"\\u0118\":'E',\"\\u011A\":'E',\"\\u0113\":'e',\"\\u0115\":'e',\"\\u0117\":'e',\"\\u0119\":'e',\"\\u011B\":'e',\"\\u011C\":'G',\"\\u011E\":'G',\"\\u0120\":'G',\"\\u0122\":'G',\"\\u011D\":'g',\"\\u011F\":'g',\"\\u0121\":'g',\"\\u0123\":'g',\"\\u0124\":'H',\"\\u0126\":'H',\"\\u0125\":'h',\"\\u0127\":'h',\"\\u0128\":'I',\"\\u012A\":'I',\"\\u012C\":'I',\"\\u012E\":'I',\"\\u0130\":'I',\"\\u0129\":'i',\"\\u012B\":'i',\"\\u012D\":'i',\"\\u012F\":'i',\"\\u0131\":'i',\"\\u0134\":'J',\"\\u0135\":'j',\"\\u0136\":'K',\"\\u0137\":'k',\"\\u0138\":'k',\"\\u0139\":'L',\"\\u013B\":'L',\"\\u013D\":'L',\"\\u013F\":'L',\"\\u0141\":'L',\"\\u013A\":'l',\"\\u013C\":'l',\"\\u013E\":'l',\"\\u0140\":'l',\"\\u0142\":'l',\"\\u0143\":'N',\"\\u0145\":'N',\"\\u0147\":'N',\"\\u014A\":'N',\"\\u0144\":'n',\"\\u0146\":'n',\"\\u0148\":'n',\"\\u014B\":'n',\"\\u014C\":'O',\"\\u014E\":'O',\"\\u0150\":'O',\"\\u014D\":'o',\"\\u014F\":'o',\"\\u0151\":'o',\"\\u0154\":'R',\"\\u0156\":'R',\"\\u0158\":'R',\"\\u0155\":'r',\"\\u0157\":'r',\"\\u0159\":'r',\"\\u015A\":'S',\"\\u015C\":'S',\"\\u015E\":'S',\"\\u0160\":'S',\"\\u015B\":'s',\"\\u015D\":'s',\"\\u015F\":'s',\"\\u0161\":'s',\"\\u0162\":'T',\"\\u0164\":'T',\"\\u0166\":'T',\"\\u0163\":'t',\"\\u0165\":'t',\"\\u0167\":'t',\"\\u0168\":'U',\"\\u016A\":'U',\"\\u016C\":'U',\"\\u016E\":'U',\"\\u0170\":'U',\"\\u0172\":'U',\"\\u0169\":'u',\"\\u016B\":'u',\"\\u016D\":'u',\"\\u016F\":'u',\"\\u0171\":'u',\"\\u0173\":'u',\"\\u0174\":'W',\"\\u0175\":'w',\"\\u0176\":'Y',\"\\u0177\":'y',\"\\u0178\":'Y',\"\\u0179\":'Z',\"\\u017B\":'Z',\"\\u017D\":'Z',\"\\u017A\":'z',\"\\u017C\":'z',\"\\u017E\":'z',\"\\u0132\":'IJ',\"\\u0133\":'ij',\"\\u0152\":'Oe',\"\\u0153\":'oe',\"\\u0149\":\"'n\",\"\\u017F\":'s'};/** Used to map characters to HTML entities. */var htmlEscapes={'&':'&','<':'<','>':'>','\"':'"',\"'\":'''};/** Used to map HTML entities to characters. */var htmlUnescapes={'&':'&','<':'<','>':'>','"':'\"',''':\"'\"};/** Used to escape characters for inclusion in compiled string literals. */var stringEscapes={'\\\\':'\\\\',\"'\":\"'\",'\\n':'n','\\r':'r',\"\\u2028\":'u2028',\"\\u2029\":'u2029'};/** Built-in method references without a dependency on `root`. */var freeParseFloat=parseFloat,freeParseInt=parseInt;/** Detect free variable `global` from Node.js. */var freeGlobal=(typeof __webpack_require__.g===\"undefined\"?\"undefined\":(0,_typeof2[\"default\"])(__webpack_require__.g))=='object'&&__webpack_require__.g&&__webpack_require__.g.Object===Object&&__webpack_require__.g;/** Detect free variable `self`. */var freeSelf=(typeof self===\"undefined\"?\"undefined\":(0,_typeof2[\"default\"])(self))=='object'&&self&&self.Object===Object&&self;/** Used as a reference to the global object. */var root=freeGlobal||freeSelf||Function('return this')();/** Detect free variable `exports`. */var freeExports=( false?0:(0,_typeof2[\"default\"])(exports))=='object'&&exports&&!exports.nodeType&&exports;/** Detect free variable `module`. */var freeModule=freeExports&&( false?0:(0,_typeof2[\"default\"])(module))=='object'&&module&&!module.nodeType&&module;/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;/** Detect free variable `process` from Node.js. */var freeProcess=moduleExports&&freeGlobal.process;/** Used to access faster Node.js helpers. */var nodeUtil=function(){try{// Use `util.types` for Node.js 10+.\nvar types=freeModule&&freeModule.require&&freeModule.require('util').types;if(types){return types;}// Legacy `process.binding('util')` for Node.js < 10.\nreturn freeProcess&&freeProcess.binding&&freeProcess.binding('util');}catch(e){}}();/* Node.js helper references. */var nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;/*--------------------------------------------------------------------------*/ /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2]);}return func.apply(thisArg,args);}/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */function arrayAggregator(array,setter,iteratee,accumulator){var index=-1,length=array==null?0:array.length;while(++index-1;}/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */function arrayIncludesWith(array,value,comparator){var index=-1,length=array==null?0:array.length;while(++index-1){}return index;}/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */function charsEndIndex(strSymbols,chrSymbols){var index=strSymbols.length;while(index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index;}/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */function countHolders(array,placeholder){var length=array.length,result=0;while(length--){if(array[length]===placeholder){++result;}}return result;}/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */var deburrLetter=basePropertyOf(deburredLetters);/**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */var escapeHtmlChar=basePropertyOf(htmlEscapes);/**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */function escapeStringChar(chr){return'\\\\'+stringEscapes[chr];}/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */function getValue(object,key){return object==null?undefined:object[key];}/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */function hasUnicode(string){return reHasUnicode.test(string);}/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */function hasUnicodeWord(string){return reHasUnicodeWord.test(string);}/**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */function iteratorToArray(iterator){var data,result=[];while(!(data=iterator.next()).done){result.push(data.value);}return result;}/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value];});return result;}/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */function overArg(func,transform){return function(arg){return func(transform(arg));};}/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=0,result=[];while(++index true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */var runInContext=function runInContext(context){context=context==null?root:_.defaults(root.Object(),context,_.pick(root,contextProps));/** Built-in constructor references. */var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;/** Used for built-in method references. */var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;/** Used to detect overreaching core-js shims. */var coreJsData=context['__core-js_shared__'];/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;/** Used to generate unique IDs. */var idCounter=0;/** Used to detect methods masquerading as native. */var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||'');return uid?'Symbol(src)_1.'+uid:'';}();/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */var nativeObjectToString=objectProto.toString;/** Used to infer the `Object` constructor. */var objectCtorString=funcToString.call(Object);/** Used to restore the original `_` reference in `_.noConflict`. */var oldDash=root._;/** Used to detect if a method is native. */var reIsNative=RegExp('^'+funcToString.call(hasOwnProperty).replace(reRegExpChar,'\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,'$1.*?')+'$');/** Built-in value references. */var Buffer=moduleExports?context.Buffer:undefined,_Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=_Symbol?_Symbol.isConcatSpreadable:undefined,symIterator=_Symbol?_Symbol.iterator:undefined,symToStringTag=_Symbol?_Symbol.toStringTag:undefined;var defineProperty=function(){try{var func=getNative(Object,'defineProperty');func({},'',{});return func;}catch(e){}}();/** Mocked built-ins. */var ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout;/* Built-in method references for those with the same name as other `lodash` methods. */var nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse;/* Built-in method references that are verified to be native. */var DataView=getNative(context,'DataView'),Map=getNative(context,'Map'),Promise=getNative(context,'Promise'),Set=getNative(context,'Set'),WeakMap=getNative(context,'WeakMap'),nativeCreate=getNative(Object,'create');/** Used to store function metadata. */var metaMap=WeakMap&&new WeakMap();/** Used to lookup unminified function names. */var realNames={};/** Used to detect maps, sets, and weakmaps. */var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);/** Used to convert symbols to primitives and strings. */var symbolProto=_Symbol?_Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;/*------------------------------------------------------------------------*/ /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value;}if(hasOwnProperty.call(value,'__wrapped__')){return wrapperClone(value);}}return new LodashWrapper(value);}/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{};}if(objectCreate){return objectCreate(proto);}object.prototype=proto;var result=new object();object.prototype=undefined;return result;};}();/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */function baseLodash(){// No operation performed.\n}/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */function LodashWrapper(value,chainAll){this.__wrapped__=value;this.__actions__=[];this.__chain__=!!chainAll;this.__index__=0;this.__values__=undefined;}/**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */lodash.templateSettings={/**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */'escape':reEscape,/**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */'evaluate':reEvaluate,/**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */'interpolate':reInterpolate,/**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */'variable':'',/**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */'imports':{/**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */'_':lodash}};// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype=baseLodash.prototype;lodash.prototype.constructor=lodash;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;/*------------------------------------------------------------------------*/ /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=MAX_ARRAY_LENGTH;this.__views__=[];}/**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */function lazyClone(){var result=new LazyWrapper(this.__wrapped__);result.__actions__=copyArray(this.__actions__);result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=copyArray(this.__iteratees__);result.__takeCount__=this.__takeCount__;result.__views__=copyArray(this.__views__);return result;}/**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true;}else{result=this.clone();result.__dir__*=-1;}return result;}/**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||!isRight&&arrLength==length&&takeCount==length){return baseWrapperValue(array,this.__actions__);}var result=[];outer:while(length--&&resIndex-1;}/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value]);}else{data[index][1]=value;}return this;}// Add methods to `ListCache`.\nListCache.prototype.clear=listCacheClear;ListCache.prototype['delete']=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;/*------------------------------------------------------------------------*/ /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index=lower?number:lower;}}return number;}/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer){result=object?customizer(value,key,object,stack):customizer(value);}if(result!==undefined){return result;}if(!isObject(value)){return value;}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result);}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep);}if(tag==objectTag||tag==argsTag||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value));}}else{if(!cloneableTags[tag]){return object?value:{};}result=initCloneByTag(value,tag,isDeep);}}// Check for circular references and return its corresponding clone.\nstack||(stack=new Stack());var stacked=stack.get(value);if(stacked){return stacked;}stack.set(value,result);if(isSet(value)){value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack));});}else if(isMap(value)){value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack));});}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?undefined:keysFunc(value);arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key];}// Recursively populate clone (susceptible to call stack limits).\nassignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack));});return result;}/**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props);};}/**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */function baseConformsTo(object,source,props){var length=props.length;if(object==null){return!length;}object=Object(object);while(length--){var key=props[length],predicate=source[key],value=object[key];if(value===undefined&&!(key in object)||!predicate(value)){return false;}}return true;}/**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */function baseDelay(func,wait,args){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return setTimeout(function(){func.apply(undefined,args);},wait);}/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=true,length=array.length,result=[],valuesLength=values.length;if(!length){return result;}if(iteratee){values=arrayMap(values,baseUnary(iteratee));}if(comparator){includes=arrayIncludesWith;isCommon=false;}else if(values.length>=LARGE_ARRAY_SIZE){includes=cacheHas;isCommon=false;values=new SetCache(values);}outer:while(++indexlength?0:length+start;}end=end===undefined||end>length?length:toInteger(end);if(end<0){end+=length;}end=start>end?0:toLength(end);while(start0&&predicate(value)){if(depth>1){// Recursively flatten arrays (susceptible to call stack limits).\nbaseFlatten(value,depth-1,predicate,isStrict,result);}else{arrayPush(result,value);}}else if(!isStrict){result[result.length]=value;}}return result;}/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */var baseFor=createBaseFor();/**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */var baseForRight=createBaseFor(true);/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys);}/**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys);}/**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */function baseFunctions(object,props){return arrayFilter(props,function(key){return isFunction(object[key]);});}/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&indexother;}/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key);}/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */function baseHasIn(object,key){return object!=null&&key in Object(object);}/**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number=120&&array.length>=120)?new SetCache(othIndex&&array):undefined;}array=arrays[0];var index=-1,seen=caches[0];outer:while(++index-1){if(seen!==array){splice.call(seen,fromIndex,1);}splice.call(array,fromIndex,1);}}return array;}/**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */function basePullAt(array,indexes){var length=array?indexes.length:0,lastIndex=length-1;while(length--){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;if(isIndex(index)){splice.call(array,index,1);}else{baseUnset(array,index);}}}return array;}/**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1));}/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */function baseRange(start,end,step,fromRight){var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(length--){result[fromRight?length:++index]=start;start+=step;}return result;}/**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */function baseRepeat(string,n){var result='';if(!string||n<1||n>MAX_SAFE_INTEGER){return result;}// Leverage the exponentiation by squaring algorithm for a faster repeat.\n// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\ndo{if(n%2){result+=string;}n=nativeFloor(n/2);if(n){string+=string;}}while(n);return result;}/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */function baseRest(func,start){return setToString(overRest(func,start,identity),func+'');}/**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */function baseSample(collection){return arraySample(values(collection));}/**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length));}/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */function baseSet(object,path,value,customizer){if(!isObject(object)){return object;}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++indexlength?0:length+start;}end=end>length?length:end;if(end<0){end+=length;}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index>>1,computed=array[mid];if(computed!==null&&!isSymbol(computed)&&(retHighest?computed<=value:computed=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set){return setToArray(set);}isCommon=false;includes=cacheHas;seen=new SetCache();}else{seen=iteratee?[]:result;}outer:while(++index=length?array:baseSlice(array,start,end);}/**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id);};/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice();}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result;}/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result;}/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength);}/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result;}/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{};}/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length);}/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=value===null,valIsReflexive=value===value,valIsSymbol=isSymbol(value);var othIsDefined=other!==undefined,othIsNull=other===null,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive){return 1;}if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value=ordersLength){return result;}var order=orders[index];return result*(order=='desc'?-1:1);}}// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n// that causes it, under certain circumstances, to provide the same value for\n// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n// for more details.\n//\n// This also ensures a stable sort in V8 and other engines.\n// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\nreturn object.index-other.index;}/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */function composeArgs(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;while(++leftIndex1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;customizer=assigner.length>3&&typeof customizer=='function'?(length--,customizer):undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1;}object=Object(object);while(++index-1?iterable[iteratee?collection[index]:index]:undefined;};}/**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */function createFlow(fromRight){return flatRest(function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;if(fromRight){funcs.reverse();}while(index--){var func=funcs[index];if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}if(prereq&&!wrapper&&getFuncName(func)=='wrapper'){var wrapper=new LodashWrapper([],true);}}index=wrapper?index:length;while(++index1){args.reverse();}if(isAry&&aryarrLength)){return false;}// Check that cyclic values are equal.\nvar arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array;}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache():undefined;stack.set(array,other);stack.set(other,array);// Ignore non-index properties.\nwhile(++index1?'& ':'')+details[lastIndex];details=details.join(length>2?', ':' ');return source.replace(reWrapComment,'{\\n/* [wrapped with '+details+'] */\\n');}/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol]);}/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */function isIndex(value,length){var type=(0,_typeof2[\"default\"])(value);length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(type=='number'||type!='symbol'&&reIsUint.test(value))&&value>-1&&value%1==0&&value0){if(++count>=HOT_COUNT){return arguments[0];}}else{count=0;}return func.apply(undefined,arguments);};}/**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;size=size===undefined?length:size;while(++index [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size===undefined){size=1;}else{size=nativeMax(toInteger(size),0);}var length=array==null?0:array.length;if(!length||size<1){return[];}var index=0,resIndex=0,result=Array(nativeCeil(length/size));while(index [1, 2, 3]\n */function compact(array){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */function concat(){var length=arguments.length;if(!length){return[];}var args=Array(length-1),array=arguments[0],index=length;while(index--){args[index-1]=arguments[index];}return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1));}/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */var difference=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true)):[];});/**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */var differenceBy=baseRest(function(array,values){var iteratee=last(values);if(isArrayLikeObject(iteratee)){iteratee=undefined;}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),getIteratee(iteratee,2)):[];});/**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */var differenceWith=baseRest(function(array,values){var comparator=last(values);if(isArrayLikeObject(comparator)){comparator=undefined;}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),undefined,comparator):[];});/**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */function drop(array,n,guard){var length=array==null?0:array.length;if(!length){return[];}n=guard||n===undefined?1:toInteger(n);return baseSlice(array,n<0?0:n,length);}/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */function dropRight(array,n,guard){var length=array==null?0:array.length;if(!length){return[];}n=guard||n===undefined?1:toInteger(n);n=length-n;return baseSlice(array,0,n<0?0:n);}/**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true,true):[];}/**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true):[];}/**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */function fill(array,value,start,end){var length=array==null?0:array.length;if(!length){return[];}if(start&&typeof start!='number'&&isIterateeCall(array,value,start)){start=0;end=length;}return baseFill(array,value,start,end);}/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0);}return baseFindIndex(array,getIteratee(predicate,3),index);}/**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */function findLastIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=length-1;if(fromIndex!==undefined){index=toInteger(fromIndex);index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1);}return baseFindIndex(array,getIteratee(predicate,3),index,true);}/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array,1):[];}/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */function flattenDeep(array){var length=array==null?0:array.length;return length?baseFlatten(array,INFINITY):[];}/**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */function flattenDepth(array,depth){var length=array==null?0:array.length;if(!length){return[];}depth=depth===undefined?1:toInteger(depth);return baseFlatten(array,depth);}/**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */function fromPairs(pairs){var index=-1,length=pairs==null?0:pairs.length,result={};while(++index 1\n *\n * _.head([]);\n * // => undefined\n */function head(array){return array&&array.length?array[0]:undefined;}/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */function indexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0);}return baseIndexOf(array,value,index);}/**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */function initial(array){var length=array==null?0:array.length;return length?baseSlice(array,0,-1):[];}/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */var intersection=baseRest(function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[];});/**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */var intersectionBy=baseRest(function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);if(iteratee===last(mapped)){iteratee=undefined;}else{mapped.pop();}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[];});/**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */var intersectionWith=baseRest(function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);comparator=typeof comparator=='function'?comparator:undefined;if(comparator){mapped.pop();}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined,comparator):[];});/**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */function join(array,separator){return array==null?'':nativeJoin.call(array,separator);}/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */function last(array){var length=array==null?0:array.length;return length?array[length-1]:undefined;}/**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */function lastIndexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return-1;}var index=length;if(fromIndex!==undefined){index=toInteger(fromIndex);index=index<0?nativeMax(length+index,0):nativeMin(index,length-1);}return value===value?strictLastIndexOf(array,value,index):baseFindIndex(array,baseIsNaN,index,true);}/**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined;}/**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */var pull=baseRest(pullAll);/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array;}/**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array;}/**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined,comparator):array;}/**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */var pullAt=flatRest(function(array,indexes){var length=array==null?0:array.length,result=baseAt(array,indexes);basePullAt(array,arrayMap(indexes,function(index){return isIndex(index,length)?+index:index;}).sort(compareAscending));return result;});/**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */function remove(array,predicate){var result=[];if(!(array&&array.length)){return result;}var index=-1,indexes=[],length=array.length;predicate=getIteratee(predicate,3);while(++index [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */function reverse(array){return array==null?array:nativeReverse.call(array);}/**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */function slice(array,start,end){var length=array==null?0:array.length;if(!length){return[];}if(end&&typeof end!='number'&&isIterateeCall(array,start,end)){start=0;end=length;}else{start=start==null?0:toInteger(start);end=end===undefined?length:toInteger(end);}return baseSlice(array,start,end);}/**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */function sortedIndex(array,value){return baseSortedIndex(array,value);}/**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2));}/**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */function sortedIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index 4\n */function sortedLastIndex(array,value){return baseSortedIndex(array,value,true);}/**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),true);}/**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */function sortedLastIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value,true)-1;if(eq(array[index],value)){return index;}}return-1;}/**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[];}/**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[];}/**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */function tail(array){var length=array==null?0:array.length;return length?baseSlice(array,1,length):[];}/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */function take(array,n,guard){if(!(array&&array.length)){return[];}n=guard||n===undefined?1:toInteger(n);return baseSlice(array,0,n<0?0:n);}/**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */function takeRight(array,n,guard){var length=array==null?0:array.length;if(!length){return[];}n=guard||n===undefined?1:toInteger(n);n=length-n;return baseSlice(array,n<0?0:n,length);}/**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),false,true):[];}/**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[];}/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */var union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true));});/**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */var unionBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined;}return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),getIteratee(iteratee,2));});/**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */var unionWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=='function'?comparator:undefined;return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),undefined,comparator);});/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */function uniq(array){return array&&array.length?baseUniq(array):[];}/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[];}/**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */function uniqWith(array,comparator){comparator=typeof comparator=='function'?comparator:undefined;return array&&array.length?baseUniq(array,undefined,comparator):[];}/**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */function unzip(array){if(!(array&&array.length)){return[];}var length=0;array=arrayFilter(array,function(group){if(isArrayLikeObject(group)){length=nativeMax(group.length,length);return true;}});return baseTimes(length,function(index){return arrayMap(array,baseProperty(index));});}/**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */function unzipWith(array,iteratee){if(!(array&&array.length)){return[];}var result=unzip(array);if(iteratee==null){return result;}return arrayMap(result,function(group){return apply(iteratee,undefined,group);});}/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */var without=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[];});/**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */var xor=baseRest(function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject));});/**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */var xorBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined;}return baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2));});/**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */var xorWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=='function'?comparator:undefined;return baseXor(arrayFilter(arrays,isArrayLikeObject),undefined,comparator);});/**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */var zip=baseRest(unzip);/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue);}/**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet);}/**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */var zipWith=baseRest(function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined;iteratee=typeof iteratee=='function'?(arrays.pop(),iteratee):undefined;return unzipWith(arrays,iteratee);});/*------------------------------------------------------------------------*/ /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */function chain(value){var result=lodash(value);result.__chain__=true;return result;}/**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */function tap(value,interceptor){interceptor(value);return value;}/**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */function thru(value,interceptor){return interceptor(value);}/**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */var wrapperAt=flatRest(function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function interceptor(object){return baseAt(object,paths);};if(length>1||this.__actions__.length||!(value instanceof LazyWrapper)||!isIndex(start)){return this.thru(interceptor);}value=value.slice(start,+start+(length?1:0));value.__actions__.push({'func':thru,'args':[interceptor],'thisArg':undefined});return new LodashWrapper(value,this.__chain__).thru(function(array){if(length&&!array.length){array.push(undefined);}return array;});});/**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */function wrapperChain(){return chain(this);}/**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__);}/**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */function wrapperNext(){if(this.__values__===undefined){this.__values__=toArray(this.value());}var done=this.__index__>=this.__values__.length,value=done?undefined:this.__values__[this.__index__++];return{'done':done,'value':value};}/**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */function wrapperToIterator(){return this;}/**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);clone.__index__=0;clone.__values__=undefined;if(result){previous.__wrapped__=clone;}else{result=clone;}var previous=clone;parent=parent.__wrapped__;}previous.__wrapped__=value;return result;}/**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this);}wrapped=wrapped.reverse();wrapped.__actions__.push({'func':thru,'args':[reverse],'thisArg':undefined});return new LodashWrapper(wrapped,this.__chain__);}return this.thru(reverse);}/**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__);}/*------------------------------------------------------------------------*/ /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */var countBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){++result[key];}else{baseAssignValue(result,key,1);}});/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined;}return func(collection,getIteratee(predicate,3));}/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,getIteratee(predicate,3));}/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */var find=createFind(findIndex);/**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */var findLast=createFind(findLastIndex);/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1);}/**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),INFINITY);}/**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */function flatMapDepth(collection,iteratee,depth){depth=depth===undefined?1:toInteger(depth);return baseFlatten(map(collection,iteratee),depth);}/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,getIteratee(iteratee,3));}/**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */function forEachRight(collection,iteratee){var func=isArray(collection)?arrayEachRight:baseEachRight;return func(collection,getIteratee(iteratee,3));}/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value);}else{baseAssignValue(result,key,[value]);}});/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */function includes(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection);fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;if(fromIndex<0){fromIndex=nativeMax(length+fromIndex,0);}return isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1;}/**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */var invokeMap=baseRest(function(collection,path,args){var index=-1,isFunc=typeof path=='function',result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args);});return result;});/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */var keyBy=createAggregator(function(result,value,key){baseAssignValue(result,key,value);});/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,getIteratee(iteratee,3));}/**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */function orderBy(collection,iteratees,orders,guard){if(collection==null){return[];}if(!isArray(iteratees)){iteratees=iteratees==null?[]:[iteratees];}orders=guard?undefined:orders;if(!isArray(orders)){orders=orders==null?[]:[orders];}return baseOrderBy(collection,iteratees,orders);}/**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */var partition=createAggregator(function(result,value,key){result[key?0:1].push(value);},function(){return[[],[]];});/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach);}/**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight);}/**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,negate(getIteratee(predicate,3)));}/**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */function sample(collection){var func=isArray(collection)?arraySample:baseSample;return func(collection);}/**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */function sampleSize(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n===undefined){n=1;}else{n=toInteger(n);}var func=isArray(collection)?arraySampleSize:baseSampleSize;return func(collection,n);}/**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */function shuffle(collection){var func=isArray(collection)?arrayShuffle:baseShuffle;return func(collection);}/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */function size(collection){if(collection==null){return 0;}if(isArrayLike(collection)){return isString(collection)?stringSize(collection):collection.length;}var tag=getTag(collection);if(tag==mapTag||tag==setTag){return collection.size;}return baseKeys(collection).length;}/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined;}return func(collection,getIteratee(predicate,3));}/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */var sortBy=baseRest(function(collection,iteratees){if(collection==null){return[];}var length=iteratees.length;if(length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])){iteratees=[];}else if(length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])){iteratees=[iteratees[0]];}return baseOrderBy(collection,baseFlatten(iteratees,1),[]);});/*------------------------------------------------------------------------*/ /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */var now=ctxNow||function(){return root.Date.now();};/*------------------------------------------------------------------------*/ /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */function after(n,func){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}n=toInteger(n);return function(){if(--n<1){return func.apply(this,arguments);}};}/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */function ary(func,n,guard){n=guard?undefined:n;n=func&&n==null?func.length:n;return createWrap(func,WRAP_ARY_FLAG,undefined,undefined,undefined,undefined,n);}/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */function before(n,func){var result;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}n=toInteger(n);return function(){if(--n>0){result=func.apply(this,arguments);}if(n<=1){func=undefined;}return result;};}/**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */var bind=baseRest(function(func,thisArg,partials){var bitmask=WRAP_BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=WRAP_PARTIAL_FLAG;}return createWrap(func,bitmask,thisArg,partials,holders);});/**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */var bindKey=baseRest(function(object,key,partials){var bitmask=WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=WRAP_PARTIAL_FLAG;}return createWrap(key,bitmask,object,partials,holders);});/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */function curry(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_FLAG,undefined,undefined,undefined,undefined,undefined,arity);result.placeholder=curry.placeholder;return result;}/**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */function curryRight(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_RIGHT_FLAG,undefined,undefined,undefined,undefined,undefined,arity);result.placeholder=curryRight.placeholder;return result;}/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=false,maxing=false,trailing=true;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}wait=toNumber(wait)||0;if(isObject(options)){leading=!!options.leading;maxing='maxWait'in options;maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait;trailing='trailing'in options?!!options.trailing:trailing;}function invokeFunc(time){var args=lastArgs,thisArg=lastThis;lastArgs=lastThis=undefined;lastInvokeTime=time;result=func.apply(thisArg,args);return result;}function leadingEdge(time){// Reset any `maxWait` timer.\nlastInvokeTime=time;// Start the timer for the trailing edge.\ntimerId=setTimeout(timerExpired,wait);// Invoke the leading edge.\nreturn leading?invokeFunc(time):result;}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting;}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;// Either this is the first call, activity has stopped and we're at the\n// trailing edge, the system time has gone backwards and we're treating\n// it as the trailing edge, or we've hit the `maxWait` limit.\nreturn lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait;}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time);}// Restart the timer.\ntimerId=setTimeout(timerExpired,remainingWait(time));}function trailingEdge(time){timerId=undefined;// Only invoke if we have `lastArgs` which means `func` has been\n// debounced at least once.\nif(trailing&&lastArgs){return invokeFunc(time);}lastArgs=lastThis=undefined;return result;}function cancel(){if(timerId!==undefined){clearTimeout(timerId);}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=undefined;}function flush(){return timerId===undefined?result:trailingEdge(now());}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===undefined){return leadingEdge(lastCallTime);}if(maxing){// Handle invocations in a tight loop.\nclearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime);}}if(timerId===undefined){timerId=setTimeout(timerExpired,wait);}return result;}debounced.cancel=cancel;debounced.flush=flush;return debounced;}/**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */var defer=baseRest(function(func,args){return baseDelay(func,1,args);});/**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */var delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args);});/**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */function flip(func){return createWrap(func,WRAP_FLIP_FLAG);}/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */function memoize(func,resolver){if(typeof func!='function'||resolver!=null&&typeof resolver!='function'){throw new TypeError(FUNC_ERROR_TEXT);}var memoized=function memoized(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key);}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result;};memoized.cache=new(memoize.Cache||MapCache)();return memoized;}// Expose `MapCache`.\nmemoize.Cache=MapCache;/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */function negate(predicate){if(typeof predicate!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2]);}return!predicate.apply(this,args);};}/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */function once(func){return before(2,func);}/**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */var overArgs=castRest(function(func,transforms){transforms=transforms.length==1&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()));var funcsLength=transforms.length;return baseRest(function(args){var index=-1,length=nativeMin(args.length,funcsLength);while(++index 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */var partial=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,undefined,partials,holders);});/**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */var partialRight=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,WRAP_PARTIAL_RIGHT_FLAG,undefined,partials,holders);});/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */var rearg=flatRest(function(func,indexes){return createWrap(func,WRAP_REARG_FLAG,undefined,undefined,undefined,indexes);});/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */function rest(func,start){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}start=start===undefined?start:toInteger(start);return baseRest(func,start);}/**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */function spread(func,start){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}start=start==null?0:nativeMax(toInteger(start),0);return baseRest(function(args){var array=args[start],otherArgs=castSlice(args,0,start);if(array){arrayPush(otherArgs,array);}return apply(func,this,otherArgs);});}/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}if(isObject(options)){leading='leading'in options?!!options.leading:leading;trailing='trailing'in options?!!options.trailing:trailing;}return debounce(func,wait,{'leading':leading,'maxWait':wait,'trailing':trailing});}/**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */function unary(func){return ary(func,1);}/**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */function wrap(value,wrapper){return partial(castFunction(wrapper),value);}/*------------------------------------------------------------------------*/ /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */function castArray(){if(!arguments.length){return[];}var value=arguments[0];return isArray(value)?value:[value];}/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG);}/**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */function cloneWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined;return baseClone(value,CLONE_SYMBOLS_FLAG,customizer);}/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG);}/**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */function cloneDeepWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined;return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer);}/**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */function conformsTo(object,source){return source==null||baseConformsTo(object,source,keys(source));}/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */function eq(value,other){return value===other||value!==value&&other!==other;}/**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */var gt=createRelationalOperation(baseGt);/**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */var gte=createRelationalOperation(function(value,other){return value>=other;});/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */var isArguments=baseIsArguments(function(){return arguments;}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,'callee')&&!propertyIsEnumerable.call(value,'callee');};/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */var isArray=Array.isArray;/**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */var isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):baseIsArrayBuffer;/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value);}/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value);}/**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */function isBoolean(value){return value===true||value===false||isObjectLike(value)&&baseGetTag(value)==boolTag;}/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */var isBuffer=nativeIsBuffer||stubFalse;/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */var isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate;/**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */function isElement(value){return isObjectLike(value)&&value.nodeType===1&&!isPlainObject(value);}/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */function isEmpty(value){if(value==null){return true;}if(isArrayLike(value)&&(isArray(value)||typeof value=='string'||typeof value.splice=='function'||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length;}var tag=getTag(value);if(tag==mapTag||tag==setTag){return!value.size;}if(isPrototype(value)){return!baseKeys(value).length;}for(var key in value){if(hasOwnProperty.call(value,key)){return false;}}return true;}/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */function isEqual(value,other){return baseIsEqual(value,other);}/**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */function isEqualWith(value,other,customizer){customizer=typeof customizer=='function'?customizer:undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,undefined,customizer):!!result;}/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */function isError(value){if(!isObjectLike(value)){return false;}var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||typeof value.message=='string'&&typeof value.name=='string'&&!isPlainObject(value);}/**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */function isFinite(value){return typeof value=='number'&&nativeIsFinite(value);}/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */function isFunction(value){if(!isObject(value)){return false;}// The use of `Object#toString` avoids issues with the `typeof` operator\n// in Safari 9 which returns 'object' for typed arrays and other constructors.\nvar tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag;}/**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */function isInteger(value){return typeof value=='number'&&value==toInteger(value);}/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */function isLength(value){return typeof value=='number'&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER;}/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */function isObject(value){var type=(0,_typeof2[\"default\"])(value);return value!=null&&(type=='object'||type=='function');}/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */function isObjectLike(value){return value!=null&&(0,_typeof2[\"default\"])(value)=='object';}/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;/**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source));}/**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */function isMatchWith(object,source,customizer){customizer=typeof customizer=='function'?customizer:undefined;return baseIsMatch(object,source,getMatchData(source),customizer);}/**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */function isNaN(value){// An `NaN` primitive is the only value that is not equal to itself.\n// Perform the `toStringTag` check first to avoid errors with some\n// ActiveX objects in IE.\nreturn isNumber(value)&&value!=+value;}/**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */function isNative(value){if(isMaskable(value)){throw new Error(CORE_ERROR_TEXT);}return baseIsNative(value);}/**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */function isNull(value){return value===null;}/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */function isNil(value){return value==null;}/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */function isNumber(value){return typeof value=='number'||isObjectLike(value)&&baseGetTag(value)==numberTag;}/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag){return false;}var proto=getPrototype(value);if(proto===null){return true;}var Ctor=hasOwnProperty.call(proto,'constructor')&&proto.constructor;return typeof Ctor=='function'&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString;}/**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp;/**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER;}/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */function isString(value){return typeof value=='string'||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag;}/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */function isSymbol(value){return(0,_typeof2[\"default\"])(value)=='symbol'||isObjectLike(value)&&baseGetTag(value)==symbolTag;}/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */function isUndefined(value){return value===undefined;}/**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag;}/**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag;}/**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */var lt=createRelationalOperation(baseLt);/**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */var lte=createRelationalOperation(function(value,other){return value<=other;});/**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */function toArray(value){if(!value){return[];}if(isArrayLike(value)){return isString(value)?stringToArray(value):copyArray(value);}if(symIterator&&value[symIterator]){return iteratorToArray(value[symIterator]());}var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value);}/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */function toFinite(value){if(!value){return value===0?value:0;}value=toNumber(value);if(value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER;}return value===value?value:0;}/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0;}/**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0;}/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */function toNumber(value){if(typeof value=='number'){return value;}if(isSymbol(value)){return NAN;}if(isObject(value)){var other=typeof value.valueOf=='function'?value.valueOf():value;value=isObject(other)?other+'':other;}if(typeof value!='string'){return value===0?value:+value;}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value;}/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */function toPlainObject(value){return copyObject(value,keysIn(value));}/**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */function toSafeInteger(value){return value?baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER):value===0?value:0;}/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */function toString(value){return value==null?'':baseToString(value);}/*------------------------------------------------------------------------*/ /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */var assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source)){copyObject(source,keys(source),object);return;}for(var key in source){if(hasOwnProperty.call(source,key)){assignValue(object,key,source[key]);}}});/**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */var assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object);});/**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */var assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer);});/**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */var assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer);});/**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */var at=flatRest(baseAt);/**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */function create(prototype,properties){var result=baseCreate(prototype);return properties==null?result:baseAssign(result,properties);}/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */var defaults=baseRest(function(object,sources){object=Object(object);var index=-1;var length=sources.length;var guard=length>2?sources[2]:undefined;if(guard&&isIterateeCall(sources[0],sources[1],guard)){length=1;}while(++index { 'a': { 'b': 2, 'c': 3 } }\n */var defaultsDeep=baseRest(function(args){args.push(undefined,customDefaultsMerge);return apply(mergeWith,undefined,args);});/**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn);}/**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight);}/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */function forIn(object,iteratee){return object==null?object:baseFor(object,getIteratee(iteratee,3),keysIn);}/**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */function forInRight(object,iteratee){return object==null?object:baseForRight(object,getIteratee(iteratee,3),keysIn);}/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3));}/**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3));}/**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */function functions(object){return object==null?[]:baseFunctions(object,keys(object));}/**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */function functionsIn(object){return object==null?[]:baseFunctions(object,keysIn(object));}/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */function get(object,path,defaultValue){var result=object==null?undefined:baseGet(object,path);return result===undefined?defaultValue:result;}/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */function has(object,path){return object!=null&&hasPath(object,path,baseHas);}/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn);}/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */var invert=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!='function'){value=nativeObjectToString.call(value);}result[value]=key;},constant(identity));/**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */var invertBy=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!='function'){value=nativeObjectToString.call(value);}if(hasOwnProperty.call(result,value)){result[value].push(key);}else{result[value]=[key];}},getIteratee);/**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */var invoke=baseRest(baseInvoke);/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object);}/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object);}/**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */function mapKeys(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value);});return result;}/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */function mapValues(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object));});return result;}/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */var merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex);});/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */var mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer);});/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */var omit=flatRest(function(object,paths){var result={};if(object==null){return result;}var isDeep=false;paths=arrayMap(paths,function(path){path=castPath(path,object);isDeep||(isDeep=path.length>1);return path;});copyObject(object,getAllKeysIn(object),result);if(isDeep){result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone);}var length=paths.length;while(length--){baseUnset(result,paths[length]);}return result;});/**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)));}/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */var pick=flatRest(function(object,paths){return object==null?{}:basePick(object,paths);});/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */function pickBy(object,predicate){if(object==null){return{};}var props=arrayMap(getAllKeysIn(object),function(prop){return[prop];});predicate=getIteratee(predicate);return basePickBy(object,props,function(value,path){return predicate(value,path[0]);});}/**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */function result(object,path,defaultValue){path=castPath(path,object);var index=-1,length=path.length;// Ensure the loop is entered when path is empty.\nif(!length){length=1;object=undefined;}while(++index 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */function set(object,path,value){return object==null?object:baseSet(object,path,value);}/**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */function setWith(object,path,value,customizer){customizer=typeof customizer=='function'?customizer:undefined;return object==null?object:baseSet(object,path,value,customizer);}/**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */var toPairs=createToPairs(keys);/**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */var toPairsIn=createToPairs(keysIn);/**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);iteratee=getIteratee(iteratee,4);if(accumulator==null){var Ctor=object&&object.constructor;if(isArrLike){accumulator=isArr?new Ctor():[];}else if(isObject(object)){accumulator=isFunction(Ctor)?baseCreate(getPrototype(object)):{};}else{accumulator={};}}(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object);});return accumulator;}/**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */function unset(object,path){return object==null?true:baseUnset(object,path);}/**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */function update(object,path,updater){return object==null?object:baseUpdate(object,path,castFunction(updater));}/**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */function updateWith(object,path,updater,customizer){customizer=typeof customizer=='function'?customizer:undefined;return object==null?object:baseUpdate(object,path,castFunction(updater),customizer);}/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */function values(object){return object==null?[]:baseValues(object,keys(object));}/**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */function valuesIn(object){return object==null?[]:baseValues(object,keysIn(object));}/*------------------------------------------------------------------------*/ /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */function clamp(number,lower,upper){if(upper===undefined){upper=lower;lower=undefined;}if(upper!==undefined){upper=toNumber(upper);upper=upper===upper?upper:0;}if(lower!==undefined){lower=toNumber(lower);lower=lower===lower?lower:0;}return baseClamp(toNumber(number),lower,upper);}/**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */function inRange(number,start,end){start=toFinite(start);if(end===undefined){end=start;start=0;}else{end=toFinite(end);}number=toNumber(number);return baseInRange(number,start,end);}/**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */function random(lower,upper,floating){if(floating&&typeof floating!='boolean'&&isIterateeCall(lower,upper,floating)){upper=floating=undefined;}if(floating===undefined){if(typeof upper=='boolean'){floating=upper;upper=undefined;}else if(typeof lower=='boolean'){floating=lower;lower=undefined;}}if(lower===undefined&&upper===undefined){lower=0;upper=1;}else{lower=toFinite(lower);if(upper===undefined){upper=lower;lower=0;}else{upper=toFinite(upper);}}if(lower>upper){var temp=lower;lower=upper;upper=temp;}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat('1e-'+((rand+'').length-1))),upper);}return baseRandom(lower,upper);}/*------------------------------------------------------------------------*/ /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?capitalize(word):word);});/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */function capitalize(string){return upperFirst(toString(string).toLowerCase());}/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */function deburr(string){string=toString(string);return string&&string.replace(reLatin,deburrLetter).replace(reComboMark,'');}/**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */function endsWith(string,target,position){string=toString(string);target=baseToString(target);var length=string.length;position=position===undefined?length:baseClamp(toInteger(position),0,length);var end=position;position-=target.length;return position>=0&&string.slice(position,end)==target;}/**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */function escape(string){string=toString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string;}/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */function escapeRegExp(string){string=toString(string);return string&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,'\\\\$&'):string;}/**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */var kebabCase=createCompounder(function(result,word,index){return result+(index?'-':'')+word.toLowerCase();});/**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */var lowerCase=createCompounder(function(result,word,index){return result+(index?' ':'')+word.toLowerCase();});/**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */var lowerFirst=createCaseFirst('toLowerCase');/**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */function pad(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;if(!length||strLength>=length){return string;}var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars);}/**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */function padEnd(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */function padStart(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */function parseInt(string,radix,guard){if(guard||radix==null){radix=0;}else if(radix){radix=+radix;}return nativeParseInt(toString(string).replace(reTrimStart,''),radix||0);}/**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */function repeat(string,n,guard){if(guard?isIterateeCall(string,n,guard):n===undefined){n=1;}else{n=toInteger(n);}return baseRepeat(toString(string),n);}/**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2]);}/**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */var snakeCase=createCompounder(function(result,word,index){return result+(index?'_':'')+word.toLowerCase();});/**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */function split(string,separator,limit){if(limit&&typeof limit!='number'&&isIterateeCall(string,separator,limit)){separator=limit=undefined;}limit=limit===undefined?MAX_ARRAY_LENGTH:limit>>>0;if(!limit){return[];}string=toString(string);if(string&&(typeof separator=='string'||separator!=null&&!isRegExp(separator))){separator=baseToString(separator);if(!separator&&hasUnicode(string)){return castSlice(stringToArray(string),0,limit);}}return string.split(separator,limit);}/**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */var startCase=createCompounder(function(result,word,index){return result+(index?' ':'')+upperFirst(word);});/**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */function startsWith(string,target,position){string=toString(string);position=position==null?0:baseClamp(toInteger(position),0,string.length);target=baseToString(target);return string.slice(position,position+target.length)==target;}/**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '