From 507b014052b1ba0178c4a35597014e134e51974e Mon Sep 17 00:00:00 2001 From: yanglbme Date: Mon, 22 Jun 2020 09:34:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=201f07d?= =?UTF-8?q?d39c67489e1acd5cf265049b0f94c542c4f=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- js/app.19b45228.js | 2 + js/app.19b45228.js.map | 1 + js/chunk-vendors.5473b59f.js | 103 +++++++++++++++++++++++++++++++ js/chunk-vendors.5473b59f.js.map | 1 + 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 js/app.19b45228.js create mode 100644 js/app.19b45228.js.map create mode 100644 js/chunk-vendors.5473b59f.js create mode 100644 js/chunk-vendors.5473b59f.js.map diff --git a/index.html b/index.html index a23b356..5560a61 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -微信 Markdown 编辑器
\ No newline at end of file +微信 Markdown 编辑器
\ No newline at end of file diff --git a/js/app.19b45228.js b/js/app.19b45228.js new file mode 100644 index 0000000..8ef4372 --- /dev/null +++ b/js/app.19b45228.js @@ -0,0 +1,2 @@ +(function(e){function t(t){for(var o,a,s=t[0],l=t[1],c=t[2],d=0,f=[];d-1&&s>-1&&s>a&&(r=r.substr(0,a)+r.substring(a+i.commentStart.length,s)+r.substr(s+i.commentEnd.length)),o.replaceRange(r,t,n)}}))})),b.a.defineExtension("autoIndentRange",(function(e,t){var n=this;this.operation((function(){for(var o=e.line;o<=t.line;o++)n.indentLine(o,"smart")}))})),b.a.defineExtension("autoFormatRange",(function(e,t){var n=this,o=n.getMode(),i=n.getRange(e,t).split("\n"),r=b.a.copyState(o,n.getTokenAt(e).state),a=n.getOption("tabSize"),s="",l=0,c=0==e.ch;function u(){s+="\n",c=!0,++l}for(var d=0;d0}));r=i(r);var a=e.substring(0,n).split(",").map((function(e){return e.trim()}));a.forEach((function(e){t[e]||(t[e]={}),Object.keys(r).forEach((function(n){t[e][n]=r[n]}))})),e=e.slice(o+1).trim()};while(e.length>0&&-1!==e.indexOf("{")&&-1!==e.indexOf("}"))n();return t}function D(e,t){var n=e.getValue(0);n?localStorage.setItem(t,n):localStorage.removeItem(t)}function L(e){return/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(e.name)?e.size>5242880&&"由于公众号限制,图片大小不能超过 5.0M":"请上传 JPG/PNG/GIF 格式的图片"}function B(e){var t=T.a.format(e,{parser:"markdown",plugins:[N.a]});return t}var G=n("466b"),V=n.n(G);function q(){for(var e=document.getElementById("output"),t=e.getElementsByTagName("img"),n=0;n",triples:"",explode:"[]{}"},n=e.Pos;function o(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==Object(ve["a"])(e)&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(r(o(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:l,Enter:c};function r(e){for(var t=0;t=0;l--){var u=a[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=s(t),i=n&&o(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),a=0;a0;return{anchor:new n(t.anchor.line,t.anchor.ch+(o?-1:1)),head:new n(t.head.line,t.head.ch+(o?1:-1))}}function d(t,i){var r=s(t);if(!r||t.getOption("disableInput"))return e.Pass;var a=o(r,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var c,d=o(r,"closeBefore"),f=o(r,"triples"),g=a.charAt(l+1)==i,h=t.listSelections(),m=l%2==0,b=0;b1&&f.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;v="addFour"}else if(g){var C=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||C==i||e.isWordChar(C))return e.Pass;v="both"}else{if(!m||!(0===w.length||/\s/.test(w)||d.indexOf(w)>-1))return e.Pass;v="both"}else v=g&&p(t,x)?"both":f.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=v)return e.Pass}else c=v}var k=l%2?a.charAt(l-1):i,S=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;e<3;e++)t.execCommand("goCharRight");else if("surround"==c){var n=t.getSelections();for(e=0;e=65&&t.keyCode<=90||189===t.keyCode)&&e.showHint(t)})),this.cssEditor.on("update",(function(t){e.cssChanged(),D(e.cssEditor,"__css_content")}))},cssChanged:function(){var e=I(this.cssEditor.getValue(0)),t=F(this.currentSize.replace("px",""));t=M(e,this.currentColor,t),this.setWxRendererOptions({theme:t}),this.onEditorRefresh()},onTextareaChange:function(){console.log("change")},uploaded:function(e,t,n){if(e)if(e.success){var o=this.editor.getCursor(),i=e.data,r="![](".concat(i,")");this.editor.replaceSelection("\n".concat(r,"\n"),o),this.$message({showClose:!0,message:"图片插入成功",type:"success"}),this.onEditorRefresh()}else this.$message({showClose:!0,message:e.message,type:"error"});else this.$message({showClose:!0,message:"上传图片未知异常",type:"error"})},leftAndRightScroll:function(){xe()("#preview").on("scroll",(function e(){clearTimeout(this.timeout);var t=xe()(this),n=xe()(t.is("#preview")?"div.CodeMirror-scroll":"#preview");n.off("scroll");var o=t[0],i=n[0],r=o.scrollTop/(o.scrollHeight-o.offsetHeight),a=r*(i.scrollHeight-i.offsetHeight);i.scrollTo(0,a),this.timeout=setTimeout((function(){n.on("scroll",e)}),100)}))},onEditorRefresh:function(){this.editorRefresh(),setTimeout((function(){return PR.prettyPrint()}),0)},endCopy:function(){var e=this;this.backLight=!1,setTimeout((function(){e.isCoping=!1}),800)}},Object(Q["b"])(["initEditorState","initEditorEntity","setWxRendererOptions","editorRefresh","initCssEditorEntity"])),mounted:function(){this.leftAndRightScroll(),setTimeout((function(){PR.prettyPrint()}),300)}},Ce=we,ke=(n("d03a"),Object(u["a"])(Ce,p,g,!1,null,"66ac7c7c",null)),Se=ke.exports,_e={name:"App",components:{Loading:f,CodemirrorEditor:Se},data:function(){return{loading:!0}},mounted:function(){var e=this;setTimeout((function(){e.loading=!1}),200),window.console&&window.console.log&&console.log("Think big, train fast, learn deep. See https://github.com/yanglbme")}},Ee=_e,Oe=Object(u["a"])(Ee,i,r,!1,null,"1407684e",null),Re=Oe.exports,Te=(n("99af"),n("a15b"),n("e0c1")),je=n.n(Te),Ne=function(e){var t=this;this.opts=e;var n=!0,o=[],i=0,r=null,a="Menlo, Operator Mono, Consolas, Monaco, monospace",s=function(e,t){return Object.assign({},e,t)};this.buildTheme=function(e){var n={},o=s(e.BASE,{"font-family":t.opts.fonts,"font-size":t.opts.size}),i=s(o,{});for(var r in e.inline)if(e.inline.hasOwnProperty(r)){var l=e.inline[r];"codespan"===r&&(l["font-family"]=a,l["white-space"]="normal"),n[r]=s(o,l)}for(var c in e.block)if(e.block.hasOwnProperty(c)){var u=e.block[c];"code"===c&&(u["font-family"]=a),n[c]=s(i,u)}return n};var l=function(e,t){var n=[],o=r[e];if(!o)return"";for(var i in o)n.push(i+":"+o[i]);return'style="'.concat(n.join(";")+(t||""),'"')},c=function(e,t){return o.push([++i,e,t]),i};this.buildFootnotes=function(){var e=o.map((function(e){return e[1]===e[2]?'['.concat(e[0],"]: ").concat(e[1],"
"):'['.concat(e[0],"] ").concat(e[1],": ").concat(e[2],"
")}));return"

引用链接

").concat(e.join("\n"),"

")},this.buildAddition=function(){return'\n \n '},this.setOptions=function(e){t.opts=s(t.opts,e)},this.hasFootnotes=function(){return 0!==o.length},this.getRenderer=function(e){o=[],i=0,r=t.buildTheme(t.opts.theme);var a=new je.a.Renderer;return a.heading=function(e,t){switch(t){case 1:return"

").concat(e,"

");case 2:return"

").concat(e,"

");case 3:return"

").concat(e,"

");default:return"

").concat(e,"

")}},a.paragraph=function(e){return-1!=e.indexOf("").concat(e,"

")},a.blockquote=function(e){return e=e.replace(//,"

")),"

").concat(e,"
")},a.code=function(e,t){e=e.replace(//g,">");for(var n=e.split("\n"),o=[],i=[],r=0;r'.concat(a||"
","
")),i.push("
  • ")}var s=t||"";return'\n
    \n
      '.concat(i.join(""),'
    \n
    \n                ').concat(o.join(""),"\n            
    \n
    \n ")},a.codespan=function(e,t){return"").concat(e,"")},a.listitem=function(e){return"<%s/>').concat(e,"")},a.list=function(e,t,n){e=e.replace(/<\/*p.*?>/g,"");var o=e.split("<%s/>");if(!t)return e=o.join("•"),"

    ").concat(e,"

    ");e=o[0];for(var i=1;i").concat(e,"

    ")},a.image=function(e,t,o){var i="";o&&(i="
    ").concat(o,"
    "));var r=l("figure"),a=l(n?"image":"image_org");return"
    ').concat(o,'').concat(i,"
    ")},a.link=function(t,n,o){if(0===t.indexOf("https://mp.weixin.qq.com"))return'").concat(o,"");if(t===o)return o;if(e){var i=c(n||o,t);return"").concat(o,"[").concat(i,"]")}return o},a.strong=function(e){return"").concat(e,"")},a.em=function(e){return''.concat(e,"")},a.table=function(e,t){return'
    ").concat(e,"").concat(t,"
    ")},a.tablecell=function(e,t){return"").concat(e,"")},a.hr=function(){return'
    '},a}},ze=Ne,$e='# 示例文章:Google 搜索的即时自动补全功能究竟是如何“工作”的?\n> Google 搜索**自动补全功能**的强大,相信不少朋友都能感受到,它帮助我们更快地“补全”我们所要输入的搜索关键字。那么,它怎么知道我们要输入什么内容?它又是如何工作的?在这篇文章里,我们一起来看看。\n\n## 使用自动补全\nGoogle 搜索的自动补全功能可以在 Google 搜索应用的大多数位置使用,包括 [Google](https://www.google.com/) 主页、适用于 IOS 和 Android 的 Google 应用,我们只需要在 Google 搜索框上开始键入关键字,就可以看到联想词了。\n\n![](https://imgkr.cn-bj.ufileos.com/17ed83bf-e028-4db2-9503-5a3b4e64deee.gif)\n\n在上图示例中,我们可以看到,输入关键字 `juej`,Google 搜索会联想到“掘金”、“掘金小册”、“绝句”等等,好处就是,我们无须输入完整的关键字即可轻松完成针对这些 topics 的搜索。\n\n谷歌搜索的自动补全功能对于使用移动设备的用户来说特别有用,用户可以轻松在难以键入的小屏幕上完成搜索。当然,对于移动设备用户和台式机用户而言,这都节省了大量的时间。根据 Google 官方报告,自动补全功能可以减少大约 25% 的打字,累积起来,预计每天可以节省 200 多年的打字时间。是的,每天!\n\n> 注意,本文所提到的“**联想词**”与“**预测**”,是同一个意思。\n\n## 基于“预测”而非“建议”\nGoogle 官方将自动补全功能称之为“预测”,而不是“建议”,为什么呢?其实是有充分理由的。自动补全功能是为了**帮助用户完成他们打算进行的搜索**,而不是建议用户要执行什么搜索。\n\n那么,Google 是如何确定这些“预测”的?其实,Google 会根据趋势搜索 [trends](https://trends.google.com/trends/?geo=US) 给到我们这些“预测”。简单来说,哪个热门、哪个搜索频率高,就更可能推给我们。当然,这也与我们当前所处的位置以及我们的搜索历史相关。\n\n另外,这些“预测”也会随着我们键入的关键字的变更而更改。例如,当我们把键入的关键字从 `juej` 更改为 `juex` 时,与“掘金”相关的预测会“消失”,同时,与“觉醒”、“决心”相关联的词会出现。\n\n![](https://imgkr.cn-bj.ufileos.com/5b17dc99-606d-42c1-9f86-e09e88aaa822.gif)\n\n## 为什么看不到某些联想词?\n如果我们在输入某个关键字时看不到联想词,那么表明 Google 的算法可能检测到:\n\n- 这个关键字不是热门字词;\n- 搜索的字词太新了,我们可能需要等待几天或几周才能看到联想词;\n- 这是一个侮辱性或敏感字词,这个搜索字词违反了 Google 的相关政策。更加详细的情况,可以了解 [Google 搜索自动补全政策](https://support.google.com/websearch/answer/7368877)。\n\n## 为什么会看到某些不当的联想词?\nGoogle 拥有专门设计的系统,可以自动捕获不适当的预测结果而不显示出来。然而,Google 每天需要处理数十亿次搜索,这意味着 Google 每天会显示数十亿甚至上百亿条预测。再好的系统,也可能存在缺陷,不正确的预测也可能随时会出现。\n\n我们作为 Google 搜索的用户,如果认定某条预测违反了相关的搜索自动补全政策,可以进行举报反馈,点击右下角“**举报不当的联想查询**”并勾选相关选项即可。\n\n![](https://imgkr.cn-bj.ufileos.com/6ca8185d-12c6-4550-bb4e-e49cfbf56db7.gif)\n\n## 如何实现自动补全算法?\n目前,Google 官方似乎并没有公开搜索自动补全的算法实现,但是业界在这方面已经有了不少研究。\n\n一个好的自动补全器必须是快速的,并且在用户键入下一个字符后立即更新联想词列表。**自动补全器的核心是一个函数,它接受输入的前缀,并搜索以给定前缀开头的词汇或语句列表**。通常来说,只需要返回少量的数目即可。\n\n接下来,我们先从一个简单且低效的实现开始,并在此基础上逐步构建更高效的方法。\n\n### 词汇表实现\n一个**简单粗暴的实现方式**是:顺序查找词汇表,依次检查每个词汇,看它是否以给定的前缀开头。\n\n但是,此方法需要将前缀与每个词汇进行匹配检查,若词汇量较少,这种方式可能勉强行得通。但是,如果词汇量规模较大,效率就太低了。\n\n一个**更好的实现方式是**:让词汇按字典顺序排序。借助二分搜索算法,可以快速搜索有序词汇表中的前缀。由于二分搜索的每一步都会将搜索的范围减半,因此,总的搜索时间与词汇表中单词数量的对数成正比,即时间复杂度是 `O(log N)`。二分搜索的性能很好,但有没有更好的实现呢?当然有,往下看。\n\n### 前缀树实现\n通常来说,许多词汇都以相同的前缀开头,比如 `need`、`nested` 都以 `ne` 开头,`seed`、`speed` 都以 `s` 开头。要是为每个单词分别存储公共前缀似乎很浪费。\n\n![](https://imgkr.cn-bj.ufileos.com/7cc3cf37-040a-420e-8ef9-d05e92c82cfd.png)\n\n前缀树是一种利用公共前缀来加速补全速度的数据结构。前缀树在节点树中排列一组单词,单词沿着从根节点到叶子节点的路径存储,树的层次对应于前缀的字母位置。\n\n前缀的补全是顺着前缀定义的路径来查找的。例如,在上图的前缀树中,前缀 `ne` 对应于从子节点取左边缘 `N` 和唯一边缘 `E` 的路径。然后可以通过继续遍历从 `E` 节点可以达到的所有叶节点来生成补全列表。在图中,`ne` 的补全可以是两个分支:`-ed` 和 `-sted`。如果在数中找不到由前缀定义的路径,则说明词汇表中不包含以该前缀开头的单词。\n\n### 有限状态自动机(DFA)实现\n前缀树可以有效处理公共前缀,但是,对于其他共享词部分,仍会分别存储在每个分支中。比如,后缀 `ed`、`ing`、`tion` 在英文单词中特别常见。在上一个例子中,`e`、`d` 分别存放在了每一个分支上。\n\n有没有一种方法可以更加节省存储空间呢?有的,那就是 DFA。\n\n
    \n
    \n\n在上面的例子中,单词 `need`、`nested`、`seed` 和 `speed` 仅由 9 个节点组成,而上一张图中的前缀树包含了 17 个节点。\n\n可以看出,最小化前缀树 DFA 可以在很大程度上减少数据结构的大小。即使词汇量很大,最小化 DFA 通常也适合在内存中存储,避免昂贵的磁盘访问是实现快速自动补全的关键。\n\n### 一些扩展\n上面介绍了如何利用合理的数据结构实现基本的自动补全功能。这些数据结构可以通过多种方式进行扩展,从而改善用户体验。\n\n通常,满足特定前缀的词汇可能很多,而用户界面上能够显示的却不多,我们更希望能显示最常搜索或者最有价值的词汇。这通常可以通过为词汇表中的每个单词增加一个代表单词值的**权重** `weight`,并且按照权重高低来排序自动补全列表。\n\n- 对于排序后的词汇表来说,在词汇表每个元素上增加 `weight` 属性并不难;\n- 对于前缀树来说,将 `weight` 存储在叶子节点中,也是很简单的一个实现;\n- 对于 `DFA` 来说,则较为复杂。因为一个叶子节点可以通过多条路径到达。一种解决方案是将权重关联到路径而不是叶子节点。\n\n目前有不少开源库都提供了这个功能,比如主流的搜索引擎框架 [Elasticsearch](https://www.elastic.co/products/elasticsearch)、[Solr](https://lucene.apache.org/solr/) 等,基于此,我们可以实现高效而强大的自动补全功能。\n\n#### 推荐阅读\n- [阿里又一个 20k+ stars 开源项目诞生,恭喜 fastjson!](https://mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)\n- [刷掉 90% 候选人的互联网大厂海量数据面试题(附题解 + 方法总结)](https://mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)\n- [好用!期待已久的文本块功能究竟如何在 Java 13 中发挥作用?](https://mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)\n- [2019 GitHub 开源贡献排行榜新鲜出炉!微软谷歌领头,阿里跻身前 12!](https://mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)\n\n---\n\n欢迎关注我的公众号“**Doocs开源社区**”,原创技术文章第一时间推送。\n\n
    \n \n
    \n\n',Ae=$e;o["default"].use(Q["a"]);var Pe={wxRenderer:null,output:"",editor:null,cssEditor:null,html:"",currentFont:"",currentSize:"",currentColor:"",citeStatus:0,nightMode:!1},Fe={setHtml:function(e,t){e.html=t},setEditorValue:function(e,t){e.editor.setValue(t)},setCssEditorValue:function(e,t){e.cssEditor.setValue(t)},setWxRendererOptions:function(e,t){e.wxRenderer.setOptions(t)},setCiteStatus:function(e,t){e.citeStatus=t,localStorage.setItem("citeStatus",t)},setCurrentFont:function(e,t){e.currentFont=t,localStorage.setItem("fonts",t)},setCurrentSize:function(e,t){e.currentSize=t,localStorage.setItem("size",t)},setCurrentColor:function(e,t){e.currentColor=t,localStorage.setItem("color",t)},themeChanged:function(e){e.nightMode=!e.nightMode},initEditorState:function(e){e.currentFont=localStorage.getItem("fonts")||U.builtinFonts[0].value,e.currentColor=localStorage.getItem("color")||U.colorOption[1].value,e.currentSize=localStorage.getItem("size")||U.sizeOption[2].value,e.citeStatus="true"===localStorage.getItem("citeStatus"),e.wxRenderer=new ze({theme:P(e.currentColor),fonts:e.currentFont,size:e.currentSize,status:e.citeStatus})},initEditorEntity:function(e){if(e.editor=b.a.fromTextArea(document.getElementById("editor"),{value:"",mode:"text/x-markdown",theme:"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":function(e){var t=B(e.getValue(0));localStorage.setItem("__editor_content",t),e.setValue(t)}}}),localStorage.getItem("__editor_content"))e.editor.setValue(localStorage.getItem("__editor_content"));else{var t=B(Ae);e.editor.setValue(t)}},initCssEditorEntity:function(e){e.cssEditor=b.a.fromTextArea(document.getElementById("cssEditor"),{value:"",mode:"css",theme:"style-mirror",lineNumbers:!1,lineWrapping:!0,matchBrackets:!0,autofocus:!0,extraKeys:{"Ctrl-F":function(e){var t=e.lineCount();e.autoFormatRange({line:0,ch:0},{line:t})}}}),localStorage.getItem("__css_content")?e.cssEditor.setValue(localStorage.getItem("__css_content")):e.cssEditor.setValue(W)},editorRefresh:function(e){var t=je()(e.editor.getValue(0),{renderer:e.wxRenderer.getRenderer(e.citeStatus)});t=t.replace(/(style=".*?)"/,'$1;margin-top: 0"'),e.citeStatus&&(t+=e.wxRenderer.buildFootnotes(),t+=e.wxRenderer.buildAddition()),e.output=t},clearEditorToDefault:function(e){var t=B(Ae);e.editor.setValue(t),e.cssEditor.setValue(W)}},Me=new Q["a"].Store({state:Pe,mutations:Fe,actions:{},modules:{}}),Ie=n("5c96"),De=n.n(Ie);n("0fae");o["default"].use(Ie["Container"]),o["default"].use(Ie["Header"]),o["default"].use(Ie["Upload"]),o["default"].use(Ie["Tooltip"]),o["default"].use(Ie["Form"]),o["default"].use(Ie["FormItem"]),o["default"].use(Ie["Select"]),o["default"].use(Ie["Option"]),o["default"].use(Ie["ColorPicker"]),o["default"].use(Ie["Switch"]),o["default"].use(Ie["Button"]),o["default"].use(Ie["Main"]),o["default"].use(Ie["Col"]),o["default"].use(Ie["Row"]),o["default"].use(Ie["Dialog"]),o["default"].use(Ie["Loading"]),o["default"].component(Ie["Message"].name,Ie["Message"]),o["default"].prototype.$loading=Ie["Loading"].service,o["default"].prototype.$message=Ie["Message"];n("a7be"),n("0f7c"),n("f6b6"),n("8d7e"),n("90ba");o["default"].use(De.a),o["default"].config.productionTip=!1,new o["default"]({store:Me,render:function(e){return e(Re)}}).$mount("#app")},"5a64":function(e,t,n){},"84bb":function(e,t,n){},"90ba":function(e,t,n){},"9e7d":function(e,t,n){},d03a:function(e,t,n){"use strict";var o=n("84bb"),i=n.n(o);i.a},e022:function(e,t,n){n("99af"),n("c975"),n("a15b"),n("d3b7"),n("4d63"),n("ac1f"),n("25f0"),n("466d"),n("5319"),n("1276"),function(){"undefined"!==typeof window&&(window.PR_SHOULD_USE_CONTINUATION=!0),function(){function e(e){function t(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return(t=d[n])?t:"0"<=n&&"7">=n?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){return 32>e?(16>e?"\\x0":"\\x")+e.toString(16):(e=String.fromCharCode(e),"\\"===e||"-"===e||"]"===e||"^"===e?"\\"+e:e)}function o(e){var o=e.substring(1,e.length-1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));e=[];var i="^"===o[0],r=["["];i&&r.push("^");i=i?1:0;for(var a=o.length;il||122l||90l||122s[0]&&(s[1]+1>s[0]&&r.push("-"),r.push(n(s[1])));return r.push("]"),r.join("")}function i(e){for(var t=e.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),i=t.length,s=[],l=0,c=0;l/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null])),o=e.regexLiterals){var r=(o=1|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*(/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+r+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+r+")*(?:\\x5D|$))+/)")])}return(o=e.types)&&n.push(["typ",o]),o=(""+e.keywords).replace(/^ | $/g,""),o.length&&n.push(["kwd",new RegExp("^(?:"+o.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]),o="^.[^\\s\\w.$@'\"`/\\\\]*",e.regexLiterals&&(o+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(o),null]),i(t,n)}function a(e,t,n){function o(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var l=e.nodeValue,c=l.match(a);c&&(t=l.substring(0,c.index),e.nodeValue=t,(l=l.substring(c.index+c[0].length))&&e.parentNode.insertBefore(s.createTextNode(l),e.nextSibling),i(e),t||e.parentNode.removeChild(e))}}else if("br"===e.nodeName.toLowerCase())i(e),e.parentNode&&e.parentNode.removeChild(e);else for(e=e.firstChild;e;e=e.nextSibling)o(e)}function i(e){function t(e,n){var o=n?e.cloneNode(!1):e,i=e.parentNode;if(i){i=t(i,1);var r=e.nextSibling;i.appendChild(o);for(var a=r;a;a=r)r=a.nextSibling,i.appendChild(a)}return o}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;e=t(e.nextSibling,0);for(var n;(n=e.parentNode)&&1===n.nodeType;)e=n;c.push(e)}for(var r=/(?:^|\s)nocode(?:\s|$)/,a=/\r\n?|\n/,s=e.ownerDocument,l=s.createElement("li");e.firstChild;)l.appendChild(e.firstChild);for(var c=[l],u=0;u=+s[1],n=/\n/g,e.a),d=c.length,f=(o=0,e.c),p=f.length,g=(i=0,e.g),h=g.length,m=0;for(g[h]=d,a=r=0;a=C&&(i+=2),o>=k&&(m+=2)}}finally{x&&(x.style.display=e)}}catch(R){u.console&&console.log(R&&R.stack||R)}}var u="undefined"!==typeof window?window:{},d=["break,continue,do,else,for,if,return,while"],f=[[d,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],p=[f,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],g=[f,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[f,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],m=(f=[f,"abstract,async,await,constructor,debugger,enum,eval,export,from,function,get,import,implements,instanceof,interface,let,null,of,set,undefined,var,with,yield,Infinity,NaN"],[d,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"]),b=[d,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=(d=[d,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/),y=/\S/,x=r({keywords:[p,h,g,f,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",m,b,d],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),w={};s(x,["default-code"]),s(i([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),"default-markup htm html mxml xhtml xml xsl".split(" ")),s(i([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),s(i([],[["atv",/^[\s\S]+/]]),["uq.val"]),s(r({keywords:p,hashComments:!0,cStyleComments:!0,types:v}),"c cc cpp cxx cyc m".split(" ")),s(r({keywords:"null,true,false"}),["json"]),s(r({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),s(r({keywords:g,cStyleComments:!0}),["java"]),s(r({keywords:d,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),s(r({keywords:m,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),s(r({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),s(r({keywords:b,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),s(r({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),s(r({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),s(i([],[["str",/^[\s\S]+/]]),["regex"]);var C=u.PR={createSimpleLexer:i,registerLangHandler:s,sourceDecorator:r,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:u.prettyPrintOne=function(e,t,n){n=n||!1,t=t||null;var o=document.createElement("div");return o.innerHTML="
    "+e+"
    ",o=o.firstChild,n&&a(o,n,!0),c({j:t,m:n,h:o,l:1,a:null,i:null,c:null,g:null}),o.innerHTML},prettyPrint:u.prettyPrint=function(e,t){function n(){for(var t=u.PR_SHOULD_USE_CONTINUATION?p.now()+250:1/0;g\n
    \n
    \n
    Loading...
    \n
    \n
    \n
    \n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loading.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loading.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Loading.vue?vue&type=template&id=71788ed8&scoped=true&\"\nimport script from \"./Loading.vue?vue&type=script&lang=js&\"\nexport * from \"./Loading.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"71788ed8\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\",class:{'container_night': _vm.nightMode}},[_c('el-container',[_c('el-header',{staticClass:\"editor__header\"},[_c('editor-header',{on:{\"refresh\":_vm.onEditorRefresh,\"uploaded\":_vm.uploaded,\"cssChanged\":_vm.cssChanged,\"showBox\":function($event){_vm.showBox = !_vm.showBox},\"showAboutDialog\":function($event){_vm.aboutDialogVisible = true},\"showDialogForm\":function($event){_vm.dialogFormVisible = true},\"startCopy\":function($event){_vm.isCoping = true, _vm.backLight = true},\"endCopy\":_vm.endCopy}})],1),_c('el-main',{staticClass:\"main-body\"},[_c('el-row',{staticClass:\"main-section\",attrs:{\"gutter\":10}},[_c('el-col',{attrs:{\"span\":12}},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.source),expression:\"source\"}],attrs:{\"id\":\"editor\",\"type\":\"textarea\",\"placeholder\":\"Your markdown text here.\"},domProps:{\"value\":(_vm.source)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.source=$event.target.value}}})]),_c('el-col',{staticClass:\"preview-wrapper\",class:{'preview-wrapper_night': _vm.nightMode && _vm.isCoping},attrs:{\"span\":12,\"id\":\"preview\"}},[_c('section',{class:{'output_night': _vm.nightMode && !_vm.backLight},attrs:{\"id\":\"output-wrapper\"}},[_c('div',{staticClass:\"preview\"},[_c('section',{attrs:{\"id\":\"output\"},domProps:{\"innerHTML\":_vm._s(_vm.output)}}),(_vm.nightMode && _vm.isCoping)?_c('div',{staticClass:\"loading-mask\"},[_c('div',{staticClass:\"loading__img\"}),_c('span',[_vm._v(\"正在生成\")])]):_vm._e()])])]),_c('transition',{attrs:{\"name\":\"custom-classes-transition\",\"enter-active-class\":\"animated bounceInRight\"}},[_c('el-col',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showBox),expression:\"showBox\"}],attrs:{\"id\":\"cssBox\",\"span\":12}},[_c('textarea',{attrs:{\"id\":\"cssEditor\",\"type\":\"textarea\",\"placeholder\":\"Your custom css here.\"}})])],1)],1)],1)],1),_c('about-dialog',{attrs:{\"aboutDialogVisible\":_vm.aboutDialogVisible},on:{\"close\":function($event){_vm.aboutDialogVisible = false}}}),_c('insert-form-dialog',{attrs:{\"dialogFormVisible\":_vm.dialogFormVisible},on:{\"close\":function($event){_vm.dialogFormVisible = false}}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import CodeMirror from \"codemirror/lib/codemirror\";\n(function () {\n CodeMirror.extendMode('css', {\n commentStart: '/*',\n commentEnd: '*/',\n newlineAfterToken: function (type, content) {\n return /^[;{}]$/.test(content)\n }\n })\n\n // Comment/uncomment the specified range\n CodeMirror.defineExtension('commentRange', function (isComment, from, to) {\n var cm = this; var curMode = CodeMirror.innerMode(cm.getMode(), cm.getTokenAt(from).state).mode\n cm.operation(function () {\n if (isComment) { // Comment range\n cm.replaceRange(curMode.commentEnd, to)\n cm.replaceRange(curMode.commentStart, from)\n if (from.line == to.line && from.ch == to.ch) // An empty comment inserted - put cursor inside\n { cm.setCursor(from.line, from.ch + curMode.commentStart.length) }\n } else { // Uncomment range\n var selText = cm.getRange(from, to)\n var startIndex = selText.indexOf(curMode.commentStart)\n var endIndex = selText.lastIndexOf(curMode.commentEnd)\n if (startIndex > -1 && endIndex > -1 && endIndex > startIndex) {\n // Take string till comment start\n selText = selText.substr(0, startIndex) +\n // From comment start till comment end\n selText.substring(startIndex + curMode.commentStart.length, endIndex) +\n // From comment end till string end\n selText.substr(endIndex + curMode.commentEnd.length)\n }\n cm.replaceRange(selText, from, to)\n }\n })\n })\n\n // Applies automatic mode-aware indentation to the specified range\n CodeMirror.defineExtension('autoIndentRange', function (from, to) {\n var cmInstance = this\n this.operation(function () {\n for (var i = from.line; i <= to.line; i++) {\n cmInstance.indentLine(i, 'smart')\n }\n })\n })\n\n // Applies automatic formatting to the specified range\n CodeMirror.defineExtension('autoFormatRange', function (from, to) {\n var cm = this\n var outer = cm.getMode(); var text = cm.getRange(from, to).split('\\n')\n var state = CodeMirror.copyState(outer, cm.getTokenAt(from).state)\n var tabSize = cm.getOption('tabSize')\n\n var out = ''; var lines = 0; var atSol = from.ch == 0\n function newline () {\n out += '\\n'\n atSol = true\n ++lines\n }\n\n for (var i = 0; i < text.length; ++i) {\n var stream = new CodeMirror.StringStream(text[i], tabSize)\n while (!stream.eol()) {\n var inner = CodeMirror.innerMode(outer, state)\n var style = outer.token(stream, state); var cur = stream.current()\n stream.start = stream.pos\n if (!atSol || /\\S/.test(cur)) {\n out += cur\n atSol = false\n }\n if (!atSol && inner.mode.newlineAfterToken &&\n inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || '', inner.state)) { newline() }\n }\n if (!stream.pos && outer.blankLine) outer.blankLine(state)\n if (!atSol) newline()\n }\n\n cm.operation(function () {\n cm.replaceRange(out, from, to)\n for (var cur = from.line + 1, end = from.line + lines; cur <= end; ++cur) { cm.indentLine(cur, 'smart') }\n cm.setSelection(from, cm.getCursor(false))\n })\n })\n})()\n","import axios from 'axios';\n\n// 创建axios实例\nconst service = axios.create({\n baseURL: '',\n timeout: 10 * 1000 // 请求超时时间\n});\n\nservice.interceptors.request.use(\n config => {\n if (/^(post)|(put)|(delete)$/i.test(config.method)) {\n if (config.data && config.data.upload) {\n config.headers['Content-Type'] = 'multipart/form-data';\n }\n }\n return config;\n }, error => {\n Promise.reject(error);\n }\n);\n\nservice.interceptors.response.use(res => {\n if (res.data.success) {\n return res.data;\n }\n console.log(res);\n return Promise.reject(res.data);\n}, error => Promise.reject(error));\n\nexport default service;","import fetch from './fetch';\n\n\nfunction fileUpload(data) {\n return fetch({\n url: 'https://imgkr.com/api/files/upload',\n method: 'post',\n data: data\n })\n}\n\n\nexport default {\n fileUpload\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-container',{staticClass:\"top is-dark\"},[_c('el-upload',{staticClass:\"header__item\",attrs:{\"action\":\"https://imgkr.com/api/files/upload\",\"headers\":{'Content-Type': 'multipart/form-data'},\"show-file-list\":false,\"multiple\":true,\"accept\":\".jpg,.jpeg,.png,.gif\",\"name\":\"file\",\"before-upload\":_vm.beforeUpload}},[_c('el-tooltip',{attrs:{\"effect\":_vm.effect,\"content\":\"上传图片\",\"placement\":\"bottom-start\"}},[_c('i',{staticClass:\"el-icon-upload\",attrs:{\"size\":\"medium\"}})])],1),_c('el-tooltip',{staticClass:\"header__item\",attrs:{\"effect\":_vm.effect,\"content\":\"下载编辑框Markdown文档\",\"placement\":\"bottom-start\"}},[_c('i',{staticClass:\"el-icon-download\",attrs:{\"size\":\"medium\"},on:{\"click\":_vm.downloadEditorContent}})]),_c('el-tooltip',{staticClass:\"header__item\",attrs:{\"effect\":_vm.effect,\"content\":\"重置页面\",\"placement\":\"bottom-start\"}},[_c('i',{staticClass:\"el-icon-refresh\",attrs:{\"size\":\"medium\"},on:{\"click\":function($event){_vm.showResetConfirm = true}}})]),_c('el-tooltip',{staticClass:\"header__item header__item_last\",attrs:{\"effect\":_vm.effect,\"content\":\"插入表格\",\"placement\":\"bottom-start\"}},[_c('i',{staticClass:\"el-icon-s-grid\",attrs:{\"size\":\"medium\"},on:{\"click\":function($event){return _vm.$emit('showDialogForm')}}})]),_c('el-form',{staticClass:\"ctrl\",attrs:{\"size\":\"mini\",\"inline\":true}},[_c('el-form-item',[_c('el-select',{attrs:{\"size\":\"mini\",\"placeholder\":\"选择字体\",\"clearable\":\"\"},on:{\"change\":_vm.fontChanged},model:{value:(_vm.selectFont),callback:function ($$v) {_vm.selectFont=$$v},expression:\"selectFont\"}},_vm._l((_vm.config.builtinFonts),function(font){return _c('el-option',{key:font.value,style:({fontFamily: font.value}),attrs:{\"label\":font.label,\"value\":font.value}},[_c('span',{staticClass:\"select-item-left\"},[_vm._v(_vm._s(font.label))]),_c('span',{staticClass:\"select-item-right\"},[_vm._v(\"Abc\")])])}),1)],1),_c('el-form-item',[_c('el-select',{attrs:{\"size\":\"mini\",\"placeholder\":\"选择段落字号\",\"clearable\":\"\"},on:{\"change\":_vm.sizeChanged},model:{value:(_vm.selectSize),callback:function ($$v) {_vm.selectSize=$$v},expression:\"selectSize\"}},_vm._l((_vm.config.sizeOption),function(size){return _c('el-option',{key:size.value,attrs:{\"label\":size.label,\"value\":size.value}},[_c('span',{staticClass:\"select-item-left\"},[_vm._v(_vm._s(size.label))]),_c('span',{staticClass:\"select-item-right\"},[_vm._v(_vm._s(size.desc))])])}),1)],1),_c('el-form-item',[_c('el-select',{attrs:{\"size\":\"mini\",\"placeholder\":\"选择颜色\",\"clearable\":\"\"},on:{\"change\":_vm.colorChanged},model:{value:(_vm.selectColor),callback:function ($$v) {_vm.selectColor=$$v},expression:\"selectColor\"}},_vm._l((_vm.config.colorOption),function(color){return _c('el-option',{key:color.value,attrs:{\"label\":color.label,\"value\":color.value}},[_c('span',{staticClass:\"select-item-left\"},[_vm._v(_vm._s(color.label))]),_c('span',{staticClass:\"select-item-right\"},[_vm._v(_vm._s(color.hex))])])}),1)],1),_c('el-tooltip',{attrs:{\"content\":\"自定义颜色\",\"effect\":_vm.effect,\"placement\":\"top\"}},[_c('el-color-picker',{attrs:{\"size\":\"mini\",\"show-alpha\":\"\"},on:{\"change\":_vm.colorChanged},model:{value:(_vm.selectColor),callback:function ($$v) {_vm.selectColor=$$v},expression:\"selectColor\"}})],1),_c('el-tooltip',{attrs:{\"content\":\"微信外链自动转为文末引用\",\"effect\":_vm.effect,\"placement\":\"top\"}},[_c('el-switch',{staticClass:\"header__switch\",attrs:{\"active-color\":\"#67c23a\",\"inactive-color\":\"#dcdfe6\"},on:{\"change\":_vm.statusChanged},model:{value:(_vm.citeStatus),callback:function ($$v) {_vm.citeStatus=$$v},expression:\"citeStatus\"}})],1)],1),_c('el-tooltip',{staticClass:\"item\",attrs:{\"effect\":_vm.effect,\"content\":\"自定义CSS样式\",\"placement\":\"left\"}},[_c('el-button',{attrs:{\"type\":_vm.btnType,\"plain\":\"\",\"size\":\"medium\",\"icon\":\"el-icon-setting\"},on:{\"click\":_vm.customStyle}})],1),_c('el-button',{attrs:{\"type\":_vm.btnType,\"plain\":\"\",\"size\":\"medium\"},on:{\"click\":_vm.copy}},[_vm._v(\"复制\")]),_c('el-button',{staticClass:\"about\",attrs:{\"type\":_vm.btnType,\"plain\":\"\",\"size\":\"medium\"},on:{\"click\":function($event){return _vm.$emit('showAboutDialog')}}},[_vm._v(\"关于\")]),_c('el-tooltip',{attrs:{\"content\":\"夜间模式\",\"placement\":\"bottom-start\"}},[(!_vm.nightMode)?_c('div',{staticClass:\"mode__switch\",on:{\"click\":_vm.themeChanged}}):_c('div',{staticClass:\"mode__switch mode__switch_black\",on:{\"click\":_vm.themeChanged}})]),_c('resetDialog',{attrs:{\"showResetConfirm\":_vm.showResetConfirm},on:{\"confirm\":_vm.confirmReset,\"close\":_vm.cancelReset}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export default {\n BASE: {\n 'text-align': 'left',\n 'color': '#3f3f3f',\n 'line-height': '1.75',\n },\n BASE_BLOCK: {\n 'margin': '1em 8px'\n },\n block: {\n // 一级标题样式\n h1: {\n 'font-size': '1.2em',\n 'text-align': 'center',\n 'font-weight': 'bold',\n 'display': 'table',\n 'margin': '2em auto 1em',\n 'padding': '0 1em',\n 'border-bottom': '2px solid rgba(0, 152, 116, 0.9)'\n },\n\n // 二级标题样式\n h2: {\n 'font-size': '1.2em',\n 'text-align': 'center',\n 'font-weight': 'bold',\n 'display': 'table',\n 'margin': '4em auto 2em',\n 'padding': '0 0.2em',\n 'background': 'rgba(0, 152, 116, 0.9)',\n 'color': '#fff'\n },\n\n // 三级标题样式\n h3: {\n 'font-weight': 'bold',\n 'font-size': '1.1em',\n 'margin': '2em 8px 0.75em 0',\n 'line-height': '1.2',\n 'padding-left': '8px',\n 'border-left': '3px solid rgba(0, 152, 116, 0.9)'\n },\n\n // 四级标题样式\n h4: {\n 'font-weight': 'bold',\n 'font-size': '1em',\n 'margin': '2em 8px 0.5em',\n 'color': 'rgba(66, 185, 131, 0.9)'\n },\n\n // 段落样式\n p: {\n 'margin': '1.5em 8px',\n 'letter-spacing': '0.1em'\n },\n\n // 引用样式\n blockquote: {\n 'font-style': 'normal',\n 'border-left': 'none',\n 'padding': '1em',\n 'border-radius': '4px',\n 'color': '#FEEEED',\n 'background': 'rgba(27,31,35,.05)',\n 'margin': '2em 8px'\n },\n\n blockquote_p: {\n 'letter-spacing': '0.1em',\n 'color': 'rgb(80, 80, 80)',\n 'font-family': 'PingFangSC-light, PingFangTC-light, Open Sans, Helvetica Neue, sans-serif',\n 'font-size': '1em',\n 'display': 'inline',\n },\n\n code: {\n 'font-size': '80%',\n 'overflow': 'auto',\n 'color': '#333',\n 'background': 'rgb(247, 247, 247)',\n 'border-radius': '2px',\n 'padding': '10px',\n 'line-height': '1.5',\n 'border': '1px solid rgb(236,236,236)',\n 'margin': '20px 0',\n },\n\n image: {\n 'border-radius': '4px',\n 'display': 'block',\n 'margin': '0.1em auto 0.5em',\n 'width': '100% !important',\n },\n\n image_org: {\n 'border-radius': '4px',\n 'display': 'block'\n },\n\n ol: {\n 'margin-left': '0',\n 'padding-left': '1em'\n },\n\n ul: {\n 'margin-left': '0',\n 'padding-left': '1em',\n 'list-style': 'circle'\n },\n\n footnotes: {\n 'margin': '0.5em 8px',\n 'font-size': '80%'\n },\n\n figure: {\n 'margin': '1.5em 8px',\n }\n },\n inline: {\n listitem: {\n 'text-indent': '-1em',\n 'display': 'block',\n 'margin': '0.2em 8px'\n },\n\n codespan: {\n 'font-size': '90%',\n 'color': '#d14',\n 'background': 'rgba(27,31,35,.05)',\n 'padding': '3px 5px',\n 'border-radius': '4px',\n },\n\n link: {\n 'color': '#576b95'\n },\n\n wx_link: {\n 'color': '#576b95',\n 'text-decoration': 'none',\n },\n\n // 字体加粗样式\n strong: {\n 'color': 'rgba(15, 76, 129, 0.9)',\n 'font-weight': 'bold',\n },\n\n table: {\n 'border-collapse': 'collapse',\n 'text-align': 'center',\n 'margin': '1em 8px'\n },\n\n thead: {\n 'background': 'rgba(0, 0, 0, 0.05)',\n 'font-weight': 'bold'\n },\n\n td: {\n 'border': '1px solid #dfdfdf',\n 'padding': '0.25em 0.5em'\n },\n\n footnote: {\n 'font-size': '12px'\n },\n\n figcaption: {\n 'text-align': 'center',\n 'color': '#888',\n 'font-size': '0.8em'\n }\n }\n};\n","import default_theme from './themes/default-theme'\nimport prettier from 'prettier/standalone'\nimport prettierMarkdown from 'prettier/parser-markdown'\n\n\n// 设置自定义颜色\nexport function setColorWithTemplate (template) {\n return function (color) {\n let custom_theme = JSON.parse(JSON.stringify(template))\n custom_theme.block.h1['border-bottom'] = `2px solid ${color}`\n custom_theme.block.h2['background'] = color\n custom_theme.block.h3['border-left'] = `3px solid ${color}`\n custom_theme.block.h4['color'] = color\n custom_theme.inline.strong['color'] = color\n return custom_theme\n }\n}\n\nexport const setColorWithCustomTemplate = function setColorWithCustomTemplate (\n template,\n color\n) {\n let custom_theme = JSON.parse(JSON.stringify(template))\n custom_theme.block.h1['border-bottom'] = `2px solid ${color}`\n custom_theme.block.h2['background'] = color\n custom_theme.block.h3['border-left'] = `3px solid ${color}`\n custom_theme.block.h4['color'] = color\n custom_theme.inline.strong['color'] = color\n return custom_theme\n}\n\n// 设置自定义字体大小\nexport function setFontSizeWithTemplate (template) {\n return function (fontSize) {\n let custom_theme = JSON.parse(JSON.stringify(template))\n custom_theme.block.h1['font-size'] = `${fontSize * 1.14}px`\n custom_theme.block.h2['font-size'] = `${fontSize * 1.1}px`\n custom_theme.block.h3['font-size'] = `${fontSize}px`\n custom_theme.block.h4['font-size'] = `${fontSize}px`\n return custom_theme\n }\n}\n\nexport const setColor = setColorWithTemplate(default_theme)\nexport const setFontSize = setFontSizeWithTemplate(default_theme)\n\nexport function customCssWithTemplate (jsonString, color, theme) {\n let custom_theme = JSON.parse(JSON.stringify(theme))\n // block\n custom_theme.block.h1['border-bottom'] = `2px solid ${color}`\n custom_theme.block.h2['background'] = color\n custom_theme.block.h3['border-left'] = `3px solid ${color}`\n custom_theme.block.h4['color'] = color\n custom_theme.inline.strong['color'] = color\n\n custom_theme.block.h1 = Object.assign(custom_theme.block.h1, jsonString.h1)\n custom_theme.block.h2 = Object.assign(custom_theme.block.h2, jsonString.h2)\n custom_theme.block.h3 = Object.assign(custom_theme.block.h3, jsonString.h3)\n custom_theme.block.h4 = Object.assign(custom_theme.block.h4, jsonString.h4)\n custom_theme.block.p = Object.assign(custom_theme.block.p, jsonString.p)\n custom_theme.block.blockquote = Object.assign(\n custom_theme.block.blockquote,\n jsonString.blockquote\n )\n custom_theme.block.blockquote_p = Object.assign(\n custom_theme.block.blockquote_p,\n jsonString.blockquote_p\n )\n custom_theme.block.image = Object.assign(\n custom_theme.block.image,\n jsonString.image\n )\n\n // inline\n custom_theme.inline.strong = Object.assign(\n custom_theme.inline.strong,\n jsonString.strong\n )\n custom_theme.inline.codespan = Object.assign(\n custom_theme.inline.codespan,\n jsonString.codespan\n )\n custom_theme.inline.link = Object.assign(\n custom_theme.inline.link,\n jsonString.link\n )\n custom_theme.inline.wx_link = Object.assign(\n custom_theme.inline.wx_link,\n jsonString.wx_link\n )\n\n return custom_theme\n}\n\n/**\n * 将CSS形式的字符串转换为JSON\n *\n * @param {css字符串} css\n */\nexport function css2json (css) {\n // 移除CSS所有注释\n while (\n (open = css.indexOf('/*')) !== -1 &&\n (close = css.indexOf('*/')) !== -1\n ) {\n css = css.substring(0, open) + css.substring(close + 2)\n }\n\n // 初始化返回值\n let json = {}\n\n while (css.length > 0 && css.indexOf('{') !== -1 && css.indexOf('}') !== -1) {\n // 存储第一个左/右花括号的下标\n const lbracket = css.indexOf('{')\n const rbracket = css.indexOf('}')\n\n // 第一步:将声明转换为Object,如:\n // `font: 'Times New Roman' 1em; color: #ff0000; margin-top: 1em;`\n // ==>\n // `{\"font\": \"'Times New Roman' 1em\", \"color\": \"#ff0000\", \"margin-top\": \"1em\"}`\n\n // 辅助方法:将array转为object\n function toObject (array) {\n let ret = {}\n array.forEach(e => {\n const index = e.indexOf(':')\n const property = e.substring(0, index).trim()\n const value = e.substring(index + 1).trim()\n ret[property] = value\n })\n return ret\n }\n\n // 切割声明块并移除空白符,然后放入数组中\n let declarations = css\n .substring(lbracket + 1, rbracket)\n .split(';')\n .map(e => e.trim())\n .filter(e => e.length > 0) // 移除所有\"\"空值\n\n // 转为Object对象\n declarations = toObject(declarations)\n\n // 第二步:选择器处理,每个选择器会与它对应的声明相关联,如:\n // `h1, p#bar {color: red}`\n // ==>\n // {\"h1\": {color: red}, \"p#bar\": {color: red}}\n\n let selectors = css\n .substring(0, lbracket)\n // 以,切割,并移除空格:`\"h1, p#bar, span.foo\"` => [\"h1\", \"p#bar\", \"span.foo\"]\n .split(',')\n .map(selector => selector.trim())\n\n // 迭代赋值\n selectors.forEach(selector => {\n // 若不存在,则先初始化\n if (!json[selector]) json[selector] = {}\n // 赋值到JSON\n Object.keys(declarations).forEach(key => {\n json[selector][key] = declarations[key]\n })\n })\n\n // 继续下个声明块\n css = css.slice(rbracket + 1).trim()\n }\n\n // 返回JSON形式的结果串\n return json\n}\n\n\n/**\n * 将编辑器内容保存到 LocalStorage\n * @param {*} editor \n * @param {*} name \n */\nexport function saveEditorContent(editor, name) {\n const content = editor.getValue(0)\n\n if (content) {\n localStorage.setItem(name, content)\n } else {\n localStorage.removeItem(name)\n }\n}\n\nexport function isImageIllegal(file) {\n if (!/\\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(file.name)) {\n return '请上传 JPG/PNG/GIF 格式的图片';\n }\n if (file.size > 5 * 1024 * 1024) {\n return '由于公众号限制,图片大小不能超过 5.0M';\n }\n return false;\n}\n\nexport function formatDoc(content) {\n const doc = prettier.format(content, {\n parser: 'markdown',\n plugins: [prettierMarkdown]\n })\n return doc\n}","import juice from 'juice'\n\nexport function solveWeChatImage() {\n const clipboardDiv = document.getElementById('output');\n const images = clipboardDiv.getElementsByTagName(\"img\");\n for (let i = 0; i < images.length; i++) {\n const image = images[i];\n const width = image.getAttribute(\"width\");\n const height = image.getAttribute(\"height\");\n image.removeAttribute(\"width\");\n image.removeAttribute(\"height\");\n image.style.width = width;\n image.style.height = height;\n }\n}\nexport function solveHtml(nightMode = false) {\n const element = document.getElementById(\"output-wrapper\");\n let html = element.innerHTML\n let res = \"\";\n res = juice.inlineContent(\n html,\n {\n inlinePseudoElements: true,\n preserveImportant: true\n }\n );\n return res;\n}","export default {\n builtinFonts: [\n {\n label: '无衬线',\n value: '-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif'\n },\n {\n label: '衬线',\n value: \"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif\"\n }\n ],\n sizeOption: [\n {\n label: '12px',\n value: '12px',\n desc: '更小'\n },\n {\n label: '13px',\n value: '13px',\n desc: '稍小'\n },\n {\n label: '14px',\n value: '14px',\n desc: '推荐'\n },\n {\n label: '15px',\n value: '15px',\n desc: '稍大'\n },\n {\n label: '16px',\n value: '16px',\n desc: '更大'\n }\n ],\n colorOption: [\n {\n label: '经典蓝',\n value: 'rgba(15, 76, 129, 1)',\n hex: '最新流行'\n },\n {\n label: '翡翠绿',\n value: 'rgba(0, 152, 116, 1)',\n hex: '优雅清新'\n },\n {\n label: '活力橘',\n value: 'rgba(250, 81, 81, 1)',\n hex: '热情活泼'\n }\n ],\n form: {\n rows: 1,\n cols: 1\n }\n};","const DEFAULT_CSS_CONTENT =\n`/*\n 按Ctrl+F可格式化\n*/\n/* 一级标题样式 */\nh1 {\n}\n/* 二级标题样式 */\nh2 {\n}\n/* 三级标题样式 */\nh3 {\n}\n/* 四级标题样式 */\nh4 {\n}\n/* 图片样式 */\nimage {\n}\n/* 引用样式 */\nblockquote {\n}\n/* 引用段落样式 */\nblockquote_p {\n}\n/* 段落样式 */\np {\n}\n/* 行内代码样式 */\ncodespan {\n}\n/* 粗体样式 */\nstrong {\n}\n/* 链接样式 */\nlink {\n}\n/* 微信链接样式 */\nwx_link {\n}\n`\nexport default DEFAULT_CSS_CONTENT\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{staticClass:\"reset__dialog\",attrs:{\"title\":\"提示\",\"visible\":_vm.showResetConfirm},on:{\"close\":function($event){return _vm.$emit('close')}}},[_c('div',{staticClass:\"text\"},[_vm._v(\" 此操作将丢失本地缓存的文本和自定义样式,是否继续? \")]),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"type\":_vm.btnType,\"plain\":\"\"},on:{\"click\":function($event){return _vm.$emit('close')}}},[_vm._v(\"取 消\")]),_c('el-button',{attrs:{\"type\":_vm.btnType,\"plain\":\"\"},on:{\"click\":function($event){return _vm.$emit('confirm')}}},[_vm._v(\"确 定\")])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./resetDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./resetDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./resetDialog.vue?vue&type=template&id=7fbc8ba6&scoped=true&\"\nimport script from \"./resetDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./resetDialog.vue?vue&type=script&lang=js&\"\nimport style0 from \"./resetDialog.vue?vue&type=style&index=0&id=7fbc8ba6&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7fbc8ba6\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./header.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./header.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./header.vue?vue&type=template&id=5240e4af&scoped=true&\"\nimport script from \"./header.vue?vue&type=script&lang=js&\"\nexport * from \"./header.vue?vue&type=script&lang=js&\"\nimport style0 from \"./header.vue?vue&type=style&index=0&id=5240e4af&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5240e4af\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{staticClass:\"about__dialog\",attrs:{\"title\":\"关于\",\"visible\":_vm.aboutDialogVisible,\"width\":\"30%\",\"center\":\"\"},on:{\"close\":function($event){return _vm.$emit('close')}}},[_c('div',{staticStyle:{\"text-align\":\"center\"}},[_c('h3',[_vm._v(\"一款高度简洁的微信 Markdown 编辑器\")])]),_c('div',{staticStyle:{\"text-align\":\"center\",\"margin-top\":\"10px\"}},[_c('p',[_vm._v(\"扫码关注我的公众号,原创技术文章第一时间推送!\")]),_c('img',{staticStyle:{\"width\":\"40%\",\"display\":\"block\",\"margin\":\"20px auto 10px\"},attrs:{\"src\":\"https://imgkr.cn-bj.ufileos.com/09f8e662-42ed-4731-a0d7-419deb74dfb6.png\"}})]),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"type\":\"success\",\"plain\":\"\"},on:{\"click\":function($event){return _vm.onRedirect('https://github.com/doocs/md')}}},[_vm._v(\"GitHub 仓库\")]),_c('el-button',{attrs:{\"type\":\"success\",\"plain\":\"\"},on:{\"click\":function($event){return _vm.onRedirect('https://gitee.com/doocs/md')}}},[_vm._v(\"Gitee 仓库\")])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./aboutDialog.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./aboutDialog.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./aboutDialog.vue?vue&type=template&id=362063c8&scoped=true&\"\nimport script from \"./aboutDialog.vue?vue&type=script&lang=js&\"\nexport * from \"./aboutDialog.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"362063c8\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-dialog',{staticClass:\"insert__dialog\",attrs:{\"title\":\"插入表格\",\"visible\":_vm.dialogFormVisible},on:{\"close\":function($event){return _vm.$emit('close')}}},[_c('el-form',{staticClass:\"insert__form\",attrs:{\"model\":_vm.config.form}},[_c('el-form-item',{attrs:{\"label\":\"行数(表头不计入行数)\"}},[_c('el-input',{model:{value:(_vm.config.form.rows),callback:function ($$v) {_vm.$set(_vm.config.form, \"rows\", $$v)},expression:\"config.form.rows\"}})],1),_c('el-form-item',{attrs:{\"label\":\"列数\"}},[_c('el-input',{model:{value:(_vm.config.form.cols),callback:function ($$v) {_vm.$set(_vm.config.form, \"cols\", $$v)},expression:\"config.form.cols\"}})],1)],1),_c('div',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{attrs:{\"type\":_vm.btnType,\"plain\":\"\"},on:{\"click\":function($event){return _vm.$emit('close')}}},[_vm._v(\"取 消\")]),_c('el-button',{attrs:{\"type\":_vm.btnType,\"plain\":\"\"},on:{\"click\":_vm.insertTable}},[_vm._v(\"确 定\")])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./insertForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./insertForm.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./insertForm.vue?vue&type=template&id=0bb71b82&scoped=true&\"\nimport script from \"./insertForm.vue?vue&type=script&lang=js&\"\nexport * from \"./insertForm.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0bb71b82\",\n null\n \n)\n\nexport default component.exports","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\nimport CodeMirror from \"codemirror/lib/codemirror\";\n(function(CodeMirror) {\n var defaults = {\n pairs: \"()[]{}''\\\"\\\"\",\n closeBefore: \")]}'\\\":;>\",\n triples: \"\",\n explode: \"[]{}\"\n };\n\n var Pos = CodeMirror.Pos;\n\n CodeMirror.defineOption(\"autoCloseBrackets\", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n cm.removeKeyMap(keyMap);\n cm.state.closeBrackets = null;\n }\n if (val) {\n ensureBound(getOption(val, \"pairs\"));\n cm.state.closeBrackets = val;\n cm.addKeyMap(keyMap);\n }\n });\n\n function getOption(conf, name) {\n if (name == \"pairs\" && typeof conf == \"string\") return conf;\n if (typeof conf == \"object\" && conf[name] != null) return conf[name];\n return defaults[name];\n }\n\n var keyMap = { Backspace: handleBackspace, Enter: handleEnter };\n function ensureBound(chars) {\n for (var i = 0; i < chars.length; i++) {\n var ch = chars.charAt(i),\n key = \"'\" + ch + \"'\";\n if (!keyMap[key]) keyMap[key] = handler(ch);\n }\n }\n ensureBound(defaults.pairs + \"`\");\n\n function handler(ch) {\n return function(cm) {\n return handleChar(cm, ch);\n };\n }\n\n function getConfig(cm) {\n var deflt = cm.state.closeBrackets;\n if (!deflt || deflt.override) return deflt;\n var mode = cm.getModeAt(cm.getCursor());\n return mode.closeBrackets || deflt;\n }\n\n function handleBackspace(cm) {\n var conf = getConfig(cm);\n if (!conf || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n var pairs = getOption(conf, \"pairs\");\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var around = charsAround(cm, ranges[i].head);\n if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n }\n for (var i = ranges.length - 1; i >= 0; i--) {\n var cur = ranges[i].head;\n cm.replaceRange(\n \"\",\n Pos(cur.line, cur.ch - 1),\n Pos(cur.line, cur.ch + 1),\n \"+delete\"\n );\n }\n }\n\n function handleEnter(cm) {\n var conf = getConfig(cm);\n var explode = conf && getOption(conf, \"explode\");\n if (!explode || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var around = charsAround(cm, ranges[i].head);\n if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n }\n cm.operation(function() {\n var linesep = cm.lineSeparator() || \"\\n\";\n cm.replaceSelection(linesep + linesep, null);\n cm.execCommand(\"goCharLeft\");\n ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var line = ranges[i].head.line;\n cm.indentLine(line, null, true);\n cm.indentLine(line + 1, null, true);\n }\n });\n }\n\n function contractSelection(sel) {\n var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;\n return {\n anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),\n head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))\n };\n }\n\n function handleChar(cm, ch) {\n var conf = getConfig(cm);\n if (!conf || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n var pairs = getOption(conf, \"pairs\");\n var pos = pairs.indexOf(ch);\n if (pos == -1) return CodeMirror.Pass;\n\n var closeBefore = getOption(conf, \"closeBefore\");\n\n var triples = getOption(conf, \"triples\");\n\n var identical = pairs.charAt(pos + 1) == ch;\n var ranges = cm.listSelections();\n var opening = pos % 2 == 0;\n\n var type;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i],\n cur = range.head,\n curType;\n var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));\n if (opening && !range.empty()) {\n curType = \"surround\";\n } else if ((identical || !opening) && next == ch) {\n if (identical && stringStartsAfter(cm, cur)) curType = \"both\";\n else if (\n triples.indexOf(ch) >= 0 &&\n cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch\n )\n curType = \"skipThree\";\n else curType = \"skip\";\n } else if (\n identical &&\n cur.ch > 1 &&\n triples.indexOf(ch) >= 0 &&\n cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch\n ) {\n if (\n cur.ch > 2 &&\n /\\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))\n )\n return CodeMirror.Pass;\n curType = \"addFour\";\n } else if (identical) {\n var prev =\n cur.ch == 0 ? \" \" : cm.getRange(Pos(cur.line, cur.ch - 1), cur);\n if (\n !CodeMirror.isWordChar(next) &&\n prev != ch &&\n !CodeMirror.isWordChar(prev)\n )\n curType = \"both\";\n else return CodeMirror.Pass;\n } else if (\n opening &&\n (next.length === 0 || /\\s/.test(next) || closeBefore.indexOf(next) > -1)\n ) {\n curType = \"both\";\n } else {\n return CodeMirror.Pass;\n }\n if (!type) type = curType;\n else if (type != curType) return CodeMirror.Pass;\n }\n\n var left = pos % 2 ? pairs.charAt(pos - 1) : ch;\n var right = pos % 2 ? ch : pairs.charAt(pos + 1);\n cm.operation(function() {\n if (type == \"skip\") {\n cm.execCommand(\"goCharRight\");\n } else if (type == \"skipThree\") {\n for (var i = 0; i < 3; i++) cm.execCommand(\"goCharRight\");\n } else if (type == \"surround\") {\n var sels = cm.getSelections();\n for (var i = 0; i < sels.length; i++) sels[i] = left + sels[i] + right;\n cm.replaceSelections(sels, \"around\");\n sels = cm.listSelections().slice();\n for (var i = 0; i < sels.length; i++)\n sels[i] = contractSelection(sels[i]);\n cm.setSelections(sels);\n } else if (type == \"both\") {\n cm.replaceSelection(left + right, null);\n cm.triggerElectric(left + right);\n cm.execCommand(\"goCharLeft\");\n } else if (type == \"addFour\") {\n cm.replaceSelection(left + left + left + left, \"before\");\n cm.execCommand(\"goCharRight\");\n }\n });\n }\n\n function charsAround(cm, pos) {\n var str = cm.getRange(Pos(pos.line, pos.ch - 1), Pos(pos.line, pos.ch + 1));\n return str.length == 2 ? str : null;\n }\n\n function stringStartsAfter(cm, pos) {\n var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1));\n return (\n /\\bstring/.test(token.type) &&\n token.start == pos.ch &&\n (pos.ch == 0 || !/\\bstring/.test(cm.getTokenTypeAt(pos)))\n );\n }\n})(CodeMirror);\n","\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodemirrorEditor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodemirrorEditor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CodemirrorEditor.vue?vue&type=template&id=66ac7c7c&scoped=true&\"\nimport script from \"./CodemirrorEditor.vue?vue&type=script&lang=js&\"\nexport * from \"./CodemirrorEditor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CodemirrorEditor.vue?vue&type=style&index=0&id=66ac7c7c&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"66ac7c7c\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=1407684e&scoped=true&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1407684e\",\n null\n \n)\n\nexport default component.exports","import marked from 'marked'\nconst WxRenderer = function (opts) {\n this.opts = opts\n let ENV_STRETCH_IMAGE = true\n\n let footnotes = []\n let footnoteIndex = 0\n let styleMapping = null\n\n const CODE_FONT_FAMILY = 'Menlo, Operator Mono, Consolas, Monaco, monospace'\n\n let merge = (base, extend) => Object.assign({}, base, extend)\n\n this.buildTheme = themeTpl => {\n let mapping = {}\n let base = merge(themeTpl.BASE, {\n 'font-family': this.opts.fonts,\n 'font-size': this.opts.size\n })\n let base_block = merge(base, {})\n for (let ele in themeTpl.inline) {\n if (themeTpl.inline.hasOwnProperty(ele)) {\n let style = themeTpl.inline[ele]\n if (ele === 'codespan') {\n style['font-family'] = CODE_FONT_FAMILY\n style['white-space'] = 'normal'\n }\n mapping[ele] = merge(base, style)\n }\n }\n\n for (let ele in themeTpl.block) {\n if (themeTpl.block.hasOwnProperty(ele)) {\n let style = themeTpl.block[ele]\n if (ele === 'code') {\n style['font-family'] = CODE_FONT_FAMILY\n }\n mapping[ele] = merge(base_block, style)\n }\n }\n return mapping\n }\n\n let getStyles = (tokenName, addition) => {\n let arr = []\n let dict = styleMapping[tokenName]\n if (!dict) return ''\n for (const key in dict) {\n arr.push(key + ':' + dict[key])\n }\n return `style=\"${arr.join(';') + (addition || '')}\"`\n }\n\n let addFootnote = (title, link) => {\n footnotes.push([++footnoteIndex, title, link])\n return footnoteIndex\n }\n\n this.buildFootnotes = () => {\n let footnoteArray = footnotes.map(x => {\n if (x[1] === x[2]) {\n return `[${x[0]}]: ${x[1]}
    `\n }\n return `[${x[0]}] ${x[1]}: ${x[2]}
    `\n })\n return `

    引用链接

    ${footnoteArray.join('\\n')}

    `\n }\n\n this.buildAddition = () => {\n return `\n \n `\n }\n\n this.setOptions = newOpts => {\n this.opts = merge(this.opts, newOpts)\n }\n\n this.hasFootnotes = () => footnotes.length !== 0\n\n this.getRenderer = (status) => {\n footnotes = []\n footnoteIndex = 0\n\n styleMapping = this.buildTheme(this.opts.theme)\n let renderer = new marked.Renderer()\n\n renderer.heading = (text, level) => {\n switch (level) {\n case 1:\n return `

    ${text}

    `\n case 2:\n return `

    ${text}

    `\n case 3:\n return `

    ${text}

    `\n default:\n return `

    ${text}

    `\n }\n }\n renderer.paragraph = text => {\n if (text.indexOf('${text}

    `\n }\n\n renderer.blockquote = text => {\n text = text.replace(//, `

    `)\n return `

    ${text}
    `\n }\n renderer.code = (text, infoString) => {\n text = text.replace(//g, '>')\n\n let lines = text.split('\\n')\n let codeLines = []\n let numbers = []\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i]\n codeLines.push(`${(line || '
    ')}
    `)\n numbers.push('
  • ')\n }\n let lang = infoString || ''\n\n return `\n
    \n
      ${numbers.join('')}
    \n
    \n                ${codeLines.join('')}\n            
    \n
    \n `\n }\n renderer.codespan = (text, infoString) => `${text}`\n renderer.listitem = text => `<%s/>${text}`\n\n renderer.list = (text, ordered, start) => {\n text = text.replace(/<\\/*p.*?>/g, '')\n let segments = text.split(`<%s/>`)\n if (!ordered) {\n text = segments.join('•')\n return `

    ${text}

    `\n }\n text = segments[0]\n for (let i = 1; i < segments.length; i++) {\n text = text + i + '.' + segments[i]\n }\n return `

    ${text}

    `\n }\n renderer.image = (href, title, text) => {\n let subText = ''\n if (text) {\n subText = `
    ${text}
    `\n }\n let figureStyles = getStyles('figure')\n let imgStyles = getStyles(ENV_STRETCH_IMAGE ? 'image' : 'image_org')\n return `
    \"${text}\"/${subText}
    `\n }\n renderer.link = (href, title, text) => {\n if (href.indexOf('https://mp.weixin.qq.com') === 0) {\n return `${text}`\n } else if (href === text) {\n return text\n } else {\n if (status) {\n let ref = addFootnote(title || text, href)\n return `${text}[${ref}]`\n } else {\n return text\n }\n }\n }\n renderer.strong = text => `${text}`\n renderer.em = text => `${text}`\n renderer.table = (header, body) => `
    ${header}${body}
    `\n // renderer.tablerow = (text) => `${text}`;\n renderer.tablecell = (text, flags) => `${text}`\n renderer.hr = () => `
    `\n return renderer\n }\n}\nexport default WxRenderer\n","const DEFAULT_CONTENT =\n`# 示例文章:Google 搜索的即时自动补全功能究竟是如何“工作”的?\n> Google 搜索**自动补全功能**的强大,相信不少朋友都能感受到,它帮助我们更快地“补全”我们所要输入的搜索关键字。那么,它怎么知道我们要输入什么内容?它又是如何工作的?在这篇文章里,我们一起来看看。\n\n## 使用自动补全\nGoogle 搜索的自动补全功能可以在 Google 搜索应用的大多数位置使用,包括 [Google](https://www.google.com/) 主页、适用于 IOS 和 Android 的 Google 应用,我们只需要在 Google 搜索框上开始键入关键字,就可以看到联想词了。\n\n![](https://imgkr.cn-bj.ufileos.com/17ed83bf-e028-4db2-9503-5a3b4e64deee.gif)\n\n在上图示例中,我们可以看到,输入关键字 \\`juej\\`,Google 搜索会联想到“掘金”、“掘金小册”、“绝句”等等,好处就是,我们无须输入完整的关键字即可轻松完成针对这些 topics 的搜索。\n\n谷歌搜索的自动补全功能对于使用移动设备的用户来说特别有用,用户可以轻松在难以键入的小屏幕上完成搜索。当然,对于移动设备用户和台式机用户而言,这都节省了大量的时间。根据 Google 官方报告,自动补全功能可以减少大约 25% 的打字,累积起来,预计每天可以节省 200 多年的打字时间。是的,每天!\n\n> 注意,本文所提到的“**联想词**”与“**预测**”,是同一个意思。\n\n## 基于“预测”而非“建议”\nGoogle 官方将自动补全功能称之为“预测”,而不是“建议”,为什么呢?其实是有充分理由的。自动补全功能是为了**帮助用户完成他们打算进行的搜索**,而不是建议用户要执行什么搜索。\n\n那么,Google 是如何确定这些“预测”的?其实,Google 会根据趋势搜索 [trends](https://trends.google.com/trends/?geo=US) 给到我们这些“预测”。简单来说,哪个热门、哪个搜索频率高,就更可能推给我们。当然,这也与我们当前所处的位置以及我们的搜索历史相关。\n\n另外,这些“预测”也会随着我们键入的关键字的变更而更改。例如,当我们把键入的关键字从 \\`juej\\` 更改为 \\`juex\\` 时,与“掘金”相关的预测会“消失”,同时,与“觉醒”、“决心”相关联的词会出现。\n\n![](https://imgkr.cn-bj.ufileos.com/5b17dc99-606d-42c1-9f86-e09e88aaa822.gif)\n\n## 为什么看不到某些联想词?\n如果我们在输入某个关键字时看不到联想词,那么表明 Google 的算法可能检测到:\n\n- 这个关键字不是热门字词;\n- 搜索的字词太新了,我们可能需要等待几天或几周才能看到联想词;\n- 这是一个侮辱性或敏感字词,这个搜索字词违反了 Google 的相关政策。更加详细的情况,可以了解 [Google 搜索自动补全政策](https://support.google.com/websearch/answer/7368877)。\n\n## 为什么会看到某些不当的联想词?\nGoogle 拥有专门设计的系统,可以自动捕获不适当的预测结果而不显示出来。然而,Google 每天需要处理数十亿次搜索,这意味着 Google 每天会显示数十亿甚至上百亿条预测。再好的系统,也可能存在缺陷,不正确的预测也可能随时会出现。\n\n我们作为 Google 搜索的用户,如果认定某条预测违反了相关的搜索自动补全政策,可以进行举报反馈,点击右下角“**举报不当的联想查询**”并勾选相关选项即可。\n\n![](https://imgkr.cn-bj.ufileos.com/6ca8185d-12c6-4550-bb4e-e49cfbf56db7.gif)\n\n## 如何实现自动补全算法?\n目前,Google 官方似乎并没有公开搜索自动补全的算法实现,但是业界在这方面已经有了不少研究。\n\n一个好的自动补全器必须是快速的,并且在用户键入下一个字符后立即更新联想词列表。**自动补全器的核心是一个函数,它接受输入的前缀,并搜索以给定前缀开头的词汇或语句列表**。通常来说,只需要返回少量的数目即可。\n\n接下来,我们先从一个简单且低效的实现开始,并在此基础上逐步构建更高效的方法。\n\n### 词汇表实现\n一个**简单粗暴的实现方式**是:顺序查找词汇表,依次检查每个词汇,看它是否以给定的前缀开头。\n\n但是,此方法需要将前缀与每个词汇进行匹配检查,若词汇量较少,这种方式可能勉强行得通。但是,如果词汇量规模较大,效率就太低了。\n\n一个**更好的实现方式是**:让词汇按字典顺序排序。借助二分搜索算法,可以快速搜索有序词汇表中的前缀。由于二分搜索的每一步都会将搜索的范围减半,因此,总的搜索时间与词汇表中单词数量的对数成正比,即时间复杂度是 \\`O(log N)\\`。二分搜索的性能很好,但有没有更好的实现呢?当然有,往下看。\n\n### 前缀树实现\n通常来说,许多词汇都以相同的前缀开头,比如 \\`need\\`、\\`nested\\` 都以 \\`ne\\` 开头,\\`seed\\`、\\`speed\\` 都以 \\`s\\` 开头。要是为每个单词分别存储公共前缀似乎很浪费。\n\n![](https://imgkr.cn-bj.ufileos.com/7cc3cf37-040a-420e-8ef9-d05e92c82cfd.png)\n\n前缀树是一种利用公共前缀来加速补全速度的数据结构。前缀树在节点树中排列一组单词,单词沿着从根节点到叶子节点的路径存储,树的层次对应于前缀的字母位置。\n\n前缀的补全是顺着前缀定义的路径来查找的。例如,在上图的前缀树中,前缀 \\`ne\\` 对应于从子节点取左边缘 \\`N\\` 和唯一边缘 \\`E\\` 的路径。然后可以通过继续遍历从 \\`E\\` 节点可以达到的所有叶节点来生成补全列表。在图中,\\`ne\\` 的补全可以是两个分支:\\`-ed\\` 和 \\`-sted\\`。如果在数中找不到由前缀定义的路径,则说明词汇表中不包含以该前缀开头的单词。\n\n### 有限状态自动机(DFA)实现\n前缀树可以有效处理公共前缀,但是,对于其他共享词部分,仍会分别存储在每个分支中。比如,后缀 \\`ed\\`、\\`ing\\`、\\`tion\\` 在英文单词中特别常见。在上一个例子中,\\`e\\`、\\`d\\` 分别存放在了每一个分支上。\n\n有没有一种方法可以更加节省存储空间呢?有的,那就是 DFA。\n\n
    \n
    \n\n在上面的例子中,单词 \\`need\\`、\\`nested\\`、\\`seed\\` 和 \\`speed\\` 仅由 9 个节点组成,而上一张图中的前缀树包含了 17 个节点。\n\n可以看出,最小化前缀树 DFA 可以在很大程度上减少数据结构的大小。即使词汇量很大,最小化 DFA 通常也适合在内存中存储,避免昂贵的磁盘访问是实现快速自动补全的关键。\n\n### 一些扩展\n上面介绍了如何利用合理的数据结构实现基本的自动补全功能。这些数据结构可以通过多种方式进行扩展,从而改善用户体验。\n\n通常,满足特定前缀的词汇可能很多,而用户界面上能够显示的却不多,我们更希望能显示最常搜索或者最有价值的词汇。这通常可以通过为词汇表中的每个单词增加一个代表单词值的**权重** \\`weight\\`,并且按照权重高低来排序自动补全列表。\n\n- 对于排序后的词汇表来说,在词汇表每个元素上增加 \\`weight\\` 属性并不难;\n- 对于前缀树来说,将 \\`weight\\` 存储在叶子节点中,也是很简单的一个实现;\n- 对于 \\`DFA\\` 来说,则较为复杂。因为一个叶子节点可以通过多条路径到达。一种解决方案是将权重关联到路径而不是叶子节点。\n\n目前有不少开源库都提供了这个功能,比如主流的搜索引擎框架 [Elasticsearch](https://www.elastic.co/products/elasticsearch)、[Solr](https://lucene.apache.org/solr/) 等,基于此,我们可以实现高效而强大的自动补全功能。\n\n#### 推荐阅读\n- [阿里又一个 20k+ stars 开源项目诞生,恭喜 fastjson!](https://mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)\n- [刷掉 90% 候选人的互联网大厂海量数据面试题(附题解 + 方法总结)](https://mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)\n- [好用!期待已久的文本块功能究竟如何在 Java 13 中发挥作用?](https://mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)\n- [2019 GitHub 开源贡献排行榜新鲜出炉!微软谷歌领头,阿里跻身前 12!](https://mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)\n\n---\n\n欢迎关注我的公众号“**Doocs开源社区**”,原创技术文章第一时间推送。\n\n
    \n \n
    \n\n`\nexport default DEFAULT_CONTENT\n","import Vue from 'vue'\nimport Vuex from 'vuex'\nimport config from '../scripts/config';\nimport WxRenderer from '../scripts/renderers/wx-renderer'\nimport marked from 'marked'\nimport CodeMirror from 'codemirror/lib/codemirror'\nimport DEFAULT_CONTENT from '../scripts/default-content'\nimport DEFAULT_CSS_CONTENT from '../scripts/themes/default-theme-css'\nimport {\n setColor,\n formatDoc\n} from '../scripts/util'\n\nVue.use(Vuex)\n\nconst state = {\n wxRenderer: null,\n output: '',\n editor: null,\n cssEditor: null,\n html: '',\n currentFont: '',\n currentSize: '',\n currentColor: '',\n citeStatus: 0,\n nightMode: false\n};\nconst mutations = {\n setHtml(state, data) {\n state.html = data;\n },\n setEditorValue(state, data) {\n state.editor.setValue(data)\n },\n setCssEditorValue(state, data) {\n state.cssEditor.setValue(data)\n },\n setWxRendererOptions(state, data) {\n state.wxRenderer.setOptions(data);\n },\n setCiteStatus(state, data) {\n state.citeStatus = data;\n localStorage.setItem('citeStatus', data)\n },\n setCurrentFont(state, data) {\n state.currentFont = data;\n localStorage.setItem('fonts', data)\n },\n setCurrentSize(state, data) {\n state.currentSize = data;\n localStorage.setItem('size', data)\n },\n setCurrentColor(state, data) {\n state.currentColor = data;\n localStorage.setItem('color', data)\n },\n themeChanged(state) {\n state.nightMode = !state.nightMode;\n },\n initEditorState(state) {\n state.currentFont = localStorage.getItem('fonts') || config.builtinFonts[0].value\n state.currentColor = localStorage.getItem('color') || config.colorOption[1].value\n state.currentSize = localStorage.getItem('size') || config.sizeOption[2].value\n state.citeStatus = localStorage.getItem('citeStatus') === 'true'\n state.wxRenderer = new WxRenderer({\n theme: setColor(state.currentColor),\n fonts: state.currentFont,\n size: state.currentSize,\n status: state.citeStatus\n })\n },\n initEditorEntity(state) {\n state.editor = CodeMirror.fromTextArea(\n document.getElementById('editor'),\n {\n value: '',\n mode: 'text/x-markdown',\n theme: 'xq-light',\n lineNumbers: false,\n lineWrapping: true,\n styleActiveLine: true,\n autoCloseBrackets: true,\n extraKeys: {\n 'Ctrl-F': function autoFormat(editor) {\n const doc = formatDoc(editor.getValue(0))\n localStorage.setItem('__editor_content', doc)\n editor.setValue(doc)\n }\n }\n }\n )\n // 如果有编辑器内容被保存则读取,否则加载默认内容\n if (localStorage.getItem('__editor_content')) {\n state.editor.setValue(localStorage.getItem('__editor_content'))\n } else {\n const doc = formatDoc(DEFAULT_CONTENT)\n state.editor.setValue(doc)\n }\n },\n initCssEditorEntity(state) {\n state.cssEditor = CodeMirror.fromTextArea(\n document.getElementById('cssEditor'),\n {\n value: '',\n mode: 'css',\n theme: 'style-mirror',\n lineNumbers: false,\n lineWrapping: true,\n matchBrackets: true,\n autofocus: true,\n extraKeys: {\n 'Ctrl-F': function autoFormat(editor) {\n const totalLines = editor.lineCount()\n\n editor.autoFormatRange({\n line: 0,\n ch: 0\n }, {\n line: totalLines\n })\n }\n }\n }\n )\n\n // 如果有编辑器内容被保存则读取,否则加载默认内容\n if (localStorage.getItem('__css_content')) {\n state.cssEditor.setValue(localStorage.getItem('__css_content'))\n } else {\n state.cssEditor.setValue(DEFAULT_CSS_CONTENT)\n }\n },\n editorRefresh(state) {\n let output = marked(state.editor.getValue(0), {\n renderer: state.wxRenderer.getRenderer(state.citeStatus)\n })\n // 去除第一行的 margin-top\n output = output.replace(/(style=\".*?)\"/, '$1;margin-top: 0\"')\n if (state.citeStatus) {\n // 引用脚注\n output += state.wxRenderer.buildFootnotes()\n // 附加的一些 style\n output += state.wxRenderer.buildAddition()\n }\n state.output = output\n },\n clearEditorToDefault(state) {\n const doc = formatDoc(DEFAULT_CONTENT)\n state.editor.setValue(doc)\n state.cssEditor.setValue(DEFAULT_CSS_CONTENT)\n }\n}\n\nexport default new Vuex.Store({\n state,\n mutations,\n actions: {},\n modules: {}\n})\n","import Vue from 'vue'\nimport {\n Container,\n Header,\n Upload,\n Tooltip,\n Form,\n FormItem,\n Select,\n Option,\n ColorPicker,\n Switch,\n Button,\n Main,\n Col,\n Row,\n Dialog,\n Loading,\n Message\n} from 'element-ui'\n\nVue.use(Container)\nVue.use(Header)\nVue.use(Upload)\nVue.use(Tooltip)\nVue.use(Form)\nVue.use(FormItem)\nVue.use(Select)\nVue.use(Option)\nVue.use(ColorPicker)\nVue.use(Switch)\nVue.use(Button)\nVue.use(Main)\nVue.use(Col)\nVue.use(Row)\nVue.use(Dialog)\nVue.use(Loading)\nVue.component(Message.name, Message)\n\nVue.prototype.$loading = Loading.service\nVue.prototype.$message = Message\n","import Vue from 'vue'\nimport App from './App.vue'\nimport store from './store'\nimport ElementUI from 'element-ui'\nimport 'element-ui/lib/theme-chalk/index.css'\nimport './element'\nimport 'codemirror/lib/codemirror.css';\nimport \"codemirror/theme/ambiance.css\";\nimport \"codemirror/addon/hint/show-hint.css\";\nimport \"codemirror/theme/xq-light.css\";\nimport \"./assets/less/theme.less\";\nVue.use(ElementUI)\n\nVue.config.productionTip = false\n\nnew Vue({\n store,\n render: h => h(App)\n}).$mount('#app')\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodemirrorEditor.vue?vue&type=style&index=0&id=66ac7c7c&lang=less&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CodemirrorEditor.vue?vue&type=style&index=0&id=66ac7c7c&lang=less&scoped=true&\"","!function(){/*\n\n Copyright (C) 2006 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\"undefined\"!==typeof window&&(window.PR_SHOULD_USE_CONTINUATION=!0);\n(function(){function T(a){function d(e){var a=e.charCodeAt(0);if(92!==a)return a;var c=e.charAt(1);return(a=w[c])?a:\"0\"<=c&&\"7\">=c?parseInt(e.substring(1),8):\"u\"===c||\"x\"===c?parseInt(e.substring(2),16):e.charCodeAt(1)}function f(e){if(32>e)return(16>e?\"\\\\x0\":\"\\\\x\")+e.toString(16);e=String.fromCharCode(e);return\"\\\\\"===e||\"-\"===e||\"]\"===e||\"^\"===e?\"\\\\\"+e:e}function c(e){var c=e.substring(1,e.length-1).match(RegExp(\"\\\\\\\\u[0-9A-Fa-f]{4}|\\\\\\\\x[0-9A-Fa-f]{2}|\\\\\\\\[0-3][0-7]{0,2}|\\\\\\\\[0-7]{1,2}|\\\\\\\\[\\\\s\\\\S]|-|[^-\\\\\\\\]\",\"g\"));\ne=[];var a=\"^\"===c[0],b=[\"[\"];a&&b.push(\"^\");for(var a=a?1:0,g=c.length;ak||122k||90k||122h[0]&&(h[1]+1>h[0]&&b.push(\"-\"),b.push(f(h[1])));b.push(\"]\");return b.join(\"\")}function m(e){for(var a=e.source.match(RegExp(\"(?:\\\\[(?:[^\\\\x5C\\\\x5D]|\\\\\\\\[\\\\s\\\\S])*\\\\]|\\\\\\\\u[A-Fa-f0-9]{4}|\\\\\\\\x[A-Fa-f0-9]{2}|\\\\\\\\[0-9]+|\\\\\\\\[^ux0-9]|\\\\(\\\\?[:!=]|[\\\\(\\\\)\\\\^]|[^\\\\x5B\\\\x5C\\\\(\\\\)\\\\^]+)\",\"g\")),b=a.length,d=[],g=0,h=0;g/,null])):d.push([\"com\",/^#[^\\r\\n]*/,null,\"#\"]));a.cStyleComments&&(f.push([\"com\",/^\\/\\/[^\\r\\n]*/,null]),f.push([\"com\",/^\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,null]));if(c=a.regexLiterals){var m=(c=1|\\\\/=?|::?|<>?>?=?|,|;|\\\\?|@|\\\\[|~|{|\\\\^\\\\^?=?|\\\\|\\\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\\\s*(\"+\n(\"/(?=[^/*\"+c+\"])(?:[^/\\\\x5B\\\\x5C\"+c+\"]|\\\\x5C\"+m+\"|\\\\x5B(?:[^\\\\x5C\\\\x5D\"+c+\"]|\\\\x5C\"+m+\")*(?:\\\\x5D|$))+/\")+\")\")])}(c=a.types)&&f.push([\"typ\",c]);c=(\"\"+a.keywords).replace(/^ | $/g,\"\");c.length&&f.push([\"kwd\",new RegExp(\"^(?:\"+c.replace(/[\\s,]+/g,\"|\")+\")\\\\b\"),null]);d.push([\"pln\",/^\\s+/,null,\" \\r\\n\\t\\u00a0\"]);c=\"^.[^\\\\s\\\\w.$@'\\\"`/\\\\\\\\]*\";a.regexLiterals&&(c+=\"(?!s*/)\");f.push([\"lit\",/^@[a-z_$][a-z_$@0-9]*/i,null],[\"typ\",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\\w+_t\\b)/,null],[\"pln\",/^[a-z_$][a-z_$@0-9]*/i,\nnull],[\"lit\",/^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*/i,null,\"0123456789\"],[\"pln\",/^\\\\[\\s\\S]?/,null],[\"pun\",new RegExp(c),null]);return G(d,f)}function L(a,d,f){function c(a){var b=a.nodeType;if(1==b&&!t.test(a.className))if(\"br\"===a.nodeName.toLowerCase())m(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)c(a);else if((3==b||4==b)&&f){var e=a.nodeValue,d=e.match(q);d&&(b=e.substring(0,d.index),a.nodeValue=b,(e=e.substring(d.index+\nd[0].length))&&a.parentNode.insertBefore(l.createTextNode(e),a.nextSibling),m(a),b||a.parentNode.removeChild(a))}}function m(a){function c(a,b){var e=b?a.cloneNode(!1):a,k=a.parentNode;if(k){var k=c(k,1),d=a.nextSibling;k.appendChild(e);for(var f=d;f;f=d)d=f.nextSibling,k.appendChild(f)}return e}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;a=c(a.nextSibling,0);for(var e;(e=a.parentNode)&&1===e.nodeType;)a=e;b.push(a)}for(var t=/(?:^|\\s)nocode(?:\\s|$)/,q=/\\r\\n?|\\n/,l=a.ownerDocument,n=l.createElement(\"li\");a.firstChild;)n.appendChild(a.firstChild);\nfor(var b=[n],p=0;p=+m[1],d=/\\n/g,t=a.a,q=t.length,f=0,l=a.c,n=l.length,c=0,b=a.g,p=b.length,w=0;b[p]=q;var r,e;for(e=r=0;e=h&&(c+=2);f>=k&&(w+=2)}}finally{g&&(g.style.display=a)}}catch(y){D.console&&console.log(y&&y.stack||y)}}var D=\"undefined\"!==typeof window?\nwindow:{},B=[\"break,continue,do,else,for,if,return,while\"],F=[[B,\"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile\"],\"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof\"],H=[F,\"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where\"],\nO=[F,\"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient\"],P=[F,\"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield\"],\nF=[F,\"abstract,async,await,constructor,debugger,enum,eval,export,from,function,get,import,implements,instanceof,interface,let,null,of,set,undefined,var,with,yield,Infinity,NaN\"],Q=[B,\"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None\"],R=[B,\"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END\"],\nB=[B,\"case,done,elif,esac,eval,fi,function,in,local,set,then,until\"],S=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\\d*)\\b/,W=/\\S/,X=x({keywords:[H,P,O,F,\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",Q,R,B],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),\nI={};t(X,[\"default-code\"]);t(G([],[[\"pln\",/^[^]*(?:>|$)/],[\"com\",/^<\\!--[\\s\\S]*?(?:-\\->|$)/],[\"lang-\",/^<\\?([\\s\\S]+?)(?:\\?>|$)/],[\"lang-\",/^<%([\\s\\S]+?)(?:%>|$)/],[\"pun\",/^(?:<[%?]|[%?]>)/],[\"lang-\",/^]*>([\\s\\S]+?)<\\/xmp\\b[^>]*>/i],[\"lang-js\",/^]*>([\\s\\S]*?)(<\\/script\\b[^>]*>)/i],[\"lang-css\",/^]*>([\\s\\S]*?)(<\\/style\\b[^>]*>)/i],[\"lang-in.tag\",/^(<\\/?[a-z][^<>]*>)/i]]),\"default-markup htm html mxml xhtml xml xsl\".split(\" \"));t(G([[\"pln\",/^[\\s]+/,\nnull,\" \\t\\r\\n\"],[\"atv\",/^(?:\\\"[^\\\"]*\\\"?|\\'[^\\']*\\'?)/,null,\"\\\"'\"]],[[\"tag\",/^^<\\/?[a-z](?:[\\w.:-]*\\w)?|\\/?>$/i],[\"atn\",/^(?!style[\\s=]|on)[a-z](?:[\\w:-]*\\w)?/i],[\"lang-uq.val\",/^=\\s*([^>\\'\\\"\\s]*(?:[^>\\'\\\"\\s\\/]|\\/(?=\\s)))/],[\"pun\",/^[=<>\\/]+/],[\"lang-js\",/^on\\w+\\s*=\\s*\\\"([^\\\"]+)\\\"/i],[\"lang-js\",/^on\\w+\\s*=\\s*\\'([^\\']+)\\'/i],[\"lang-js\",/^on\\w+\\s*=\\s*([^\\\"\\'>\\s]+)/i],[\"lang-css\",/^style\\s*=\\s*\\\"([^\\\"]+)\\\"/i],[\"lang-css\",/^style\\s*=\\s*\\'([^\\']+)\\'/i],[\"lang-css\",/^style\\s*=\\s*([^\\\"\\'>\\s]+)/i]]),[\"in.tag\"]);\nt(G([],[[\"atv\",/^[\\s\\S]+/]]),[\"uq.val\"]);t(x({keywords:H,hashComments:!0,cStyleComments:!0,types:S}),\"c cc cpp cxx cyc m\".split(\" \"));t(x({keywords:\"null,true,false\"}),[\"json\"]);t(x({keywords:P,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:S}),[\"cs\"]);t(x({keywords:O,cStyleComments:!0}),[\"java\"]);t(x({keywords:B,hashComments:!0,multiLineStrings:!0}),[\"bash\",\"bsh\",\"csh\",\"sh\"]);t(x({keywords:Q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),[\"cv\",\"py\",\"python\"]);t(x({keywords:\"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END\",\nhashComments:!0,multiLineStrings:!0,regexLiterals:2}),[\"perl\",\"pl\",\"pm\"]);t(x({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),[\"rb\",\"ruby\"]);t(x({keywords:F,cStyleComments:!0,regexLiterals:!0}),[\"javascript\",\"js\",\"ts\",\"typescript\"]);t(x({keywords:\"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes\",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,\nregexLiterals:!0}),[\"coffee\"]);t(G([],[[\"str\",/^[\\s\\S]+/]]),[\"regex\"]);var Y=D.PR={createSimpleLexer:G,registerLangHandler:t,sourceDecorator:x,PR_ATTRIB_NAME:\"atn\",PR_ATTRIB_VALUE:\"atv\",PR_COMMENT:\"com\",PR_DECLARATION:\"dec\",PR_KEYWORD:\"kwd\",PR_LITERAL:\"lit\",PR_NOCODE:\"nocode\",PR_PLAIN:\"pln\",PR_PUNCTUATION:\"pun\",PR_SOURCE:\"src\",PR_STRING:\"str\",PR_TAG:\"tag\",PR_TYPE:\"typ\",prettyPrintOne:D.prettyPrintOne=function(a,d,f){f=f||!1;d=d||null;var c=document.createElement(\"div\");c.innerHTML=\"
    \"+a+\"
    \";\nc=c.firstChild;f&&L(c,f,!0);M({j:d,m:f,h:c,l:1,a:null,i:null,c:null,g:null});return c.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function f(){for(var c=D.PR_SHOULD_USE_CONTINUATION?b.now()+250:Infinity;pl)r(s,n=t[l++])&&(~o(u,n)||u.push(n));return u}},"051a":function(e,t,n){var r=s(n("64b2")),i=l(r);t.XML=d(r,i);var o=s(n("f0f2")),a=l(o);function s(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function l(e){var t=[],n=[];return Object.keys(e).forEach((function(e){1===e.length?t.push("\\"+e):n.push(e)})),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.HTML=d(o,a);var u=/[^\0-\x7F]/g,c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function h(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function p(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=1024*(t-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}function d(e,t){function n(t){return e[t]}return function(e){return e.replace(t,n).replace(c,p).replace(u,h)}}var f=l(r);function m(e){return e.replace(f,h).replace(c,p).replace(u,h)}t.escape=m},"051b":function(e,t,n){var r=n("1a14"),i=n("10db");e.exports=n("0bad")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},"057f":function(e,t,n){var r=n("fc6a"),i=n("241c").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(r(e))}},"05f5":function(e,t,n){var r=n("7a41"),i=n("ef08").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"06cf":function(e,t,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),a=n("fc6a"),s=n("c04e"),l=n("5135"),u=n("0cfb"),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),u)try{return c(e,t)}catch(n){}if(l(e,t))return o(!i.f.call(e,t),e[t])}},"072d":function(e,t,n){"use strict";var r=n("0bad"),i=n("9876"),o=n("fed5"),a=n("1917"),s=n("0983"),l=n("9fbb"),u=Object.assign;e.exports=!u||n("4b8b")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){var n=s(e),u=arguments.length,c=1,h=o.f,p=a.f;while(u>c){var d,f=l(arguments[c++]),m=h?i(f).concat(h(f)):i(f),g=m.length,v=0;while(g>v)d=m[v++],r&&!p.call(f,d)||(n[d]=f[d])}return n}:u},"0983":function(e,t,n){var r=n("c901");e.exports=function(e){return Object(r(e))}},"0a06":function(e,t,n){"use strict";var r=n("c532"),i=n("30b5"),o=n("f6b4"),a=n("5270"),s=n("4a7b");function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=s(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));while(t.length)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(r.merge(n||{},{method:e,url:t}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,i){return this.request(r.merge(i||{},{method:e,url:t,data:n}))}})),e.exports=l},"0ae2":function(e,t,n){var r=n("9876"),i=n("fed5"),o=n("1917");e.exports=function(e){var t=r(e),n=i.f;if(n){var a,s=n(e),l=o.f,u=0;while(s.length>u)l.call(e,a=s[u++])&&t.push(a)}return t}},"0b99":function(e,t,n){"use strict";var r=n("19fa")(!0);n("393a")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},"0bad":function(e,t,n){e.exports=!n("4b8b")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"0bfb":function(e,t,n){var r,i,o,a,s=!1,l=!1,u=n("115b")("parse"),c=n("c415");function h(e,t){var n,s;t||(t={}),r=!!t.comments,o=!!t.position,i=0,a=Array.isArray(e)?e.slice():c(e);var h,p=[];l&&(n=Date.now());while(h=d())s=x(h),s&&p.push(s);return l&&u("ran in",Date.now()-n+"ms"),{type:"stylesheet",stylesheet:{rules:p}}}function p(e,t){var n;t||(t={});for(var r=["type","name","value"],i={},a=0;a-1}function Xe(e,t){var n=this.__data__,r=dt(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}function Je(e){var t=-1,n=e?e.length:0;this.clear();while(++tu))return!1;var h=o.get(e);if(h&&o.get(t))return h==t;var p=-1,d=!0,f=i&a?new rt:void 0;o.set(e,t),o.set(t,e);while(++p-1&&e%1==0&&e-1&&e%1==0&&e<=u}function cn(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function hn(e){return!!e&&"object"==typeof e}function pn(e){return"symbol"==typeof e||hn(e)&&ye.call(e)==_}var dn=ee?oe(ee):kt;function fn(e){return null==e?"":Ot(e)}function mn(e,t,n){var r=null==e?void 0:yt(e,t);return void 0===r?n:r}function gn(e,t){return null!=e&&zt(e,t,Dt)}function vn(e){return an(e)?pt(e):St(e)}function yn(e){return e}function bn(e){return Ht(e)?re(Jt(e)):Tt(e)}n.exports=Qt}).call(this,n("c8ba"),n("62e4")(e))},"0df6":function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"0e15":function(e,t,n){var r=n("597f");e.exports=function(e,t,n){return void 0===n?r(e,t,!1):r(e,n,!1!==t)}},"0f7c":function(e,t,n){},"0f94":function(e,t,n){var r=e.exports;[n("68b4"),n("26f9"),n("7a39"),n("733c"),n("9f20"),n("f67e")].forEach((function(e){Object.keys(e).forEach((function(t){r[t]=e[t].bind(r)}))}))},"0fae":function(e,t,n){},1098:function(e,t,n){"use strict";t.__esModule=!0;var r=n("17ed"),i=l(r),o=n("f893"),a=l(o),s="function"===typeof a.default&&"symbol"===typeof i.default?function(e){return typeof e}:function(e){return e&&"function"===typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":typeof e};function l(e){return e&&e.__esModule?e:{default:e}}t.default="function"===typeof a.default&&"symbol"===s(i.default)?function(e){return"undefined"===typeof e?"undefined":s(e)}:function(e){return e&&"function"===typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":"undefined"===typeof e?"undefined":s(e)}},"10db":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"111b":function(e,t,n){(function(e){e(n("56b3"),n("7b00"))})((function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(n){var r=n.getCursor(),i=n.getTokenAt(r),o=e.innerMode(n.getMode(),i.state);if("css"==o.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(r.line,i.start),to:e.Pos(r.line,i.end)};var a=i.start,s=r.ch,l=i.string.slice(0,s-a);/[^\w$_-]/.test(l)&&(l="",a=s=r.ch);var u=e.resolveMode("text/css"),c=[],h=o.state.state;return"pseudo"==h||"variable-3"==i.type?p(t):"block"==h||"maybeprop"==h?p(u.propertyKeywords):"prop"==h||"parens"==h||"at"==h||"params"==h?(p(u.valueKeywords),p(u.colorKeywords)):"media"!=h&&"media_parens"!=h||(p(u.mediaTypes),p(u.mediaFeatures)),c.length?{list:c,from:e.Pos(r.line,a),to:e.Pos(r.line,s)}:void 0}function p(e){for(var t in e)l&&0!=t.lastIndexOf(l,0)||c.push(t)}}))}))},1157:function(e,t,n){var r,i; +/*! + * jQuery JavaScript Library v3.5.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2020-05-04T22:49Z + */(function(t,n){"use strict";"object"===typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)})("undefined"!==typeof window?window:this,(function(n,o){"use strict";var a=[],s=Object.getPrototypeOf,l=a.slice,u=a.flat?function(e){return a.flat.call(e)}:function(e){return a.concat.apply([],e)},c=a.push,h=a.indexOf,p={},d=p.toString,f=p.hasOwnProperty,m=f.toString,g=m.call(Object),v={},y=function(e){return"function"===typeof e&&"number"!==typeof e.nodeType},b=function(e){return null!=e&&e===e.window},D=n.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){n=n||D;var r,i,o=n.createElement("script");if(o.text=e,t)for(r in x)i=t[r]||t.getAttribute&&t.getAttribute(r),i&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function C(e){return null==e?e+"":"object"===typeof e||"function"===typeof e?p[d.call(e)]||"object":typeof e}var _="3.5.1",k=function(e,t){return new k.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!y(e)&&!b(e)&&("array"===n||0===t||"number"===typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:_,constructor:k,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+M+")"+M+"*"),W=new RegExp(M+"|>"),U=new RegExp(R),G=new RegExp("^"+I+"$"),Y={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},ae=De((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(T=P.call(x.childNodes),x.childNodes),T[x.childNodes.length].nodeType}catch(Se){L={apply:T.length?function(e,t){N.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(e,t,r,i){var o,s,u,c,h,f,v,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!==typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&(p(t),t=t||d,m)){if(11!==x&&(h=Q.exec(e)))if(o=h[1]){if(9===x){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&b(t,u)&&u.id===o)return r.push(u),r}else{if(h[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!g||!g.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===x&&(W.test(e)||H.test(e))){y=ee.test(e)&&ve(t.parentNode)||t,y===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=D)),f=a(e),s=f.length;while(s--)f[s]=(c?"#"+c:":scope")+" "+be(f[s]);v=f.join(",")}try{return L.apply(r,y.querySelectorAll(v)),r}catch(w){S(e,!0)}finally{c===D&&t.removeAttribute("id")}}}return l(e.replace(z,"$1"),t,r,i)}function le(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ue(e){return e[D]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(Se){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ue((function(t){return t=+t,ue((function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&"undefined"!==typeof e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},p=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:x;return a!=d&&9===a.nodeType&&a.documentElement?(d=a,f=d.documentElement,m=!o(d),x!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return f.appendChild(e).appendChild(d.createElement("div")),"undefined"!==typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Z.test(d.getElementsByClassName),n.getById=ce((function(e){return f.appendChild(e).id=D,!d.getElementsByName||!d.getElementsByName(D).length})),n.getById?(r.filter["ID"]=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find["ID"]=function(e,t){if("undefined"!==typeof t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter["ID"]=function(e){var t=e.replace(te,ne);return function(e){var n="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find["ID"]=function(e,t){if("undefined"!==typeof t.getElementById&&m){var n,r,i,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),r.find["TAG"]=n.getElementsByTagName?function(e,t){return"undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find["CLASS"]=n.getElementsByClassName&&function(e,t){if("undefined"!==typeof t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=Z.test(d.querySelectorAll))&&(ce((function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+M+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+D+"-]").length||g.push("~="),t=d.createElement("input"),t.setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+D+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Z.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",R)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(f.compareDocumentPosition),b=t||Z.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return h=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==x&&b(x,e)?-1:t==d||t.ownerDocument==x&&b(x,t)?1:c?j(c,e)-j(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return h=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?j(c,e)-j(c,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==x?-1:s[r]==x?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&m&&!S[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(Se){S(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&p(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&F.call(r.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==o?o:n.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(h=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),h){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"===typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},r=se.selectors={cacheLength:50,createPseudo:ue,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y["CHILD"].test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&_(e,(function(e){return t.test("string"===typeof e.className&&e.className||"undefined"!==typeof e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,h,p,d,f,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(o){while(m){p=t;while(p=p[m])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&y){p=g,h=p[D]||(p[D]={}),c=h[p.uniqueID]||(h[p.uniqueID]={}),u=c[e]||[],d=u[0]===w&&u[1],b=d&&u[2],p=d&&g.childNodes[d];while(p=++d&&p&&p[m]||(b=d=0)||f.pop())if(1===p.nodeType&&++b&&p===t){c[e]=[w,d,b];break}}else if(y&&(p=t,h=p[D]||(p[D]={}),c=h[p.uniqueID]||(h[p.uniqueID]={}),u=c[e]||[],d=u[0]===w&&u[1],b=d),!1===b)while(p=++d&&p&&p[m]||(b=d=0)||f.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++b&&(y&&(h=p[D]||(p[D]={}),c=h[p.uniqueID]||(h[p.uniqueID]={}),c[e]=[w,b]),p===t))break;return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[D]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){var r,o=i(e,t),a=o.length;while(a--)r=j(e,o[a]),e[r]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ue((function(e){var t=[],n=[],r=s(e.replace(z,"$1"));return r[D]?ue((function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return se(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ue((function(e){return G.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos["empty"](e)},header:function(e){return J.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function we(e,t,n){for(var r=0,i=t.length;r-1&&(o[u]=!(a[u]=h))}}else v=Ce(v===a?v.splice(f,v.length):v),i?i(null,a,v,l):L.apply(a,v)}))}function ke(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,c=De((function(e){return e===t}),s,!0),h=De((function(e){return j(t,e)>-1}),s,!0),p=[function(e,n,r){var i=!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):h(e,n,r));return t=null,i}];l1&&xe(p),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,l0,i=e.length>0,o=function(o,a,s,l,c){var h,f,g,v=0,y="0",b=o&&[],D=[],x=u,C=o||i&&r.find["TAG"]("*",c),_=w+=null==x?1:Math.random()||.1,k=C.length;for(c&&(u=a==d||a||c);y!==k&&null!=(h=C[y]);y++){if(i&&h){f=0,a||h.ownerDocument==d||(p(h),s=!m);while(g=e[f++])if(g(h,a||d,s)){l.push(h);break}c&&(w=_)}n&&((h=!g&&h)&&v--,o&&b.push(h))}if(v+=y,n&&y!==v){f=0;while(g=t[f++])g(b,D,a,s);if(o){if(v>0)while(y--)b[y]||D[y]||(D[y]=O.call(l));D=Ce(D)}L.apply(l,D),c&&!o&&D.length>0&&v+t.length>1&&se.uniqueSort(l)}return c&&(w=_,u=x),b};return n?ue(o):o}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=r.preFilter;while(s){for(a in n&&!(i=V.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=H.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(z," ")}),s=s.slice(n.length)),r.filter)!(i=Y[a].exec(s))||u[a]&&!(i=u[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):k(e,l).slice(0)},s=se.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)o=ke(t[n]),o[D]?r.push(o):i.push(o);o=E(e,Ee(i,r)),o.selector=e}return o},l=se.select=function(e,t,n,i){var o,l,u,c,h,p="function"===typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if(l=d[0]=d[0].slice(0),l.length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&r.relative[l[1].type]){if(t=(r.find["ID"](u.matches[0].replace(te,ne),t)||[])[0],!t)return n;p&&(t=t.parentNode),e=e.slice(l.shift().value.length)}o=Y["needsContext"].test(e)?0:l.length;while(o--){if(u=l[o],r.relative[c=u.type])break;if((h=r.find[c])&&(i=h(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(o,1),e=i.length&&be(l),!e)return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=D.split("").sort(A).join("")===D,n.detectDuplicates=!!h,p(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),ce((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||he(B,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);k.find=S,k.expr=S.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=S.uniqueSort,k.text=S.getText,k.isXMLDoc=S.isXML,k.contains=S.contains,k.escapeSelector=S.escape;var A=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},F=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},T=k.expr.match.needsContext;function O(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return y(t)?k.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!==typeof t?k.grep(e,(function(e){return h.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!==typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"===typeof e&&T.test(e)?k(e):e||[],!1).length}});var P,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,B=k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||P,"string"===typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:D,!0)),N.test(r[1])&&k.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=D.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)};B.prototype=k.fn,P=k(D);var M=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function $(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?k.uniqueSort(o):o)},index:function(e){return e?"string"===typeof e?h.call(k(e),this[0]):h.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return $(e,"nextSibling")},prev:function(e){return $(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return F((e.parentNode||{}).firstChild,e)},children:function(e){return F(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(O(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,r){var i=k.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"===typeof r&&(i=k.filter(r,i)),this.length>1&&(I[e]||k.uniqueSort(i),M.test(e)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function q(e){var t={};return k.each(e.match(R)||[],(function(e,n){t[n]=!0})),t}function z(e){return e}function V(e){throw e}function H(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"===typeof e?q(e):k.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(n){k.each(t,(function(t,r){var i=y(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=o&&(r!==V&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?c():(k.Deferred.getStackHook&&(c.stackTrace=k.Deferred.getStackHook()),n.setTimeout(c))}}return k.Deferred((function(n){t[0][3].add(a(0,n,y(i)?i:z,n.notifyWith)),t[1][3].add(a(0,n,y(e)?e:z)),t[2][3].add(a(0,n,y(r)?r:V))})).promise()},promise:function(e){return null!=e?k.extend(e,i):i}},o={};return k.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=l.call(arguments),o=k.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?l.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(H(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();while(n--)H(i[n],a(n),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&W.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout((function(){throw e}))};var U=k.Deferred();function G(){D.removeEventListener("DOMContentLoaded",G),n.removeEventListener("load",G),k.ready()}k.fn.ready=function(e){return U.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||U.resolveWith(D,[k]))}}),k.ready.then=U.then,"complete"===D.readyState||"loading"!==D.readyState&&!D.documentElement.doScroll?n.setTimeout(k.ready):(D.addEventListener("DOMContentLoaded",G),n.addEventListener("load",G));var Y=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===C(n))for(s in i=!0,n)Y(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(k(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){ne.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=te.get(e,t),n&&(!r||Array.isArray(n)?r=te.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t),a=function(){k.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return te.get(e,n)||te.access(e,n,{empty:k.Callbacks("once memory").add((function(){te.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!==typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,De=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=D.createDocumentFragment(),t=e.appendChild(D.createElement("div")),n=D.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),v.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",v.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="",v.option=!!t.lastChild})();var xe={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function we(e,t){var n;return n="undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&O(e,t)?k.merge([e],n):n}function Ce(e,t){for(var n=0,r=e.length;n",""]);var _e=/<|&#?\w+;/;function ke(e,t,n,r,i){for(var o,a,s,l,u,c,h=t.createDocumentFragment(),p=[],d=0,f=e.length;d-1)i&&i.push(o);else if(u=he(o),a=we(h.appendChild(o),"script"),u&&Ce(a),n){c=0;while(o=a[c++])De.test(o.type||"")&&n.push(o)}return h}var Ee=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function Fe(){return!0}function Te(){return!1}function Oe(e,t){return e===Ne()===("focus"===t)}function Ne(){try{return D.activeElement}catch(e){}}function Le(e,t,n,r,i,o){var a,s;if("object"===typeof t){for(s in"string"!==typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"===typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,i=function(e){return k().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=k.guid++)),e.each((function(){k.event.add(this,t,i,r,n)}))}function Pe(e,t,n){n?(te.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=te.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=l.call(arguments),te.set(this,t,o),r=n(this,t),this[t](),i=te.get(this,t),o!==i||r?te.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(te.set(this,t,{value:k.event.trigger(k.extend(o[0],k.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===te.get(e,t)&&k.event.add(e,t,Fe)}k.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,h,p,d,f,m,g=te.get(e);if(Q(e)){n.handler&&(o=n,n=o.handler,i=o.selector),i&&k.find.matchesSelector(ce,i),n.guid||(n.guid=k.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return"undefined"!==typeof k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(R)||[""],u=t.length;while(u--)s=Ae.exec(t[u])||[],d=m=s[1],f=(s[2]||"").split(".").sort(),d&&(h=k.event.special[d]||{},d=(i?h.delegateType:h.bindType)||d,h=k.event.special[d]||{},c=k.extend({type:d,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:f.join(".")},o),(p=l[d])||(p=l[d]=[],p.delegateCount=0,h.setup&&!1!==h.setup.call(e,r,f,a)||e.addEventListener&&e.addEventListener(d,a)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,h,p,d,f,m,g=te.hasData(e)&&te.get(e);if(g&&(l=g.events)){t=(t||"").match(R)||[""],u=t.length;while(u--)if(s=Ae.exec(t[u])||[],d=m=s[1],f=(s[2]||"").split(".").sort(),d){h=k.event.special[d]||{},d=(r?h.delegateType:h.bindType)||d,p=l[d]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,h.remove&&h.remove.call(e,c));a&&!p.length&&(h.teardown&&!1!==h.teardown.call(e,f,g.handle)||k.removeEvent(e,d,g.handle),delete l[d])}else for(d in l)k.event.remove(e,d+t[u],n,r,!0);k.isEmptyObject(l)&&te.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=k.event.fix(e),u=(te.get(this,"events")||Object.create(null))[l.type]||[],c=k.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:k.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\s*$/g;function Ie(e,t){return O(e,"table")&&O(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function $e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function qe(e,t){var n,r,i,o,a,s,l;if(1===t.nodeType){if(te.hasData(e)&&(o=te.get(e),l=o.events,l))for(i in te.remove(t,"handle events"),l)for(n=0,r=l[i].length;n1&&"string"===typeof f&&!v.checkClone&&Be.test(f))return e.each((function(i){var o=e.eq(i);m&&(t[0]=f.call(this,i,o.html())),Ve(o,t,n,r)}));if(p&&(i=ke(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=k.map(we(i,"script"),$e),s=a.length;h0&&Ce(a,!l&&we(e,"script")),s},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(Q(n)){if(t=n[te.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[te.expando]=void 0}n[ne.expando]&&(n[ne.expando]=void 0)}}}),k.fn.extend({detach:function(e){return He(this,e,!0)},remove:function(e){return He(this,e)},text:function(e){return Y(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.appendChild(e)}}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return Y(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"===typeof e&&!je.test(e)&&!xe[(be.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n3,ce.removeChild(e)),s}}))})();var Je=["Webkit","Moz","ms"],Ze=D.createElement("div").style,Qe={};function et(e){var t=e[0].toUpperCase()+e.slice(1),n=Je.length;while(n--)if(e=Je[n]+t,e in Ze)return e}function tt(e){var t=k.cssProps[e]||Qe[e];return t||(e in Ze?e:Qe[e]=et(e)||e)}var nt=/^(none|table(?!-c[ea]).+)/,rt=/^--/,it={position:"absolute",visibility:"hidden",display:"block"},ot={letterSpacing:"0",fontWeight:"400"};function at(e,t,n){var r=le.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function st(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=k.css(e,n+ue[a],!0,i)),r?("content"===n&&(l-=k.css(e,"padding"+ue[a],!0,i)),"margin"!==n&&(l-=k.css(e,"border"+ue[a]+"Width",!0,i))):(l+=k.css(e,"padding"+ue[a],!0,i),"padding"!==n?l+=k.css(e,"border"+ue[a]+"Width",!0,i):s+=k.css(e,"border"+ue[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l}function lt(e,t,n){var r=Ue(e),i=!v.boxSizingReliable()||n,o=i&&"border-box"===k.css(e,"boxSizing",!1,r),a=o,s=Ke(e,t,r),l="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&o||!v.reliableTrDimensions()&&O(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===k.css(e,"boxSizing",!1,r),a=l in e,a&&(s=e[l])),s=parseFloat(s)||0,s+st(e,t,n||(o?"border":"content"),a,r,s)+"px"}function ut(e,t,n,r,i){return new ut.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ke(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=Z(t),l=rt.test(t),u=e.style;if(l||(t=tt(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];o=typeof n,"string"===o&&(i=le.exec(n))&&i[1]&&(n=fe(e,t,i),o="number"),null!=n&&n===n&&("number"!==o||l||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=Z(t),l=rt.test(t);return l||(t=tt(s)),a=k.cssHooks[t]||k.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ke(e,t,r)),"normal"===i&&t in ot&&(i=ot[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!nt.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?lt(e,t,r):Ge(e,it,(function(){return lt(e,t,r)}))},set:function(e,n,r){var i,o=Ue(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=a||r,l=s&&"border-box"===k.css(e,"boxSizing",!1,o),u=r?st(e,t,r,l,o):0;return l&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-st(e,t,"border",!1,o)-.5)),u&&(i=le.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),at(e,n,u)}}})),k.cssHooks.marginLeft=Xe(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ke(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"===typeof n?n.split(" "):[n];r<4;r++)i[e+ue[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=at)})),k.fn.extend({css:function(e,t){return Y(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ue(e),i=t.length;a1)}}),k.Tween=ut,ut.prototype={constructor:ut,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=ut.propHooks[this.prop];return e&&e.get?e.get(this):ut.propHooks._default.get(this)},run:function(e){var t,n=ut.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ut.propHooks._default.set(this),this}},ut.prototype.init.prototype=ut.prototype,ut.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[tt(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},ut.propHooks.scrollTop=ut.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=ut.prototype.init,k.fx.step={};var ct,ht,pt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ft(){ht&&(!1===D.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ft):n.setTimeout(ft,k.fx.interval),k.fx.tick())}function mt(){return n.setTimeout((function(){ct=void 0})),ct=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=ue[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(Dt.tweeners[t]||[]).concat(Dt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"===typeof e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=k.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&O(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=wt[t]||k.find.attr;wt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=wt[a],wt[a]=i,i=null!=n(e,t,r)?a:null,wt[a]=o),i}}));var Ct=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;function kt(e){var t=e.match(R)||[];return t.join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"===typeof e&&e.match(R)||[]}k.fn.extend({prop:function(e,t){return Y(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):Ct.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(y(e))return this.each((function(t){k(this).addClass(e.call(this,t,Et(this)))}));if(t=St(e),t.length)while(n=this[l++])if(i=Et(n),r=1===n.nodeType&&" "+kt(i)+" ",r){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=kt(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(y(e))return this.each((function(t){k(this).removeClass(e.call(this,t,Et(this)))}));if(!arguments.length)return this.attr("class","");if(t=St(e),t.length)while(n=this[l++])if(i=Et(n),r=1===n.nodeType&&" "+kt(i)+" ",r){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");s=kt(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"===typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,Et(this),t),t)})):this.each((function(){var t,i,o,a;if(r){i=0,o=k(this),a=St(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||(t=Et(this),t&&te.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":te.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+kt(Et(n))+" ").indexOf(t)>-1)return!0;return!1}});var At=/\r/g;k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each((function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,k(this).val()):e,null==i?i="":"number"===typeof i?i+="":Array.isArray(i)&&(i=k.map(i,(function(e){return null==e?"":e+""}))),t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"===typeof n?n.replace(At,""):null==n?"":n)):void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:kt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},v.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in n;var Ft=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,r,i){var o,a,s,l,u,c,h,p,d=[r||D],m=f.call(e,"type")?e.type:e,g=f.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=r=r||D,3!==r.nodeType&&8!==r.nodeType&&!Ft.test(m+k.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,e=e[k.expando]?e:new k.Event(m,"object"===typeof e&&e),e.isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:k.makeArray(t,[e]),h=k.event.special[m]||{},i||!h.trigger||!1!==h.trigger.apply(r,t))){if(!i&&!h.noBubble&&!b(r)){for(l=h.delegateType||m,Ft.test(l+m)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||D)&&d.push(s.defaultView||s.parentWindow||n)}o=0;while((a=d[o++])&&!e.isPropagationStopped())p=a,e.type=o>1?l:h.bindType||m,c=(te.get(a,"events")||Object.create(null))[e.type]&&te.get(a,"handle"),c&&c.apply(a,t),c=u&&a[u],c&&c.apply&&Q(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(d.pop(),t)||!Q(r)||u&&y(r[m])&&!b(r)&&(s=r[u],s&&(r[u]=null),k.event.triggered=m,e.isPropagationStopped()&&p.addEventListener(m,Tt),r[m](),e.isPropagationStopped()&&p.removeEventListener(m,Tt),k.event.triggered=void 0,s&&(r[u]=s)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),v.focusin||k.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=te.access(r,t);i||r.addEventListener(e,n,!0),te.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=te.access(r,t)-1;i?te.access(r,t,i):(r.removeEventListener(e,n,!0),te.remove(r,t))}}}));var Ot=n.location,Nt={guid:Date.now()},Lt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!==typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Pt=/\[\]$/,jt=/\r?\n/g,Bt=/^(?:submit|button|image|reset|file)$/i,Mt=/^(?:input|select|textarea|keygen)/i;function It(e,t,n,r){var i;if(Array.isArray(t))k.each(t,(function(t,i){n||Pt.test(e)?r(e,i):It(e+"["+("object"===typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==C(t))r(e,t);else for(i in t)It(e+"["+i+"]",t[i],n,r)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){i(this.name,this.value)}));else for(n in e)It(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Mt.test(this.nodeName)&&!Bt.test(e)&&(this.checked||!ye.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(jt,"\r\n")}})):{name:t.name,value:n.replace(jt,"\r\n")}})).get()}});var $t=/%20/g,Rt=/#.*$/,qt=/([?&])_=[^&]*/,zt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ht=/^(?:GET|HEAD)$/,Wt=/^\/\//,Ut={},Gt={},Yt="*/".concat("*"),Kt=D.createElement("a");function Xt(e){return function(t,n){"string"!==typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(R)||[];if(y(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Jt(e,t,n,r){var i={},o=e===Gt;function a(s){var l;return i[s]=!0,k.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!==typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}function Qt(e,t,n){var r,i,o,a,s=e.contents,l=e.dataTypes;while("*"===l[0])l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}function en(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift(),o)if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]],a)){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(h){return{state:"parsererror",error:a?h:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}Kt.href=Ot.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ot.href,type:"GET",isLocal:Vt.test(Ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,k.ajaxSettings),t):Zt(k.ajaxSettings,e)},ajaxPrefilter:Xt(Ut),ajaxTransport:Xt(Gt),ajax:function(e,t){"object"===typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,l,u,c,h,p,d=k.ajaxSetup({},t),f=d.context||d,m=d.context&&(f.nodeType||f.jquery)?k(f):k.event,g=k.Deferred(),v=k.Callbacks("once memory"),y=d.statusCode||{},b={},x={},w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a){a={};while(t=zt.exec(o))a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||w;return r&&r.abort(t),_(0,t),this}};if(g.promise(C),d.url=((e||d.url||Ot.href)+"").replace(Wt,Ot.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(R)||[""],null==d.crossDomain){l=D.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=Kt.protocol+"//"+Kt.host!==l.protocol+"//"+l.host}catch(E){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!==typeof d.data&&(d.data=k.param(d.data,d.traditional)),Jt(Ut,d,t,C),u)return C;for(h in c=k.event&&d.global,c&&0===k.active++&&k.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ht.test(d.type),i=d.url.replace(Rt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace($t,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"===typeof d.data)&&(i+=(Lt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(qt,"$1"),p=(Lt.test(i)?"&":"?")+"_="+Nt.guid+++p),d.url=i+p),d.ifModified&&(k.lastModified[i]&&C.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&C.setRequestHeader("If-None-Match",k.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&C.setRequestHeader("Content-Type",d.contentType),C.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Yt+"; q=0.01":""):d.accepts["*"]),d.headers)C.setRequestHeader(h,d.headers[h]);if(d.beforeSend&&(!1===d.beforeSend.call(f,C,d)||u))return C.abort();if(w="abort",v.add(d.complete),C.done(d.success),C.fail(d.error),r=Jt(Gt,d,t,C),r){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,d]),u)return C;d.async&&d.timeout>0&&(s=n.setTimeout((function(){C.abort("timeout")}),d.timeout));try{u=!1,r.send(b,_)}catch(E){if(u)throw E;_(-1,E)}}else _(-1,"No Transport");function _(e,t,a,l){var h,p,b,D,x,w=t;u||(u=!0,s&&n.clearTimeout(s),r=void 0,o=l||"",C.readyState=e>0?4:0,h=e>=200&&e<300||304===e,a&&(D=Qt(d,C,a)),!h&&k.inArray("script",d.dataTypes)>-1&&(d.converters["text script"]=function(){}),D=en(d,D,C,h),h?(d.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(k.lastModified[i]=x),x=C.getResponseHeader("etag"),x&&(k.etag[i]=x)),204===e||"HEAD"===d.type?w="nocontent":304===e?w="notmodified":(w=D.state,p=D.data,b=D.error,h=!b)):(b=w,!e&&w||(w="error",e<0&&(e=0))),C.status=e,C.statusText=(t||w)+"",h?g.resolveWith(f,[p,w,C]):g.rejectWith(f,[C,w,b]),C.statusCode(y),y=void 0,c&&m.trigger(h?"ajaxSuccess":"ajaxError",[C,d,h?p:b]),v.fireWith(f,[C,w]),c&&(m.trigger("ajaxComplete",[C,d]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var tn={0:200,1223:204},nn=k.ajaxSettings.xhr();v.cors=!!nn&&"withCredentials"in nn,v.ajax=nn=!!nn,k.ajaxTransport((function(e){var t,r;if(v.cors||nn&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!==typeof s.status?o(0,"error"):o(s.status,s.statusText):o(tn[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!==typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(l){if(t)throw l}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=k("`;\n // If the inner JS formatter removes the parens, the expression might change its meaning:\n // f((a + b) / 2) vs f(a + b / 2)\n if (node.extra && node.extra.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\\d+_\\d+_IN_JS$/.test(node.name)) {\n return true;\n }\n\n return false;\n }\n\n if (parent.type === \"ParenthesizedExpression\") {\n return false;\n } // Add parens around the extends clause of a class. It is needed for almost\n // all expressions.\n\n\n if ((parent.type === \"ClassDeclaration\" || parent.type === \"ClassExpression\") && parent.superClass === node && (node.type === \"ArrowFunctionExpression\" || node.type === \"AssignmentExpression\" || node.type === \"AwaitExpression\" || node.type === \"BinaryExpression\" || node.type === \"ConditionalExpression\" || node.type === \"LogicalExpression\" || node.type === \"NewExpression\" || node.type === \"ObjectExpression\" || node.type === \"ParenthesizedExpression\" || node.type === \"SequenceExpression\" || node.type === \"TaggedTemplateExpression\" || node.type === \"UnaryExpression\" || node.type === \"UpdateExpression\" || node.type === \"YieldExpression\")) {\n return true;\n }\n\n if (parent.type === \"ExportDefaultDeclaration\") {\n return (// `export default function` or `export default class` can't be followed by\n // anything after. So an expression like `export default (function(){}).toString()`\n // needs to be followed by a parentheses\n shouldWrapFunctionForExportDefault(path, options) || // `export default (foo, bar)` also needs parentheses\n node.type === \"SequenceExpression\"\n );\n }\n\n if (parent.type === \"Decorator\" && parent.expression === node) {\n let hasCallExpression = false;\n let hasMemberExpression = false;\n let current = node;\n\n while (current) {\n switch (current.type) {\n case \"MemberExpression\":\n hasMemberExpression = true;\n current = current.object;\n break;\n\n case \"CallExpression\":\n if (\n /** @(x().y) */\n hasMemberExpression ||\n /** @(x().y()) */\n hasCallExpression) {\n return true;\n }\n\n hasCallExpression = true;\n current = current.callee;\n break;\n\n case \"Identifier\":\n return false;\n\n default:\n return true;\n }\n }\n\n return true;\n }\n\n if (parent.type === \"ArrowFunctionExpression\" && parent.body === node && node.type !== \"SequenceExpression\" && // these have parens added anyway\n util$1.startsWithNoLookaheadToken(node,\n /* forbidFunctionClassAndDoExpr */\n false) || parent.type === \"ExpressionStatement\" && util$1.startsWithNoLookaheadToken(node,\n /* forbidFunctionClassAndDoExpr */\n true)) {\n return true;\n }\n\n switch (node.type) {\n case \"SpreadElement\":\n case \"SpreadProperty\":\n return parent.type === \"MemberExpression\" && name === \"object\" && parent.object === node;\n\n case \"UpdateExpression\":\n if (parent.type === \"UnaryExpression\") {\n return node.prefix && (node.operator === \"++\" && parent.operator === \"+\" || node.operator === \"--\" && parent.operator === \"-\");\n }\n\n // else fallthrough\n\n case \"UnaryExpression\":\n switch (parent.type) {\n case \"UnaryExpression\":\n return node.operator === parent.operator && (node.operator === \"+\" || node.operator === \"-\");\n\n case \"BindExpression\":\n return true;\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return name === \"object\";\n\n case \"TaggedTemplateExpression\":\n return true;\n\n case \"NewExpression\":\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n return name === \"callee\";\n\n case \"BinaryExpression\":\n return parent.operator === \"**\" && name === \"left\";\n\n case \"TSNonNullExpression\":\n return true;\n\n default:\n return false;\n }\n\n case \"BinaryExpression\":\n {\n if (parent.type === \"UpdateExpression\") {\n return true;\n }\n\n const isLeftOfAForStatement = node => {\n let i = 0;\n\n while (node) {\n const parent = path.getParentNode(i++);\n\n if (!parent) {\n return false;\n }\n\n if (parent.type === \"ForStatement\" && parent.init === node) {\n return true;\n }\n\n node = parent;\n }\n\n return false;\n };\n\n if (node.operator === \"in\" && isLeftOfAForStatement(node)) {\n return true;\n }\n }\n // fallthrough\n\n case \"TSTypeAssertion\":\n case \"TSAsExpression\":\n case \"LogicalExpression\":\n switch (parent.type) {\n case \"ConditionalExpression\":\n return node.type === \"TSAsExpression\";\n\n case \"CallExpression\":\n case \"NewExpression\":\n case \"OptionalCallExpression\":\n return name === \"callee\";\n\n case \"ClassExpression\":\n case \"ClassDeclaration\":\n return name === \"superClass\" && parent.superClass === node;\n\n case \"TSTypeAssertion\":\n case \"TaggedTemplateExpression\":\n case \"UnaryExpression\":\n case \"JSXSpreadAttribute\":\n case \"SpreadElement\":\n case \"SpreadProperty\":\n case \"BindExpression\":\n case \"AwaitExpression\":\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"UpdateExpression\":\n return true;\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return name === \"object\";\n\n case \"AssignmentExpression\":\n return parent.left === node && (node.type === \"TSTypeAssertion\" || node.type === \"TSAsExpression\");\n\n case \"LogicalExpression\":\n if (node.type === \"LogicalExpression\") {\n return parent.operator !== node.operator;\n }\n\n // else fallthrough\n\n case \"BinaryExpression\":\n {\n if (!node.operator && node.type !== \"TSTypeAssertion\") {\n return true;\n }\n\n const po = parent.operator;\n const pp = util$1.getPrecedence(po);\n const no = node.operator;\n const np = util$1.getPrecedence(no);\n\n if (pp > np) {\n return true;\n }\n\n if (pp === np && name === \"right\") {\n assert.strictEqual(parent.right, node);\n return true;\n }\n\n if (pp === np && !util$1.shouldFlatten(po, no)) {\n return true;\n }\n\n if (pp < np && no === \"%\") {\n return po === \"+\" || po === \"-\";\n } // Add parenthesis when working with bitwise operators\n // It's not strictly needed but helps with code understanding\n\n\n if (util$1.isBitwiseOperator(po)) {\n return true;\n }\n\n return false;\n }\n\n default:\n return false;\n }\n\n case \"SequenceExpression\":\n switch (parent.type) {\n case \"ReturnStatement\":\n return false;\n\n case \"ForStatement\":\n // Although parentheses wouldn't hurt around sequence\n // expressions in the head of for loops, traditional style\n // dictates that e.g. i++, j++ should not be wrapped with\n // parentheses.\n return false;\n\n case \"ExpressionStatement\":\n return name !== \"expression\";\n\n case \"ArrowFunctionExpression\":\n // We do need parentheses, but SequenceExpressions are handled\n // specially when printing bodies of arrow functions.\n return name !== \"body\";\n\n default:\n // Otherwise err on the side of overparenthesization, adding\n // explicit exceptions above if this proves overzealous.\n return true;\n }\n\n case \"YieldExpression\":\n if (parent.type === \"UnaryExpression\" || parent.type === \"AwaitExpression\" || parent.type === \"TSAsExpression\" || parent.type === \"TSNonNullExpression\") {\n return true;\n }\n\n // else fallthrough\n\n case \"AwaitExpression\":\n switch (parent.type) {\n case \"TaggedTemplateExpression\":\n case \"UnaryExpression\":\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n case \"SpreadElement\":\n case \"SpreadProperty\":\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"BindExpression\":\n return true;\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return name === \"object\";\n\n case \"NewExpression\":\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n return name === \"callee\";\n\n case \"ConditionalExpression\":\n return parent.test === node;\n\n default:\n return false;\n }\n\n case \"TSJSDocFunctionType\":\n case \"TSConditionalType\":\n if (parent.type === \"TSConditionalType\" && node === parent.extendsType) {\n return true;\n }\n\n // fallthrough\n\n case \"TSFunctionType\":\n case \"TSConstructorType\":\n if (parent.type === \"TSConditionalType\" && node === parent.checkType) {\n return true;\n }\n\n // fallthrough\n\n case \"TSUnionType\":\n case \"TSIntersectionType\":\n if (parent.type === \"TSUnionType\" || parent.type === \"TSIntersectionType\") {\n return true;\n }\n\n // fallthrough\n\n case \"TSTypeOperator\":\n case \"TSInferType\":\n return parent.type === \"TSArrayType\" || parent.type === \"TSOptionalType\" || parent.type === \"TSRestType\" || parent.type === \"TSIndexedAccessType\" && node === parent.objectType || parent.type === \"TSTypeOperator\" || parent.type === \"TSTypeAnnotation\" && /^TSJSDoc/.test(path.getParentNode(1).type);\n\n case \"ArrayTypeAnnotation\":\n return parent.type === \"NullableTypeAnnotation\";\n\n case \"IntersectionTypeAnnotation\":\n case \"UnionTypeAnnotation\":\n return parent.type === \"ArrayTypeAnnotation\" || parent.type === \"NullableTypeAnnotation\" || parent.type === \"IntersectionTypeAnnotation\" || parent.type === \"UnionTypeAnnotation\";\n\n case \"NullableTypeAnnotation\":\n return parent.type === \"ArrayTypeAnnotation\";\n\n case \"FunctionTypeAnnotation\":\n {\n const ancestor = parent.type === \"NullableTypeAnnotation\" ? path.getParentNode(1) : parent;\n return ancestor.type === \"UnionTypeAnnotation\" || ancestor.type === \"IntersectionTypeAnnotation\" || ancestor.type === \"ArrayTypeAnnotation\" || // We should check ancestor's parent to know whether the parentheses\n // are really needed, but since ??T doesn't make sense this check\n // will almost never be true.\n ancestor.type === \"NullableTypeAnnotation\";\n }\n\n case \"StringLiteral\":\n case \"NumericLiteral\":\n case \"Literal\":\n if (typeof node.value === \"string\" && parent.type === \"ExpressionStatement\" && ( // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2\n // See corresponding workaround in printer.js case: \"Literal\"\n options.parser !== \"typescript\" && !parent.directive || options.parser === \"typescript\" && options.originalText.charAt(options.locStart(node) - 1) === \"(\")) {\n // To avoid becoming a directive\n const grandParent = path.getParentNode(1);\n return grandParent.type === \"Program\" || grandParent.type === \"BlockStatement\";\n }\n\n return parent.type === \"MemberExpression\" && typeof node.value === \"number\" && name === \"object\" && parent.object === node;\n\n case \"AssignmentExpression\":\n {\n const grandParent = path.getParentNode(1);\n\n if (parent.type === \"ArrowFunctionExpression\" && parent.body === node) {\n return true;\n } else if (parent.type === \"ClassProperty\" && parent.key === node && parent.computed) {\n return false;\n } else if (parent.type === \"TSPropertySignature\" && parent.name === node) {\n return false;\n } else if (parent.type === \"ForStatement\" && (parent.init === node || parent.update === node)) {\n return false;\n } else if (parent.type === \"ExpressionStatement\") {\n return node.left.type === \"ObjectPattern\";\n } else if (parent.type === \"TSPropertySignature\" && parent.key === node) {\n return false;\n } else if (parent.type === \"AssignmentExpression\") {\n return false;\n } else if (parent.type === \"SequenceExpression\" && grandParent && grandParent.type === \"ForStatement\" && (grandParent.init === parent || grandParent.update === parent)) {\n return false;\n } else if (parent.type === \"Property\" && parent.value === node) {\n return false;\n } else if (parent.type === \"NGChainedExpression\") {\n return false;\n }\n\n return true;\n }\n\n case \"ConditionalExpression\":\n switch (parent.type) {\n case \"TaggedTemplateExpression\":\n case \"UnaryExpression\":\n case \"SpreadElement\":\n case \"SpreadProperty\":\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n case \"NGPipeExpression\":\n case \"ExportDefaultDeclaration\":\n case \"AwaitExpression\":\n case \"JSXSpreadAttribute\":\n case \"TSTypeAssertion\":\n case \"TypeCastExpression\":\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n return true;\n\n case \"NewExpression\":\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n return name === \"callee\";\n\n case \"ConditionalExpression\":\n return name === \"test\" && parent.test === node;\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return name === \"object\";\n\n default:\n return false;\n }\n\n case \"FunctionExpression\":\n switch (parent.type) {\n case \"NewExpression\":\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n // Not always necessary, but it's clearer to the reader if IIFEs are wrapped in parentheses.\n // Is necessary if it is `expression` of `ExpressionStatement`.\n return name === \"callee\";\n\n case \"TaggedTemplateExpression\":\n return true;\n // This is basically a kind of IIFE.\n\n default:\n return false;\n }\n\n case \"ArrowFunctionExpression\":\n switch (parent.type) {\n case \"NewExpression\":\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n return name === \"callee\";\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return name === \"object\";\n\n case \"TSAsExpression\":\n case \"BindExpression\":\n case \"TaggedTemplateExpression\":\n case \"UnaryExpression\":\n case \"LogicalExpression\":\n case \"BinaryExpression\":\n case \"AwaitExpression\":\n case \"TSTypeAssertion\":\n return true;\n\n case \"ConditionalExpression\":\n return name === \"test\";\n\n default:\n return false;\n }\n\n case \"ClassExpression\":\n switch (parent.type) {\n case \"NewExpression\":\n return name === \"callee\" && parent.callee === node;\n\n default:\n return false;\n }\n\n case \"OptionalMemberExpression\":\n case \"OptionalCallExpression\":\n if (parent.type === \"MemberExpression\" && name === \"object\" || (parent.type === \"CallExpression\" || parent.type === \"NewExpression\") && name === \"callee\") {\n return true;\n }\n\n // fallthrough\n\n case \"CallExpression\":\n case \"MemberExpression\":\n case \"TaggedTemplateExpression\":\n case \"TSNonNullExpression\":\n if ((parent.type === \"BindExpression\" || parent.type === \"NewExpression\") && name === \"callee\") {\n let object = node;\n\n while (object) {\n switch (object.type) {\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n return true;\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n case \"BindExpression\":\n object = object.object;\n break;\n // tagged templates are basically member expressions from a grammar perspective\n // see https://tc39.github.io/ecma262/#prod-MemberExpression\n\n case \"TaggedTemplateExpression\":\n object = object.tag;\n break;\n\n case \"TSNonNullExpression\":\n object = object.expression;\n break;\n\n default:\n return false;\n }\n }\n }\n\n return false;\n\n case \"BindExpression\":\n return (parent.type === \"BindExpression\" || parent.type === \"NewExpression\") && name === \"callee\" || (parent.type === \"MemberExpression\" || parent.type === \"OptionalMemberExpression\") && name === \"object\";\n\n case \"NGPipeExpression\":\n if (parent.type === \"NGRoot\" || parent.type === \"NGMicrosyntaxExpression\" || parent.type === \"ObjectProperty\" || parent.type === \"ArrayExpression\" || (parent.type === \"CallExpression\" || parent.type === \"OptionalCallExpression\") && parent.arguments[name] === node || parent.type === \"NGPipeExpression\" && name === \"right\" || parent.type === \"MemberExpression\" && name === \"property\" || parent.type === \"AssignmentExpression\") {\n return false;\n }\n\n return true;\n\n case \"JSXFragment\":\n case \"JSXElement\":\n return name === \"callee\" || parent.type !== \"ArrayExpression\" && parent.type !== \"ArrowFunctionExpression\" && parent.type !== \"AssignmentExpression\" && parent.type !== \"AssignmentPattern\" && parent.type !== \"BinaryExpression\" && parent.type !== \"CallExpression\" && parent.type !== \"NewExpression\" && parent.type !== \"ConditionalExpression\" && parent.type !== \"ExpressionStatement\" && parent.type !== \"JsExpressionRoot\" && parent.type !== \"JSXAttribute\" && parent.type !== \"JSXElement\" && parent.type !== \"JSXExpressionContainer\" && parent.type !== \"JSXFragment\" && parent.type !== \"LogicalExpression\" && parent.type !== \"ObjectProperty\" && parent.type !== \"OptionalCallExpression\" && parent.type !== \"Property\" && parent.type !== \"ReturnStatement\" && parent.type !== \"ThrowStatement\" && parent.type !== \"TypeCastExpression\" && parent.type !== \"VariableDeclarator\" && parent.type !== \"YieldExpression\";\n\n case \"TypeAnnotation\":\n return name === \"returnType\" && parent.type === \"ArrowFunctionExpression\" && includesFunctionTypeInObjectType(node);\n }\n\n return false;\n }\n\n function isStatement(node) {\n return node.type === \"BlockStatement\" || node.type === \"BreakStatement\" || node.type === \"ClassBody\" || node.type === \"ClassDeclaration\" || node.type === \"ClassMethod\" || node.type === \"ClassProperty\" || node.type === \"ClassPrivateProperty\" || node.type === \"ContinueStatement\" || node.type === \"DebuggerStatement\" || node.type === \"DeclareClass\" || node.type === \"DeclareExportAllDeclaration\" || node.type === \"DeclareExportDeclaration\" || node.type === \"DeclareFunction\" || node.type === \"DeclareInterface\" || node.type === \"DeclareModule\" || node.type === \"DeclareModuleExports\" || node.type === \"DeclareVariable\" || node.type === \"DoWhileStatement\" || node.type === \"EnumDeclaration\" || node.type === \"ExportAllDeclaration\" || node.type === \"ExportDefaultDeclaration\" || node.type === \"ExportNamedDeclaration\" || node.type === \"ExpressionStatement\" || node.type === \"ForInStatement\" || node.type === \"ForOfStatement\" || node.type === \"ForStatement\" || node.type === \"FunctionDeclaration\" || node.type === \"IfStatement\" || node.type === \"ImportDeclaration\" || node.type === \"InterfaceDeclaration\" || node.type === \"LabeledStatement\" || node.type === \"MethodDefinition\" || node.type === \"ReturnStatement\" || node.type === \"SwitchStatement\" || node.type === \"ThrowStatement\" || node.type === \"TryStatement\" || node.type === \"TSDeclareFunction\" || node.type === \"TSEnumDeclaration\" || node.type === \"TSImportEqualsDeclaration\" || node.type === \"TSInterfaceDeclaration\" || node.type === \"TSModuleDeclaration\" || node.type === \"TSNamespaceExportDeclaration\" || node.type === \"TypeAlias\" || node.type === \"VariableDeclaration\" || node.type === \"WhileStatement\" || node.type === \"WithStatement\";\n }\n\n function includesFunctionTypeInObjectType(node) {\n return hasNode$1(node, n1 => n1.type === \"ObjectTypeAnnotation\" && hasNode$1(n1, n2 => n2.type === \"FunctionTypeAnnotation\" || undefined) || undefined);\n }\n\n function endsWithRightBracket(node) {\n switch (node.type) {\n case \"ObjectExpression\":\n return true;\n\n default:\n return false;\n }\n }\n\n function isFollowedByRightBracket(path) {\n const node = path.getValue();\n const parent = path.getParentNode();\n const name = path.getName();\n\n switch (parent.type) {\n case \"NGPipeExpression\":\n if (typeof name === \"number\" && parent.arguments[name] === node && parent.arguments.length - 1 === name) {\n return path.callParent(isFollowedByRightBracket);\n }\n\n break;\n\n case \"ObjectProperty\":\n if (name === \"value\") {\n const parentParent = path.getParentNode(1);\n return parentParent.properties[parentParent.properties.length - 1] === parent;\n }\n\n break;\n\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n if (name === \"right\") {\n return path.callParent(isFollowedByRightBracket);\n }\n\n break;\n\n case \"ConditionalExpression\":\n if (name === \"alternate\") {\n return path.callParent(isFollowedByRightBracket);\n }\n\n break;\n\n case \"UnaryExpression\":\n if (parent.prefix) {\n return path.callParent(isFollowedByRightBracket);\n }\n\n break;\n }\n\n return false;\n }\n\n function shouldWrapFunctionForExportDefault(path, options) {\n const node = path.getValue();\n const parent = path.getParentNode();\n\n if (node.type === \"FunctionExpression\" || node.type === \"ClassExpression\") {\n return parent.type === \"ExportDefaultDeclaration\" || // in some cases the function is already wrapped\n // (e.g. `export default (function() {})();`)\n // in this case we don't need to add extra parens\n !needsParens(path, options);\n }\n\n if (!hasNakedLeftSide$1(node) || parent.type !== \"ExportDefaultDeclaration\" && needsParens(path, options)) {\n return false;\n }\n\n return path.call(childPath => shouldWrapFunctionForExportDefault(childPath, options), ...getLeftSidePathName$1(path, node));\n }\n\n var needsParens_1 = needsParens;\n\n const {\n builders: {\n concat: concat$c,\n join: join$8,\n line: line$8\n }\n } = document;\n\n function printHtmlBinding(path, options, print) {\n const node = path.getValue();\n\n if (options.__onHtmlBindingRoot && path.getName() === null) {\n options.__onHtmlBindingRoot(node, options);\n }\n\n if (node.type !== \"File\") {\n return;\n }\n\n if (options.__isVueForBindingLeft) {\n return path.call(functionDeclarationPath => {\n const {\n params\n } = functionDeclarationPath.getValue();\n return concat$c([params.length > 1 ? \"(\" : \"\", join$8(concat$c([\",\", line$8]), functionDeclarationPath.map(print, \"params\")), params.length > 1 ? \")\" : \"\"]);\n }, \"program\", \"body\", 0);\n }\n\n if (options.__isVueSlotScope) {\n return path.call(functionDeclarationPath => join$8(concat$c([\",\", line$8]), functionDeclarationPath.map(print, \"params\")), \"program\", \"body\", 0);\n }\n } // based on https://github.com/prettier/prettier/blob/master/src/language-html/syntax-vue.js isVueEventBindingExpression()\n\n\n function isVueEventBindingExpression$2(node) {\n switch (node.type) {\n case \"MemberExpression\":\n switch (node.property.type) {\n case \"Identifier\":\n case \"NumericLiteral\":\n case \"StringLiteral\":\n return isVueEventBindingExpression$2(node.object);\n }\n\n return false;\n\n case \"Identifier\":\n return true;\n\n default:\n return false;\n }\n }\n\n var htmlBinding = {\n isVueEventBindingExpression: isVueEventBindingExpression$2,\n printHtmlBinding\n };\n\n function preprocess$1(ast, options) {\n switch (options.parser) {\n case \"json\":\n case \"json5\":\n case \"json-stringify\":\n case \"__js_expression\":\n case \"__vue_expression\":\n return Object.assign({}, ast, {\n type: options.parser.startsWith(\"__\") ? \"JsExpressionRoot\" : \"JsonRoot\",\n node: ast,\n comments: [],\n rootMarker: options.rootMarker\n });\n\n default:\n return ast;\n }\n }\n\n var preprocess_1$1 = preprocess$1;\n\n const {\n shouldFlatten: shouldFlatten$1,\n getNextNonSpaceNonCommentCharacter: getNextNonSpaceNonCommentCharacter$1,\n hasNewline: hasNewline$5,\n hasNewlineInRange: hasNewlineInRange$3,\n getLast: getLast$3,\n getStringWidth: getStringWidth$3,\n printString: printString$2,\n printNumber: printNumber$2,\n hasIgnoreComment: hasIgnoreComment$4,\n hasNodeIgnoreComment: hasNodeIgnoreComment$2,\n getPenultimate: getPenultimate$1,\n startsWithNoLookaheadToken: startsWithNoLookaheadToken$1,\n getIndentSize: getIndentSize$2,\n getPreferredQuote: getPreferredQuote$1\n } = util$1;\n const {\n isNextLineEmpty: isNextLineEmpty$4,\n isNextLineEmptyAfterIndex: isNextLineEmptyAfterIndex$2,\n getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$3\n } = utilShared;\n const {\n insertPragma: insertPragma$7\n } = pragma;\n const {\n printHtmlBinding: printHtmlBinding$1,\n isVueEventBindingExpression: isVueEventBindingExpression$3\n } = htmlBinding;\n const {\n classChildNeedsASIProtection: classChildNeedsASIProtection$1,\n classPropMayCauseASIProblems: classPropMayCauseASIProblems$1,\n conditionalExpressionChainContainsJSX: conditionalExpressionChainContainsJSX$1,\n getFlowVariance: getFlowVariance$1,\n getLeftSidePathName: getLeftSidePathName$2,\n getParentExportDeclaration: getParentExportDeclaration$1,\n getTypeScriptMappedTypeModifier: getTypeScriptMappedTypeModifier$1,\n hasDanglingComments: hasDanglingComments$1,\n hasFlowAnnotationComment: hasFlowAnnotationComment$1,\n hasFlowShorthandAnnotationComment: hasFlowShorthandAnnotationComment$2,\n hasLeadingComment: hasLeadingComment$3,\n hasLeadingOwnLineComment: hasLeadingOwnLineComment$1,\n hasNakedLeftSide: hasNakedLeftSide$2,\n hasNewlineBetweenOrAfterDecorators: hasNewlineBetweenOrAfterDecorators$1,\n hasNgSideEffect: hasNgSideEffect$1,\n hasPrettierIgnore: hasPrettierIgnore$5,\n hasTrailingComment: hasTrailingComment$1,\n identity: identity$2,\n isBinaryish: isBinaryish$1,\n isCallOrOptionalCallExpression: isCallOrOptionalCallExpression$1,\n isEmptyJSXElement: isEmptyJSXElement$1,\n isExportDeclaration: isExportDeclaration$1,\n isFlowAnnotationComment: isFlowAnnotationComment$1,\n isFunctionCompositionArgs: isFunctionCompositionArgs$1,\n isFunctionNotation: isFunctionNotation$1,\n isFunctionOrArrowExpression: isFunctionOrArrowExpression$1,\n isGetterOrSetter: isGetterOrSetter$1,\n isJestEachTemplateLiteral: isJestEachTemplateLiteral$1,\n isJSXNode: isJSXNode$1,\n isJSXWhitespaceExpression: isJSXWhitespaceExpression$1,\n isLastStatement: isLastStatement$1,\n isLiteral: isLiteral$1,\n isLongCurriedCallExpression: isLongCurriedCallExpression$1,\n isMeaningfulJSXText: isMeaningfulJSXText$1,\n isMemberExpressionChain: isMemberExpressionChain$1,\n isMemberish: isMemberish$1,\n isNgForOf: isNgForOf$1,\n isNumericLiteral: isNumericLiteral$1,\n isObjectType: isObjectType$1,\n isObjectTypePropertyAFunction: isObjectTypePropertyAFunction$1,\n isSimpleCallArgument: isSimpleCallArgument$1,\n isSimpleFlowType: isSimpleFlowType$1,\n isSimpleTemplateLiteral: isSimpleTemplateLiteral$1,\n isStringLiteral: isStringLiteral$1,\n isStringPropSafeToCoerceToIdentifier: isStringPropSafeToCoerceToIdentifier$1,\n isTemplateOnItsOwnLine: isTemplateOnItsOwnLine$1,\n isTestCall: isTestCall$1,\n isTheOnlyJSXElementInMarkdown: isTheOnlyJSXElementInMarkdown$1,\n isTSXFile: isTSXFile$1,\n isTypeAnnotationAFunction: isTypeAnnotationAFunction$1,\n matchJsxWhitespaceRegex: matchJsxWhitespaceRegex$1,\n needsHardlineAfterDanglingComment: needsHardlineAfterDanglingComment$1,\n rawText: rawText$1,\n returnArgumentHasLeadingComment: returnArgumentHasLeadingComment$1\n } = utils$5;\n const needsQuoteProps = new WeakMap();\n const {\n builders: {\n concat: concat$d,\n join: join$9,\n line: line$9,\n hardline: hardline$9,\n softline: softline$6,\n literalline: literalline$4,\n group: group$b,\n indent: indent$7,\n align: align$1,\n conditionalGroup: conditionalGroup$1,\n fill: fill$4,\n ifBreak: ifBreak$6,\n breakParent: breakParent$3,\n lineSuffixBoundary: lineSuffixBoundary$1,\n addAlignmentToDoc: addAlignmentToDoc$2,\n dedent: dedent$2\n },\n utils: {\n willBreak: willBreak$1,\n isLineNext: isLineNext$1,\n isEmpty: isEmpty$1,\n removeLines: removeLines$2\n },\n printer: {\n printDocToString: printDocToString$2\n }\n } = document;\n let uid = 0;\n\n function shouldPrintComma$1(options, level) {\n level = level || \"es5\";\n\n switch (options.trailingComma) {\n case \"all\":\n if (level === \"all\") {\n return true;\n }\n\n // fallthrough\n\n case \"es5\":\n if (level === \"es5\") {\n return true;\n }\n\n // fallthrough\n\n case \"none\":\n default:\n return false;\n }\n }\n\n function genericPrint$3(path, options, printPath, args) {\n const node = path.getValue();\n let needsParens = false;\n const linesWithoutParens = printPathNoParens(path, options, printPath, args);\n\n if (!node || isEmpty$1(linesWithoutParens)) {\n return linesWithoutParens;\n }\n\n const parentExportDecl = getParentExportDeclaration$1(path);\n const decorators = [];\n\n if (node.type === \"ClassMethod\" || node.type === \"ClassPrivateMethod\" || node.type === \"ClassProperty\" || node.type === \"TSAbstractClassProperty\" || node.type === \"ClassPrivateProperty\" || node.type === \"MethodDefinition\" || node.type === \"TSAbstractMethodDefinition\" || node.type === \"TSDeclareMethod\") ; else if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration and the decorator\n // was written before the export, the export will be responsible\n // for printing the decorators.\n !(parentExportDecl && options.locStart(parentExportDecl, {\n ignoreDecorators: true\n }) > options.locStart(node.decorators[0]))) {\n const shouldBreak = node.type === \"ClassExpression\" || node.type === \"ClassDeclaration\" || hasNewlineBetweenOrAfterDecorators$1(node, options);\n const separator = shouldBreak ? hardline$9 : line$9;\n path.each(decoratorPath => {\n let decorator = decoratorPath.getValue();\n\n if (decorator.expression) {\n decorator = decorator.expression;\n } else {\n decorator = decorator.callee;\n }\n\n decorators.push(printPath(decoratorPath), separator);\n }, \"decorators\");\n\n if (parentExportDecl) {\n decorators.unshift(hardline$9);\n }\n } else if (isExportDeclaration$1(node) && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0 && // Only print decorators here if they were written before the export,\n // otherwise they are printed by the node.declaration\n options.locStart(node, {\n ignoreDecorators: true\n }) > options.locStart(node.declaration.decorators[0])) {\n // Export declarations are responsible for printing any decorators\n // that logically apply to node.declaration.\n path.each(decoratorPath => {\n const decorator = decoratorPath.getValue();\n const prefix = decorator.type === \"Decorator\" ? \"\" : \"@\";\n decorators.push(prefix, printPath(decoratorPath), hardline$9);\n }, \"declaration\", \"decorators\");\n } else {\n // Nodes with decorators can't have parentheses, so we can avoid\n // computing pathNeedsParens() except in this case.\n needsParens = needsParens_1(path, options);\n }\n\n const parts = [];\n\n if (needsParens) {\n parts.unshift(\"(\");\n }\n\n parts.push(linesWithoutParens);\n\n if (needsParens) {\n const node = path.getValue();\n\n if (hasFlowShorthandAnnotationComment$2(node)) {\n parts.push(\" /*\");\n parts.push(node.trailingComments[0].value.trimStart());\n parts.push(\"*/\");\n node.trailingComments[0].printed = true;\n }\n\n parts.push(\")\");\n }\n\n if (decorators.length > 0) {\n return group$b(concat$d(decorators.concat(parts)));\n }\n\n return concat$d(parts);\n }\n\n function printDecorators(path, options, print) {\n const node = path.getValue();\n return group$b(concat$d([join$9(line$9, path.map(print, \"decorators\")), hasNewlineBetweenOrAfterDecorators$1(node, options) ? hardline$9 : line$9]));\n }\n /**\n * The following is the shared logic for\n * ternary operators, namely ConditionalExpression\n * and TSConditionalType\n * @typedef {Object} OperatorOptions\n * @property {() => Array} beforeParts - Parts to print before the `?`.\n * @property {(breakClosingParen: boolean) => Array} afterParts - Parts to print after the conditional expression.\n * @property {boolean} shouldCheckJsx - Whether to check for and print in JSX mode.\n * @property {string} conditionalNodeType - The type of the conditional expression node, ie \"ConditionalExpression\" or \"TSConditionalType\".\n * @property {string} consequentNodePropertyName - The property at which the consequent node can be found on the main node, eg \"consequent\".\n * @property {string} alternateNodePropertyName - The property at which the alternate node can be found on the main node, eg \"alternate\".\n * @property {string[]} testNodePropertyNames - The properties at which the test nodes can be found on the main node, eg \"test\".\n * @param {FastPath} path - The path to the ConditionalExpression/TSConditionalType node.\n * @param {Options} options - Prettier options\n * @param {Function} print - Print function to call recursively\n * @param {OperatorOptions} operatorOptions\n * @returns Doc\n */\n\n\n function printTernaryOperator(path, options, print, operatorOptions) {\n const node = path.getValue();\n const consequentNode = node[operatorOptions.consequentNodePropertyName];\n const alternateNode = node[operatorOptions.alternateNodePropertyName];\n const parts = []; // We print a ConditionalExpression in either \"JSX mode\" or \"normal mode\".\n // See tests/jsx/conditional-expression.js for more info.\n\n let jsxMode = false;\n const parent = path.getParentNode();\n const isParentTest = parent.type === operatorOptions.conditionalNodeType && operatorOptions.testNodePropertyNames.some(prop => parent[prop] === node);\n let forceNoIndent = parent.type === operatorOptions.conditionalNodeType && !isParentTest; // Find the outermost non-ConditionalExpression parent, and the outermost\n // ConditionalExpression parent. We'll use these to determine if we should\n // print in JSX mode.\n\n let currentParent;\n let previousParent;\n let i = 0;\n\n do {\n previousParent = currentParent || node;\n currentParent = path.getParentNode(i);\n i++;\n } while (currentParent && currentParent.type === operatorOptions.conditionalNodeType && operatorOptions.testNodePropertyNames.every(prop => currentParent[prop] !== previousParent));\n\n const firstNonConditionalParent = currentParent || parent;\n const lastConditionalParent = previousParent;\n\n if (operatorOptions.shouldCheckJsx && (isJSXNode$1(node[operatorOptions.testNodePropertyNames[0]]) || isJSXNode$1(consequentNode) || isJSXNode$1(alternateNode) || conditionalExpressionChainContainsJSX$1(lastConditionalParent))) {\n jsxMode = true;\n forceNoIndent = true; // Even though they don't need parens, we wrap (almost) everything in\n // parens when using ?: within JSX, because the parens are analogous to\n // curly braces in an if statement.\n\n const wrap = doc => concat$d([ifBreak$6(\"(\", \"\"), indent$7(concat$d([softline$6, doc])), softline$6, ifBreak$6(\")\", \"\")]); // The only things we don't wrap are:\n // * Nested conditional expressions in alternates\n // * null\n // * undefined\n\n\n const isNil = node => node.type === \"NullLiteral\" || node.type === \"Literal\" && node.value === null || node.type === \"Identifier\" && node.name === \"undefined\";\n\n parts.push(\" ? \", isNil(consequentNode) ? path.call(print, operatorOptions.consequentNodePropertyName) : wrap(path.call(print, operatorOptions.consequentNodePropertyName)), \" : \", alternateNode.type === operatorOptions.conditionalNodeType || isNil(alternateNode) ? path.call(print, operatorOptions.alternateNodePropertyName) : wrap(path.call(print, operatorOptions.alternateNodePropertyName)));\n } else {\n // normal mode\n const part = concat$d([line$9, \"? \", consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6(\"\", \"(\") : \"\", align$1(2, path.call(print, operatorOptions.consequentNodePropertyName)), consequentNode.type === operatorOptions.conditionalNodeType ? ifBreak$6(\"\", \")\") : \"\", line$9, \": \", alternateNode.type === operatorOptions.conditionalNodeType ? path.call(print, operatorOptions.alternateNodePropertyName) : align$1(2, path.call(print, operatorOptions.alternateNodePropertyName))]);\n parts.push(parent.type !== operatorOptions.conditionalNodeType || parent[operatorOptions.alternateNodePropertyName] === node || isParentTest ? part : options.useTabs ? dedent$2(indent$7(part)) : align$1(Math.max(0, options.tabWidth - 2), part));\n } // We want a whole chain of ConditionalExpressions to all\n // break if any of them break. That means we should only group around the\n // outer-most ConditionalExpression.\n\n\n const maybeGroup = doc => parent === firstNonConditionalParent ? group$b(doc) : doc; // Break the closing paren to keep the chain right after it:\n // (a\n // ? b\n // : c\n // ).call()\n\n\n const breakClosingParen = !jsxMode && (parent.type === \"MemberExpression\" || parent.type === \"OptionalMemberExpression\" || parent.type === \"NGPipeExpression\" && parent.left === node) && !parent.computed;\n const result = maybeGroup(concat$d([].concat((testDoc =>\n /**\n * a\n * ? b\n * : multiline\n * test\n * node\n * ^^ align(2)\n * ? d\n * : e\n */\n parent.type === operatorOptions.conditionalNodeType && parent[operatorOptions.alternateNodePropertyName] === node ? align$1(2, testDoc) : testDoc)(concat$d(operatorOptions.beforeParts())), forceNoIndent ? concat$d(parts) : indent$7(concat$d(parts)), operatorOptions.afterParts(breakClosingParen))));\n return isParentTest ? group$b(concat$d([indent$7(concat$d([softline$6, result])), softline$6])) : result;\n }\n\n function printPathNoParens(path, options, print, args) {\n const n = path.getValue();\n const semi = options.semi ? \";\" : \"\";\n\n if (!n) {\n return \"\";\n }\n\n if (typeof n === \"string\") {\n return n;\n }\n\n const htmlBinding = printHtmlBinding$1(path, options, print);\n\n if (htmlBinding) {\n return htmlBinding;\n }\n\n let parts = [];\n\n switch (n.type) {\n case \"JsExpressionRoot\":\n return path.call(print, \"node\");\n\n case \"JsonRoot\":\n return concat$d([path.call(print, \"node\"), hardline$9]);\n\n case \"File\":\n // Print @babel/parser's InterpreterDirective here so that\n // leading comments on the `Program` node get printed after the hashbang.\n if (n.program && n.program.interpreter) {\n parts.push(path.call(programPath => programPath.call(print, \"interpreter\"), \"program\"));\n }\n\n parts.push(path.call(print, \"program\"));\n return concat$d(parts);\n\n case \"Program\":\n // Babel 6\n if (n.directives) {\n path.each(childPath => {\n parts.push(print(childPath), semi, hardline$9);\n\n if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options.locEnd)) {\n parts.push(hardline$9);\n }\n }, \"directives\");\n }\n\n parts.push(path.call(bodyPath => {\n return printStatementSequence(bodyPath, options, print);\n }, \"body\"));\n parts.push(comments.printDanglingComments(path, options,\n /* sameIndent */\n true)); // Only force a trailing newline if there were any contents.\n\n if (!n.body.every(({\n type\n }) => type === \"EmptyStatement\") || n.comments) {\n parts.push(hardline$9);\n }\n\n return concat$d(parts);\n // Babel extension.\n\n case \"EmptyStatement\":\n return \"\";\n\n case \"ExpressionStatement\":\n // Detect Flow-parsed directives\n if (n.directive) {\n return concat$d([nodeStr(n.expression, options, true), semi]);\n }\n\n if (options.parser === \"__vue_event_binding\") {\n const parent = path.getParentNode();\n\n if (parent.type === \"Program\" && parent.body.length === 1 && parent.body[0] === n) {\n return concat$d([path.call(print, \"expression\"), isVueEventBindingExpression$3(n.expression) ? \";\" : \"\"]);\n }\n } // Do not append semicolon after the only JSX element in a program\n\n\n return concat$d([path.call(print, \"expression\"), isTheOnlyJSXElementInMarkdown$1(options, path) ? \"\" : semi]);\n // Babel non-standard node. Used for Closure-style type casts. See postprocess.js.\n\n case \"ParenthesizedExpression\":\n {\n const shouldHug = !n.expression.comments;\n\n if (shouldHug) {\n return concat$d([\"(\", path.call(print, \"expression\"), \")\"]);\n }\n\n return group$b(concat$d([\"(\", indent$7(concat$d([softline$6, path.call(print, \"expression\")])), softline$6, \")\"]));\n }\n\n case \"AssignmentExpression\":\n return printAssignment(n.left, path.call(print, \"left\"), concat$d([\" \", n.operator]), n.right, path.call(print, \"right\"), options);\n\n case \"BinaryExpression\":\n case \"LogicalExpression\":\n case \"NGPipeExpression\":\n {\n const parent = path.getParentNode();\n const parentParent = path.getParentNode(1);\n const isInsideParenthesis = n !== parent.body && (parent.type === \"IfStatement\" || parent.type === \"WhileStatement\" || parent.type === \"SwitchStatement\" || parent.type === \"DoWhileStatement\");\n const parts = printBinaryishExpressions(path, print, options,\n /* isNested */\n false, isInsideParenthesis); // if (\n // this.hasPlugin(\"dynamicImports\") && this.lookahead().type === tt.parenLeft\n // ) {\n //\n // looks super weird, we want to break the children if the parent breaks\n //\n // if (\n // this.hasPlugin(\"dynamicImports\") &&\n // this.lookahead().type === tt.parenLeft\n // ) {\n\n if (isInsideParenthesis) {\n return concat$d(parts);\n } // Break between the parens in\n // unaries or in a member or specific call expression, i.e.\n //\n // (\n // a &&\n // b &&\n // c\n // ).call()\n\n\n if ((parent.type === \"CallExpression\" || parent.type === \"OptionalCallExpression\") && parent.callee === n || parent.type === \"UnaryExpression\" || (parent.type === \"MemberExpression\" || parent.type === \"OptionalMemberExpression\") && !parent.computed) {\n return group$b(concat$d([indent$7(concat$d([softline$6, concat$d(parts)])), softline$6]));\n } // Avoid indenting sub-expressions in some cases where the first sub-expression is already\n // indented accordingly. We should indent sub-expressions where the first case isn't indented.\n\n\n const shouldNotIndent = parent.type === \"ReturnStatement\" || parent.type === \"ThrowStatement\" || parent.type === \"JSXExpressionContainer\" && parentParent.type === \"JSXAttribute\" || n.operator !== \"|\" && parent.type === \"JsExpressionRoot\" || n.type !== \"NGPipeExpression\" && (parent.type === \"NGRoot\" && options.parser === \"__ng_binding\" || parent.type === \"NGMicrosyntaxExpression\" && parentParent.type === \"NGMicrosyntax\" && parentParent.body.length === 1) || n === parent.body && parent.type === \"ArrowFunctionExpression\" || n !== parent.body && parent.type === \"ForStatement\" || parent.type === \"ConditionalExpression\" && parentParent.type !== \"ReturnStatement\" && parentParent.type !== \"ThrowStatement\" && parentParent.type !== \"CallExpression\" && parentParent.type !== \"OptionalCallExpression\" || parent.type === \"TemplateLiteral\";\n const shouldIndentIfInlining = parent.type === \"AssignmentExpression\" || parent.type === \"VariableDeclarator\" || parent.type === \"ClassProperty\" || parent.type === \"TSAbstractClassProperty\" || parent.type === \"ClassPrivateProperty\" || parent.type === \"ObjectProperty\" || parent.type === \"Property\";\n const samePrecedenceSubExpression = isBinaryish$1(n.left) && shouldFlatten$1(n.operator, n.left.operator);\n\n if (shouldNotIndent || shouldInlineLogicalExpression(n) && !samePrecedenceSubExpression || !shouldInlineLogicalExpression(n) && shouldIndentIfInlining) {\n return group$b(concat$d(parts));\n }\n\n if (parts.length === 0) {\n return \"\";\n } // If the right part is a JSX node, we include it in a separate group to\n // prevent it breaking the whole chain, so we can print the expression like:\n //\n // foo && bar && (\n // \n // \n // \n // )\n\n\n const hasJSX = isJSXNode$1(n.right);\n const rest = concat$d(hasJSX ? parts.slice(1, -1) : parts.slice(1));\n const groupId = Symbol(\"logicalChain-\" + ++uid);\n const chain = group$b(concat$d([// Don't include the initial expression in the indentation\n // level. The first item is guaranteed to be the first\n // left-most expression.\n parts.length > 0 ? parts[0] : \"\", indent$7(rest)]), {\n id: groupId\n });\n\n if (!hasJSX) {\n return chain;\n }\n\n const jsxPart = getLast$3(parts);\n return group$b(concat$d([chain, ifBreak$6(indent$7(jsxPart), jsxPart, {\n groupId\n })]));\n }\n\n case \"AssignmentPattern\":\n return concat$d([path.call(print, \"left\"), \" = \", path.call(print, \"right\")]);\n\n case \"TSTypeAssertion\":\n {\n const shouldBreakAfterCast = !(n.expression.type === \"ArrayExpression\" || n.expression.type === \"ObjectExpression\");\n const castGroup = group$b(concat$d([\"<\", indent$7(concat$d([softline$6, path.call(print, \"typeAnnotation\")])), softline$6, \">\"]));\n const exprContents = concat$d([ifBreak$6(\"(\"), indent$7(concat$d([softline$6, path.call(print, \"expression\")])), softline$6, ifBreak$6(\")\")]);\n\n if (shouldBreakAfterCast) {\n return conditionalGroup$1([concat$d([castGroup, path.call(print, \"expression\")]), concat$d([castGroup, group$b(exprContents, {\n shouldBreak: true\n })]), concat$d([castGroup, path.call(print, \"expression\")])]);\n }\n\n return group$b(concat$d([castGroup, path.call(print, \"expression\")]));\n }\n\n case \"OptionalMemberExpression\":\n case \"MemberExpression\":\n {\n const parent = path.getParentNode();\n let firstNonMemberParent;\n let i = 0;\n\n do {\n firstNonMemberParent = path.getParentNode(i);\n i++;\n } while (firstNonMemberParent && (firstNonMemberParent.type === \"MemberExpression\" || firstNonMemberParent.type === \"OptionalMemberExpression\" || firstNonMemberParent.type === \"TSNonNullExpression\"));\n\n const shouldInline = firstNonMemberParent && (firstNonMemberParent.type === \"NewExpression\" || firstNonMemberParent.type === \"BindExpression\" || firstNonMemberParent.type === \"VariableDeclarator\" && firstNonMemberParent.id.type !== \"Identifier\" || firstNonMemberParent.type === \"AssignmentExpression\" && firstNonMemberParent.left.type !== \"Identifier\") || n.computed || n.object.type === \"Identifier\" && n.property.type === \"Identifier\" && parent.type !== \"MemberExpression\" && parent.type !== \"OptionalMemberExpression\";\n return concat$d([path.call(print, \"object\"), shouldInline ? printMemberLookup(path, options, print) : group$b(indent$7(concat$d([softline$6, printMemberLookup(path, options, print)])))]);\n }\n\n case \"MetaProperty\":\n return concat$d([path.call(print, \"meta\"), \".\", path.call(print, \"property\")]);\n\n case \"BindExpression\":\n if (n.object) {\n parts.push(path.call(print, \"object\"));\n }\n\n parts.push(group$b(indent$7(concat$d([softline$6, printBindExpressionCallee(path, options, print)]))));\n return concat$d(parts);\n\n case \"Identifier\":\n {\n return concat$d([n.name, printOptionalToken(path), printTypeAnnotation(path, options, print)]);\n }\n\n case \"V8IntrinsicIdentifier\":\n return concat$d([\"%\", n.name]);\n\n case \"SpreadElement\":\n case \"SpreadElementPattern\":\n case \"SpreadProperty\":\n case \"SpreadPropertyPattern\":\n case \"RestElement\":\n case \"ObjectTypeSpreadProperty\":\n return concat$d([\"...\", path.call(print, \"argument\"), printTypeAnnotation(path, options, print)]);\n\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n parts.push(printFunctionDeclaration(path, print, options));\n\n if (!n.body) {\n parts.push(semi);\n }\n\n return concat$d(parts);\n\n case \"ArrowFunctionExpression\":\n {\n if (n.async) {\n parts.push(\"async \");\n }\n\n if (shouldPrintParamsWithoutParens(path, options)) {\n parts.push(path.call(print, \"params\", 0));\n } else {\n parts.push(group$b(concat$d([printFunctionParams(path, print, options,\n /* expandLast */\n args && (args.expandLastArg || args.expandFirstArg),\n /* printTypeParams */\n true), printReturnType(path, print, options)])));\n }\n\n const dangling = comments.printDanglingComments(path, options,\n /* sameIndent */\n true, comment => {\n const nextCharacter = getNextNonSpaceNonCommentCharacterIndex$3(options.originalText, comment, options.locEnd);\n return options.originalText.slice(nextCharacter, nextCharacter + 2) === \"=>\";\n });\n\n if (dangling) {\n parts.push(\" \", dangling);\n }\n\n parts.push(\" =>\");\n const body = path.call(bodyPath => print(bodyPath, args), \"body\"); // We want to always keep these types of nodes on the same line\n // as the arrow.\n\n if (!hasLeadingOwnLineComment$1(options.originalText, n.body, options) && (n.body.type === \"ArrayExpression\" || n.body.type === \"ObjectExpression\" || n.body.type === \"BlockStatement\" || isJSXNode$1(n.body) || isTemplateOnItsOwnLine$1(n.body, options.originalText, options) || n.body.type === \"ArrowFunctionExpression\" || n.body.type === \"DoExpression\")) {\n return group$b(concat$d([concat$d(parts), \" \", body]));\n } // We handle sequence expressions as the body of arrows specially,\n // so that the required parentheses end up on their own lines.\n\n\n if (n.body.type === \"SequenceExpression\") {\n return group$b(concat$d([concat$d(parts), group$b(concat$d([\" (\", indent$7(concat$d([softline$6, body])), softline$6, \")\"]))]));\n } // if the arrow function is expanded as last argument, we are adding a\n // level of indentation and need to add a softline to align the closing )\n // with the opening (, or if it's inside a JSXExpression (e.g. an attribute)\n // we should align the expression's closing } with the line with the opening {.\n\n\n const shouldAddSoftLine = (args && args.expandLastArg || path.getParentNode().type === \"JSXExpressionContainer\") && !(n.comments && n.comments.length);\n const printTrailingComma = args && args.expandLastArg && shouldPrintComma$1(options, \"all\"); // In order to avoid confusion between\n // a => a ? a : a\n // a <= a ? a : a\n\n const shouldAddParens = n.body.type === \"ConditionalExpression\" && !startsWithNoLookaheadToken$1(n.body,\n /* forbidFunctionAndClass */\n false);\n return group$b(concat$d([concat$d(parts), group$b(concat$d([indent$7(concat$d([line$9, shouldAddParens ? ifBreak$6(\"\", \"(\") : \"\", body, shouldAddParens ? ifBreak$6(\"\", \")\") : \"\"])), shouldAddSoftLine ? concat$d([ifBreak$6(printTrailingComma ? \",\" : \"\"), softline$6]) : \"\"]))]));\n }\n\n case \"YieldExpression\":\n parts.push(\"yield\");\n\n if (n.delegate) {\n parts.push(\"*\");\n }\n\n if (n.argument) {\n parts.push(\" \", path.call(print, \"argument\"));\n }\n\n return concat$d(parts);\n\n case \"AwaitExpression\":\n {\n parts.push(\"await \", path.call(print, \"argument\"));\n const parent = path.getParentNode();\n\n if ((parent.type === \"CallExpression\" || parent.type === \"OptionalCallExpression\") && parent.callee === n || (parent.type === \"MemberExpression\" || parent.type === \"OptionalMemberExpression\") && parent.object === n) {\n return group$b(concat$d([indent$7(concat$d([softline$6, concat$d(parts)])), softline$6]));\n }\n\n return concat$d(parts);\n }\n\n case \"ImportSpecifier\":\n if (n.importKind) {\n parts.push(path.call(print, \"importKind\"), \" \");\n }\n\n parts.push(path.call(print, \"imported\"));\n\n if (n.local && n.local.name !== n.imported.name) {\n parts.push(\" as \", path.call(print, \"local\"));\n }\n\n return concat$d(parts);\n\n case \"ExportSpecifier\":\n parts.push(path.call(print, \"local\"));\n\n if (n.exported && n.exported.name !== n.local.name) {\n parts.push(\" as \", path.call(print, \"exported\"));\n }\n\n return concat$d(parts);\n\n case \"ImportNamespaceSpecifier\":\n parts.push(\"* as \");\n parts.push(path.call(print, \"local\"));\n return concat$d(parts);\n\n case \"ImportDefaultSpecifier\":\n return path.call(print, \"local\");\n\n case \"TSExportAssignment\":\n return concat$d([\"export = \", path.call(print, \"expression\"), semi]);\n\n case \"ExportDefaultDeclaration\":\n case \"ExportNamedDeclaration\":\n return printExportDeclaration(path, options, print);\n\n case \"ExportAllDeclaration\":\n parts.push(\"export \");\n\n if (n.exportKind === \"type\") {\n parts.push(\"type \");\n }\n\n parts.push(\"* \");\n\n if (n.exported) {\n parts.push(\"as \", path.call(print, \"exported\"), \" \");\n }\n\n parts.push(\"from \", path.call(print, \"source\"), semi);\n return concat$d(parts);\n\n case \"ExportNamespaceSpecifier\":\n case \"ExportDefaultSpecifier\":\n return path.call(print, \"exported\");\n\n case \"ImportDeclaration\":\n {\n parts.push(\"import \");\n\n if (n.importKind && n.importKind !== \"value\") {\n parts.push(n.importKind + \" \");\n }\n\n const standalones = [];\n const grouped = [];\n\n if (n.specifiers && n.specifiers.length > 0) {\n path.each(specifierPath => {\n const value = specifierPath.getValue();\n\n if (value.type === \"ImportDefaultSpecifier\" || value.type === \"ImportNamespaceSpecifier\") {\n standalones.push(print(specifierPath));\n } else {\n grouped.push(print(specifierPath));\n }\n }, \"specifiers\");\n\n if (standalones.length > 0) {\n parts.push(join$9(\", \", standalones));\n }\n\n if (standalones.length > 0 && grouped.length > 0) {\n parts.push(\", \");\n }\n\n if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(node => node.comments)) {\n parts.push(concat$d([\"{\", options.bracketSpacing ? \" \" : \"\", concat$d(grouped), options.bracketSpacing ? \" \" : \"\", \"}\"]));\n } else if (grouped.length >= 1) {\n parts.push(group$b(concat$d([\"{\", indent$7(concat$d([options.bracketSpacing ? line$9 : softline$6, join$9(concat$d([\",\", line$9]), grouped)])), ifBreak$6(shouldPrintComma$1(options) ? \",\" : \"\"), options.bracketSpacing ? line$9 : softline$6, \"}\"])));\n }\n\n parts.push(\" from \");\n } else if (n.importKind && n.importKind === \"type\" || // import {} from 'x'\n /{\\s*}/.test(options.originalText.slice(options.locStart(n), options.locStart(n.source)))) {\n parts.push(\"{} from \");\n }\n\n parts.push(path.call(print, \"source\"), semi);\n return concat$d(parts);\n }\n\n case \"Import\":\n return \"import\";\n\n case \"TSModuleBlock\":\n case \"BlockStatement\":\n {\n const naked = path.call(bodyPath => {\n return printStatementSequence(bodyPath, options, print);\n }, \"body\");\n const hasContent = n.body.find(node => node.type !== \"EmptyStatement\");\n const hasDirectives = n.directives && n.directives.length > 0;\n const parent = path.getParentNode();\n const parentParent = path.getParentNode(1);\n\n if (!hasContent && !hasDirectives && !hasDanglingComments$1(n) && (parent.type === \"ArrowFunctionExpression\" || parent.type === \"FunctionExpression\" || parent.type === \"FunctionDeclaration\" || parent.type === \"ObjectMethod\" || parent.type === \"ClassMethod\" || parent.type === \"ClassPrivateMethod\" || parent.type === \"ForStatement\" || parent.type === \"WhileStatement\" || parent.type === \"DoWhileStatement\" || parent.type === \"DoExpression\" || parent.type === \"CatchClause\" && !parentParent.finalizer || parent.type === \"TSModuleDeclaration\")) {\n return \"{}\";\n }\n\n parts.push(\"{\"); // Babel 6\n\n if (hasDirectives) {\n path.each(childPath => {\n parts.push(indent$7(concat$d([hardline$9, print(childPath), semi])));\n\n if (isNextLineEmpty$4(options.originalText, childPath.getValue(), options.locEnd)) {\n parts.push(hardline$9);\n }\n }, \"directives\");\n }\n\n if (hasContent) {\n parts.push(indent$7(concat$d([hardline$9, naked])));\n }\n\n parts.push(comments.printDanglingComments(path, options));\n parts.push(hardline$9, \"}\");\n return concat$d(parts);\n }\n\n case \"ReturnStatement\":\n return concat$d([\"return\", printReturnAndThrowArgument(path, options, print)]);\n\n case \"NewExpression\":\n case \"OptionalCallExpression\":\n case \"CallExpression\":\n {\n const isNew = n.type === \"NewExpression\";\n const optional = printOptionalToken(path);\n\n if ( // We want to keep CommonJS- and AMD-style require calls, and AMD-style\n // define calls, as a unit.\n // e.g. `define([\"some/lib\", (lib) => {`\n !isNew && n.callee.type === \"Identifier\" && (n.callee.name === \"require\" || n.callee.name === \"define\") || // Template literals as single arguments\n n.arguments.length === 1 && isTemplateOnItsOwnLine$1(n.arguments[0], options.originalText, options) || // Keep test declarations on a single line\n // e.g. `it('long name', () => {`\n !isNew && isTestCall$1(n, path.getParentNode())) {\n return concat$d([isNew ? \"new \" : \"\", path.call(print, \"callee\"), optional, printFunctionTypeParameters(path, options, print), concat$d([\"(\", join$9(\", \", path.map(print, \"arguments\")), \")\"])]);\n } // Inline Flow annotation comments following Identifiers in Call nodes need to\n // stay with the Identifier. For example:\n //\n // foo /*:: */(bar);\n //\n // Here, we ensure that such comments stay between the Identifier and the Callee.\n\n\n const isIdentifierWithFlowAnnotation = n.callee.type === \"Identifier\" && hasFlowAnnotationComment$1(n.callee.trailingComments);\n\n if (isIdentifierWithFlowAnnotation) {\n n.callee.trailingComments[0].printed = true;\n } // We detect calls on member lookups and possibly print them in a\n // special chain format. See `printMemberChain` for more info.\n\n\n if (!isNew && isMemberish$1(n.callee) && !path.call(path => needsParens_1(path, options), \"callee\")) {\n return printMemberChain(path, options, print);\n }\n\n const contents = concat$d([isNew ? \"new \" : \"\", path.call(print, \"callee\"), optional, isIdentifierWithFlowAnnotation ? \"/*:: \".concat(n.callee.trailingComments[0].value.slice(2).trim(), \" */\") : \"\", printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); // We group here when the callee is itself a call expression.\n // See `isLongCurriedCallExpression` for more info.\n\n if (isCallOrOptionalCallExpression$1(n.callee)) {\n return group$b(contents);\n }\n\n return contents;\n }\n\n case \"TSInterfaceDeclaration\":\n if (n.declare) {\n parts.push(\"declare \");\n }\n\n parts.push(n.abstract ? \"abstract \" : \"\", printTypeScriptModifiers(path, options, print), \"interface \", path.call(print, \"id\"), n.typeParameters ? path.call(print, \"typeParameters\") : \"\", \" \");\n\n if (n.extends && n.extends.length) {\n parts.push(group$b(indent$7(concat$d([softline$6, \"extends \", (n.extends.length === 1 ? identity$2 : indent$7)(join$9(concat$d([\",\", line$9]), path.map(print, \"extends\"))), \" \"]))));\n }\n\n parts.push(path.call(print, \"body\"));\n return concat$d(parts);\n\n case \"ObjectTypeInternalSlot\":\n return concat$d([n.static ? \"static \" : \"\", \"[[\", path.call(print, \"id\"), \"]]\", printOptionalToken(path), n.method ? \"\" : \": \", path.call(print, \"value\")]);\n\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"ObjectTypeAnnotation\":\n case \"TSInterfaceBody\":\n case \"TSTypeLiteral\":\n {\n let propertiesField;\n\n if (n.type === \"TSTypeLiteral\") {\n propertiesField = \"members\";\n } else if (n.type === \"TSInterfaceBody\") {\n propertiesField = \"body\";\n } else {\n propertiesField = \"properties\";\n }\n\n const isTypeAnnotation = n.type === \"ObjectTypeAnnotation\";\n const fields = [];\n\n if (isTypeAnnotation) {\n fields.push(\"indexers\", \"callProperties\", \"internalSlots\");\n }\n\n fields.push(propertiesField);\n const firstProperty = fields.map(field => n[field][0]).sort((a, b) => options.locStart(a) - options.locStart(b))[0];\n const parent = path.getParentNode(0);\n const isFlowInterfaceLikeBody = isTypeAnnotation && parent && (parent.type === \"InterfaceDeclaration\" || parent.type === \"DeclareInterface\" || parent.type === \"DeclareClass\") && path.getName() === \"body\";\n const shouldBreak = n.type === \"TSInterfaceBody\" || isFlowInterfaceLikeBody || n.type === \"ObjectPattern\" && parent.type !== \"FunctionDeclaration\" && parent.type !== \"FunctionExpression\" && parent.type !== \"ArrowFunctionExpression\" && parent.type !== \"ObjectMethod\" && parent.type !== \"ClassMethod\" && parent.type !== \"ClassPrivateMethod\" && parent.type !== \"AssignmentPattern\" && parent.type !== \"CatchClause\" && n.properties.some(property => property.value && (property.value.type === \"ObjectPattern\" || property.value.type === \"ArrayPattern\")) || n.type !== \"ObjectPattern\" && firstProperty && hasNewlineInRange$3(options.originalText, options.locStart(n), options.locStart(firstProperty));\n const separator = isFlowInterfaceLikeBody ? \";\" : n.type === \"TSInterfaceBody\" || n.type === \"TSTypeLiteral\" ? ifBreak$6(semi, \";\") : \",\";\n const leftBrace = n.exact ? \"{|\" : \"{\";\n const rightBrace = n.exact ? \"|}\" : \"}\"; // Unfortunately, things are grouped together in the ast can be\n // interleaved in the source code. So we need to reorder them before\n // printing them.\n\n const propsAndLoc = [];\n fields.forEach(field => {\n path.each(childPath => {\n const node = childPath.getValue();\n propsAndLoc.push({\n node,\n printed: print(childPath),\n loc: options.locStart(node)\n });\n }, field);\n });\n let separatorParts = [];\n const props = propsAndLoc.sort((a, b) => a.loc - b.loc).map(prop => {\n const result = concat$d(separatorParts.concat(group$b(prop.printed)));\n separatorParts = [separator, line$9];\n\n if ((prop.node.type === \"TSPropertySignature\" || prop.node.type === \"TSMethodSignature\" || prop.node.type === \"TSConstructSignatureDeclaration\") && hasNodeIgnoreComment$2(prop.node)) {\n separatorParts.shift();\n }\n\n if (isNextLineEmpty$4(options.originalText, prop.node, options.locEnd)) {\n separatorParts.push(hardline$9);\n }\n\n return result;\n });\n\n if (n.inexact) {\n let printed;\n\n if (hasDanglingComments$1(n)) {\n const hasLineComments = !n.comments.every(comments$1.isBlockComment);\n const printedDanglingComments = comments.printDanglingComments(path, options,\n /* sameIndent */\n true);\n printed = concat$d([printedDanglingComments, hasLineComments || hasNewline$5(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$9 : line$9, \"...\"]);\n } else {\n printed = \"...\";\n }\n\n props.push(concat$d(separatorParts.concat(printed)));\n }\n\n const lastElem = getLast$3(n[propertiesField]);\n const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === \"RestElement\" || hasNodeIgnoreComment$2(lastElem)));\n let content;\n\n if (props.length === 0) {\n if (!hasDanglingComments$1(n)) {\n return concat$d([leftBrace, rightBrace, printTypeAnnotation(path, options, print)]);\n }\n\n content = group$b(concat$d([leftBrace, comments.printDanglingComments(path, options), softline$6, rightBrace, printOptionalToken(path), printTypeAnnotation(path, options, print)]));\n } else {\n content = concat$d([leftBrace, indent$7(concat$d([options.bracketSpacing ? line$9 : softline$6, concat$d(props)])), ifBreak$6(canHaveTrailingSeparator && (separator !== \",\" || shouldPrintComma$1(options)) ? separator : \"\"), concat$d([options.bracketSpacing ? line$9 : softline$6, rightBrace]), printOptionalToken(path), printTypeAnnotation(path, options, print)]);\n } // If we inline the object as first argument of the parent, we don't want\n // to create another group so that the object breaks before the return\n // type\n\n\n if (path.match(node => node.type === \"ObjectPattern\" && !node.decorators, (node, name, number) => shouldHugArguments(node) && (name === \"params\" || name === \"parameters\") && number === 0) || path.match(shouldHugType, (node, name) => name === \"typeAnnotation\", (node, name) => name === \"typeAnnotation\", (node, name, number) => shouldHugArguments(node) && (name === \"params\" || name === \"parameters\") && number === 0)) {\n return content;\n }\n\n return group$b(content, {\n shouldBreak\n });\n }\n // Babel 6\n\n case \"ObjectProperty\": // Non-standard AST node type.\n\n case \"Property\":\n if (n.method || n.kind === \"get\" || n.kind === \"set\") {\n return printMethod(path, options, print);\n }\n\n if (n.shorthand) {\n parts.push(path.call(print, \"value\"));\n } else {\n parts.push(printAssignment(n.key, printPropertyKey(path, options, print), \":\", n.value, path.call(print, \"value\"), options));\n }\n\n return concat$d(parts);\n // Babel 6\n\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n case \"MethodDefinition\":\n case \"TSAbstractMethodDefinition\":\n case \"TSDeclareMethod\":\n if (n.decorators && n.decorators.length !== 0) {\n parts.push(printDecorators(path, options, print));\n }\n\n if (n.accessibility) {\n parts.push(n.accessibility + \" \");\n }\n\n if (n.static) {\n parts.push(\"static \");\n }\n\n if (n.type === \"TSAbstractMethodDefinition\" || n.abstract) {\n parts.push(\"abstract \");\n }\n\n parts.push(printMethod(path, options, print));\n return concat$d(parts);\n\n case \"ObjectMethod\":\n return printMethod(path, options, print);\n\n case \"Decorator\":\n return concat$d([\"@\", path.call(print, \"expression\"), path.call(print, \"callee\")]);\n\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n if (n.elements.length === 0) {\n if (!hasDanglingComments$1(n)) {\n parts.push(\"[]\");\n } else {\n parts.push(group$b(concat$d([\"[\", comments.printDanglingComments(path, options), softline$6, \"]\"])));\n }\n } else {\n const lastElem = getLast$3(n.elements);\n const canHaveTrailingComma = !(lastElem && lastElem.type === \"RestElement\"); // JavaScript allows you to have empty elements in an array which\n // changes its length based on the number of commas. The algorithm\n // is that if the last argument is null, we need to force insert\n // a comma to ensure JavaScript recognizes it.\n // [,].length === 1\n // [1,].length === 1\n // [1,,].length === 2\n //\n // Note that getLast returns null if the array is empty, but\n // we already check for an empty array just above so we are safe\n\n const needsForcedTrailingComma = canHaveTrailingComma && lastElem === null;\n const shouldBreak = n.elements.length > 1 && n.elements.every((element, i, elements) => {\n const elementType = element && element.type;\n\n if (elementType !== \"ArrayExpression\" && elementType !== \"ObjectExpression\") {\n return false;\n }\n\n const nextElement = elements[i + 1];\n\n if (nextElement && elementType !== nextElement.type) {\n return false;\n }\n\n const itemsKey = elementType === \"ArrayExpression\" ? \"elements\" : \"properties\";\n return element[itemsKey] && element[itemsKey].length > 1;\n });\n parts.push(group$b(concat$d([\"[\", indent$7(concat$d([softline$6, printArrayItems(path, options, \"elements\", print)])), needsForcedTrailingComma ? \",\" : \"\", ifBreak$6(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma$1(options) ? \",\" : \"\"), comments.printDanglingComments(path, options,\n /* sameIndent */\n true), softline$6, \"]\"]), {\n shouldBreak\n }));\n }\n\n parts.push(printOptionalToken(path), printTypeAnnotation(path, options, print));\n return concat$d(parts);\n\n case \"SequenceExpression\":\n {\n const parent = path.getParentNode(0);\n\n if (parent.type === \"ExpressionStatement\" || parent.type === \"ForStatement\") {\n // For ExpressionStatements and for-loop heads, which are among\n // the few places a SequenceExpression appears unparenthesized, we want\n // to indent expressions after the first.\n const parts = [];\n path.each(p => {\n if (p.getName() === 0) {\n parts.push(print(p));\n } else {\n parts.push(\",\", indent$7(concat$d([line$9, print(p)])));\n }\n }, \"expressions\");\n return group$b(concat$d(parts));\n }\n\n return group$b(concat$d([join$9(concat$d([\",\", line$9]), path.map(print, \"expressions\"))]));\n }\n\n case \"ThisExpression\":\n return \"this\";\n\n case \"Super\":\n return \"super\";\n\n case \"NullLiteral\":\n // Babel 6 Literal split\n return \"null\";\n\n case \"RegExpLiteral\":\n // Babel 6 Literal split\n return printRegex(n);\n\n case \"NumericLiteral\":\n // Babel 6 Literal split\n return printNumber$2(n.extra.raw);\n\n case \"BigIntLiteral\":\n // babel: n.extra.raw, typescript: n.raw, flow: n.bigint\n return (n.bigint || (n.extra ? n.extra.raw : n.raw)).toLowerCase();\n\n case \"BooleanLiteral\": // Babel 6 Literal split\n\n case \"StringLiteral\": // Babel 6 Literal split\n\n case \"Literal\":\n {\n if (n.regex) {\n return printRegex(n.regex);\n }\n\n if (typeof n.value === \"number\") {\n return printNumber$2(n.raw);\n }\n\n if (typeof n.value !== \"string\") {\n return \"\" + n.value;\n } // TypeScript workaround for https://github.com/JamesHenry/typescript-estree/issues/2\n // See corresponding workaround in needs-parens.js\n\n\n const grandParent = path.getParentNode(1);\n const isTypeScriptDirective = options.parser === \"typescript\" && typeof n.value === \"string\" && grandParent && (grandParent.type === \"Program\" || grandParent.type === \"BlockStatement\");\n return nodeStr(n, options, isTypeScriptDirective);\n }\n\n case \"Directive\":\n return path.call(print, \"value\");\n // Babel 6\n\n case \"DirectiveLiteral\":\n return nodeStr(n, options);\n\n case \"UnaryExpression\":\n parts.push(n.operator);\n\n if (/[a-z]$/.test(n.operator)) {\n parts.push(\" \");\n }\n\n if (n.argument.comments && n.argument.comments.length > 0) {\n parts.push(group$b(concat$d([\"(\", indent$7(concat$d([softline$6, path.call(print, \"argument\")])), softline$6, \")\"])));\n } else {\n parts.push(path.call(print, \"argument\"));\n }\n\n return concat$d(parts);\n\n case \"UpdateExpression\":\n parts.push(path.call(print, \"argument\"), n.operator);\n\n if (n.prefix) {\n parts.reverse();\n }\n\n return concat$d(parts);\n\n case \"ConditionalExpression\":\n return printTernaryOperator(path, options, print, {\n beforeParts: () => [path.call(print, \"test\")],\n afterParts: breakClosingParen => [breakClosingParen ? softline$6 : \"\"],\n shouldCheckJsx: true,\n conditionalNodeType: \"ConditionalExpression\",\n consequentNodePropertyName: \"consequent\",\n alternateNodePropertyName: \"alternate\",\n testNodePropertyNames: [\"test\"]\n });\n\n case \"VariableDeclaration\":\n {\n const printed = path.map(childPath => {\n return print(childPath);\n }, \"declarations\"); // We generally want to terminate all variable declarations with a\n // semicolon, except when they in the () part of for loops.\n\n const parentNode = path.getParentNode();\n const isParentForLoop = parentNode.type === \"ForStatement\" || parentNode.type === \"ForInStatement\" || parentNode.type === \"ForOfStatement\";\n const hasValue = n.declarations.some(decl => decl.init);\n let firstVariable;\n\n if (printed.length === 1 && !n.declarations[0].comments) {\n firstVariable = printed[0];\n } else if (printed.length > 0) {\n // Indent first var to comply with eslint one-var rule\n firstVariable = indent$7(printed[0]);\n }\n\n parts = [n.declare ? \"declare \" : \"\", n.kind, firstVariable ? concat$d([\" \", firstVariable]) : \"\", indent$7(concat$d(printed.slice(1).map(p => concat$d([\",\", hasValue && !isParentForLoop ? hardline$9 : line$9, p]))))];\n\n if (!(isParentForLoop && parentNode.body !== n)) {\n parts.push(semi);\n }\n\n return group$b(concat$d(parts));\n }\n\n case \"TSTypeAliasDeclaration\":\n {\n if (n.declare) {\n parts.push(\"declare \");\n }\n\n const printed = printAssignmentRight(n.id, n.typeAnnotation, n.typeAnnotation && path.call(print, \"typeAnnotation\"), options);\n parts.push(\"type \", path.call(print, \"id\"), path.call(print, \"typeParameters\"), \" =\", printed, semi);\n return group$b(concat$d(parts));\n }\n\n case \"VariableDeclarator\":\n return printAssignment(n.id, path.call(print, \"id\"), \" =\", n.init, n.init && path.call(print, \"init\"), options);\n\n case \"WithStatement\":\n return group$b(concat$d([\"with (\", path.call(print, \"object\"), \")\", adjustClause(n.body, path.call(print, \"body\"))]));\n\n case \"IfStatement\":\n {\n const con = adjustClause(n.consequent, path.call(print, \"consequent\"));\n const opening = group$b(concat$d([\"if (\", group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, \"test\")])), softline$6])), \")\", con]));\n parts.push(opening);\n\n if (n.alternate) {\n const commentOnOwnLine = hasTrailingComment$1(n.consequent) && n.consequent.comments.some(comment => comment.trailing && !comments$1.isBlockComment(comment)) || needsHardlineAfterDanglingComment$1(n);\n const elseOnSameLine = n.consequent.type === \"BlockStatement\" && !commentOnOwnLine;\n parts.push(elseOnSameLine ? \" \" : hardline$9);\n\n if (hasDanglingComments$1(n)) {\n parts.push(comments.printDanglingComments(path, options, true), commentOnOwnLine ? hardline$9 : \" \");\n }\n\n parts.push(\"else\", group$b(adjustClause(n.alternate, path.call(print, \"alternate\"), n.alternate.type === \"IfStatement\")));\n }\n\n return concat$d(parts);\n }\n\n case \"ForStatement\":\n {\n const body = adjustClause(n.body, path.call(print, \"body\")); // We want to keep dangling comments above the loop to stay consistent.\n // Any comment positioned between the for statement and the parentheses\n // is going to be printed before the statement.\n\n const dangling = comments.printDanglingComments(path, options,\n /* sameLine */\n true);\n const printedComments = dangling ? concat$d([dangling, softline$6]) : \"\";\n\n if (!n.init && !n.test && !n.update) {\n return concat$d([printedComments, group$b(concat$d([\"for (;;)\", body]))]);\n }\n\n return concat$d([printedComments, group$b(concat$d([\"for (\", group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, \"init\"), \";\", line$9, path.call(print, \"test\"), \";\", line$9, path.call(print, \"update\")])), softline$6])), \")\", body]))]);\n }\n\n case \"WhileStatement\":\n return group$b(concat$d([\"while (\", group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, \"test\")])), softline$6])), \")\", adjustClause(n.body, path.call(print, \"body\"))]));\n\n case \"ForInStatement\":\n // Note: esprima can't actually parse \"for each (\".\n return group$b(concat$d([n.each ? \"for each (\" : \"for (\", path.call(print, \"left\"), \" in \", path.call(print, \"right\"), \")\", adjustClause(n.body, path.call(print, \"body\"))]));\n\n case \"ForOfStatement\":\n return group$b(concat$d([\"for\", n.await ? \" await\" : \"\", \" (\", path.call(print, \"left\"), \" of \", path.call(print, \"right\"), \")\", adjustClause(n.body, path.call(print, \"body\"))]));\n\n case \"DoWhileStatement\":\n {\n const clause = adjustClause(n.body, path.call(print, \"body\"));\n const doBody = group$b(concat$d([\"do\", clause]));\n parts = [doBody];\n\n if (n.body.type === \"BlockStatement\") {\n parts.push(\" \");\n } else {\n parts.push(hardline$9);\n }\n\n parts.push(\"while (\");\n parts.push(group$b(concat$d([indent$7(concat$d([softline$6, path.call(print, \"test\")])), softline$6])), \")\", semi);\n return concat$d(parts);\n }\n\n case \"DoExpression\":\n return concat$d([\"do \", path.call(print, \"body\")]);\n\n case \"BreakStatement\":\n parts.push(\"break\");\n\n if (n.label) {\n parts.push(\" \", path.call(print, \"label\"));\n }\n\n parts.push(semi);\n return concat$d(parts);\n\n case \"ContinueStatement\":\n parts.push(\"continue\");\n\n if (n.label) {\n parts.push(\" \", path.call(print, \"label\"));\n }\n\n parts.push(semi);\n return concat$d(parts);\n\n case \"LabeledStatement\":\n if (n.body.type === \"EmptyStatement\") {\n return concat$d([path.call(print, \"label\"), \":;\"]);\n }\n\n return concat$d([path.call(print, \"label\"), \": \", path.call(print, \"body\")]);\n\n case \"TryStatement\":\n return concat$d([\"try \", path.call(print, \"block\"), n.handler ? concat$d([\" \", path.call(print, \"handler\")]) : \"\", n.finalizer ? concat$d([\" finally \", path.call(print, \"finalizer\")]) : \"\"]);\n\n case \"CatchClause\":\n if (n.param) {\n const hasComments = n.param.comments && n.param.comments.some(comment => !comments$1.isBlockComment(comment) || comment.leading && hasNewline$5(options.originalText, options.locEnd(comment)) || comment.trailing && hasNewline$5(options.originalText, options.locStart(comment), {\n backwards: true\n }));\n const param = path.call(print, \"param\");\n return concat$d([\"catch \", hasComments ? concat$d([\"(\", indent$7(concat$d([softline$6, param])), softline$6, \") \"]) : concat$d([\"(\", param, \") \"]), path.call(print, \"body\")]);\n }\n\n return concat$d([\"catch \", path.call(print, \"body\")]);\n\n case \"ThrowStatement\":\n return concat$d([\"throw\", printReturnAndThrowArgument(path, options, print)]);\n // Note: ignoring n.lexical because it has no printing consequences.\n\n case \"SwitchStatement\":\n return concat$d([group$b(concat$d([\"switch (\", indent$7(concat$d([softline$6, path.call(print, \"discriminant\")])), softline$6, \")\"])), \" {\", n.cases.length > 0 ? indent$7(concat$d([hardline$9, join$9(hardline$9, path.map(casePath => {\n const caseNode = casePath.getValue();\n return concat$d([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && isNextLineEmpty$4(options.originalText, caseNode, options.locEnd) ? hardline$9 : \"\"]);\n }, \"cases\"))])) : \"\", hardline$9, \"}\"]);\n\n case \"SwitchCase\":\n {\n if (n.test) {\n parts.push(\"case \", path.call(print, \"test\"), \":\");\n } else {\n parts.push(\"default:\");\n }\n\n const consequent = n.consequent.filter(node => node.type !== \"EmptyStatement\");\n\n if (consequent.length > 0) {\n const cons = path.call(consequentPath => {\n return printStatementSequence(consequentPath, options, print);\n }, \"consequent\");\n parts.push(consequent.length === 1 && consequent[0].type === \"BlockStatement\" ? concat$d([\" \", cons]) : indent$7(concat$d([hardline$9, cons])));\n }\n\n return concat$d(parts);\n }\n // JSX extensions below.\n\n case \"DebuggerStatement\":\n return concat$d([\"debugger\", semi]);\n\n case \"JSXAttribute\":\n parts.push(path.call(print, \"name\"));\n\n if (n.value) {\n let res;\n\n if (isStringLiteral$1(n.value)) {\n const raw = rawText$1(n.value); // Unescape all quotes so we get an accurate preferred quote\n\n let final = raw.replace(/'/g, \"'\").replace(/"/g, '\"');\n const quote = getPreferredQuote$1(final, options.jsxSingleQuote ? \"'\" : '\"');\n const escape = quote === \"'\" ? \"'\" : \""\";\n final = final.slice(1, -1).replace(new RegExp(quote, \"g\"), escape);\n res = concat$d([quote, final, quote]);\n } else {\n res = path.call(print, \"value\");\n }\n\n parts.push(\"=\", res);\n }\n\n return concat$d(parts);\n\n case \"JSXIdentifier\":\n return \"\" + n.name;\n\n case \"JSXNamespacedName\":\n return join$9(\":\", [path.call(print, \"namespace\"), path.call(print, \"name\")]);\n\n case \"JSXMemberExpression\":\n return join$9(\".\", [path.call(print, \"object\"), path.call(print, \"property\")]);\n\n case \"TSQualifiedName\":\n return join$9(\".\", [path.call(print, \"left\"), path.call(print, \"right\")]);\n\n case \"JSXSpreadAttribute\":\n case \"JSXSpreadChild\":\n {\n return concat$d([\"{\", path.call(p => {\n const printed = concat$d([\"...\", print(p)]);\n const n = p.getValue();\n\n if (!n.comments || !n.comments.length) {\n return printed;\n }\n\n return concat$d([indent$7(concat$d([softline$6, comments.printComments(p, () => printed, options)])), softline$6]);\n }, n.type === \"JSXSpreadAttribute\" ? \"argument\" : \"expression\"), \"}\"]);\n }\n\n case \"JSXExpressionContainer\":\n {\n const parent = path.getParentNode(0);\n const hasComments = n.expression.comments && n.expression.comments.length > 0;\n const shouldInline = n.expression.type === \"JSXEmptyExpression\" || !hasComments && (n.expression.type === \"ArrayExpression\" || n.expression.type === \"ObjectExpression\" || n.expression.type === \"ArrowFunctionExpression\" || n.expression.type === \"CallExpression\" || n.expression.type === \"OptionalCallExpression\" || n.expression.type === \"FunctionExpression\" || n.expression.type === \"TemplateLiteral\" || n.expression.type === \"TaggedTemplateExpression\" || n.expression.type === \"DoExpression\" || isJSXNode$1(parent) && (n.expression.type === \"ConditionalExpression\" || isBinaryish$1(n.expression)));\n\n if (shouldInline) {\n return group$b(concat$d([\"{\", path.call(print, \"expression\"), lineSuffixBoundary$1, \"}\"]));\n }\n\n return group$b(concat$d([\"{\", indent$7(concat$d([softline$6, path.call(print, \"expression\")])), softline$6, lineSuffixBoundary$1, \"}\"]));\n }\n\n case \"JSXFragment\":\n case \"JSXElement\":\n {\n const elem = comments.printComments(path, () => printJSXElement(path, options, print), options);\n return maybeWrapJSXElementInParens(path, elem, options);\n }\n\n case \"JSXOpeningElement\":\n {\n const n = path.getValue();\n const nameHasComments = n.name && n.name.comments && n.name.comments.length > 0 || n.typeParameters && n.typeParameters.comments && n.typeParameters.comments.length > 0; // Don't break self-closing elements with no attributes and no comments\n\n if (n.selfClosing && !n.attributes.length && !nameHasComments) {\n return concat$d([\"<\", path.call(print, \"name\"), path.call(print, \"typeParameters\"), \" />\"]);\n } // don't break up opening elements with a single long text attribute\n\n\n if (n.attributes && n.attributes.length === 1 && n.attributes[0].value && isStringLiteral$1(n.attributes[0].value) && !n.attributes[0].value.value.includes(\"\\n\") && // We should break for the following cases:\n // \n // \n !nameHasComments && (!n.attributes[0].comments || !n.attributes[0].comments.length)) {\n return group$b(concat$d([\"<\", path.call(print, \"name\"), path.call(print, \"typeParameters\"), \" \", concat$d(path.map(print, \"attributes\")), n.selfClosing ? \" />\" : \">\"]));\n }\n\n const lastAttrHasTrailingComments = n.attributes.length && hasTrailingComment$1(getLast$3(n.attributes));\n const bracketSameLine = // Simple tags (no attributes and no comment in tag name) should be\n // kept unbroken regardless of `jsxBracketSameLine`\n !n.attributes.length && !nameHasComments || options.jsxBracketSameLine && ( // We should print the bracket in a new line for the following cases:\n // \n // \n !nameHasComments || n.attributes.length) && !lastAttrHasTrailingComments; // We should print the opening element expanded if any prop value is a\n // string literal with newlines\n\n const shouldBreak = n.attributes && n.attributes.some(attr => attr.value && isStringLiteral$1(attr.value) && attr.value.value.includes(\"\\n\"));\n return group$b(concat$d([\"<\", path.call(print, \"name\"), path.call(print, \"typeParameters\"), concat$d([indent$7(concat$d(path.map(attr => concat$d([line$9, print(attr)]), \"attributes\"))), n.selfClosing ? line$9 : bracketSameLine ? \">\" : softline$6]), n.selfClosing ? \"/>\" : bracketSameLine ? \"\" : \">\"]), {\n shouldBreak\n });\n }\n\n case \"JSXClosingElement\":\n return concat$d([\"\"]);\n\n case \"JSXOpeningFragment\":\n case \"JSXClosingFragment\":\n {\n const hasComment = n.comments && n.comments.length;\n const hasOwnLineComment = hasComment && !n.comments.every(comments$1.isBlockComment);\n const isOpeningFragment = n.type === \"JSXOpeningFragment\";\n return concat$d([isOpeningFragment ? \"<\" : \"\"]);\n }\n\n case \"JSXText\":\n /* istanbul ignore next */\n throw new Error(\"JSXTest should be handled by JSXElement\");\n\n case \"JSXEmptyExpression\":\n {\n const requiresHardline = n.comments && !n.comments.every(comments$1.isBlockComment);\n return concat$d([comments.printDanglingComments(path, options,\n /* sameIndent */\n !requiresHardline), requiresHardline ? hardline$9 : \"\"]);\n }\n\n case \"ClassBody\":\n if (!n.comments && n.body.length === 0) {\n return \"{}\";\n }\n\n return concat$d([\"{\", n.body.length > 0 ? indent$7(concat$d([hardline$9, path.call(bodyPath => {\n return printStatementSequence(bodyPath, options, print);\n }, \"body\")])) : comments.printDanglingComments(path, options), hardline$9, \"}\"]);\n\n case \"ClassProperty\":\n case \"TSAbstractClassProperty\":\n case \"ClassPrivateProperty\":\n {\n if (n.decorators && n.decorators.length !== 0) {\n parts.push(printDecorators(path, options, print));\n }\n\n if (n.accessibility) {\n parts.push(n.accessibility + \" \");\n }\n\n if (n.declare) {\n parts.push(\"declare \");\n }\n\n if (n.static) {\n parts.push(\"static \");\n }\n\n if (n.type === \"TSAbstractClassProperty\" || n.abstract) {\n parts.push(\"abstract \");\n }\n\n if (n.readonly) {\n parts.push(\"readonly \");\n }\n\n const variance = getFlowVariance$1(n);\n\n if (variance) {\n parts.push(variance);\n }\n\n parts.push(printPropertyKey(path, options, print), printOptionalToken(path), printTypeAnnotation(path, options, print));\n\n if (n.value) {\n parts.push(\" =\", printAssignmentRight(n.key, n.value, path.call(print, \"value\"), options));\n }\n\n parts.push(semi);\n return group$b(concat$d(parts));\n }\n\n case \"ClassDeclaration\":\n case \"ClassExpression\":\n if (n.declare) {\n parts.push(\"declare \");\n }\n\n parts.push(concat$d(printClass(path, options, print)));\n return concat$d(parts);\n\n case \"TSInterfaceHeritage\":\n case \"TSExpressionWithTypeArguments\":\n // Babel AST\n parts.push(path.call(print, \"expression\"));\n\n if (n.typeParameters) {\n parts.push(path.call(print, \"typeParameters\"));\n }\n\n return concat$d(parts);\n\n case \"TemplateElement\":\n return join$9(literalline$4, n.value.raw.split(/\\r?\\n/g));\n\n case \"TemplateLiteral\":\n {\n let expressions = path.map(print, \"expressions\");\n const parentNode = path.getParentNode();\n\n if (isJestEachTemplateLiteral$1(n, parentNode)) {\n const printed = printJestEachTemplateLiteral(n, expressions, options);\n\n if (printed) {\n return printed;\n }\n }\n\n const isSimple = isSimpleTemplateLiteral$1(n);\n\n if (isSimple) {\n expressions = expressions.map(doc => printDocToString$2(doc, Object.assign({}, options, {\n printWidth: Infinity\n })).formatted);\n }\n\n parts.push(lineSuffixBoundary$1, \"`\");\n path.each(childPath => {\n const i = childPath.getName();\n parts.push(print(childPath));\n\n if (i < expressions.length) {\n // For a template literal of the following form:\n // `someQuery {\n // ${call({\n // a,\n // b,\n // })}\n // }`\n // the expression is on its own line (there is a \\n in the previous\n // quasi literal), therefore we want to indent the JavaScript\n // expression inside at the beginning of ${ instead of the beginning\n // of the `.\n const {\n tabWidth\n } = options;\n const quasi = childPath.getValue();\n const indentSize = getIndentSize$2(quasi.value.raw, tabWidth);\n let printed = expressions[i];\n\n if (!isSimple) {\n // Breaks at the template element boundaries (${ and }) are preferred to breaking\n // in the middle of a MemberExpression\n if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === \"MemberExpression\" || n.expressions[i].type === \"OptionalMemberExpression\" || n.expressions[i].type === \"ConditionalExpression\" || n.expressions[i].type === \"SequenceExpression\" || n.expressions[i].type === \"TSAsExpression\" || isBinaryish$1(n.expressions[i])) {\n printed = concat$d([indent$7(concat$d([softline$6, printed])), softline$6]);\n }\n }\n\n const aligned = indentSize === 0 && quasi.value.raw.endsWith(\"\\n\") ? align$1(-Infinity, printed) : addAlignmentToDoc$2(printed, indentSize, tabWidth);\n parts.push(group$b(concat$d([\"${\", aligned, lineSuffixBoundary$1, \"}\"])));\n }\n }, \"quasis\");\n parts.push(\"`\");\n return concat$d(parts);\n }\n // These types are unprintable because they serve as abstract\n // supertypes for other (printable) types.\n\n case \"TaggedTemplateExpression\":\n return concat$d([path.call(print, \"tag\"), path.call(print, \"typeParameters\"), path.call(print, \"quasi\")]);\n\n case \"Node\":\n case \"Printable\":\n case \"SourceLocation\":\n case \"Position\":\n case \"Statement\":\n case \"Function\":\n case \"Pattern\":\n case \"Expression\":\n case \"Declaration\":\n case \"Specifier\":\n case \"NamedSpecifier\":\n case \"Comment\":\n case \"MemberTypeAnnotation\": // Flow\n\n case \"Type\":\n /* istanbul ignore next */\n throw new Error(\"unprintable type: \" + JSON.stringify(n.type));\n // Type Annotations for Facebook Flow, typically stripped out or\n // transformed away before printing.\n\n case \"TypeAnnotation\":\n case \"TSTypeAnnotation\":\n if (n.typeAnnotation) {\n return path.call(print, \"typeAnnotation\");\n }\n /* istanbul ignore next */\n\n\n return \"\";\n\n case \"TSTupleType\":\n case \"TupleTypeAnnotation\":\n {\n const typesField = n.type === \"TSTupleType\" ? \"elementTypes\" : \"types\";\n const hasRest = n[typesField].length > 0 && getLast$3(n[typesField]).type === \"TSRestType\";\n return group$b(concat$d([\"[\", indent$7(concat$d([softline$6, printArrayItems(path, options, typesField, print)])), ifBreak$6(shouldPrintComma$1(options, \"all\") && !hasRest ? \",\" : \"\"), comments.printDanglingComments(path, options,\n /* sameIndent */\n true), softline$6, \"]\"]));\n }\n\n case \"ExistsTypeAnnotation\":\n return \"*\";\n\n case \"EmptyTypeAnnotation\":\n return \"empty\";\n\n case \"AnyTypeAnnotation\":\n return \"any\";\n\n case \"MixedTypeAnnotation\":\n return \"mixed\";\n\n case \"ArrayTypeAnnotation\":\n return concat$d([path.call(print, \"elementType\"), \"[]\"]);\n\n case \"BooleanTypeAnnotation\":\n return \"boolean\";\n\n case \"BooleanLiteralTypeAnnotation\":\n return \"\" + n.value;\n\n case \"DeclareClass\":\n return printFlowDeclaration(path, printClass(path, options, print));\n\n case \"TSDeclareFunction\":\n // For TypeScript the TSDeclareFunction node shares the AST\n // structure with FunctionDeclaration\n return concat$d([n.declare ? \"declare \" : \"\", printFunctionDeclaration(path, print, options), semi]);\n\n case \"DeclareFunction\":\n return printFlowDeclaration(path, [\"function \", path.call(print, \"id\"), n.predicate ? \" \" : \"\", path.call(print, \"predicate\"), semi]);\n\n case \"DeclareModule\":\n return printFlowDeclaration(path, [\"module \", path.call(print, \"id\"), \" \", path.call(print, \"body\")]);\n\n case \"DeclareModuleExports\":\n return printFlowDeclaration(path, [\"module.exports\", \": \", path.call(print, \"typeAnnotation\"), semi]);\n\n case \"DeclareVariable\":\n return printFlowDeclaration(path, [\"var \", path.call(print, \"id\"), semi]);\n\n case \"DeclareExportAllDeclaration\":\n return concat$d([\"declare export * from \", path.call(print, \"source\")]);\n\n case \"DeclareExportDeclaration\":\n return concat$d([\"declare \", printExportDeclaration(path, options, print)]);\n\n case \"DeclareOpaqueType\":\n case \"OpaqueType\":\n {\n parts.push(\"opaque type \", path.call(print, \"id\"), path.call(print, \"typeParameters\"));\n\n if (n.supertype) {\n parts.push(\": \", path.call(print, \"supertype\"));\n }\n\n if (n.impltype) {\n parts.push(\" = \", path.call(print, \"impltype\"));\n }\n\n parts.push(semi);\n\n if (n.type === \"DeclareOpaqueType\") {\n return printFlowDeclaration(path, parts);\n }\n\n return concat$d(parts);\n }\n\n case \"EnumDeclaration\":\n return concat$d([\"enum \", path.call(print, \"id\"), \" \", path.call(print, \"body\")]);\n\n case \"EnumBooleanBody\":\n case \"EnumNumberBody\":\n case \"EnumStringBody\":\n case \"EnumSymbolBody\":\n {\n if (n.type === \"EnumSymbolBody\" || n.explicitType) {\n let type = null;\n\n switch (n.type) {\n case \"EnumBooleanBody\":\n type = \"boolean\";\n break;\n\n case \"EnumNumberBody\":\n type = \"number\";\n break;\n\n case \"EnumStringBody\":\n type = \"string\";\n break;\n\n case \"EnumSymbolBody\":\n type = \"symbol\";\n break;\n }\n\n parts.push(\"of \", type, \" \");\n }\n\n if (n.members.length === 0) {\n parts.push(group$b(concat$d([\"{\", comments.printDanglingComments(path, options), softline$6, \"}\"])));\n } else {\n parts.push(group$b(concat$d([\"{\", indent$7(concat$d([hardline$9, printArrayItems(path, options, \"members\", print), shouldPrintComma$1(options) ? \",\" : \"\"])), comments.printDanglingComments(path, options,\n /* sameIndent */\n true), hardline$9, \"}\"])));\n }\n\n return concat$d(parts);\n }\n\n case \"EnumBooleanMember\":\n case \"EnumNumberMember\":\n case \"EnumStringMember\":\n return concat$d([path.call(print, \"id\"), \" = \", typeof n.init === \"object\" ? path.call(print, \"init\") : String(n.init)]);\n\n case \"EnumDefaultedMember\":\n return path.call(print, \"id\");\n\n case \"FunctionTypeAnnotation\":\n case \"TSFunctionType\":\n {\n // FunctionTypeAnnotation is ambiguous:\n // declare function foo(a: B): void; OR\n // var A: (a: B) => void;\n const parent = path.getParentNode(0);\n const parentParent = path.getParentNode(1);\n const parentParentParent = path.getParentNode(2);\n let isArrowFunctionTypeAnnotation = n.type === \"TSFunctionType\" || !((parent.type === \"ObjectTypeProperty\" || parent.type === \"ObjectTypeInternalSlot\") && !getFlowVariance$1(parent) && !parent.optional && options.locStart(parent) === options.locStart(n) || parent.type === \"ObjectTypeCallProperty\" || parentParentParent && parentParentParent.type === \"DeclareFunction\");\n let needsColon = isArrowFunctionTypeAnnotation && (parent.type === \"TypeAnnotation\" || parent.type === \"TSTypeAnnotation\"); // Sadly we can't put it inside of FastPath::needsColon because we are\n // printing \":\" as part of the expression and it would put parenthesis\n // around :(\n\n const needsParens = needsColon && isArrowFunctionTypeAnnotation && (parent.type === \"TypeAnnotation\" || parent.type === \"TSTypeAnnotation\") && parentParent.type === \"ArrowFunctionExpression\";\n\n if (isObjectTypePropertyAFunction$1(parent, options)) {\n isArrowFunctionTypeAnnotation = true;\n needsColon = true;\n }\n\n if (needsParens) {\n parts.push(\"(\");\n }\n\n parts.push(printFunctionParams(path, print, options,\n /* expandArg */\n false,\n /* printTypeParams */\n true)); // The returnType is not wrapped in a TypeAnnotation, so the colon\n // needs to be added separately.\n\n if (n.returnType || n.predicate || n.typeAnnotation) {\n parts.push(isArrowFunctionTypeAnnotation ? \" => \" : \": \", path.call(print, \"returnType\"), path.call(print, \"predicate\"), path.call(print, \"typeAnnotation\"));\n }\n\n if (needsParens) {\n parts.push(\")\");\n }\n\n return group$b(concat$d(parts));\n }\n\n case \"TSRestType\":\n return concat$d([\"...\", path.call(print, \"typeAnnotation\")]);\n\n case \"TSOptionalType\":\n return concat$d([path.call(print, \"typeAnnotation\"), \"?\"]);\n\n case \"FunctionTypeParam\":\n return concat$d([path.call(print, \"name\"), printOptionalToken(path), n.name ? \": \" : \"\", path.call(print, \"typeAnnotation\")]);\n\n case \"GenericTypeAnnotation\":\n return concat$d([path.call(print, \"id\"), path.call(print, \"typeParameters\")]);\n\n case \"DeclareInterface\":\n case \"InterfaceDeclaration\":\n case \"InterfaceTypeAnnotation\":\n {\n if (n.type === \"DeclareInterface\" || n.declare) {\n parts.push(\"declare \");\n }\n\n parts.push(\"interface\");\n\n if (n.type === \"DeclareInterface\" || n.type === \"InterfaceDeclaration\") {\n parts.push(\" \", path.call(print, \"id\"), path.call(print, \"typeParameters\"));\n }\n\n if (n.extends.length > 0) {\n parts.push(group$b(indent$7(concat$d([line$9, \"extends \", (n.extends.length === 1 ? identity$2 : indent$7)(join$9(concat$d([\",\", line$9]), path.map(print, \"extends\")))]))));\n }\n\n parts.push(\" \", path.call(print, \"body\"));\n return group$b(concat$d(parts));\n }\n\n case \"ClassImplements\":\n case \"InterfaceExtends\":\n return concat$d([path.call(print, \"id\"), path.call(print, \"typeParameters\")]);\n\n case \"TSClassImplements\":\n return concat$d([path.call(print, \"expression\"), path.call(print, \"typeParameters\")]);\n\n case \"TSIntersectionType\":\n case \"IntersectionTypeAnnotation\":\n {\n const types = path.map(print, \"types\");\n const result = [];\n let wasIndented = false;\n\n for (let i = 0; i < types.length; ++i) {\n if (i === 0) {\n result.push(types[i]);\n } else if (isObjectType$1(n.types[i - 1]) && isObjectType$1(n.types[i])) {\n // If both are objects, don't indent\n result.push(concat$d([\" & \", wasIndented ? indent$7(types[i]) : types[i]]));\n } else if (!isObjectType$1(n.types[i - 1]) && !isObjectType$1(n.types[i])) {\n // If no object is involved, go to the next line if it breaks\n result.push(indent$7(concat$d([\" &\", line$9, types[i]])));\n } else {\n // If you go from object to non-object or vis-versa, then inline it\n if (i > 1) {\n wasIndented = true;\n }\n\n result.push(\" & \", i > 1 ? indent$7(types[i]) : types[i]);\n }\n }\n\n return group$b(concat$d(result));\n }\n\n case \"TSUnionType\":\n case \"UnionTypeAnnotation\":\n {\n // single-line variation\n // A | B | C\n // multi-line variation\n // | A\n // | B\n // | C\n const parent = path.getParentNode(); // If there's a leading comment, the parent is doing the indentation\n\n const shouldIndent = parent.type !== \"TypeParameterInstantiation\" && parent.type !== \"TSTypeParameterInstantiation\" && parent.type !== \"GenericTypeAnnotation\" && parent.type !== \"TSTypeReference\" && parent.type !== \"TSTypeAssertion\" && parent.type !== \"TupleTypeAnnotation\" && parent.type !== \"TSTupleType\" && !(parent.type === \"FunctionTypeParam\" && !parent.name) && !((parent.type === \"TypeAlias\" || parent.type === \"VariableDeclarator\" || parent.type === \"TSTypeAliasDeclaration\") && hasLeadingOwnLineComment$1(options.originalText, n, options)); // {\n // a: string\n // } | null | void\n // should be inlined and not be printed in the multi-line variant\n\n const shouldHug = shouldHugType(n); // We want to align the children but without its comment, so it looks like\n // | child1\n // // comment\n // | child2\n\n const printed = path.map(typePath => {\n let printedType = typePath.call(print);\n\n if (!shouldHug) {\n printedType = align$1(2, printedType);\n }\n\n return comments.printComments(typePath, () => printedType, options);\n }, \"types\");\n\n if (shouldHug) {\n return join$9(\" | \", printed);\n }\n\n const shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment$1(options.originalText, n, options);\n const code = concat$d([ifBreak$6(concat$d([shouldAddStartLine ? line$9 : \"\", \"| \"])), join$9(concat$d([line$9, \"| \"]), printed)]);\n\n if (needsParens_1(path, options)) {\n return group$b(concat$d([indent$7(code), softline$6]));\n }\n\n if (parent.type === \"TupleTypeAnnotation\" && parent.types.length > 1 || parent.type === \"TSTupleType\" && parent.elementTypes.length > 1) {\n return group$b(concat$d([indent$7(concat$d([ifBreak$6(concat$d([\"(\", softline$6])), code])), softline$6, ifBreak$6(\")\")]));\n }\n\n return group$b(shouldIndent ? indent$7(code) : code);\n }\n\n case \"NullableTypeAnnotation\":\n return concat$d([\"?\", path.call(print, \"typeAnnotation\")]);\n\n case \"TSNullKeyword\":\n case \"NullLiteralTypeAnnotation\":\n return \"null\";\n\n case \"ThisTypeAnnotation\":\n return \"this\";\n\n case \"NumberTypeAnnotation\":\n return \"number\";\n\n case \"SymbolTypeAnnotation\":\n return \"symbol\";\n\n case \"ObjectTypeCallProperty\":\n if (n.static) {\n parts.push(\"static \");\n }\n\n parts.push(path.call(print, \"value\"));\n return concat$d(parts);\n\n case \"ObjectTypeIndexer\":\n {\n const variance = getFlowVariance$1(n);\n return concat$d([variance || \"\", \"[\", path.call(print, \"id\"), n.id ? \": \" : \"\", path.call(print, \"key\"), \"]: \", path.call(print, \"value\")]);\n }\n\n case \"ObjectTypeProperty\":\n {\n const variance = getFlowVariance$1(n);\n let modifier = \"\";\n\n if (n.proto) {\n modifier = \"proto \";\n } else if (n.static) {\n modifier = \"static \";\n }\n\n return concat$d([modifier, isGetterOrSetter$1(n) ? n.kind + \" \" : \"\", variance || \"\", printPropertyKey(path, options, print), printOptionalToken(path), isFunctionNotation$1(n, options) ? \"\" : \": \", path.call(print, \"value\")]);\n }\n\n case \"QualifiedTypeIdentifier\":\n return concat$d([path.call(print, \"qualification\"), \".\", path.call(print, \"id\")]);\n\n case \"StringLiteralTypeAnnotation\":\n return nodeStr(n, options);\n\n case \"NumberLiteralTypeAnnotation\":\n assert.strictEqual(typeof n.value, \"number\");\n\n if (n.extra != null) {\n return printNumber$2(n.extra.raw);\n }\n\n return printNumber$2(n.raw);\n\n case \"StringTypeAnnotation\":\n return \"string\";\n\n case \"DeclareTypeAlias\":\n case \"TypeAlias\":\n {\n if (n.type === \"DeclareTypeAlias\" || n.declare) {\n parts.push(\"declare \");\n }\n\n const printed = printAssignmentRight(n.id, n.right, path.call(print, \"right\"), options);\n parts.push(\"type \", path.call(print, \"id\"), path.call(print, \"typeParameters\"), \" =\", printed, semi);\n return group$b(concat$d(parts));\n }\n\n case \"TypeCastExpression\":\n {\n return concat$d([\"(\", path.call(print, \"expression\"), printTypeAnnotation(path, options, print), \")\"]);\n }\n\n case \"TypeParameterDeclaration\":\n case \"TypeParameterInstantiation\":\n {\n const value = path.getValue();\n const commentStart = value.range ? options.originalText.slice(0, value.range[0]).lastIndexOf(\"/*\") : -1; // As noted in the TypeCastExpression comments above, we're able to use a normal whitespace regex here\n // because we know for sure that this is a type definition.\n\n const commentSyntax = commentStart >= 0 && options.originalText.slice(commentStart).match(/^\\/\\*\\s*::/);\n\n if (commentSyntax) {\n return concat$d([\"/*:: \", printTypeParameters(path, options, print, \"params\"), \" */\"]);\n }\n\n return printTypeParameters(path, options, print, \"params\");\n }\n\n case \"TSTypeParameterDeclaration\":\n case \"TSTypeParameterInstantiation\":\n return printTypeParameters(path, options, print, \"params\");\n\n case \"TSTypeParameter\":\n case \"TypeParameter\":\n {\n const parent = path.getParentNode();\n\n if (parent.type === \"TSMappedType\") {\n parts.push(\"[\", path.call(print, \"name\"));\n\n if (n.constraint) {\n parts.push(\" in \", path.call(print, \"constraint\"));\n }\n\n parts.push(\"]\");\n return concat$d(parts);\n }\n\n const variance = getFlowVariance$1(n);\n\n if (variance) {\n parts.push(variance);\n }\n\n parts.push(path.call(print, \"name\"));\n\n if (n.bound) {\n parts.push(\": \");\n parts.push(path.call(print, \"bound\"));\n }\n\n if (n.constraint) {\n parts.push(\" extends \", path.call(print, \"constraint\"));\n }\n\n if (n.default) {\n parts.push(\" = \", path.call(print, \"default\"));\n } // Keep comma if the file extension is .tsx and\n // has one type parameter that isn't extend with any types.\n // Because, otherwise formatted result will be invalid as tsx.\n\n\n const grandParent = path.getNode(2);\n\n if (parent.params && parent.params.length === 1 && isTSXFile$1(options) && !n.constraint && grandParent.type === \"ArrowFunctionExpression\") {\n parts.push(\",\");\n }\n\n return concat$d(parts);\n }\n\n case \"TypeofTypeAnnotation\":\n return concat$d([\"typeof \", path.call(print, \"argument\")]);\n\n case \"VoidTypeAnnotation\":\n return \"void\";\n\n case \"InferredPredicate\":\n return \"%checks\";\n // Unhandled types below. If encountered, nodes of these types should\n // be either left alone or desugared into AST types that are fully\n // supported by the pretty-printer.\n\n case \"DeclaredPredicate\":\n return concat$d([\"%checks(\", path.call(print, \"value\"), \")\"]);\n\n case \"TSAbstractKeyword\":\n return \"abstract\";\n\n case \"TSAnyKeyword\":\n return \"any\";\n\n case \"TSAsyncKeyword\":\n return \"async\";\n\n case \"TSBooleanKeyword\":\n return \"boolean\";\n\n case \"TSBigIntKeyword\":\n return \"bigint\";\n\n case \"TSConstKeyword\":\n return \"const\";\n\n case \"TSDeclareKeyword\":\n return \"declare\";\n\n case \"TSExportKeyword\":\n return \"export\";\n\n case \"TSNeverKeyword\":\n return \"never\";\n\n case \"TSNumberKeyword\":\n return \"number\";\n\n case \"TSObjectKeyword\":\n return \"object\";\n\n case \"TSProtectedKeyword\":\n return \"protected\";\n\n case \"TSPrivateKeyword\":\n return \"private\";\n\n case \"TSPublicKeyword\":\n return \"public\";\n\n case \"TSReadonlyKeyword\":\n return \"readonly\";\n\n case \"TSSymbolKeyword\":\n return \"symbol\";\n\n case \"TSStaticKeyword\":\n return \"static\";\n\n case \"TSStringKeyword\":\n return \"string\";\n\n case \"TSUndefinedKeyword\":\n return \"undefined\";\n\n case \"TSUnknownKeyword\":\n return \"unknown\";\n\n case \"TSVoidKeyword\":\n return \"void\";\n\n case \"TSAsExpression\":\n return concat$d([path.call(print, \"expression\"), \" as \", path.call(print, \"typeAnnotation\")]);\n\n case \"TSArrayType\":\n return concat$d([path.call(print, \"elementType\"), \"[]\"]);\n\n case \"TSPropertySignature\":\n {\n if (n.export) {\n parts.push(\"export \");\n }\n\n if (n.accessibility) {\n parts.push(n.accessibility + \" \");\n }\n\n if (n.static) {\n parts.push(\"static \");\n }\n\n if (n.readonly) {\n parts.push(\"readonly \");\n }\n\n parts.push(printPropertyKey(path, options, print), printOptionalToken(path));\n\n if (n.typeAnnotation) {\n parts.push(\": \");\n parts.push(path.call(print, \"typeAnnotation\"));\n } // This isn't valid semantically, but it's in the AST so we can print it.\n\n\n if (n.initializer) {\n parts.push(\" = \", path.call(print, \"initializer\"));\n }\n\n return concat$d(parts);\n }\n\n case \"TSParameterProperty\":\n if (n.accessibility) {\n parts.push(n.accessibility + \" \");\n }\n\n if (n.export) {\n parts.push(\"export \");\n }\n\n if (n.static) {\n parts.push(\"static \");\n }\n\n if (n.readonly) {\n parts.push(\"readonly \");\n }\n\n parts.push(path.call(print, \"parameter\"));\n return concat$d(parts);\n\n case \"TSTypeReference\":\n return concat$d([path.call(print, \"typeName\"), printTypeParameters(path, options, print, \"typeParameters\")]);\n\n case \"TSTypeQuery\":\n return concat$d([\"typeof \", path.call(print, \"exprName\")]);\n\n case \"TSIndexSignature\":\n {\n const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're\n // using them, it makes sense to have a trailing comma. But if you\n // aren't, this is more like a computed property name than an array.\n // So we leave off the trailing comma when there's just one parameter.\n\n const trailingComma = n.parameters.length > 1 ? ifBreak$6(shouldPrintComma$1(options) ? \",\" : \"\") : \"\";\n const parametersGroup = group$b(concat$d([indent$7(concat$d([softline$6, join$9(concat$d([\", \", softline$6]), path.map(print, \"parameters\"))])), trailingComma, softline$6]));\n return concat$d([n.export ? \"export \" : \"\", n.accessibility ? concat$d([n.accessibility, \" \"]) : \"\", n.static ? \"static \" : \"\", n.readonly ? \"readonly \" : \"\", \"[\", n.parameters ? parametersGroup : \"\", n.typeAnnotation ? \"]: \" : \"]\", n.typeAnnotation ? path.call(print, \"typeAnnotation\") : \"\", parent.type === \"ClassBody\" ? semi : \"\"]);\n }\n\n case \"TSTypePredicate\":\n return concat$d([n.asserts ? \"asserts \" : \"\", path.call(print, \"parameterName\"), n.typeAnnotation ? concat$d([\" is \", path.call(print, \"typeAnnotation\")]) : \"\"]);\n\n case \"TSNonNullExpression\":\n return concat$d([path.call(print, \"expression\"), \"!\"]);\n\n case \"TSThisType\":\n return \"this\";\n\n case \"TSImportType\":\n return concat$d([!n.isTypeOf ? \"\" : \"typeof \", \"import(\", path.call(print, n.parameter ? \"parameter\" : \"argument\"), \")\", !n.qualifier ? \"\" : concat$d([\".\", path.call(print, \"qualifier\")]), printTypeParameters(path, options, print, \"typeParameters\")]);\n\n case \"TSLiteralType\":\n return path.call(print, \"literal\");\n\n case \"TSIndexedAccessType\":\n return concat$d([path.call(print, \"objectType\"), \"[\", path.call(print, \"indexType\"), \"]\"]);\n\n case \"TSConstructSignatureDeclaration\":\n case \"TSCallSignatureDeclaration\":\n case \"TSConstructorType\":\n {\n if (n.type !== \"TSCallSignatureDeclaration\") {\n parts.push(\"new \");\n }\n\n parts.push(group$b(printFunctionParams(path, print, options,\n /* expandArg */\n false,\n /* printTypeParams */\n true)));\n\n if (n.returnType || n.typeAnnotation) {\n const isType = n.type === \"TSConstructorType\";\n parts.push(isType ? \" => \" : \": \", path.call(print, \"returnType\"), path.call(print, \"typeAnnotation\"));\n }\n\n return concat$d(parts);\n }\n\n case \"TSTypeOperator\":\n return concat$d([n.operator, \" \", path.call(print, \"typeAnnotation\")]);\n\n case \"TSMappedType\":\n {\n const shouldBreak = hasNewlineInRange$3(options.originalText, options.locStart(n), options.locEnd(n));\n return group$b(concat$d([\"{\", indent$7(concat$d([options.bracketSpacing ? line$9 : softline$6, n.readonly ? concat$d([getTypeScriptMappedTypeModifier$1(n.readonly, \"readonly\"), \" \"]) : \"\", printTypeScriptModifiers(path, options, print), path.call(print, \"typeParameter\"), n.optional ? getTypeScriptMappedTypeModifier$1(n.optional, \"?\") : \"\", n.typeAnnotation ? \": \" : \"\", path.call(print, \"typeAnnotation\"), ifBreak$6(semi, \"\")])), comments.printDanglingComments(path, options,\n /* sameIndent */\n true), options.bracketSpacing ? line$9 : softline$6, \"}\"]), {\n shouldBreak\n });\n }\n\n case \"TSMethodSignature\":\n parts.push(n.accessibility ? concat$d([n.accessibility, \" \"]) : \"\", n.export ? \"export \" : \"\", n.static ? \"static \" : \"\", n.readonly ? \"readonly \" : \"\", n.computed ? \"[\" : \"\", path.call(print, \"key\"), n.computed ? \"]\" : \"\", printOptionalToken(path), printFunctionParams(path, print, options,\n /* expandArg */\n false,\n /* printTypeParams */\n true));\n\n if (n.returnType || n.typeAnnotation) {\n parts.push(\": \", path.call(print, \"returnType\"), path.call(print, \"typeAnnotation\"));\n }\n\n return group$b(concat$d(parts));\n\n case \"TSNamespaceExportDeclaration\":\n parts.push(\"export as namespace \", path.call(print, \"id\"));\n\n if (options.semi) {\n parts.push(\";\");\n }\n\n return group$b(concat$d(parts));\n\n case \"TSEnumDeclaration\":\n if (n.declare) {\n parts.push(\"declare \");\n }\n\n if (n.modifiers) {\n parts.push(printTypeScriptModifiers(path, options, print));\n }\n\n if (n.const) {\n parts.push(\"const \");\n }\n\n parts.push(\"enum \", path.call(print, \"id\"), \" \");\n\n if (n.members.length === 0) {\n parts.push(group$b(concat$d([\"{\", comments.printDanglingComments(path, options), softline$6, \"}\"])));\n } else {\n parts.push(group$b(concat$d([\"{\", indent$7(concat$d([hardline$9, printArrayItems(path, options, \"members\", print), shouldPrintComma$1(options, \"es5\") ? \",\" : \"\"])), comments.printDanglingComments(path, options,\n /* sameIndent */\n true), hardline$9, \"}\"])));\n }\n\n return concat$d(parts);\n\n case \"TSEnumMember\":\n parts.push(path.call(print, \"id\"));\n\n if (n.initializer) {\n parts.push(\" = \", path.call(print, \"initializer\"));\n }\n\n return concat$d(parts);\n\n case \"TSImportEqualsDeclaration\":\n if (n.isExport) {\n parts.push(\"export \");\n }\n\n parts.push(\"import \", path.call(print, \"id\"), \" = \", path.call(print, \"moduleReference\"));\n\n if (options.semi) {\n parts.push(\";\");\n }\n\n return group$b(concat$d(parts));\n\n case \"TSExternalModuleReference\":\n return concat$d([\"require(\", path.call(print, \"expression\"), \")\"]);\n\n case \"TSModuleDeclaration\":\n {\n const parent = path.getParentNode();\n const isExternalModule = isLiteral$1(n.id);\n const parentIsDeclaration = parent.type === \"TSModuleDeclaration\";\n const bodyIsDeclaration = n.body && n.body.type === \"TSModuleDeclaration\";\n\n if (parentIsDeclaration) {\n parts.push(\".\");\n } else {\n if (n.declare) {\n parts.push(\"declare \");\n }\n\n parts.push(printTypeScriptModifiers(path, options, print));\n const textBetweenNodeAndItsId = options.originalText.slice(options.locStart(n), options.locStart(n.id)); // Global declaration looks like this:\n // (declare)? global { ... }\n\n const isGlobalDeclaration = n.id.type === \"Identifier\" && n.id.name === \"global\" && !/namespace|module/.test(textBetweenNodeAndItsId);\n\n if (!isGlobalDeclaration) {\n parts.push(isExternalModule || /(^|\\s)module(\\s|$)/.test(textBetweenNodeAndItsId) ? \"module \" : \"namespace \");\n }\n }\n\n parts.push(path.call(print, \"id\"));\n\n if (bodyIsDeclaration) {\n parts.push(path.call(print, \"body\"));\n } else if (n.body) {\n parts.push(\" \", group$b(path.call(print, \"body\")));\n } else {\n parts.push(semi);\n }\n\n return concat$d(parts);\n }\n\n case \"PrivateName\":\n return concat$d([\"#\", path.call(print, \"id\")]);\n // TODO: Temporary auto-generated node type. To remove when typescript-estree has proper support for private fields.\n\n case \"TSPrivateIdentifier\":\n return n.escapedText;\n\n case \"TSConditionalType\":\n return printTernaryOperator(path, options, print, {\n beforeParts: () => [path.call(print, \"checkType\"), \" \", \"extends\", \" \", path.call(print, \"extendsType\")],\n afterParts: () => [],\n shouldCheckJsx: false,\n conditionalNodeType: \"TSConditionalType\",\n consequentNodePropertyName: \"trueType\",\n alternateNodePropertyName: \"falseType\",\n testNodePropertyNames: [\"checkType\", \"extendsType\"]\n });\n\n case \"TSInferType\":\n return concat$d([\"infer\", \" \", path.call(print, \"typeParameter\")]);\n\n case \"InterpreterDirective\":\n parts.push(\"#!\", n.value, hardline$9);\n\n if (isNextLineEmpty$4(options.originalText, n, options.locEnd)) {\n parts.push(hardline$9);\n }\n\n return concat$d(parts);\n\n case \"NGRoot\":\n return concat$d([].concat(path.call(print, \"node\"), !n.node.comments || n.node.comments.length === 0 ? [] : concat$d([\" //\", n.node.comments[0].value.trimEnd()])));\n\n case \"NGChainedExpression\":\n return group$b(join$9(concat$d([\";\", line$9]), path.map(childPath => hasNgSideEffect$1(childPath) ? print(childPath) : concat$d([\"(\", print(childPath), \")\"]), \"expressions\")));\n\n case \"NGEmptyExpression\":\n return \"\";\n\n case \"NGQuotedExpression\":\n return concat$d([n.prefix, \": \", n.value.trim()]);\n\n case \"NGMicrosyntax\":\n return concat$d(path.map((childPath, index) => concat$d([index === 0 ? \"\" : isNgForOf$1(childPath.getValue(), index, n) ? \" \" : concat$d([\";\", line$9]), print(childPath)]), \"body\"));\n\n case \"NGMicrosyntaxKey\":\n return /^[a-z_$][a-z0-9_$]*(-[a-z_$][a-z0-9_$])*$/i.test(n.name) ? n.name : JSON.stringify(n.name);\n\n case \"NGMicrosyntaxExpression\":\n return concat$d([path.call(print, \"expression\"), n.alias === null ? \"\" : concat$d([\" as \", path.call(print, \"alias\")])]);\n\n case \"NGMicrosyntaxKeyedExpression\":\n {\n const index = path.getName();\n const parentNode = path.getParentNode();\n const shouldNotPrintColon = isNgForOf$1(n, index, parentNode) || (index === 1 && (n.key.name === \"then\" || n.key.name === \"else\") || index === 2 && n.key.name === \"else\" && parentNode.body[index - 1].type === \"NGMicrosyntaxKeyedExpression\" && parentNode.body[index - 1].key.name === \"then\") && parentNode.body[0].type === \"NGMicrosyntaxExpression\";\n return concat$d([path.call(print, \"key\"), shouldNotPrintColon ? \" \" : \": \", path.call(print, \"expression\")]);\n }\n\n case \"NGMicrosyntaxLet\":\n return concat$d([\"let \", path.call(print, \"key\"), n.value === null ? \"\" : concat$d([\" = \", path.call(print, \"value\")])]);\n\n case \"NGMicrosyntaxAs\":\n return concat$d([path.call(print, \"key\"), \" as \", path.call(print, \"alias\")]);\n\n case \"ArgumentPlaceholder\":\n return \"?\";\n // These are not valid TypeScript. Printing them just for the sake of error recovery.\n\n case \"TSJSDocAllType\":\n return \"*\";\n\n case \"TSJSDocUnknownType\":\n return \"?\";\n\n case \"TSJSDocNullableType\":\n return concat$d([\"?\", path.call(print, \"typeAnnotation\")]);\n\n case \"TSJSDocNonNullableType\":\n return concat$d([\"!\", path.call(print, \"typeAnnotation\")]);\n\n case \"TSJSDocFunctionType\":\n return concat$d([\"function(\", // The parameters could be here, but typescript-estree doesn't convert them anyway (throws an error).\n \"): \", path.call(print, \"typeAnnotation\")]);\n\n default:\n /* istanbul ignore next */\n throw new Error(\"unknown type: \" + JSON.stringify(n.type));\n }\n }\n\n function printStatementSequence(path, options, print) {\n const printed = [];\n const bodyNode = path.getNode();\n const isClass = bodyNode.type === \"ClassBody\";\n path.map((stmtPath, i) => {\n const stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy\n // \"statements,\" it's safer simply to skip them.\n\n /* istanbul ignore if */\n\n if (!stmt) {\n return;\n } // Skip printing EmptyStatement nodes to avoid leaving stray\n // semicolons lying around.\n\n\n if (stmt.type === \"EmptyStatement\") {\n return;\n }\n\n const stmtPrinted = print(stmtPath);\n const text = options.originalText;\n const parts = []; // in no-semi mode, prepend statement with semicolon if it might break ASI\n // don't prepend the only JSX element in a program with semicolon\n\n if (!options.semi && !isClass && !isTheOnlyJSXElementInMarkdown$1(options, stmtPath) && stmtNeedsASIProtection(stmtPath, options)) {\n if (stmt.comments && stmt.comments.some(comment => comment.leading)) {\n parts.push(print(stmtPath, {\n needsSemi: true\n }));\n } else {\n parts.push(\";\", stmtPrinted);\n }\n } else {\n parts.push(stmtPrinted);\n }\n\n if (!options.semi && isClass) {\n if (classPropMayCauseASIProblems$1(stmtPath)) {\n parts.push(\";\");\n } else if (stmt.type === \"ClassProperty\") {\n const nextChild = bodyNode.body[i + 1];\n\n if (classChildNeedsASIProtection$1(nextChild)) {\n parts.push(\";\");\n }\n }\n }\n\n if (isNextLineEmpty$4(text, stmt, options.locEnd) && !isLastStatement$1(stmtPath)) {\n parts.push(hardline$9);\n }\n\n printed.push(concat$d(parts));\n });\n return join$9(hardline$9, printed);\n }\n\n function printPropertyKey(path, options, print) {\n const node = path.getNode();\n\n if (node.computed) {\n return concat$d([\"[\", path.call(print, \"key\"), \"]\"]);\n }\n\n const parent = path.getParentNode();\n const {\n key\n } = node;\n\n if (node.type === \"ClassPrivateProperty\" && // flow has `Identifier` key, and babel has `PrivateName` key\n key.type === \"Identifier\") {\n return concat$d([\"#\", path.call(print, \"key\")]);\n }\n\n if (options.quoteProps === \"consistent\" && !needsQuoteProps.has(parent)) {\n const objectHasStringProp = (parent.properties || parent.body || parent.members).some(prop => !prop.computed && prop.key && isStringLiteral$1(prop.key) && !isStringPropSafeToCoerceToIdentifier$1(prop, options));\n needsQuoteProps.set(parent, objectHasStringProp);\n }\n\n if (key.type === \"Identifier\" && (options.parser === \"json\" || options.quoteProps === \"consistent\" && needsQuoteProps.get(parent))) {\n // a -> \"a\"\n const prop = printString$2(JSON.stringify(key.name), options);\n return path.call(keyPath => comments.printComments(keyPath, () => prop, options), \"key\");\n }\n\n if (isStringPropSafeToCoerceToIdentifier$1(node, options) && (options.quoteProps === \"as-needed\" || options.quoteProps === \"consistent\" && !needsQuoteProps.get(parent))) {\n // 'a' -> a\n return path.call(keyPath => comments.printComments(keyPath, () => key.value, options), \"key\");\n }\n\n return path.call(print, \"key\");\n }\n\n function printMethod(path, options, print) {\n const node = path.getNode();\n const {\n kind\n } = node;\n const value = node.value || node;\n const parts = [];\n\n if (!kind || kind === \"init\" || kind === \"method\" || kind === \"constructor\") {\n if (value.async) {\n parts.push(\"async \");\n }\n\n if (value.generator) {\n parts.push(\"*\");\n }\n } else {\n assert.ok(kind === \"get\" || kind === \"set\");\n parts.push(kind, \" \");\n }\n\n parts.push(printPropertyKey(path, options, print), node.optional || node.key.optional ? \"?\" : \"\", node === value ? printMethodInternal(path, options, print) : path.call(path => printMethodInternal(path, options, print), \"value\"));\n return concat$d(parts);\n }\n\n function printMethodInternal(path, options, print) {\n const parts = [printFunctionTypeParameters(path, options, print), group$b(concat$d([printFunctionParams(path, print, options), printReturnType(path, print, options)]))];\n\n if (path.getNode().body) {\n parts.push(\" \", path.call(print, \"body\"));\n } else {\n parts.push(options.semi ? \";\" : \"\");\n }\n\n return concat$d(parts);\n }\n\n function couldGroupArg(arg) {\n return arg.type === \"ObjectExpression\" && (arg.properties.length > 0 || arg.comments) || arg.type === \"ArrayExpression\" && (arg.elements.length > 0 || arg.comments) || arg.type === \"TSTypeAssertion\" && couldGroupArg(arg.expression) || arg.type === \"TSAsExpression\" && couldGroupArg(arg.expression) || arg.type === \"FunctionExpression\" || arg.type === \"ArrowFunctionExpression\" && ( // we want to avoid breaking inside composite return types but not simple keywords\n // https://github.com/prettier/prettier/issues/4070\n // export class Thing implements OtherThing {\n // do: (type: Type) => Provider = memoize(\n // (type: ObjectType): Provider => {}\n // );\n // }\n // https://github.com/prettier/prettier/issues/6099\n // app.get(\"/\", (req, res): void => {\n // res.send(\"Hello World!\");\n // });\n !arg.returnType || !arg.returnType.typeAnnotation || arg.returnType.typeAnnotation.type !== \"TSTypeReference\") && (arg.body.type === \"BlockStatement\" || arg.body.type === \"ArrowFunctionExpression\" || arg.body.type === \"ObjectExpression\" || arg.body.type === \"ArrayExpression\" || arg.body.type === \"CallExpression\" || arg.body.type === \"OptionalCallExpression\" || arg.body.type === \"ConditionalExpression\" || isJSXNode$1(arg.body));\n }\n\n function shouldGroupLastArg(args) {\n const lastArg = getLast$3(args);\n const penultimateArg = getPenultimate$1(args);\n return !hasLeadingComment$3(lastArg) && !hasTrailingComment$1(lastArg) && couldGroupArg(lastArg) && ( // If the last two arguments are of the same type,\n // disable last element expansion.\n !penultimateArg || penultimateArg.type !== lastArg.type);\n }\n\n function shouldGroupFirstArg(args) {\n if (args.length !== 2) {\n return false;\n }\n\n const [firstArg, secondArg] = args;\n return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === \"FunctionExpression\" || firstArg.type === \"ArrowFunctionExpression\" && firstArg.body.type === \"BlockStatement\") && secondArg.type !== \"FunctionExpression\" && secondArg.type !== \"ArrowFunctionExpression\" && secondArg.type !== \"ConditionalExpression\" && !couldGroupArg(secondArg);\n }\n\n function printJestEachTemplateLiteral(node, expressions, options) {\n /**\n * a | b | expected\n * ${1} | ${1} | ${2}\n * ${1} | ${2} | ${3}\n * ${2} | ${1} | ${3}\n */\n const headerNames = node.quasis[0].value.raw.trim().split(/\\s*\\|\\s*/);\n\n if (headerNames.length > 1 || headerNames.some(headerName => headerName.length !== 0)) {\n const parts = [];\n const stringifiedExpressions = expressions.map(doc => \"${\" + printDocToString$2(doc, Object.assign({}, options, {\n printWidth: Infinity,\n endOfLine: \"lf\"\n })).formatted + \"}\");\n const tableBody = [{\n hasLineBreak: false,\n cells: []\n }];\n\n for (let i = 1; i < node.quasis.length; i++) {\n const row = tableBody[tableBody.length - 1];\n const correspondingExpression = stringifiedExpressions[i - 1];\n row.cells.push(correspondingExpression);\n\n if (correspondingExpression.includes(\"\\n\")) {\n row.hasLineBreak = true;\n }\n\n if (node.quasis[i].value.raw.includes(\"\\n\")) {\n tableBody.push({\n hasLineBreak: false,\n cells: []\n });\n }\n }\n\n const maxColumnCount = Math.max(headerNames.length, ...tableBody.map(row => row.cells.length));\n const maxColumnWidths = Array.from({\n length: maxColumnCount\n }).fill(0);\n const table = [{\n cells: headerNames\n }, ...tableBody.filter(row => row.cells.length !== 0)];\n\n for (const {\n cells\n } of table.filter(row => !row.hasLineBreak)) {\n cells.forEach((cell, index) => {\n maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth$3(cell));\n });\n }\n\n parts.push(lineSuffixBoundary$1, \"`\", indent$7(concat$d([hardline$9, join$9(hardline$9, table.map(row => join$9(\" | \", row.cells.map((cell, index) => row.hasLineBreak ? cell : cell + \" \".repeat(maxColumnWidths[index] - getStringWidth$3(cell))))))])), hardline$9, \"`\");\n return concat$d(parts);\n }\n }\n\n function printArgumentsList(path, options, print) {\n const node = path.getValue();\n const args = node.arguments;\n\n if (args.length === 0) {\n return concat$d([\"(\", comments.printDanglingComments(path, options,\n /* sameIndent */\n true), \")\"]);\n } // useEffect(() => { ... }, [foo, bar, baz])\n\n\n if (args.length === 2 && args[0].type === \"ArrowFunctionExpression\" && args[0].params.length === 0 && args[0].body.type === \"BlockStatement\" && args[1].type === \"ArrayExpression\" && !args.find(arg => arg.comments)) {\n return concat$d([\"(\", path.call(print, \"arguments\", 0), \", \", path.call(print, \"arguments\", 1), \")\"]);\n } // func(\n // ({\n // a,\n // b\n // }) => {}\n // );\n\n\n function shouldBreakForArrowFunctionInArguments(arg, argPath) {\n if (!arg || arg.type !== \"ArrowFunctionExpression\" || !arg.body || arg.body.type !== \"BlockStatement\" || !arg.params || arg.params.length < 1) {\n return false;\n }\n\n let shouldBreak = false;\n argPath.each(paramPath => {\n const printed = concat$d([print(paramPath)]);\n shouldBreak = shouldBreak || willBreak$1(printed);\n }, \"params\");\n return shouldBreak;\n }\n\n let anyArgEmptyLine = false;\n let shouldBreakForArrowFunction = false;\n let hasEmptyLineFollowingFirstArg = false;\n const lastArgIndex = args.length - 1;\n const printedArguments = path.map((argPath, index) => {\n const arg = argPath.getNode();\n const parts = [print(argPath)];\n\n if (index === lastArgIndex) ; else if (isNextLineEmpty$4(options.originalText, arg, options.locEnd)) {\n if (index === 0) {\n hasEmptyLineFollowingFirstArg = true;\n }\n\n anyArgEmptyLine = true;\n parts.push(\",\", hardline$9, hardline$9);\n } else {\n parts.push(\",\", line$9);\n }\n\n shouldBreakForArrowFunction = shouldBreakForArrowFunctionInArguments(arg, argPath);\n return concat$d(parts);\n }, \"arguments\");\n const maybeTrailingComma = // Dynamic imports cannot have trailing commas\n !(node.callee && node.callee.type === \"Import\") && shouldPrintComma$1(options, \"all\") ? \",\" : \"\";\n\n function allArgsBrokenOut() {\n return group$b(concat$d([\"(\", indent$7(concat$d([line$9, concat$d(printedArguments)])), maybeTrailingComma, line$9, \")\"]), {\n shouldBreak: true\n });\n }\n\n if (path.getParentNode().type !== \"Decorator\" && isFunctionCompositionArgs$1(args)) {\n return allArgsBrokenOut();\n }\n\n const shouldGroupFirst = shouldGroupFirstArg(args);\n const shouldGroupLast = shouldGroupLastArg(args);\n\n if (shouldGroupFirst || shouldGroupLast) {\n const shouldBreak = (shouldGroupFirst ? printedArguments.slice(1).some(willBreak$1) : printedArguments.slice(0, -1).some(willBreak$1)) || anyArgEmptyLine || shouldBreakForArrowFunction; // We want to print the last argument with a special flag\n\n let printedExpanded;\n let i = 0;\n path.each(argPath => {\n if (shouldGroupFirst && i === 0) {\n printedExpanded = [concat$d([argPath.call(p => print(p, {\n expandFirstArg: true\n })), printedArguments.length > 1 ? \",\" : \"\", hasEmptyLineFollowingFirstArg ? hardline$9 : line$9, hasEmptyLineFollowingFirstArg ? hardline$9 : \"\"])].concat(printedArguments.slice(1));\n }\n\n if (shouldGroupLast && i === args.length - 1) {\n printedExpanded = printedArguments.slice(0, -1).concat(argPath.call(p => print(p, {\n expandLastArg: true\n })));\n }\n\n i++;\n }, \"arguments\");\n const somePrintedArgumentsWillBreak = printedArguments.some(willBreak$1);\n const simpleConcat = concat$d([\"(\", concat$d(printedExpanded), \")\"]);\n return concat$d([somePrintedArgumentsWillBreak ? breakParent$3 : \"\", conditionalGroup$1([!somePrintedArgumentsWillBreak && !node.typeArguments && !node.typeParameters ? simpleConcat : ifBreak$6(allArgsBrokenOut(), simpleConcat), shouldGroupFirst ? concat$d([\"(\", group$b(printedExpanded[0], {\n shouldBreak: true\n }), concat$d(printedExpanded.slice(1)), \")\"]) : concat$d([\"(\", concat$d(printedArguments.slice(0, -1)), group$b(getLast$3(printedExpanded), {\n shouldBreak: true\n }), \")\"]), allArgsBrokenOut()], {\n shouldBreak\n })]);\n }\n\n const contents = concat$d([\"(\", indent$7(concat$d([softline$6, concat$d(printedArguments)])), ifBreak$6(maybeTrailingComma), softline$6, \")\"]);\n\n if (isLongCurriedCallExpression$1(path)) {\n // By not wrapping the arguments in a group, the printer prioritizes\n // breaking up these arguments rather than the args of the parent call.\n return contents;\n }\n\n return group$b(contents, {\n shouldBreak: printedArguments.some(willBreak$1) || anyArgEmptyLine\n });\n }\n\n function printTypeAnnotation(path, options, print) {\n const node = path.getValue();\n\n if (!node.typeAnnotation) {\n return \"\";\n }\n\n const parentNode = path.getParentNode();\n const isDefinite = node.definite || parentNode && parentNode.type === \"VariableDeclarator\" && parentNode.definite;\n const isFunctionDeclarationIdentifier = parentNode.type === \"DeclareFunction\" && parentNode.id === node;\n\n if (isFlowAnnotationComment$1(options.originalText, node.typeAnnotation, options)) {\n return concat$d([\" /*: \", path.call(print, \"typeAnnotation\"), \" */\"]);\n }\n\n return concat$d([isFunctionDeclarationIdentifier ? \"\" : isDefinite ? \"!: \" : \": \", path.call(print, \"typeAnnotation\")]);\n }\n\n function printFunctionTypeParameters(path, options, print) {\n const fun = path.getValue();\n\n if (fun.typeArguments) {\n return path.call(print, \"typeArguments\");\n }\n\n if (fun.typeParameters) {\n return path.call(print, \"typeParameters\");\n }\n\n return \"\";\n }\n\n function printFunctionParams(path, print, options, expandArg, printTypeParams) {\n const fun = path.getValue();\n const parent = path.getParentNode();\n const paramsField = fun.parameters ? \"parameters\" : \"params\";\n const isParametersInTestCall = isTestCall$1(parent);\n const shouldHugParameters = shouldHugArguments(fun);\n const shouldExpandParameters = expandArg && !(fun[paramsField] && fun[paramsField].some(n => n.comments));\n const typeParams = printTypeParams ? printFunctionTypeParameters(path, options, print) : \"\";\n let printed = [];\n\n if (fun[paramsField]) {\n const lastArgIndex = fun[paramsField].length - 1;\n printed = path.map((childPath, index) => {\n const parts = [];\n const param = childPath.getValue();\n parts.push(print(childPath));\n\n if (index === lastArgIndex) {\n if (fun.rest) {\n parts.push(\",\", line$9);\n }\n } else if (isParametersInTestCall || shouldHugParameters || shouldExpandParameters) {\n parts.push(\", \");\n } else if (isNextLineEmpty$4(options.originalText, param, options.locEnd)) {\n parts.push(\",\", hardline$9, hardline$9);\n } else {\n parts.push(\",\", line$9);\n }\n\n return concat$d(parts);\n }, paramsField);\n }\n\n if (fun.rest) {\n printed.push(concat$d([\"...\", path.call(print, \"rest\")]));\n }\n\n if (printed.length === 0) {\n return concat$d([typeParams, \"(\", comments.printDanglingComments(path, options,\n /* sameIndent */\n true, comment => getNextNonSpaceNonCommentCharacter$1(options.originalText, comment, options.locEnd) === \")\"), \")\"]);\n }\n\n const lastParam = getLast$3(fun[paramsField]); // If the parent is a call with the first/last argument expansion and this is the\n // params of the first/last argument, we don't want the arguments to break and instead\n // want the whole expression to be on a new line.\n //\n // Good: Bad:\n // verylongcall( verylongcall((\n // (a, b) => { a,\n // } b,\n // }) ) => {\n // })\n\n if (shouldExpandParameters) {\n return group$b(concat$d([removeLines$2(typeParams), \"(\", concat$d(printed.map(removeLines$2)), \")\"]));\n } // Single object destructuring should hug\n //\n // function({\n // a,\n // b,\n // c\n // }) {}\n\n\n const hasNotParameterDecorator = fun[paramsField].every(param => !param.decorators);\n\n if (shouldHugParameters && hasNotParameterDecorator) {\n return concat$d([typeParams, \"(\", concat$d(printed), \")\"]);\n } // don't break in specs, eg; `it(\"should maintain parens around done even when long\", (done) => {})`\n\n\n if (isParametersInTestCall) {\n return concat$d([typeParams, \"(\", concat$d(printed), \")\"]);\n }\n\n const isFlowShorthandWithOneArg = (isObjectTypePropertyAFunction$1(parent, options) || isTypeAnnotationAFunction$1(parent, options) || parent.type === \"TypeAlias\" || parent.type === \"UnionTypeAnnotation\" || parent.type === \"TSUnionType\" || parent.type === \"IntersectionTypeAnnotation\" || parent.type === \"FunctionTypeAnnotation\" && parent.returnType === fun) && fun[paramsField].length === 1 && fun[paramsField][0].name === null && fun[paramsField][0].typeAnnotation && fun.typeParameters === null && isSimpleFlowType$1(fun[paramsField][0].typeAnnotation) && !fun.rest;\n\n if (isFlowShorthandWithOneArg) {\n if (options.arrowParens === \"always\") {\n return concat$d([\"(\", concat$d(printed), \")\"]);\n }\n\n return concat$d(printed);\n }\n\n const canHaveTrailingComma = !(lastParam && lastParam.type === \"RestElement\") && !fun.rest;\n return concat$d([typeParams, \"(\", indent$7(concat$d([softline$6, concat$d(printed)])), ifBreak$6(canHaveTrailingComma && shouldPrintComma$1(options, \"all\") ? \",\" : \"\"), softline$6, \")\"]);\n }\n\n function shouldPrintParamsWithoutParens(path, options) {\n if (options.arrowParens === \"always\") {\n return false;\n }\n\n if (options.arrowParens === \"avoid\") {\n const node = path.getValue();\n return canPrintParamsWithoutParens(node);\n } // Fallback default; should be unreachable\n\n\n return false;\n }\n\n function canPrintParamsWithoutParens(node) {\n return node.params.length === 1 && !node.rest && !node.typeParameters && !hasDanglingComments$1(node) && node.params[0].type === \"Identifier\" && !node.params[0].typeAnnotation && !node.params[0].comments && !node.params[0].optional && !node.predicate && !node.returnType;\n }\n\n function printFunctionDeclaration(path, print, options) {\n const n = path.getValue();\n const parts = [];\n\n if (n.async) {\n parts.push(\"async \");\n }\n\n if (n.generator) {\n parts.push(\"function* \");\n } else {\n parts.push(\"function \");\n }\n\n if (n.id) {\n parts.push(path.call(print, \"id\"));\n }\n\n parts.push(printFunctionTypeParameters(path, options, print), group$b(concat$d([printFunctionParams(path, print, options), printReturnType(path, print, options)])), n.body ? \" \" : \"\", path.call(print, \"body\"));\n return concat$d(parts);\n }\n\n function printReturnType(path, print, options) {\n const n = path.getValue();\n const returnType = path.call(print, \"returnType\");\n\n if (n.returnType && isFlowAnnotationComment$1(options.originalText, n.returnType, options)) {\n return concat$d([\" /*: \", returnType, \" */\"]);\n }\n\n const parts = [returnType]; // prepend colon to TypeScript type annotation\n\n if (n.returnType && n.returnType.typeAnnotation) {\n parts.unshift(\": \");\n }\n\n if (n.predicate) {\n // The return type will already add the colon, but otherwise we\n // need to do it ourselves\n parts.push(n.returnType ? \" \" : \": \", path.call(print, \"predicate\"));\n }\n\n return concat$d(parts);\n }\n\n function printExportDeclaration(path, options, print) {\n const decl = path.getValue();\n const semi = options.semi ? \";\" : \"\";\n const parts = [\"export \"];\n const isDefault = decl.default || decl.type === \"ExportDefaultDeclaration\";\n\n if (isDefault) {\n parts.push(\"default \");\n }\n\n parts.push(comments.printDanglingComments(path, options,\n /* sameIndent */\n true));\n\n if (needsHardlineAfterDanglingComment$1(decl)) {\n parts.push(hardline$9);\n }\n\n if (decl.declaration) {\n parts.push(path.call(print, \"declaration\"));\n\n if (isDefault && decl.declaration.type !== \"ClassDeclaration\" && decl.declaration.type !== \"FunctionDeclaration\" && decl.declaration.type !== \"TSInterfaceDeclaration\" && decl.declaration.type !== \"DeclareClass\" && decl.declaration.type !== \"DeclareFunction\" && decl.declaration.type !== \"TSDeclareFunction\") {\n parts.push(semi);\n }\n } else {\n if (decl.specifiers && decl.specifiers.length > 0) {\n const specifiers = [];\n const defaultSpecifiers = [];\n const namespaceSpecifiers = [];\n path.each(specifierPath => {\n const specifierType = path.getValue().type;\n\n if (specifierType === \"ExportSpecifier\") {\n specifiers.push(print(specifierPath));\n } else if (specifierType === \"ExportDefaultSpecifier\") {\n defaultSpecifiers.push(print(specifierPath));\n } else if (specifierType === \"ExportNamespaceSpecifier\") {\n namespaceSpecifiers.push(concat$d([\"* as \", print(specifierPath)]));\n }\n }, \"specifiers\");\n const isNamespaceFollowed = namespaceSpecifiers.length !== 0 && specifiers.length !== 0;\n const isDefaultFollowed = defaultSpecifiers.length !== 0 && (namespaceSpecifiers.length !== 0 || specifiers.length !== 0);\n const canBreak = specifiers.length > 1 || defaultSpecifiers.length > 0 || decl.specifiers && decl.specifiers.some(node => node.comments);\n let printed = \"\";\n\n if (specifiers.length !== 0) {\n if (canBreak) {\n printed = group$b(concat$d([\"{\", indent$7(concat$d([options.bracketSpacing ? line$9 : softline$6, join$9(concat$d([\",\", line$9]), specifiers)])), ifBreak$6(shouldPrintComma$1(options) ? \",\" : \"\"), options.bracketSpacing ? line$9 : softline$6, \"}\"]));\n } else {\n printed = concat$d([\"{\", options.bracketSpacing ? \" \" : \"\", concat$d(specifiers), options.bracketSpacing ? \" \" : \"\", \"}\"]);\n }\n }\n\n parts.push(decl.exportKind === \"type\" ? \"type \" : \"\", concat$d(defaultSpecifiers), concat$d([isDefaultFollowed ? \", \" : \"\"]), concat$d(namespaceSpecifiers), concat$d([isNamespaceFollowed ? \", \" : \"\"]), printed);\n } else {\n parts.push(\"{}\");\n }\n\n if (decl.source) {\n parts.push(\" from \", path.call(print, \"source\"));\n }\n\n parts.push(semi);\n }\n\n return concat$d(parts);\n }\n\n function printFlowDeclaration(path, parts) {\n const parentExportDecl = getParentExportDeclaration$1(path);\n\n if (parentExportDecl) {\n assert.strictEqual(parentExportDecl.type, \"DeclareExportDeclaration\");\n } else {\n // If the parent node has type DeclareExportDeclaration, then it\n // will be responsible for printing the \"declare\" token. Otherwise\n // it needs to be printed with this non-exported declaration node.\n parts.unshift(\"declare \");\n }\n\n return concat$d(parts);\n }\n\n function printTypeScriptModifiers(path, options, print) {\n const n = path.getValue();\n\n if (!n.modifiers || !n.modifiers.length) {\n return \"\";\n }\n\n return concat$d([join$9(\" \", path.map(print, \"modifiers\")), \" \"]);\n }\n\n function printTypeParameters(path, options, print, paramsKey) {\n const n = path.getValue();\n\n if (!n[paramsKey]) {\n return \"\";\n } // for TypeParameterDeclaration typeParameters is a single node\n\n\n if (!Array.isArray(n[paramsKey])) {\n return path.call(print, paramsKey);\n }\n\n const grandparent = path.getNode(2);\n const greatGrandParent = path.getNode(3);\n const greatGreatGrandParent = path.getNode(4);\n const isParameterInTestCall = grandparent != null && isTestCall$1(grandparent);\n const shouldInline = isParameterInTestCall || n[paramsKey].length === 0 || n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === \"GenericTypeAnnotation\" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === \"TSTypeReference\" && shouldHugType(n[paramsKey][0].typeName) || n[paramsKey][0].type === \"NullableTypeAnnotation\" || // See https://github.com/prettier/prettier/pull/6467 for the context.\n greatGreatGrandParent && greatGreatGrandParent.type === \"VariableDeclarator\" && grandparent.type === \"TSTypeAnnotation\" && greatGrandParent.type !== \"ArrowFunctionExpression\" && n[paramsKey][0].type !== \"TSUnionType\" && n[paramsKey][0].type !== \"UnionTypeAnnotation\" && n[paramsKey][0].type !== \"TSIntersectionType\" && n[paramsKey][0].type !== \"IntersectionTypeAnnotation\" && n[paramsKey][0].type !== \"TSConditionalType\" && n[paramsKey][0].type !== \"TSMappedType\" && n[paramsKey][0].type !== \"TSTypeOperator\" && n[paramsKey][0].type !== \"TSIndexedAccessType\" && n[paramsKey][0].type !== \"TSArrayType\");\n\n function printDanglingCommentsForInline(n) {\n if (!hasDanglingComments$1(n)) {\n return \"\";\n }\n\n const hasOnlyBlockComments = n.comments.every(comments$1.isBlockComment);\n const printed = comments.printDanglingComments(path, options,\n /* sameIndent */\n hasOnlyBlockComments);\n\n if (hasOnlyBlockComments) {\n return printed;\n }\n\n return concat$d([printed, hardline$9]);\n }\n\n if (shouldInline) {\n return concat$d([\"<\", join$9(\", \", path.map(print, paramsKey)), printDanglingCommentsForInline(n), \">\"]);\n }\n\n return group$b(concat$d([\"<\", indent$7(concat$d([softline$6, join$9(concat$d([\",\", line$9]), path.map(print, paramsKey))])), ifBreak$6(options.parser !== \"typescript\" && options.parser !== \"babel-ts\" && shouldPrintComma$1(options, \"all\") ? \",\" : \"\"), softline$6, \">\"]));\n }\n\n function printClass(path, options, print) {\n const n = path.getValue();\n const parts = [];\n\n if (n.abstract) {\n parts.push(\"abstract \");\n }\n\n parts.push(\"class\");\n\n if (n.id) {\n parts.push(\" \", path.call(print, \"id\"));\n }\n\n parts.push(path.call(print, \"typeParameters\"));\n const partsGroup = [];\n\n if (n.superClass) {\n const printed = concat$d([\"extends \", path.call(print, \"superClass\"), path.call(print, \"superTypeParameters\")]); // Keep old behaviour of extends in same line\n // If there is only on extends and there are not comments\n\n if ((!n.implements || n.implements.length === 0) && (!n.superClass.comments || n.superClass.comments.length === 0)) {\n parts.push(concat$d([\" \", path.call(superClass => comments.printComments(superClass, () => printed, options), \"superClass\")]));\n } else {\n partsGroup.push(group$b(concat$d([line$9, path.call(superClass => comments.printComments(superClass, () => printed, options), \"superClass\")])));\n }\n } else if (n.extends && n.extends.length > 0) {\n parts.push(\" extends \", join$9(\", \", path.map(print, \"extends\")));\n }\n\n if (n.mixins && n.mixins.length > 0) {\n partsGroup.push(line$9, \"mixins \", group$b(indent$7(join$9(concat$d([\",\", line$9]), path.map(print, \"mixins\")))));\n }\n\n if (n.implements && n.implements.length > 0) {\n partsGroup.push(line$9, \"implements\", group$b(indent$7(concat$d([line$9, join$9(concat$d([\",\", line$9]), path.map(print, \"implements\"))]))));\n }\n\n if (partsGroup.length > 0) {\n parts.push(group$b(indent$7(concat$d(partsGroup))));\n }\n\n if (n.body && n.body.comments && hasLeadingOwnLineComment$1(options.originalText, n.body, options)) {\n parts.push(hardline$9);\n } else {\n parts.push(\" \");\n }\n\n parts.push(path.call(print, \"body\"));\n return parts;\n }\n\n function printOptionalToken(path) {\n const node = path.getValue();\n\n if (!node.optional || // It's an optional computed method parsed by typescript-estree.\n // \"?\" is printed in `printMethod`.\n node.type === \"Identifier\" && node === path.getParentNode().key) {\n return \"\";\n }\n\n if (node.type === \"OptionalCallExpression\" || node.type === \"OptionalMemberExpression\" && node.computed) {\n return \"?.\";\n }\n\n return \"?\";\n }\n\n function printMemberLookup(path, options, print) {\n const property = path.call(print, \"property\");\n const n = path.getValue();\n const optional = printOptionalToken(path);\n\n if (!n.computed) {\n return concat$d([optional, \".\", property]);\n }\n\n if (!n.property || isNumericLiteral$1(n.property)) {\n return concat$d([optional, \"[\", property, \"]\"]);\n }\n\n return group$b(concat$d([optional, \"[\", indent$7(concat$d([softline$6, property])), softline$6, \"]\"]));\n }\n\n function printBindExpressionCallee(path, options, print) {\n return concat$d([\"::\", path.call(print, \"callee\")]);\n } // We detect calls on member expressions specially to format a\n // common pattern better. The pattern we are looking for is this:\n //\n // arr\n // .map(x => x + 1)\n // .filter(x => x > 10)\n // .some(x => x % 2)\n //\n // The way it is structured in the AST is via a nested sequence of\n // MemberExpression and CallExpression. We need to traverse the AST\n // and make groups out of it to print it in the desired way.\n\n\n function printMemberChain(path, options, print) {\n // The first phase is to linearize the AST by traversing it down.\n //\n // a().b()\n // has the following AST structure:\n // CallExpression(MemberExpression(CallExpression(Identifier)))\n // and we transform it into\n // [Identifier, CallExpression, MemberExpression, CallExpression]\n const printedNodes = []; // Here we try to retain one typed empty line after each call expression or\n // the first group whether it is in parentheses or not\n\n function shouldInsertEmptyLineAfter(node) {\n const {\n originalText\n } = options;\n const nextCharIndex = getNextNonSpaceNonCommentCharacterIndex$3(originalText, node, options.locEnd);\n const nextChar = originalText.charAt(nextCharIndex); // if it is cut off by a parenthesis, we only account for one typed empty\n // line after that parenthesis\n\n if (nextChar === \")\") {\n return isNextLineEmptyAfterIndex$2(originalText, nextCharIndex + 1, options.locEnd);\n }\n\n return isNextLineEmpty$4(originalText, node, options.locEnd);\n }\n\n function rec(path) {\n const node = path.getValue();\n\n if ((node.type === \"CallExpression\" || node.type === \"OptionalCallExpression\") && (isMemberish$1(node.callee) || node.callee.type === \"CallExpression\" || node.callee.type === \"OptionalCallExpression\")) {\n printedNodes.unshift({\n node,\n printed: concat$d([comments.printComments(path, () => concat$d([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]), options), shouldInsertEmptyLineAfter(node) ? hardline$9 : \"\"])\n });\n path.call(callee => rec(callee), \"callee\");\n } else if (isMemberish$1(node)) {\n printedNodes.unshift({\n node,\n needsParens: needsParens_1(path, options),\n printed: comments.printComments(path, () => node.type === \"OptionalMemberExpression\" || node.type === \"MemberExpression\" ? printMemberLookup(path, options, print) : printBindExpressionCallee(path, options, print), options)\n });\n path.call(object => rec(object), \"object\");\n } else if (node.type === \"TSNonNullExpression\") {\n printedNodes.unshift({\n node,\n printed: comments.printComments(path, () => \"!\", options)\n });\n path.call(expression => rec(expression), \"expression\");\n } else {\n printedNodes.unshift({\n node,\n printed: path.call(print)\n });\n }\n } // Note: the comments of the root node have already been printed, so we\n // need to extract this first call without printing them as they would\n // if handled inside of the recursive call.\n\n\n const node = path.getValue();\n printedNodes.unshift({\n node,\n printed: concat$d([printOptionalToken(path), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)])\n });\n path.call(callee => rec(callee), \"callee\"); // Once we have a linear list of printed nodes, we want to create groups out\n // of it.\n //\n // a().b.c().d().e\n // will be grouped as\n // [\n // [Identifier, CallExpression],\n // [MemberExpression, MemberExpression, CallExpression],\n // [MemberExpression, CallExpression],\n // [MemberExpression],\n // ]\n // so that we can print it as\n // a()\n // .b.c()\n // .d()\n // .e\n // The first group is the first node followed by\n // - as many CallExpression as possible\n // < fn()()() >.something()\n // - as many array accessors as possible\n // < fn()[0][1][2] >.something()\n // - then, as many MemberExpression as possible but the last one\n // < this.items >.something()\n\n const groups = [];\n let currentGroup = [printedNodes[0]];\n let i = 1;\n\n for (; i < printedNodes.length; ++i) {\n if (printedNodes[i].node.type === \"TSNonNullExpression\" || printedNodes[i].node.type === \"OptionalCallExpression\" || printedNodes[i].node.type === \"CallExpression\" || (printedNodes[i].node.type === \"MemberExpression\" || printedNodes[i].node.type === \"OptionalMemberExpression\") && printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {\n currentGroup.push(printedNodes[i]);\n } else {\n break;\n }\n }\n\n if (printedNodes[0].node.type !== \"CallExpression\" && printedNodes[0].node.type !== \"OptionalCallExpression\") {\n for (; i + 1 < printedNodes.length; ++i) {\n if (isMemberish$1(printedNodes[i].node) && isMemberish$1(printedNodes[i + 1].node)) {\n currentGroup.push(printedNodes[i]);\n } else {\n break;\n }\n }\n }\n\n groups.push(currentGroup);\n currentGroup = []; // Then, each following group is a sequence of MemberExpression followed by\n // a sequence of CallExpression. To compute it, we keep adding things to the\n // group until we has seen a CallExpression in the past and reach a\n // MemberExpression\n\n let hasSeenCallExpression = false;\n\n for (; i < printedNodes.length; ++i) {\n if (hasSeenCallExpression && isMemberish$1(printedNodes[i].node)) {\n // [0] should be appended at the end of the group instead of the\n // beginning of the next one\n if (printedNodes[i].node.computed && isNumericLiteral$1(printedNodes[i].node.property)) {\n currentGroup.push(printedNodes[i]);\n continue;\n }\n\n groups.push(currentGroup);\n currentGroup = [];\n hasSeenCallExpression = false;\n }\n\n if (printedNodes[i].node.type === \"CallExpression\" || printedNodes[i].node.type === \"OptionalCallExpression\") {\n hasSeenCallExpression = true;\n }\n\n currentGroup.push(printedNodes[i]);\n\n if (printedNodes[i].node.comments && printedNodes[i].node.comments.some(comment => comment.trailing)) {\n groups.push(currentGroup);\n currentGroup = [];\n hasSeenCallExpression = false;\n }\n }\n\n if (currentGroup.length > 0) {\n groups.push(currentGroup);\n } // There are cases like Object.keys(), Observable.of(), _.values() where\n // they are the subject of all the chained calls and therefore should\n // be kept on the same line:\n //\n // Object.keys(items)\n // .filter(x => x)\n // .map(x => x)\n //\n // In order to detect those cases, we use an heuristic: if the first\n // node is an identifier with the name starting with a capital\n // letter or just a sequence of _$. The rationale is that they are\n // likely to be factories.\n\n\n function isFactory(name) {\n return /^[A-Z]|^[_$]+$/.test(name);\n } // In case the Identifier is shorter than tab width, we can keep the\n // first call in a single line, if it's an ExpressionStatement.\n //\n // d3.scaleLinear()\n // .domain([0, 100])\n // .range([0, width]);\n //\n\n\n function isShort(name) {\n return name.length <= options.tabWidth;\n }\n\n function shouldNotWrap(groups) {\n const parent = path.getParentNode();\n const isExpression = parent && parent.type === \"ExpressionStatement\";\n const hasComputed = groups[1].length && groups[1][0].node.computed;\n\n if (groups[0].length === 1) {\n const firstNode = groups[0][0].node;\n return firstNode.type === \"ThisExpression\" || firstNode.type === \"Identifier\" && (isFactory(firstNode.name) || isExpression && isShort(firstNode.name) || hasComputed);\n }\n\n const lastNode = getLast$3(groups[0]).node;\n return (lastNode.type === \"MemberExpression\" || lastNode.type === \"OptionalMemberExpression\") && lastNode.property.type === \"Identifier\" && (isFactory(lastNode.property.name) || hasComputed);\n }\n\n const shouldMerge = groups.length >= 2 && !groups[1][0].node.comments && shouldNotWrap(groups);\n\n function printGroup(printedGroup) {\n const printed = printedGroup.map(tuple => tuple.printed); // Checks if the last node (i.e. the parent node) needs parens and print\n // accordingly\n\n if (printedGroup.length > 0 && printedGroup[printedGroup.length - 1].needsParens) {\n return concat$d([\"(\", ...printed, \")\"]);\n }\n\n return concat$d(printed);\n }\n\n function printIndentedGroup(groups) {\n if (groups.length === 0) {\n return \"\";\n }\n\n return indent$7(group$b(concat$d([hardline$9, join$9(hardline$9, groups.map(printGroup))])));\n }\n\n const printedGroups = groups.map(printGroup);\n const oneLine = concat$d(printedGroups);\n const cutoff = shouldMerge ? 3 : 2;\n const flatGroups = groups.reduce((res, group) => res.concat(group), []);\n const hasComment = flatGroups.slice(1, -1).some(node => hasLeadingComment$3(node.node)) || flatGroups.slice(0, -1).some(node => hasTrailingComment$1(node.node)) || groups[cutoff] && hasLeadingComment$3(groups[cutoff][0].node); // If we only have a single `.`, we shouldn't do anything fancy and just\n // render everything concatenated together.\n\n if (groups.length <= cutoff && !hasComment) {\n if (isLongCurriedCallExpression$1(path)) {\n return oneLine;\n }\n\n return group$b(oneLine);\n } // Find out the last node in the first group and check if it has an\n // empty line after\n\n\n const lastNodeBeforeIndent = getLast$3(shouldMerge ? groups.slice(1, 2)[0] : groups[0]).node;\n const shouldHaveEmptyLineBeforeIndent = lastNodeBeforeIndent.type !== \"CallExpression\" && lastNodeBeforeIndent.type !== \"OptionalCallExpression\" && shouldInsertEmptyLineAfter(lastNodeBeforeIndent);\n const expanded = concat$d([printGroup(groups[0]), shouldMerge ? concat$d(groups.slice(1, 2).map(printGroup)) : \"\", shouldHaveEmptyLineBeforeIndent ? hardline$9 : \"\", printIndentedGroup(groups.slice(shouldMerge ? 2 : 1))]);\n const callExpressions = printedNodes.map(({\n node\n }) => node).filter(isCallOrOptionalCallExpression$1); // We don't want to print in one line if the chain has:\n // * A comment.\n // * Non-trivial arguments.\n // * Any group but the last one has a hard line.\n // If the last group is a function it's okay to inline if it fits.\n\n if (hasComment || callExpressions.length > 2 && callExpressions.some(expr => !expr.arguments.every(arg => isSimpleCallArgument$1(arg, 0))) || printedGroups.slice(0, -1).some(willBreak$1) ||\n /**\n * scopes.filter(scope => scope.value !== '').map((scope, i) => {\n * // multi line content\n * })\n */\n ((lastGroupDoc, lastGroupNode) => isCallOrOptionalCallExpression$1(lastGroupNode) && willBreak$1(lastGroupDoc))(getLast$3(printedGroups), getLast$3(getLast$3(groups)).node) && callExpressions.slice(0, -1).some(n => n.arguments.some(isFunctionOrArrowExpression$1))) {\n return group$b(expanded);\n }\n\n return concat$d([// We only need to check `oneLine` because if `expanded` is chosen\n // that means that the parent group has already been broken\n // naturally\n willBreak$1(oneLine) || shouldHaveEmptyLineBeforeIndent ? breakParent$3 : \"\", conditionalGroup$1([oneLine, expanded])]);\n }\n\n function separatorNoWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {\n if (isFacebookTranslationTag) {\n return \"\";\n }\n\n if (childNode.type === \"JSXElement\" && !childNode.closingElement || nextNode && nextNode.type === \"JSXElement\" && !nextNode.closingElement) {\n return child.length === 1 ? softline$6 : hardline$9;\n }\n\n return softline$6;\n }\n\n function separatorWithWhitespace(isFacebookTranslationTag, child, childNode, nextNode) {\n if (isFacebookTranslationTag) {\n return hardline$9;\n }\n\n if (child.length === 1) {\n return childNode.type === \"JSXElement\" && !childNode.closingElement || nextNode && nextNode.type === \"JSXElement\" && !nextNode.closingElement ? hardline$9 : softline$6;\n }\n\n return hardline$9;\n } // JSX Children are strange, mostly for two reasons:\n // 1. JSX reads newlines into string values, instead of skipping them like JS\n // 2. up to one whitespace between elements within a line is significant,\n // but not between lines.\n //\n // Leading, trailing, and lone whitespace all need to\n // turn themselves into the rather ugly `{' '}` when breaking.\n //\n // We print JSX using the `fill` doc primitive.\n // This requires that we give it an array of alternating\n // content and whitespace elements.\n // To ensure this we add dummy `\"\"` content elements as needed.\n\n\n function printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag) {\n const n = path.getValue();\n const children = []; // using `map` instead of `each` because it provides `i`\n\n path.map((childPath, i) => {\n const child = childPath.getValue();\n\n if (isLiteral$1(child)) {\n const text = rawText$1(child); // Contains a non-whitespace character\n\n if (isMeaningfulJSXText$1(child)) {\n const words = text.split(matchJsxWhitespaceRegex$1); // Starts with whitespace\n\n if (words[0] === \"\") {\n children.push(\"\");\n words.shift();\n\n if (/\\n/.test(words[0])) {\n const next = n.children[i + 1];\n children.push(separatorWithWhitespace(isFacebookTranslationTag, words[1], child, next));\n } else {\n children.push(jsxWhitespace);\n }\n\n words.shift();\n }\n\n let endWhitespace; // Ends with whitespace\n\n if (getLast$3(words) === \"\") {\n words.pop();\n endWhitespace = words.pop();\n } // This was whitespace only without a new line.\n\n\n if (words.length === 0) {\n return;\n }\n\n words.forEach((word, i) => {\n if (i % 2 === 1) {\n children.push(line$9);\n } else {\n children.push(word);\n }\n });\n\n if (endWhitespace !== undefined) {\n if (/\\n/.test(endWhitespace)) {\n const next = n.children[i + 1];\n children.push(separatorWithWhitespace(isFacebookTranslationTag, getLast$3(children), child, next));\n } else {\n children.push(jsxWhitespace);\n }\n } else {\n const next = n.children[i + 1];\n children.push(separatorNoWhitespace(isFacebookTranslationTag, getLast$3(children), child, next));\n }\n } else if (/\\n/.test(text)) {\n // Keep (up to one) blank line between tags/expressions/text.\n // Note: We don't keep blank lines between text elements.\n if (text.match(/\\n/g).length > 1) {\n children.push(\"\");\n children.push(hardline$9);\n }\n } else {\n children.push(\"\");\n children.push(jsxWhitespace);\n }\n } else {\n const printedChild = print(childPath);\n children.push(printedChild);\n const next = n.children[i + 1];\n const directlyFollowedByMeaningfulText = next && isMeaningfulJSXText$1(next);\n\n if (directlyFollowedByMeaningfulText) {\n const firstWord = rawText$1(next).trim().split(matchJsxWhitespaceRegex$1)[0];\n children.push(separatorNoWhitespace(isFacebookTranslationTag, firstWord, child, next));\n } else {\n children.push(hardline$9);\n }\n }\n }, \"children\");\n return children;\n } // JSX expands children from the inside-out, instead of the outside-in.\n // This is both to break children before attributes,\n // and to ensure that when children break, their parents do as well.\n //\n // Any element that is written without any newlines and fits on a single line\n // is left that way.\n // Not only that, any user-written-line containing multiple JSX siblings\n // should also be kept on one line if possible,\n // so each user-written-line is wrapped in its own group.\n //\n // Elements that contain newlines or don't fit on a single line (recursively)\n // are fully-split, using hardline and shouldBreak: true.\n //\n // To support that case properly, all leading and trailing spaces\n // are stripped from the list of children, and replaced with a single hardline.\n\n\n function printJSXElement(path, options, print) {\n const n = path.getValue();\n\n if (n.type === \"JSXElement\" && isEmptyJSXElement$1(n)) {\n return concat$d([path.call(print, \"openingElement\"), path.call(print, \"closingElement\")]);\n }\n\n const openingLines = n.type === \"JSXElement\" ? path.call(print, \"openingElement\") : path.call(print, \"openingFragment\");\n const closingLines = n.type === \"JSXElement\" ? path.call(print, \"closingElement\") : path.call(print, \"closingFragment\");\n\n if (n.children.length === 1 && n.children[0].type === \"JSXExpressionContainer\" && (n.children[0].expression.type === \"TemplateLiteral\" || n.children[0].expression.type === \"TaggedTemplateExpression\")) {\n return concat$d([openingLines, concat$d(path.map(print, \"children\")), closingLines]);\n } // Convert `{\" \"}` to text nodes containing a space.\n // This makes it easy to turn them into `jsxWhitespace` which\n // can then print as either a space or `{\" \"}` when breaking.\n\n\n n.children = n.children.map(child => {\n if (isJSXWhitespaceExpression$1(child)) {\n return {\n type: \"JSXText\",\n value: \" \",\n raw: \" \"\n };\n }\n\n return child;\n });\n const containsTag = n.children.filter(isJSXNode$1).length > 0;\n const containsMultipleExpressions = n.children.filter(child => child.type === \"JSXExpressionContainer\").length > 1;\n const containsMultipleAttributes = n.type === \"JSXElement\" && n.openingElement.attributes.length > 1; // Record any breaks. Should never go from true to false, only false to true.\n\n let forcedBreak = willBreak$1(openingLines) || containsTag || containsMultipleAttributes || containsMultipleExpressions;\n const isMdxBlock = path.getParentNode().rootMarker === \"mdx\";\n const rawJsxWhitespace = options.singleQuote ? \"{' '}\" : '{\" \"}';\n const jsxWhitespace = isMdxBlock ? concat$d([\" \"]) : ifBreak$6(concat$d([rawJsxWhitespace, softline$6]), \" \");\n const isFacebookTranslationTag = n.openingElement && n.openingElement.name && n.openingElement.name.name === \"fbt\";\n const children = printJSXChildren(path, options, print, jsxWhitespace, isFacebookTranslationTag);\n const containsText = n.children.some(child => isMeaningfulJSXText$1(child)); // We can end up we multiple whitespace elements with empty string\n // content between them.\n // We need to remove empty whitespace and softlines before JSX whitespace\n // to get the correct output.\n\n for (let i = children.length - 2; i >= 0; i--) {\n const isPairOfEmptyStrings = children[i] === \"\" && children[i + 1] === \"\";\n const isPairOfHardlines = children[i] === hardline$9 && children[i + 1] === \"\" && children[i + 2] === hardline$9;\n const isLineFollowedByJSXWhitespace = (children[i] === softline$6 || children[i] === hardline$9) && children[i + 1] === \"\" && children[i + 2] === jsxWhitespace;\n const isJSXWhitespaceFollowedByLine = children[i] === jsxWhitespace && children[i + 1] === \"\" && (children[i + 2] === softline$6 || children[i + 2] === hardline$9);\n const isDoubleJSXWhitespace = children[i] === jsxWhitespace && children[i + 1] === \"\" && children[i + 2] === jsxWhitespace;\n const isPairOfHardOrSoftLines = children[i] === softline$6 && children[i + 1] === \"\" && children[i + 2] === hardline$9 || children[i] === hardline$9 && children[i + 1] === \"\" && children[i + 2] === softline$6;\n\n if (isPairOfHardlines && containsText || isPairOfEmptyStrings || isLineFollowedByJSXWhitespace || isDoubleJSXWhitespace || isPairOfHardOrSoftLines) {\n children.splice(i, 2);\n } else if (isJSXWhitespaceFollowedByLine) {\n children.splice(i + 1, 2);\n }\n } // Trim trailing lines (or empty strings)\n\n\n while (children.length && (isLineNext$1(getLast$3(children)) || isEmpty$1(getLast$3(children)))) {\n children.pop();\n } // Trim leading lines (or empty strings)\n\n\n while (children.length && (isLineNext$1(children[0]) || isEmpty$1(children[0])) && (isLineNext$1(children[1]) || isEmpty$1(children[1]))) {\n children.shift();\n children.shift();\n } // Tweak how we format children if outputting this element over multiple lines.\n // Also detect whether we will force this element to output over multiple lines.\n\n\n const multilineChildren = [];\n children.forEach((child, i) => {\n // There are a number of situations where we need to ensure we display\n // whitespace as `{\" \"}` when outputting this element over multiple lines.\n if (child === jsxWhitespace) {\n if (i === 1 && children[i - 1] === \"\") {\n if (children.length === 2) {\n // Solitary whitespace\n multilineChildren.push(rawJsxWhitespace);\n return;\n } // Leading whitespace\n\n\n multilineChildren.push(concat$d([rawJsxWhitespace, hardline$9]));\n return;\n } else if (i === children.length - 1) {\n // Trailing whitespace\n multilineChildren.push(rawJsxWhitespace);\n return;\n } else if (children[i - 1] === \"\" && children[i - 2] === hardline$9) {\n // Whitespace after line break\n multilineChildren.push(rawJsxWhitespace);\n return;\n }\n }\n\n multilineChildren.push(child);\n\n if (willBreak$1(child)) {\n forcedBreak = true;\n }\n }); // If there is text we use `fill` to fit as much onto each line as possible.\n // When there is no text (just tags and expressions) we use `group`\n // to output each on a separate line.\n\n const content = containsText ? fill$4(multilineChildren) : group$b(concat$d(multilineChildren), {\n shouldBreak: true\n });\n\n if (isMdxBlock) {\n return content;\n }\n\n const multiLineElem = group$b(concat$d([openingLines, indent$7(concat$d([hardline$9, content])), hardline$9, closingLines]));\n\n if (forcedBreak) {\n return multiLineElem;\n }\n\n return conditionalGroup$1([group$b(concat$d([openingLines, concat$d(children), closingLines])), multiLineElem]);\n }\n\n function maybeWrapJSXElementInParens(path, elem, options) {\n const parent = path.getParentNode();\n\n if (!parent) {\n return elem;\n }\n\n const NO_WRAP_PARENTS = {\n ArrayExpression: true,\n JSXAttribute: true,\n JSXElement: true,\n JSXExpressionContainer: true,\n JSXFragment: true,\n ExpressionStatement: true,\n CallExpression: true,\n OptionalCallExpression: true,\n ConditionalExpression: true,\n JsExpressionRoot: true\n };\n\n if (NO_WRAP_PARENTS[parent.type]) {\n return elem;\n }\n\n const shouldBreak = path.match(undefined, node => node.type === \"ArrowFunctionExpression\", isCallOrOptionalCallExpression$1, node => node.type === \"JSXExpressionContainer\");\n const needsParens = needsParens_1(path, options);\n return group$b(concat$d([needsParens ? \"\" : ifBreak$6(\"(\"), indent$7(concat$d([softline$6, elem])), softline$6, needsParens ? \"\" : ifBreak$6(\")\")]), {\n shouldBreak\n });\n }\n\n function shouldInlineLogicalExpression(node) {\n if (node.type !== \"LogicalExpression\") {\n return false;\n }\n\n if (node.right.type === \"ObjectExpression\" && node.right.properties.length !== 0) {\n return true;\n }\n\n if (node.right.type === \"ArrayExpression\" && node.right.elements.length !== 0) {\n return true;\n }\n\n if (isJSXNode$1(node.right)) {\n return true;\n }\n\n return false;\n } // For binary expressions to be consistent, we need to group\n // subsequent operators with the same precedence level under a single\n // group. Otherwise they will be nested such that some of them break\n // onto new lines but not all. Operators with the same precedence\n // level should either all break or not. Because we group them by\n // precedence level and the AST is structured based on precedence\n // level, things are naturally broken up correctly, i.e. `&&` is\n // broken before `+`.\n\n\n function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) {\n let parts = [];\n const node = path.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same.\n\n if (isBinaryish$1(node)) {\n // Put all operators with the same precedence level in the same\n // group. The reason we only need to do this with the `left`\n // expression is because given an expression like `1 + 2 - 3`, it\n // is always parsed like `((1 + 2) - 3)`, meaning the `left` side\n // is where the rest of the expression will exist. Binary\n // expressions on the right side mean they have a difference\n // precedence level and should be treated as a separate group, so\n // print them normally. (This doesn't hold for the `**` operator,\n // which is unique in that it is right-associative.)\n if (shouldFlatten$1(node.operator, node.left.operator)) {\n // Flatten them out by recursively calling this function.\n parts = parts.concat(path.call(left => printBinaryishExpressions(left, print, options,\n /* isNested */\n true, isInsideParenthesis), \"left\"));\n } else {\n parts.push(path.call(print, \"left\"));\n }\n\n const shouldInline = shouldInlineLogicalExpression(node);\n const lineBeforeOperator = (node.operator === \"|>\" || node.type === \"NGPipeExpression\" || node.operator === \"|\" && options.parser === \"__vue_expression\") && !hasLeadingOwnLineComment$1(options.originalText, node.right, options);\n const operator = node.type === \"NGPipeExpression\" ? \"|\" : node.operator;\n const rightSuffix = node.type === \"NGPipeExpression\" && node.arguments.length !== 0 ? group$b(indent$7(concat$d([softline$6, \": \", join$9(concat$d([softline$6, \":\", ifBreak$6(\" \")]), path.map(print, \"arguments\").map(arg => align$1(2, group$b(arg))))]))) : \"\";\n const right = shouldInline ? concat$d([operator, \" \", path.call(print, \"right\"), rightSuffix]) : concat$d([lineBeforeOperator ? softline$6 : \"\", operator, lineBeforeOperator ? \" \" : line$9, path.call(print, \"right\"), rightSuffix]); // If there's only a single binary expression, we want to create a group\n // in order to avoid having a small right part like -1 be on its own line.\n\n const parent = path.getParentNode();\n const shouldGroup = !(isInsideParenthesis && node.type === \"LogicalExpression\") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type;\n parts.push(\" \", shouldGroup ? group$b(right) : right); // The root comments are already printed, but we need to manually print\n // the other ones since we don't call the normal print on BinaryExpression,\n // only for the left and right parts\n\n if (isNested && node.comments) {\n parts = comments.printComments(path, () => concat$d(parts), options);\n }\n } else {\n // Our stopping case. Simply print the node normally.\n parts.push(path.call(print));\n }\n\n return parts;\n }\n\n function printAssignmentRight(leftNode, rightNode, printedRight, options) {\n if (hasLeadingOwnLineComment$1(options.originalText, rightNode, options)) {\n return indent$7(concat$d([line$9, printedRight]));\n }\n\n const canBreak = isBinaryish$1(rightNode) && !shouldInlineLogicalExpression(rightNode) || rightNode.type === \"ConditionalExpression\" && isBinaryish$1(rightNode.test) && !shouldInlineLogicalExpression(rightNode.test) || rightNode.type === \"StringLiteralTypeAnnotation\" || rightNode.type === \"ClassExpression\" && rightNode.decorators && rightNode.decorators.length || (leftNode.type === \"Identifier\" || isStringLiteral$1(leftNode) || leftNode.type === \"MemberExpression\") && (isStringLiteral$1(rightNode) || isMemberExpressionChain$1(rightNode)) && // do not put values on a separate line from the key in json\n options.parser !== \"json\" && options.parser !== \"json5\" || rightNode.type === \"SequenceExpression\";\n\n if (canBreak) {\n return group$b(indent$7(concat$d([line$9, printedRight])));\n }\n\n return concat$d([\" \", printedRight]);\n }\n\n function printAssignment(leftNode, printedLeft, operator, rightNode, printedRight, options) {\n if (!rightNode) {\n return printedLeft;\n }\n\n const printed = printAssignmentRight(leftNode, rightNode, printedRight, options);\n return group$b(concat$d([printedLeft, operator, printed]));\n }\n\n function adjustClause(node, clause, forceSpace) {\n if (node.type === \"EmptyStatement\") {\n return \";\";\n }\n\n if (node.type === \"BlockStatement\" || forceSpace) {\n return concat$d([\" \", clause]);\n }\n\n return indent$7(concat$d([line$9, clause]));\n }\n\n function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) {\n const raw = rawText$1(node);\n const isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === \"DirectiveLiteral\";\n return printString$2(raw, options, isDirectiveLiteral);\n }\n\n function printRegex(node) {\n const flags = node.flags.split(\"\").sort().join(\"\");\n return \"/\".concat(node.pattern, \"/\").concat(flags);\n }\n\n function exprNeedsASIProtection(path, options) {\n const node = path.getValue();\n const maybeASIProblem = needsParens_1(path, options) || node.type === \"ParenthesizedExpression\" || node.type === \"TypeCastExpression\" || node.type === \"ArrowFunctionExpression\" && !shouldPrintParamsWithoutParens(path, options) || node.type === \"ArrayExpression\" || node.type === \"ArrayPattern\" || node.type === \"UnaryExpression\" && node.prefix && (node.operator === \"+\" || node.operator === \"-\") || node.type === \"TemplateLiteral\" || node.type === \"TemplateElement\" || isJSXNode$1(node) || node.type === \"BindExpression\" && !node.object || node.type === \"RegExpLiteral\" || node.type === \"Literal\" && node.pattern || node.type === \"Literal\" && node.regex;\n\n if (maybeASIProblem) {\n return true;\n }\n\n if (!hasNakedLeftSide$2(node)) {\n return false;\n }\n\n return path.call(childPath => exprNeedsASIProtection(childPath, options), ...getLeftSidePathName$2(path, node));\n }\n\n function stmtNeedsASIProtection(path, options) {\n const node = path.getNode();\n\n if (node.type !== \"ExpressionStatement\") {\n return false;\n }\n\n return path.call(childPath => exprNeedsASIProtection(childPath, options), \"expression\");\n }\n\n function shouldHugType(node) {\n if (isSimpleFlowType$1(node) || isObjectType$1(node)) {\n return true;\n }\n\n if (node.type === \"UnionTypeAnnotation\" || node.type === \"TSUnionType\") {\n const voidCount = node.types.filter(n => n.type === \"VoidTypeAnnotation\" || n.type === \"TSVoidKeyword\" || n.type === \"NullLiteralTypeAnnotation\" || n.type === \"TSNullKeyword\").length;\n const hasObject = node.types.some(n => n.type === \"ObjectTypeAnnotation\" || n.type === \"TSTypeLiteral\" || // This is a bit aggressive but captures Array<{x}>\n n.type === \"GenericTypeAnnotation\" || n.type === \"TSTypeReference\");\n\n if (node.types.length - 1 === voidCount && hasObject) {\n return true;\n }\n }\n\n return false;\n }\n\n function shouldHugArguments(fun) {\n if (!fun || fun.rest) {\n return false;\n }\n\n const params = fun.params || fun.parameters;\n\n if (!params || params.length !== 1) {\n return false;\n }\n\n const param = params[0];\n return !param.comments && (param.type === \"ObjectPattern\" || param.type === \"ArrayPattern\" || param.type === \"Identifier\" && param.typeAnnotation && (param.typeAnnotation.type === \"TypeAnnotation\" || param.typeAnnotation.type === \"TSTypeAnnotation\") && isObjectType$1(param.typeAnnotation.typeAnnotation) || param.type === \"FunctionTypeParam\" && isObjectType$1(param.typeAnnotation) || param.type === \"AssignmentPattern\" && (param.left.type === \"ObjectPattern\" || param.left.type === \"ArrayPattern\") && (param.right.type === \"Identifier\" || param.right.type === \"ObjectExpression\" && param.right.properties.length === 0 || param.right.type === \"ArrayExpression\" && param.right.elements.length === 0));\n }\n\n function printArrayItems(path, options, printPath, print) {\n const printedElements = [];\n let separatorParts = [];\n path.each(childPath => {\n printedElements.push(concat$d(separatorParts));\n printedElements.push(group$b(print(childPath)));\n separatorParts = [\",\", line$9];\n\n if (childPath.getValue() && isNextLineEmpty$4(options.originalText, childPath.getValue(), options.locEnd)) {\n separatorParts.push(softline$6);\n }\n }, printPath);\n return concat$d(printedElements);\n }\n\n function printReturnAndThrowArgument(path, options, print) {\n const node = path.getValue();\n const semi = options.semi ? \";\" : \"\";\n const parts = [];\n\n if (node.argument) {\n if (returnArgumentHasLeadingComment$1(options, node.argument)) {\n parts.push(concat$d([\" (\", indent$7(concat$d([hardline$9, path.call(print, \"argument\")])), hardline$9, \")\"]));\n } else if (isBinaryish$1(node.argument) || node.argument.type === \"SequenceExpression\") {\n parts.push(group$b(concat$d([ifBreak$6(\" (\", \" \"), indent$7(concat$d([softline$6, path.call(print, \"argument\")])), softline$6, ifBreak$6(\")\")])));\n } else {\n parts.push(\" \", path.call(print, \"argument\"));\n }\n }\n\n const lastComment = Array.isArray(node.comments) && node.comments[node.comments.length - 1];\n const isLastCommentLine = lastComment && (lastComment.type === \"CommentLine\" || lastComment.type === \"Line\");\n\n if (isLastCommentLine) {\n parts.push(semi);\n }\n\n if (hasDanglingComments$1(node)) {\n parts.push(\" \", comments.printDanglingComments(path, options,\n /* sameIndent */\n true));\n }\n\n if (!isLastCommentLine) {\n parts.push(semi);\n }\n\n return concat$d(parts);\n }\n\n function willPrintOwnComments(path\n /*, options */\n ) {\n const node = path.getValue();\n const parent = path.getParentNode();\n return (node && (isJSXNode$1(node) || hasFlowShorthandAnnotationComment$2(node) || parent && (parent.type === \"CallExpression\" || parent.type === \"OptionalCallExpression\") && (hasFlowAnnotationComment$1(node.leadingComments) || hasFlowAnnotationComment$1(node.trailingComments))) || parent && (parent.type === \"JSXSpreadAttribute\" || parent.type === \"JSXSpreadChild\" || parent.type === \"UnionTypeAnnotation\" || parent.type === \"TSUnionType\" || (parent.type === \"ClassDeclaration\" || parent.type === \"ClassExpression\") && parent.superClass === node)) && (!hasIgnoreComment$4(path) || parent.type === \"UnionTypeAnnotation\" || parent.type === \"TSUnionType\");\n }\n\n function canAttachComment$1(node) {\n return node.type && node.type !== \"CommentBlock\" && node.type !== \"CommentLine\" && node.type !== \"Line\" && node.type !== \"Block\" && node.type !== \"EmptyStatement\" && node.type !== \"TemplateElement\" && node.type !== \"Import\";\n }\n\n function printComment$2(commentPath, options) {\n const comment = commentPath.getValue();\n\n switch (comment.type) {\n case \"CommentBlock\":\n case \"Block\":\n {\n if (isIndentableBlockComment(comment)) {\n const printed = printIndentableBlockComment(comment); // We need to prevent an edge case of a previous trailing comment\n // printed as a `lineSuffix` which causes the comments to be\n // interleaved. See https://github.com/prettier/prettier/issues/4412\n\n if (comment.trailing && !hasNewline$5(options.originalText, options.locStart(comment), {\n backwards: true\n })) {\n return concat$d([hardline$9, printed]);\n }\n\n return printed;\n }\n\n const commentEnd = options.locEnd(comment);\n const isInsideFlowComment = options.originalText.slice(commentEnd - 3, commentEnd) === \"*-/\";\n return \"/*\" + comment.value + (isInsideFlowComment ? \"*-/\" : \"*/\");\n }\n\n case \"CommentLine\":\n case \"Line\":\n // Print shebangs with the proper comment characters\n if (options.originalText.slice(options.locStart(comment)).startsWith(\"#!\")) {\n return \"#!\" + comment.value.trimEnd();\n }\n\n return \"//\" + comment.value.trimEnd();\n\n default:\n throw new Error(\"Not a comment: \" + JSON.stringify(comment));\n }\n }\n\n function isIndentableBlockComment(comment) {\n // If the comment has multiple lines and every line starts with a star\n // we can fix the indentation of each line. The stars in the `/*` and\n // `*/` delimiters are not included in the comment value, so add them\n // back first.\n const lines = \"*\".concat(comment.value, \"*\").split(\"\\n\");\n return lines.length > 1 && lines.every(line => line.trim()[0] === \"*\");\n }\n\n function printIndentableBlockComment(comment) {\n const lines = comment.value.split(\"\\n\");\n return concat$d([\"/*\", join$9(hardline$9, lines.map((line, index) => index === 0 ? line.trimEnd() : \" \" + (index < lines.length - 1 ? line.trim() : line.trimStart()))), \"*/\"]);\n }\n\n var printerEstree = {\n preprocess: preprocess_1$1,\n print: genericPrint$3,\n embed: embed_1$1,\n insertPragma: insertPragma$7,\n massageAstNode: clean_1$1,\n hasPrettierIgnore: hasPrettierIgnore$5,\n willPrintOwnComments,\n canAttachComment: canAttachComment$1,\n printComment: printComment$2,\n isBlockComment: comments$1.isBlockComment,\n handleComments: {\n ownLine: comments$1.handleOwnLineComment,\n endOfLine: comments$1.handleEndOfLineComment,\n remaining: comments$1.handleRemainingComment\n },\n getGapRegex: comments$1.getGapRegex,\n getCommentChildNodes: comments$1.getCommentChildNodes\n };\n\n const {\n concat: concat$e,\n hardline: hardline$a,\n indent: indent$8,\n join: join$a\n } = document.builders;\n\n function genericPrint$4(path, options, print) {\n const node = path.getValue();\n\n switch (node.type) {\n case \"JsonRoot\":\n return concat$e([path.call(print, \"node\"), hardline$a]);\n\n case \"ArrayExpression\":\n return node.elements.length === 0 ? \"[]\" : concat$e([\"[\", indent$8(concat$e([hardline$a, join$a(concat$e([\",\", hardline$a]), path.map(print, \"elements\"))])), hardline$a, \"]\"]);\n\n case \"ObjectExpression\":\n return node.properties.length === 0 ? \"{}\" : concat$e([\"{\", indent$8(concat$e([hardline$a, join$a(concat$e([\",\", hardline$a]), path.map(print, \"properties\"))])), hardline$a, \"}\"]);\n\n case \"ObjectProperty\":\n return concat$e([path.call(print, \"key\"), \": \", path.call(print, \"value\")]);\n\n case \"UnaryExpression\":\n return concat$e([node.operator === \"+\" ? \"\" : node.operator, path.call(print, \"argument\")]);\n\n case \"NullLiteral\":\n return \"null\";\n\n case \"BooleanLiteral\":\n return node.value ? \"true\" : \"false\";\n\n case \"StringLiteral\":\n case \"NumericLiteral\":\n return JSON.stringify(node.value);\n\n case \"Identifier\":\n return JSON.stringify(node.name);\n\n default:\n /* istanbul ignore next */\n throw new Error(\"unknown type: \" + JSON.stringify(node.type));\n }\n }\n\n function clean$5(node, newNode\n /*, parent*/\n ) {\n delete newNode.start;\n delete newNode.end;\n delete newNode.extra;\n delete newNode.loc;\n delete newNode.comments;\n delete newNode.errors;\n\n if (node.type === \"Identifier\") {\n return {\n type: \"StringLiteral\",\n value: node.name\n };\n }\n\n if (node.type === \"UnaryExpression\" && node.operator === \"+\") {\n return newNode.argument;\n }\n }\n\n var printerEstreeJson = {\n preprocess: preprocess_1$1,\n print: genericPrint$4,\n massageAstNode: clean$5\n };\n\n const CATEGORY_JAVASCRIPT = \"JavaScript\"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js\n\n var options$5 = {\n arrowParens: {\n since: \"1.9.0\",\n category: CATEGORY_JAVASCRIPT,\n type: \"choice\",\n default: [{\n since: \"1.9.0\",\n value: \"avoid\"\n }, {\n since: \"2.0.0\",\n value: \"always\"\n }],\n description: \"Include parentheses around a sole arrow function parameter.\",\n choices: [{\n value: \"always\",\n description: \"Always include parens. Example: `(x) => x`\"\n }, {\n value: \"avoid\",\n description: \"Omit parens when possible. Example: `x => x`\"\n }]\n },\n bracketSpacing: commonOptions.bracketSpacing,\n jsxBracketSameLine: {\n since: \"0.17.0\",\n category: CATEGORY_JAVASCRIPT,\n type: \"boolean\",\n default: false,\n description: \"Put > on the last line instead of at a new line.\"\n },\n semi: {\n since: \"1.0.0\",\n category: CATEGORY_JAVASCRIPT,\n type: \"boolean\",\n default: true,\n description: \"Print semicolons.\",\n oppositeDescription: \"Do not print semicolons, except at the beginning of lines which may need them.\"\n },\n singleQuote: commonOptions.singleQuote,\n jsxSingleQuote: {\n since: \"1.15.0\",\n category: CATEGORY_JAVASCRIPT,\n type: \"boolean\",\n default: false,\n description: \"Use single quotes in JSX.\"\n },\n quoteProps: {\n since: \"1.17.0\",\n category: CATEGORY_JAVASCRIPT,\n type: \"choice\",\n default: \"as-needed\",\n description: \"Change when properties in objects are quoted.\",\n choices: [{\n value: \"as-needed\",\n description: \"Only add quotes around object properties where required.\"\n }, {\n value: \"consistent\",\n description: \"If at least one property in an object requires quotes, quote all properties.\"\n }, {\n value: \"preserve\",\n description: \"Respect the input use of quotes in object properties.\"\n }]\n },\n trailingComma: {\n since: \"0.0.0\",\n category: CATEGORY_JAVASCRIPT,\n type: \"choice\",\n default: [{\n since: \"0.0.0\",\n value: false\n }, {\n since: \"0.19.0\",\n value: \"none\"\n }, {\n since: \"2.0.0\",\n value: \"es5\"\n }],\n description: \"Print trailing commas wherever possible when multi-line.\",\n choices: [{\n value: \"es5\",\n description: \"Trailing commas where valid in ES5 (objects, arrays, etc.)\"\n }, {\n value: \"none\",\n description: \"No trailing commas.\"\n }, {\n value: \"all\",\n description: \"Trailing commas wherever possible (including function arguments).\"\n }]\n }\n };\n\n var name$9 = \"JavaScript\";\n var type$8 = \"programming\";\n var tmScope$8 = \"source.js\";\n var aceMode$8 = \"javascript\";\n var codemirrorMode$4 = \"javascript\";\n var codemirrorMimeType$4 = \"text/javascript\";\n var color$3 = \"#f1e05a\";\n var aliases$2 = [\n \t\"js\",\n \t\"node\"\n ];\n var extensions$8 = [\n \t\".js\",\n \t\"._js\",\n \t\".bones\",\n \t\".cjs\",\n \t\".es\",\n \t\".es6\",\n \t\".frag\",\n \t\".gs\",\n \t\".jake\",\n \t\".jsb\",\n \t\".jscad\",\n \t\".jsfl\",\n \t\".jsm\",\n \t\".jss\",\n \t\".mjs\",\n \t\".njs\",\n \t\".pac\",\n \t\".sjs\",\n \t\".ssjs\",\n \t\".xsjs\",\n \t\".xsjslib\"\n ];\n var filenames = [\n \t\"Jakefile\"\n ];\n var interpreters = [\n \t\"chakra\",\n \t\"d8\",\n \t\"gjs\",\n \t\"js\",\n \t\"node\",\n \t\"qjs\",\n \t\"rhino\",\n \t\"v8\",\n \t\"v8-shell\"\n ];\n var languageId$8 = 183;\n var JavaScript = {\n \tname: name$9,\n \ttype: type$8,\n \ttmScope: tmScope$8,\n \taceMode: aceMode$8,\n \tcodemirrorMode: codemirrorMode$4,\n \tcodemirrorMimeType: codemirrorMimeType$4,\n \tcolor: color$3,\n \taliases: aliases$2,\n \textensions: extensions$8,\n \tfilenames: filenames,\n \tinterpreters: interpreters,\n \tlanguageId: languageId$8\n };\n\n var JavaScript$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$9,\n type: type$8,\n tmScope: tmScope$8,\n aceMode: aceMode$8,\n codemirrorMode: codemirrorMode$4,\n codemirrorMimeType: codemirrorMimeType$4,\n color: color$3,\n aliases: aliases$2,\n extensions: extensions$8,\n filenames: filenames,\n interpreters: interpreters,\n languageId: languageId$8,\n 'default': JavaScript\n });\n\n var name$a = \"JSX\";\n var type$9 = \"programming\";\n var group$c = \"JavaScript\";\n var extensions$9 = [\n \t\".jsx\"\n ];\n var tmScope$9 = \"source.js.jsx\";\n var aceMode$9 = \"javascript\";\n var codemirrorMode$5 = \"jsx\";\n var codemirrorMimeType$5 = \"text/jsx\";\n var languageId$9 = 178;\n var JSX = {\n \tname: name$a,\n \ttype: type$9,\n \tgroup: group$c,\n \textensions: extensions$9,\n \ttmScope: tmScope$9,\n \taceMode: aceMode$9,\n \tcodemirrorMode: codemirrorMode$5,\n \tcodemirrorMimeType: codemirrorMimeType$5,\n \tlanguageId: languageId$9\n };\n\n var JSX$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$a,\n type: type$9,\n group: group$c,\n extensions: extensions$9,\n tmScope: tmScope$9,\n aceMode: aceMode$9,\n codemirrorMode: codemirrorMode$5,\n codemirrorMimeType: codemirrorMimeType$5,\n languageId: languageId$9,\n 'default': JSX\n });\n\n var name$b = \"TypeScript\";\n var type$a = \"programming\";\n var color$4 = \"#2b7489\";\n var aliases$3 = [\n \t\"ts\"\n ];\n var interpreters$1 = [\n \t\"deno\",\n \t\"ts-node\"\n ];\n var extensions$a = [\n \t\".ts\"\n ];\n var tmScope$a = \"source.ts\";\n var aceMode$a = \"typescript\";\n var codemirrorMode$6 = \"javascript\";\n var codemirrorMimeType$6 = \"application/typescript\";\n var languageId$a = 378;\n var TypeScript = {\n \tname: name$b,\n \ttype: type$a,\n \tcolor: color$4,\n \taliases: aliases$3,\n \tinterpreters: interpreters$1,\n \textensions: extensions$a,\n \ttmScope: tmScope$a,\n \taceMode: aceMode$a,\n \tcodemirrorMode: codemirrorMode$6,\n \tcodemirrorMimeType: codemirrorMimeType$6,\n \tlanguageId: languageId$a\n };\n\n var TypeScript$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$b,\n type: type$a,\n color: color$4,\n aliases: aliases$3,\n interpreters: interpreters$1,\n extensions: extensions$a,\n tmScope: tmScope$a,\n aceMode: aceMode$a,\n codemirrorMode: codemirrorMode$6,\n codemirrorMimeType: codemirrorMimeType$6,\n languageId: languageId$a,\n 'default': TypeScript\n });\n\n var name$c = \"TSX\";\n var type$b = \"programming\";\n var group$d = \"TypeScript\";\n var extensions$b = [\n \t\".tsx\"\n ];\n var tmScope$b = \"source.tsx\";\n var aceMode$b = \"javascript\";\n var codemirrorMode$7 = \"jsx\";\n var codemirrorMimeType$7 = \"text/jsx\";\n var languageId$b = 94901924;\n var TSX = {\n \tname: name$c,\n \ttype: type$b,\n \tgroup: group$d,\n \textensions: extensions$b,\n \ttmScope: tmScope$b,\n \taceMode: aceMode$b,\n \tcodemirrorMode: codemirrorMode$7,\n \tcodemirrorMimeType: codemirrorMimeType$7,\n \tlanguageId: languageId$b\n };\n\n var TSX$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$c,\n type: type$b,\n group: group$d,\n extensions: extensions$b,\n tmScope: tmScope$b,\n aceMode: aceMode$b,\n codemirrorMode: codemirrorMode$7,\n codemirrorMimeType: codemirrorMimeType$7,\n languageId: languageId$b,\n 'default': TSX\n });\n\n var name$d = \"JSON\";\n var type$c = \"data\";\n var tmScope$c = \"source.json\";\n var aceMode$c = \"json\";\n var codemirrorMode$8 = \"javascript\";\n var codemirrorMimeType$8 = \"application/json\";\n var searchable = false;\n var extensions$c = [\n \t\".json\",\n \t\".avsc\",\n \t\".geojson\",\n \t\".gltf\",\n \t\".har\",\n \t\".ice\",\n \t\".JSON-tmLanguage\",\n \t\".jsonl\",\n \t\".mcmeta\",\n \t\".tfstate\",\n \t\".tfstate.backup\",\n \t\".topojson\",\n \t\".webapp\",\n \t\".webmanifest\",\n \t\".yy\",\n \t\".yyp\"\n ];\n var filenames$1 = [\n \t\".arcconfig\",\n \t\".htmlhintrc\",\n \t\".tern-config\",\n \t\".tern-project\",\n \t\".watchmanconfig\",\n \t\"composer.lock\",\n \t\"mcmod.info\"\n ];\n var languageId$c = 174;\n var _JSON = {\n \tname: name$d,\n \ttype: type$c,\n \ttmScope: tmScope$c,\n \taceMode: aceMode$c,\n \tcodemirrorMode: codemirrorMode$8,\n \tcodemirrorMimeType: codemirrorMimeType$8,\n \tsearchable: searchable,\n \textensions: extensions$c,\n \tfilenames: filenames$1,\n \tlanguageId: languageId$c\n };\n\n var _JSON$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$d,\n type: type$c,\n tmScope: tmScope$c,\n aceMode: aceMode$c,\n codemirrorMode: codemirrorMode$8,\n codemirrorMimeType: codemirrorMimeType$8,\n searchable: searchable,\n extensions: extensions$c,\n filenames: filenames$1,\n languageId: languageId$c,\n 'default': _JSON\n });\n\n var name$e = \"JSON with Comments\";\n var type$d = \"data\";\n var group$e = \"JSON\";\n var tmScope$d = \"source.js\";\n var aceMode$d = \"javascript\";\n var codemirrorMode$9 = \"javascript\";\n var codemirrorMimeType$9 = \"text/javascript\";\n var aliases$4 = [\n \t\"jsonc\"\n ];\n var extensions$d = [\n \t\".jsonc\",\n \t\".sublime-build\",\n \t\".sublime-commands\",\n \t\".sublime-completions\",\n \t\".sublime-keymap\",\n \t\".sublime-macro\",\n \t\".sublime-menu\",\n \t\".sublime-mousemap\",\n \t\".sublime-project\",\n \t\".sublime-settings\",\n \t\".sublime-theme\",\n \t\".sublime-workspace\",\n \t\".sublime_metrics\",\n \t\".sublime_session\"\n ];\n var filenames$2 = [\n \t\".babelrc\",\n \t\".eslintrc.json\",\n \t\".jscsrc\",\n \t\".jshintrc\",\n \t\".jslintrc\",\n \t\"jsconfig.json\",\n \t\"language-configuration.json\",\n \t\"tsconfig.json\"\n ];\n var languageId$d = 423;\n var JSON_with_Comments = {\n \tname: name$e,\n \ttype: type$d,\n \tgroup: group$e,\n \ttmScope: tmScope$d,\n \taceMode: aceMode$d,\n \tcodemirrorMode: codemirrorMode$9,\n \tcodemirrorMimeType: codemirrorMimeType$9,\n \taliases: aliases$4,\n \textensions: extensions$d,\n \tfilenames: filenames$2,\n \tlanguageId: languageId$d\n };\n\n var JSON_with_Comments$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$e,\n type: type$d,\n group: group$e,\n tmScope: tmScope$d,\n aceMode: aceMode$d,\n codemirrorMode: codemirrorMode$9,\n codemirrorMimeType: codemirrorMimeType$9,\n aliases: aliases$4,\n extensions: extensions$d,\n filenames: filenames$2,\n languageId: languageId$d,\n 'default': JSON_with_Comments\n });\n\n var name$f = \"JSON5\";\n var type$e = \"data\";\n var extensions$e = [\n \t\".json5\"\n ];\n var tmScope$e = \"source.js\";\n var aceMode$e = \"javascript\";\n var codemirrorMode$a = \"javascript\";\n var codemirrorMimeType$a = \"application/json\";\n var languageId$e = 175;\n var JSON5 = {\n \tname: name$f,\n \ttype: type$e,\n \textensions: extensions$e,\n \ttmScope: tmScope$e,\n \taceMode: aceMode$e,\n \tcodemirrorMode: codemirrorMode$a,\n \tcodemirrorMimeType: codemirrorMimeType$a,\n \tlanguageId: languageId$e\n };\n\n var JSON5$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$f,\n type: type$e,\n extensions: extensions$e,\n tmScope: tmScope$e,\n aceMode: aceMode$e,\n codemirrorMode: codemirrorMode$a,\n codemirrorMimeType: codemirrorMimeType$a,\n languageId: languageId$e,\n 'default': JSON5\n });\n\n var require$$0$6 = getCjsExportFromNamespace(JavaScript$1);\n\n var require$$1$2 = getCjsExportFromNamespace(JSX$1);\n\n var require$$2$1 = getCjsExportFromNamespace(TypeScript$1);\n\n var require$$3$1 = getCjsExportFromNamespace(TSX$1);\n\n var require$$4 = getCjsExportFromNamespace(_JSON$1);\n\n var require$$5 = getCjsExportFromNamespace(JSON_with_Comments$1);\n\n var require$$6 = getCjsExportFromNamespace(JSON5$1);\n\n const languages$4 = [createLanguage(require$$0$6, data => ({\n since: \"0.0.0\",\n parsers: [\"babel\", \"flow\"],\n vscodeLanguageIds: [\"javascript\", \"mongo\"],\n interpreters: data.interpreters.concat([\"nodejs\"])\n })), createLanguage(require$$0$6, () => ({\n name: \"Flow\",\n since: \"0.0.0\",\n parsers: [\"babel\", \"flow\"],\n vscodeLanguageIds: [\"javascript\"],\n aliases: [],\n filenames: [],\n extensions: [\".js.flow\"]\n })), createLanguage(require$$1$2, () => ({\n since: \"0.0.0\",\n parsers: [\"babel\", \"flow\"],\n vscodeLanguageIds: [\"javascriptreact\"]\n })), createLanguage(require$$2$1, () => ({\n since: \"1.4.0\",\n parsers: [\"typescript\", \"babel-ts\"],\n vscodeLanguageIds: [\"typescript\"]\n })), createLanguage(require$$3$1, () => ({\n since: \"1.4.0\",\n parsers: [\"typescript\", \"babel-ts\"],\n vscodeLanguageIds: [\"typescriptreact\"]\n })), createLanguage(require$$4, () => ({\n name: \"JSON.stringify\",\n since: \"1.13.0\",\n parsers: [\"json-stringify\"],\n vscodeLanguageIds: [\"json\"],\n extensions: [],\n // .json file defaults to json instead of json-stringify\n filenames: [\"package.json\", \"package-lock.json\", \"composer.json\"]\n })), createLanguage(require$$4, data => ({\n since: \"1.5.0\",\n parsers: [\"json\"],\n vscodeLanguageIds: [\"json\"],\n filenames: data.filenames.concat([\".prettierrc\"])\n })), createLanguage(require$$5, data => ({\n since: \"1.5.0\",\n parsers: [\"json\"],\n vscodeLanguageIds: [\"jsonc\"],\n filenames: data.filenames.concat([\".eslintrc\"])\n })), createLanguage(require$$6, () => ({\n since: \"1.13.0\",\n parsers: [\"json5\"],\n vscodeLanguageIds: [\"json5\"]\n }))];\n const printers$4 = {\n estree: printerEstree,\n \"estree-json\": printerEstreeJson\n };\n var languageJs = {\n languages: languages$4,\n options: options$5,\n printers: printers$4\n };\n\n var json$1 = {\n \"cjkPattern\": \"[\\\\u02ea-\\\\u02eb\\\\u1100-\\\\u11ff\\\\u2e80-\\\\u2e99\\\\u2e9b-\\\\u2ef3\\\\u2f00-\\\\u2fd5\\\\u3000-\\\\u303f\\\\u3041-\\\\u3096\\\\u3099-\\\\u309f\\\\u30a1-\\\\u30fa\\\\u30fc-\\\\u30ff\\\\u3105-\\\\u312f\\\\u3131-\\\\u318e\\\\u3190-\\\\u3191\\\\u3196-\\\\u31ba\\\\u31c0-\\\\u31e3\\\\u31f0-\\\\u321e\\\\u322a-\\\\u3247\\\\u3260-\\\\u327e\\\\u328a-\\\\u32b0\\\\u32c0-\\\\u32cb\\\\u32d0-\\\\u3370\\\\u337b-\\\\u337f\\\\u33e0-\\\\u33fe\\\\u3400-\\\\u4db5\\\\u4e00-\\\\u9fef\\\\ua960-\\\\ua97c\\\\uac00-\\\\ud7a3\\\\ud7b0-\\\\ud7c6\\\\ud7cb-\\\\ud7fb\\\\uf900-\\\\ufa6d\\\\ufa70-\\\\ufad9\\\\ufe10-\\\\ufe1f\\\\ufe30-\\\\ufe6f\\\\uff00-\\\\uffef]|[\\\\ud840-\\\\ud868\\\\ud86a-\\\\ud86c\\\\ud86f-\\\\ud872\\\\ud874-\\\\ud879][\\\\udc00-\\\\udfff]|\\\\ud82c[\\\\udc00-\\\\udd1e\\\\udd50-\\\\udd52\\\\udd64-\\\\udd67]|\\\\ud83c[\\\\ude00\\\\ude50-\\\\ude51]|\\\\ud869[\\\\udc00-\\\\uded6\\\\udf00-\\\\udfff]|\\\\ud86d[\\\\udc00-\\\\udf34\\\\udf40-\\\\udfff]|\\\\ud86e[\\\\udc00-\\\\udc1d\\\\udc20-\\\\udfff]|\\\\ud873[\\\\udc00-\\\\udea1\\\\udeb0-\\\\udfff]|\\\\ud87a[\\\\udc00-\\\\udfe0]|\\\\ud87e[\\\\udc00-\\\\ude1d]\",\n \"kPattern\": \"[\\\\u1100-\\\\u11ff\\\\u3001-\\\\u3003\\\\u3008-\\\\u3011\\\\u3013-\\\\u301f\\\\u302e-\\\\u3030\\\\u3037\\\\u30fb\\\\u3131-\\\\u318e\\\\u3200-\\\\u321e\\\\u3260-\\\\u327e\\\\ua960-\\\\ua97c\\\\uac00-\\\\ud7a3\\\\ud7b0-\\\\ud7c6\\\\ud7cb-\\\\ud7fb\\\\ufe45-\\\\ufe46\\\\uff61-\\\\uff65\\\\uffa0-\\\\uffbe\\\\uffc2-\\\\uffc7\\\\uffca-\\\\uffcf\\\\uffd2-\\\\uffd7\\\\uffda-\\\\uffdc]\",\n \"punctuationPattern\": \"[\\\\u0021-\\\\u002f\\\\u003a-\\\\u0040\\\\u005b-\\\\u0060\\\\u007b-\\\\u007e\\\\u00a1\\\\u00a7\\\\u00ab\\\\u00b6-\\\\u00b7\\\\u00bb\\\\u00bf\\\\u037e\\\\u0387\\\\u055a-\\\\u055f\\\\u0589-\\\\u058a\\\\u05be\\\\u05c0\\\\u05c3\\\\u05c6\\\\u05f3-\\\\u05f4\\\\u0609-\\\\u060a\\\\u060c-\\\\u060d\\\\u061b\\\\u061e-\\\\u061f\\\\u066a-\\\\u066d\\\\u06d4\\\\u0700-\\\\u070d\\\\u07f7-\\\\u07f9\\\\u0830-\\\\u083e\\\\u085e\\\\u0964-\\\\u0965\\\\u0970\\\\u09fd\\\\u0a76\\\\u0af0\\\\u0c77\\\\u0c84\\\\u0df4\\\\u0e4f\\\\u0e5a-\\\\u0e5b\\\\u0f04-\\\\u0f12\\\\u0f14\\\\u0f3a-\\\\u0f3d\\\\u0f85\\\\u0fd0-\\\\u0fd4\\\\u0fd9-\\\\u0fda\\\\u104a-\\\\u104f\\\\u10fb\\\\u1360-\\\\u1368\\\\u1400\\\\u166e\\\\u169b-\\\\u169c\\\\u16eb-\\\\u16ed\\\\u1735-\\\\u1736\\\\u17d4-\\\\u17d6\\\\u17d8-\\\\u17da\\\\u1800-\\\\u180a\\\\u1944-\\\\u1945\\\\u1a1e-\\\\u1a1f\\\\u1aa0-\\\\u1aa6\\\\u1aa8-\\\\u1aad\\\\u1b5a-\\\\u1b60\\\\u1bfc-\\\\u1bff\\\\u1c3b-\\\\u1c3f\\\\u1c7e-\\\\u1c7f\\\\u1cc0-\\\\u1cc7\\\\u1cd3\\\\u2010-\\\\u2027\\\\u2030-\\\\u2043\\\\u2045-\\\\u2051\\\\u2053-\\\\u205e\\\\u207d-\\\\u207e\\\\u208d-\\\\u208e\\\\u2308-\\\\u230b\\\\u2329-\\\\u232a\\\\u2768-\\\\u2775\\\\u27c5-\\\\u27c6\\\\u27e6-\\\\u27ef\\\\u2983-\\\\u2998\\\\u29d8-\\\\u29db\\\\u29fc-\\\\u29fd\\\\u2cf9-\\\\u2cfc\\\\u2cfe-\\\\u2cff\\\\u2d70\\\\u2e00-\\\\u2e2e\\\\u2e30-\\\\u2e4f\\\\u3001-\\\\u3003\\\\u3008-\\\\u3011\\\\u3014-\\\\u301f\\\\u3030\\\\u303d\\\\u30a0\\\\u30fb\\\\ua4fe-\\\\ua4ff\\\\ua60d-\\\\ua60f\\\\ua673\\\\ua67e\\\\ua6f2-\\\\ua6f7\\\\ua874-\\\\ua877\\\\ua8ce-\\\\ua8cf\\\\ua8f8-\\\\ua8fa\\\\ua8fc\\\\ua92e-\\\\ua92f\\\\ua95f\\\\ua9c1-\\\\ua9cd\\\\ua9de-\\\\ua9df\\\\uaa5c-\\\\uaa5f\\\\uaade-\\\\uaadf\\\\uaaf0-\\\\uaaf1\\\\uabeb\\\\ufd3e-\\\\ufd3f\\\\ufe10-\\\\ufe19\\\\ufe30-\\\\ufe52\\\\ufe54-\\\\ufe61\\\\ufe63\\\\ufe68\\\\ufe6a-\\\\ufe6b\\\\uff01-\\\\uff03\\\\uff05-\\\\uff0a\\\\uff0c-\\\\uff0f\\\\uff1a-\\\\uff1b\\\\uff1f-\\\\uff20\\\\uff3b-\\\\uff3d\\\\uff3f\\\\uff5b\\\\uff5d\\\\uff5f-\\\\uff65]|\\\\ud800[\\\\udd00-\\\\udd02\\\\udf9f\\\\udfd0]|\\\\ud801[\\\\udd6f]|\\\\ud802[\\\\udc57\\\\udd1f\\\\udd3f\\\\ude50-\\\\ude58\\\\ude7f\\\\udef0-\\\\udef6\\\\udf39-\\\\udf3f\\\\udf99-\\\\udf9c]|\\\\ud803[\\\\udf55-\\\\udf59]|\\\\ud804[\\\\udc47-\\\\udc4d\\\\udcbb-\\\\udcbc\\\\udcbe-\\\\udcc1\\\\udd40-\\\\udd43\\\\udd74-\\\\udd75\\\\uddc5-\\\\uddc8\\\\uddcd\\\\udddb\\\\udddd-\\\\udddf\\\\ude38-\\\\ude3d\\\\udea9]|\\\\ud805[\\\\udc4b-\\\\udc4f\\\\udc5b\\\\udc5d\\\\udcc6\\\\uddc1-\\\\uddd7\\\\ude41-\\\\ude43\\\\ude60-\\\\ude6c\\\\udf3c-\\\\udf3e]|\\\\ud806[\\\\udc3b\\\\udde2\\\\ude3f-\\\\ude46\\\\ude9a-\\\\ude9c\\\\ude9e-\\\\udea2]|\\\\ud807[\\\\udc41-\\\\udc45\\\\udc70-\\\\udc71\\\\udef7-\\\\udef8\\\\udfff]|\\\\ud809[\\\\udc70-\\\\udc74]|\\\\ud81a[\\\\ude6e-\\\\ude6f\\\\udef5\\\\udf37-\\\\udf3b\\\\udf44]|\\\\ud81b[\\\\ude97-\\\\ude9a\\\\udfe2]|\\\\ud82f[\\\\udc9f]|\\\\ud836[\\\\ude87-\\\\ude8b]|\\\\ud83a[\\\\udd5e-\\\\udd5f]\"\n };\n\n const {\n cjkPattern,\n kPattern,\n punctuationPattern\n } = json$1;\n const {\n getLast: getLast$4\n } = util$1;\n const INLINE_NODE_TYPES = [\"liquidNode\", \"inlineCode\", \"emphasis\", \"strong\", \"delete\", \"link\", \"linkReference\", \"image\", \"imageReference\", \"footnote\", \"footnoteReference\", \"sentence\", \"whitespace\", \"word\", \"break\", \"inlineMath\"];\n const INLINE_NODE_WRAPPER_TYPES = INLINE_NODE_TYPES.concat([\"tableCell\", \"paragraph\", \"heading\"]);\n const kRegex = new RegExp(kPattern);\n const punctuationRegex = new RegExp(punctuationPattern);\n /**\n * split text into whitespaces and words\n * @param {string} text\n * @return {Array<{ type: \"whitespace\", value: \" \" | \"\\n\" | \"\" } | { type: \"word\", value: string }>}\n */\n\n function splitText(text, options) {\n const KIND_NON_CJK = \"non-cjk\";\n const KIND_CJ_LETTER = \"cj-letter\";\n const KIND_K_LETTER = \"k-letter\";\n const KIND_CJK_PUNCTUATION = \"cjk-punctuation\";\n const nodes = [];\n (options.proseWrap === \"preserve\" ? text : text.replace(new RegExp(\"(\".concat(cjkPattern, \")\\n(\").concat(cjkPattern, \")\"), \"g\"), \"$1$2\")).split(/([ \\t\\n]+)/).forEach((token, index, tokens) => {\n // whitespace\n if (index % 2 === 1) {\n nodes.push({\n type: \"whitespace\",\n value: /\\n/.test(token) ? \"\\n\" : \" \"\n });\n return;\n } // word separated by whitespace\n\n\n if ((index === 0 || index === tokens.length - 1) && token === \"\") {\n return;\n }\n\n token.split(new RegExp(\"(\".concat(cjkPattern, \")\"))).forEach((innerToken, innerIndex, innerTokens) => {\n if ((innerIndex === 0 || innerIndex === innerTokens.length - 1) && innerToken === \"\") {\n return;\n } // non-CJK word\n\n\n if (innerIndex % 2 === 0) {\n if (innerToken !== \"\") {\n appendNode({\n type: \"word\",\n value: innerToken,\n kind: KIND_NON_CJK,\n hasLeadingPunctuation: punctuationRegex.test(innerToken[0]),\n hasTrailingPunctuation: punctuationRegex.test(getLast$4(innerToken))\n });\n }\n\n return;\n } // CJK character\n\n\n appendNode(punctuationRegex.test(innerToken) ? {\n type: \"word\",\n value: innerToken,\n kind: KIND_CJK_PUNCTUATION,\n hasLeadingPunctuation: true,\n hasTrailingPunctuation: true\n } : {\n type: \"word\",\n value: innerToken,\n kind: kRegex.test(innerToken) ? KIND_K_LETTER : KIND_CJ_LETTER,\n hasLeadingPunctuation: false,\n hasTrailingPunctuation: false\n });\n });\n });\n return nodes;\n\n function appendNode(node) {\n const lastNode = getLast$4(nodes);\n\n if (lastNode && lastNode.type === \"word\") {\n if (lastNode.kind === KIND_NON_CJK && node.kind === KIND_CJ_LETTER && !lastNode.hasTrailingPunctuation || lastNode.kind === KIND_CJ_LETTER && node.kind === KIND_NON_CJK && !node.hasLeadingPunctuation) {\n nodes.push({\n type: \"whitespace\",\n value: \" \"\n });\n } else if (!isBetween(KIND_NON_CJK, KIND_CJK_PUNCTUATION) && // disallow leading/trailing full-width whitespace\n ![lastNode.value, node.value].some(value => /\\u3000/.test(value))) {\n nodes.push({\n type: \"whitespace\",\n value: \"\"\n });\n }\n }\n\n nodes.push(node);\n\n function isBetween(kind1, kind2) {\n return lastNode.kind === kind1 && node.kind === kind2 || lastNode.kind === kind2 && node.kind === kind1;\n }\n }\n }\n\n function getOrderedListItemInfo(orderListItem, originalText) {\n const [, numberText, marker, leadingSpaces] = originalText.slice(orderListItem.position.start.offset, orderListItem.position.end.offset).match(/^\\s*(\\d+)(\\.|\\))(\\s*)/);\n return {\n numberText,\n marker,\n leadingSpaces\n };\n }\n\n function hasGitDiffFriendlyOrderedList(node, options) {\n if (!node.ordered) {\n return false;\n }\n\n if (node.children.length < 2) {\n return false;\n }\n\n const firstNumber = Number(getOrderedListItemInfo(node.children[0], options.originalText).numberText);\n const secondNumber = Number(getOrderedListItemInfo(node.children[1], options.originalText).numberText);\n\n if (firstNumber === 0 && node.children.length > 2) {\n const thirdNumber = Number(getOrderedListItemInfo(node.children[2], options.originalText).numberText);\n return secondNumber === 1 && thirdNumber === 1;\n }\n\n return secondNumber === 1;\n } // workaround for https://github.com/remarkjs/remark/issues/351\n // leading and trailing newlines are stripped by remark\n\n\n function getFencedCodeBlockValue(node, originalText) {\n const text = originalText.slice(node.position.start.offset, node.position.end.offset);\n const leadingSpaceCount = text.match(/^\\s*/)[0].length;\n const replaceRegex = new RegExp(\"^\\\\s{0,\".concat(leadingSpaceCount, \"}\"));\n const lineContents = text.split(\"\\n\");\n const markerStyle = text[leadingSpaceCount]; // ` or ~\n\n const marker = text.slice(leadingSpaceCount).match(new RegExp(\"^[\".concat(markerStyle, \"]+\")))[0]; // https://spec.commonmark.org/0.28/#example-104: Closing fences may be indented by 0-3 spaces\n // https://spec.commonmark.org/0.28/#example-93: The closing code fence must be at least as long as the opening fence\n\n const hasEndMarker = new RegExp(\"^\\\\s{0,3}\".concat(marker)).test(lineContents[lineContents.length - 1].slice(getIndent(lineContents.length - 1)));\n return lineContents.slice(1, hasEndMarker ? -1 : undefined).map((x, i) => x.slice(getIndent(i + 1)).replace(replaceRegex, \"\")).join(\"\\n\");\n\n function getIndent(lineIndex) {\n return node.position.indent[lineIndex - 1] - 1;\n }\n }\n\n function mapAst(ast, handler) {\n return function preorder(node, index, parentStack) {\n parentStack = parentStack || [];\n const newNode = Object.assign({}, handler(node, index, parentStack));\n\n if (newNode.children) {\n newNode.children = newNode.children.map((child, index) => {\n return preorder(child, index, [newNode].concat(parentStack));\n });\n }\n\n return newNode;\n }(ast, null, null);\n }\n\n var utils$6 = {\n mapAst,\n splitText,\n punctuationPattern,\n getFencedCodeBlockValue,\n getOrderedListItemInfo,\n hasGitDiffFriendlyOrderedList,\n INLINE_NODE_TYPES,\n INLINE_NODE_WRAPPER_TYPES\n };\n\n const {\n builders: {\n hardline: hardline$b,\n literalline: literalline$5,\n concat: concat$f,\n markAsRoot: markAsRoot$3\n },\n utils: {\n mapDoc: mapDoc$4\n }\n } = document;\n const {\n getFencedCodeBlockValue: getFencedCodeBlockValue$1\n } = utils$6;\n\n function embed$4(path, print, textToDoc, options) {\n const node = path.getValue();\n\n if (node.type === \"code\" && node.lang !== null) {\n // only look for the first string so as to support [markdown-preview-enhanced](https://shd101wyy.github.io/markdown-preview-enhanced/#/code-chunk)\n const langMatch = node.lang.match(/^[A-Za-z0-9_-]+/);\n const lang = langMatch ? langMatch[0] : \"\";\n const parser = getParserName(lang);\n\n if (parser) {\n const styleUnit = options.__inJsTemplate ? \"~\" : \"`\";\n const style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1));\n const doc = textToDoc(getFencedCodeBlockValue$1(node, options.originalText), {\n parser\n });\n return markAsRoot$3(concat$f([style, node.lang, hardline$b, replaceNewlinesWithLiterallines(doc), style]));\n }\n }\n\n if (node.type === \"yaml\") {\n return markAsRoot$3(concat$f([\"---\", hardline$b, node.value && node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, {\n parser: \"yaml\"\n })) : \"\", \"---\"]));\n } // MDX\n\n\n switch (node.type) {\n case \"importExport\":\n return textToDoc(node.value, {\n parser: \"babel\"\n });\n\n case \"jsx\":\n return textToDoc(\"<$>\".concat(node.value, \"\"), {\n parser: \"__js_expression\",\n rootMarker: \"mdx\"\n });\n }\n\n return null;\n\n function getParserName(lang) {\n const supportInfo = support.getSupportInfo({\n plugins: options.plugins\n });\n const language = supportInfo.languages.find(language => language.name.toLowerCase() === lang || language.aliases && language.aliases.includes(lang) || language.extensions && language.extensions.find(ext => ext === \".\".concat(lang)));\n\n if (language) {\n return language.parsers[0];\n }\n\n return null;\n }\n\n function replaceNewlinesWithLiterallines(doc) {\n return mapDoc$4(doc, currentDoc => typeof currentDoc === \"string\" && currentDoc.includes(\"\\n\") ? concat$f(currentDoc.split(/(\\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$5)) : currentDoc);\n }\n }\n\n var embed_1$2 = embed$4;\n\n const pragmas = [\"format\", \"prettier\"];\n\n function startWithPragma(text) {\n const pragma = \"@(\".concat(pragmas.join(\"|\"), \")\");\n const regex = new RegExp([\"\"), \"\")].join(\"|\"), \"m\");\n const matched = text.match(regex);\n return matched && matched.index === 0;\n }\n\n var pragma$4 = {\n startWithPragma,\n hasPragma: text => startWithPragma(frontMatter(text).content.trimStart()),\n insertPragma: text => {\n const extracted = frontMatter(text);\n const pragma = \"\");\n return extracted.frontMatter ? \"\".concat(extracted.frontMatter.raw, \"\\n\\n\").concat(pragma, \"\\n\\n\").concat(extracted.content) : \"\".concat(pragma, \"\\n\\n\").concat(extracted.content);\n }\n };\n\n const {\n getOrderedListItemInfo: getOrderedListItemInfo$1,\n mapAst: mapAst$1,\n splitText: splitText$1\n } = utils$6; // 0x0 ~ 0x10ffff\n // eslint-disable-next-line no-control-regex\n\n const isSingleCharRegex = /^([\\u0000-\\uffff]|[\\ud800-\\udbff][\\udc00-\\udfff])$/;\n\n function preprocess$2(ast, options) {\n ast = restoreUnescapedCharacter(ast, options);\n ast = mergeContinuousTexts(ast);\n ast = transformInlineCode(ast);\n ast = transformIndentedCodeblockAndMarkItsParentList(ast, options);\n ast = markAlignedList(ast, options);\n ast = splitTextIntoSentences(ast, options);\n ast = transformImportExport(ast);\n ast = mergeContinuousImportExport(ast);\n return ast;\n }\n\n function transformImportExport(ast) {\n return mapAst$1(ast, node => {\n if (node.type !== \"import\" && node.type !== \"export\") {\n return node;\n }\n\n return Object.assign({}, node, {\n type: \"importExport\"\n });\n });\n }\n\n function transformInlineCode(ast) {\n return mapAst$1(ast, node => {\n if (node.type !== \"inlineCode\") {\n return node;\n }\n\n return Object.assign({}, node, {\n value: node.value.replace(/\\s+/g, \" \")\n });\n });\n }\n\n function restoreUnescapedCharacter(ast, options) {\n return mapAst$1(ast, node => {\n return node.type !== \"text\" ? node : Object.assign({}, node, {\n value: node.value !== \"*\" && node.value !== \"_\" && node.value !== \"$\" && // handle these cases in printer\n isSingleCharRegex.test(node.value) && node.position.end.offset - node.position.start.offset !== node.value.length ? options.originalText.slice(node.position.start.offset, node.position.end.offset) : node.value\n });\n });\n }\n\n function mergeContinuousImportExport(ast) {\n return mergeChildren(ast, (prevNode, node) => prevNode.type === \"importExport\" && node.type === \"importExport\", (prevNode, node) => ({\n type: \"importExport\",\n value: prevNode.value + \"\\n\\n\" + node.value,\n position: {\n start: prevNode.position.start,\n end: node.position.end\n }\n }));\n }\n\n function mergeChildren(ast, shouldMerge, mergeNode) {\n return mapAst$1(ast, node => {\n if (!node.children) {\n return node;\n }\n\n const children = node.children.reduce((current, child) => {\n const lastChild = current[current.length - 1];\n\n if (lastChild && shouldMerge(lastChild, child)) {\n current.splice(-1, 1, mergeNode(lastChild, child));\n } else {\n current.push(child);\n }\n\n return current;\n }, []);\n return Object.assign({}, node, {\n children\n });\n });\n }\n\n function mergeContinuousTexts(ast) {\n return mergeChildren(ast, (prevNode, node) => prevNode.type === \"text\" && node.type === \"text\", (prevNode, node) => ({\n type: \"text\",\n value: prevNode.value + node.value,\n position: {\n start: prevNode.position.start,\n end: node.position.end\n }\n }));\n }\n\n function splitTextIntoSentences(ast, options) {\n return mapAst$1(ast, (node, index, [parentNode]) => {\n if (node.type !== \"text\") {\n return node;\n }\n\n let {\n value\n } = node;\n\n if (parentNode.type === \"paragraph\") {\n if (index === 0) {\n value = value.trimStart();\n }\n\n if (index === parentNode.children.length - 1) {\n value = value.trimEnd();\n }\n }\n\n return {\n type: \"sentence\",\n position: node.position,\n children: splitText$1(value, options)\n };\n });\n }\n\n function transformIndentedCodeblockAndMarkItsParentList(ast, options) {\n return mapAst$1(ast, (node, index, parentStack) => {\n if (node.type === \"code\") {\n // the first char may point to `\\n`, e.g. `\\n\\t\\tbar`, just ignore it\n const isIndented = /^\\n?( {4,}|\\t)/.test(options.originalText.slice(node.position.start.offset, node.position.end.offset));\n node.isIndented = isIndented;\n\n if (isIndented) {\n for (let i = 0; i < parentStack.length; i++) {\n const parent = parentStack[i]; // no need to check checked items\n\n if (parent.hasIndentedCodeblock) {\n break;\n }\n\n if (parent.type === \"list\") {\n parent.hasIndentedCodeblock = true;\n }\n }\n }\n }\n\n return node;\n });\n }\n\n function markAlignedList(ast, options) {\n return mapAst$1(ast, (node, index, parentStack) => {\n if (node.type === \"list\" && node.children.length !== 0) {\n // if one of its parents is not aligned, it's not possible to be aligned in sub-lists\n for (let i = 0; i < parentStack.length; i++) {\n const parent = parentStack[i];\n\n if (parent.type === \"list\" && !parent.isAligned) {\n node.isAligned = false;\n return node;\n }\n }\n\n node.isAligned = isAligned(node);\n }\n\n return node;\n });\n\n function getListItemStart(listItem) {\n return listItem.children.length === 0 ? -1 : listItem.children[0].position.start.column - 1;\n }\n\n function isAligned(list) {\n if (!list.ordered) {\n /**\n * - 123\n * - 123\n */\n return true;\n }\n\n const [firstItem, secondItem] = list.children;\n const firstInfo = getOrderedListItemInfo$1(firstItem, options.originalText);\n\n if (firstInfo.leadingSpaces.length > 1) {\n /**\n * 1. 123\n *\n * 1. 123\n * 1. 123\n */\n return true;\n }\n\n const firstStart = getListItemStart(firstItem);\n\n if (firstStart === -1) {\n /**\n * 1.\n *\n * 1.\n * 1.\n */\n return false;\n }\n\n if (list.children.length === 1) {\n /**\n * aligned:\n *\n * 11. 123\n *\n * not aligned:\n *\n * 1. 123\n */\n return firstStart % options.tabWidth === 0;\n }\n\n const secondStart = getListItemStart(secondItem);\n\n if (firstStart !== secondStart) {\n /**\n * 11. 123\n * 1. 123\n *\n * 1. 123\n * 11. 123\n */\n return false;\n }\n\n if (firstStart % options.tabWidth === 0) {\n /**\n * 11. 123\n * 12. 123\n */\n return true;\n }\n /**\n * aligned:\n *\n * 11. 123\n * 1. 123\n *\n * not aligned:\n *\n * 1. 123\n * 2. 123\n */\n\n\n const secondInfo = getOrderedListItemInfo$1(secondItem, options.originalText);\n return secondInfo.leadingSpaces.length > 1;\n }\n }\n\n var preprocess_1$2 = preprocess$2;\n\n const {\n builders: {\n breakParent: breakParent$4,\n concat: concat$g,\n join: join$b,\n line: line$a,\n literalline: literalline$6,\n markAsRoot: markAsRoot$4,\n hardline: hardline$c,\n softline: softline$7,\n ifBreak: ifBreak$7,\n fill: fill$5,\n align: align$2,\n indent: indent$9,\n group: group$f\n },\n utils: {\n mapDoc: mapDoc$5\n },\n printer: {\n printDocToString: printDocToString$3\n }\n } = document;\n const {\n getFencedCodeBlockValue: getFencedCodeBlockValue$2,\n hasGitDiffFriendlyOrderedList: hasGitDiffFriendlyOrderedList$1,\n splitText: splitText$2,\n punctuationPattern: punctuationPattern$1,\n INLINE_NODE_TYPES: INLINE_NODE_TYPES$1,\n INLINE_NODE_WRAPPER_TYPES: INLINE_NODE_WRAPPER_TYPES$1\n } = utils$6;\n const {\n replaceEndOfLineWith: replaceEndOfLineWith$2\n } = util$1;\n const TRAILING_HARDLINE_NODES = [\"importExport\"];\n const SINGLE_LINE_NODE_TYPES = [\"heading\", \"tableCell\", \"link\"];\n const SIBLING_NODE_TYPES = [\"listItem\", \"definition\", \"footnoteDefinition\"];\n\n function genericPrint$5(path, options, print) {\n const node = path.getValue();\n\n if (shouldRemainTheSameContent(path)) {\n return concat$g(splitText$2(options.originalText.slice(node.position.start.offset, node.position.end.offset), options).map(node => node.type === \"word\" ? node.value : node.value === \"\" ? \"\" : printLine(path, node.value, options)));\n }\n\n switch (node.type) {\n case \"root\":\n if (node.children.length === 0) {\n return \"\";\n }\n\n return concat$g([normalizeDoc(printRoot(path, options, print)), !TRAILING_HARDLINE_NODES.includes(getLastDescendantNode(node).type) ? hardline$c : \"\"]);\n\n case \"paragraph\":\n return printChildren$2(path, options, print, {\n postprocessor: fill$5\n });\n\n case \"sentence\":\n return printChildren$2(path, options, print);\n\n case \"word\":\n return node.value.replace(/[*$]/g, \"\\\\$&\") // escape all `*` and `$` (math)\n .replace(new RegExp([\"(^|\".concat(punctuationPattern$1, \")(_+)\"), \"(_+)(\".concat(punctuationPattern$1, \"|$)\")].join(\"|\"), \"g\"), (_, text1, underscore1, underscore2, text2) => (underscore1 ? \"\".concat(text1).concat(underscore1) : \"\".concat(underscore2).concat(text2)).replace(/_/g, \"\\\\_\"));\n // escape all `_` except concating with non-punctuation, e.g. `1_2_3` is not considered emphasis\n\n case \"whitespace\":\n {\n const parentNode = path.getParentNode();\n const index = parentNode.children.indexOf(node);\n const nextNode = parentNode.children[index + 1];\n const proseWrap = // leading char that may cause different syntax\n nextNode && /^>|^([-+*]|#{1,6}|[0-9]+[.)])$/.test(nextNode.value) ? \"never\" : options.proseWrap;\n return printLine(path, node.value, {\n proseWrap\n });\n }\n\n case \"emphasis\":\n {\n const parentNode = path.getParentNode();\n const index = parentNode.children.indexOf(node);\n const prevNode = parentNode.children[index - 1];\n const nextNode = parentNode.children[index + 1];\n const hasPrevOrNextWord = // `1*2*3` is considered emphasis but `1_2_3` is not\n prevNode && prevNode.type === \"sentence\" && prevNode.children.length > 0 && util$1.getLast(prevNode.children).type === \"word\" && !util$1.getLast(prevNode.children).hasTrailingPunctuation || nextNode && nextNode.type === \"sentence\" && nextNode.children.length > 0 && nextNode.children[0].type === \"word\" && !nextNode.children[0].hasLeadingPunctuation;\n const style = hasPrevOrNextWord || getAncestorNode$2(path, \"emphasis\") ? \"*\" : \"_\";\n return concat$g([style, printChildren$2(path, options, print), style]);\n }\n\n case \"strong\":\n return concat$g([\"**\", printChildren$2(path, options, print), \"**\"]);\n\n case \"delete\":\n return concat$g([\"~~\", printChildren$2(path, options, print), \"~~\"]);\n\n case \"inlineCode\":\n {\n const backtickCount = util$1.getMinNotPresentContinuousCount(node.value, \"`\");\n const style = \"`\".repeat(backtickCount || 1);\n const gap = backtickCount ? \" \" : \"\";\n return concat$g([style, gap, node.value, gap, style]);\n }\n\n case \"link\":\n switch (options.originalText[node.position.start.offset]) {\n case \"<\":\n {\n const mailto = \"mailto:\";\n const url = // is parsed as { url: \"mailto:hello@example.com\" }\n node.url.startsWith(mailto) && options.originalText.slice(node.position.start.offset + 1, node.position.start.offset + 1 + mailto.length) !== mailto ? node.url.slice(mailto.length) : node.url;\n return concat$g([\"<\", url, \">\"]);\n }\n\n case \"[\":\n return concat$g([\"[\", printChildren$2(path, options, print), \"](\", printUrl(node.url, \")\"), printTitle(node.title, options), \")\"]);\n\n default:\n return options.originalText.slice(node.position.start.offset, node.position.end.offset);\n }\n\n case \"image\":\n return concat$g([\"![\", node.alt || \"\", \"](\", printUrl(node.url, \")\"), printTitle(node.title, options), \")\"]);\n\n case \"blockquote\":\n return concat$g([\"> \", align$2(\"> \", printChildren$2(path, options, print))]);\n\n case \"heading\":\n return concat$g([\"#\".repeat(node.depth) + \" \", printChildren$2(path, options, print)]);\n\n case \"code\":\n {\n if (node.isIndented) {\n // indented code block\n const alignment = \" \".repeat(4);\n return align$2(alignment, concat$g([alignment, concat$g(replaceEndOfLineWith$2(node.value, hardline$c))]));\n } // fenced code block\n\n\n const styleUnit = options.__inJsTemplate ? \"~\" : \"`\";\n const style = styleUnit.repeat(Math.max(3, util$1.getMaxContinuousCount(node.value, styleUnit) + 1));\n return concat$g([style, node.lang || \"\", hardline$c, concat$g(replaceEndOfLineWith$2(getFencedCodeBlockValue$2(node, options.originalText), hardline$c)), hardline$c, style]);\n }\n\n case \"yaml\":\n case \"toml\":\n return options.originalText.slice(node.position.start.offset, node.position.end.offset);\n\n case \"html\":\n {\n const parentNode = path.getParentNode();\n const value = parentNode.type === \"root\" && util$1.getLast(parentNode.children) === node ? node.value.trimEnd() : node.value;\n const isHtmlComment = /^$/.test(value);\n return concat$g(replaceEndOfLineWith$2(value, isHtmlComment ? hardline$c : markAsRoot$4(literalline$6)));\n }\n\n case \"list\":\n {\n const nthSiblingIndex = getNthListSiblingIndex(node, path.getParentNode());\n const isGitDiffFriendlyOrderedList = hasGitDiffFriendlyOrderedList$1(node, options);\n return printChildren$2(path, options, print, {\n processor: (childPath, index) => {\n const prefix = getPrefix();\n const childNode = childPath.getValue();\n\n if (childNode.children.length === 2 && childNode.children[1].type === \"html\" && childNode.children[0].position.start.column !== childNode.children[1].position.start.column) {\n return concat$g([prefix, printListItem(childPath, options, print, prefix)]);\n }\n\n return concat$g([prefix, align$2(\" \".repeat(prefix.length), printListItem(childPath, options, print, prefix))]);\n\n function getPrefix() {\n const rawPrefix = node.ordered ? (index === 0 ? node.start : isGitDiffFriendlyOrderedList ? 1 : node.start + index) + (nthSiblingIndex % 2 === 0 ? \". \" : \") \") : nthSiblingIndex % 2 === 0 ? \"- \" : \"* \";\n return node.isAligned ||\n /* workaround for https://github.com/remarkjs/remark/issues/315 */\n node.hasIndentedCodeblock ? alignListPrefix(rawPrefix, options) : rawPrefix;\n }\n }\n });\n }\n\n case \"thematicBreak\":\n {\n const counter = getAncestorCounter$1(path, \"list\");\n\n if (counter === -1) {\n return \"---\";\n }\n\n const nthSiblingIndex = getNthListSiblingIndex(path.getParentNode(counter), path.getParentNode(counter + 1));\n return nthSiblingIndex % 2 === 0 ? \"***\" : \"---\";\n }\n\n case \"linkReference\":\n return concat$g([\"[\", printChildren$2(path, options, print), \"]\", node.referenceType === \"full\" ? concat$g([\"[\", node.identifier, \"]\"]) : node.referenceType === \"collapsed\" ? \"[]\" : \"\"]);\n\n case \"imageReference\":\n switch (node.referenceType) {\n case \"full\":\n return concat$g([\"![\", node.alt || \"\", \"][\", node.identifier, \"]\"]);\n\n default:\n return concat$g([\"![\", node.alt, \"]\", node.referenceType === \"collapsed\" ? \"[]\" : \"\"]);\n }\n\n case \"definition\":\n {\n const lineOrSpace = options.proseWrap === \"always\" ? line$a : \" \";\n return group$f(concat$g([concat$g([\"[\", node.identifier, \"]:\"]), indent$9(concat$g([lineOrSpace, printUrl(node.url), node.title === null ? \"\" : concat$g([lineOrSpace, printTitle(node.title, options, false)])]))]));\n }\n\n case \"footnote\":\n return concat$g([\"[^\", printChildren$2(path, options, print), \"]\"]);\n\n case \"footnoteReference\":\n return concat$g([\"[^\", node.identifier, \"]\"]);\n\n case \"footnoteDefinition\":\n {\n const nextNode = path.getParentNode().children[path.getName() + 1];\n const shouldInlineFootnote = node.children.length === 1 && node.children[0].type === \"paragraph\" && (options.proseWrap === \"never\" || options.proseWrap === \"preserve\" && node.children[0].position.start.line === node.children[0].position.end.line);\n return concat$g([\"[^\", node.identifier, \"]: \", shouldInlineFootnote ? printChildren$2(path, options, print) : group$f(concat$g([align$2(\" \".repeat(options.tabWidth), printChildren$2(path, options, print, {\n processor: (childPath, index) => {\n return index === 0 ? group$f(concat$g([softline$7, childPath.call(print)])) : childPath.call(print);\n }\n })), nextNode && nextNode.type === \"footnoteDefinition\" ? softline$7 : \"\"]))]);\n }\n\n case \"table\":\n return printTable(path, options, print);\n\n case \"tableCell\":\n return printChildren$2(path, options, print);\n\n case \"break\":\n return /\\s/.test(options.originalText[node.position.start.offset]) ? concat$g([\" \", markAsRoot$4(literalline$6)]) : concat$g([\"\\\\\", hardline$c]);\n\n case \"liquidNode\":\n return concat$g(replaceEndOfLineWith$2(node.value, hardline$c));\n // MDX\n\n case \"importExport\":\n case \"jsx\":\n return node.value;\n // fallback to the original text if multiparser failed\n\n case \"math\":\n return concat$g([\"$$\", hardline$c, node.value ? concat$g([concat$g(replaceEndOfLineWith$2(node.value, hardline$c)), hardline$c]) : \"\", \"$$\"]);\n\n case \"inlineMath\":\n {\n // remark-math trims content but we don't want to remove whitespaces\n // since it's very possible that it's recognized as math accidentally\n return options.originalText.slice(options.locStart(node), options.locEnd(node));\n }\n\n case \"tableRow\": // handled in \"table\"\n\n case \"listItem\": // handled in \"list\"\n\n default:\n throw new Error(\"Unknown markdown type \".concat(JSON.stringify(node.type)));\n }\n }\n\n function printListItem(path, options, print, listPrefix) {\n const node = path.getValue();\n const prefix = node.checked === null ? \"\" : node.checked ? \"[x] \" : \"[ ] \";\n return concat$g([prefix, printChildren$2(path, options, print, {\n processor: (childPath, index) => {\n if (index === 0 && childPath.getValue().type !== \"list\") {\n return align$2(\" \".repeat(prefix.length), childPath.call(print));\n }\n\n const alignment = \" \".repeat(clamp(options.tabWidth - listPrefix.length, 0, 3) // 4+ will cause indented code block\n );\n return concat$g([alignment, align$2(alignment, childPath.call(print))]);\n }\n })]);\n }\n\n function alignListPrefix(prefix, options) {\n const additionalSpaces = getAdditionalSpaces();\n return prefix + \" \".repeat(additionalSpaces >= 4 ? 0 : additionalSpaces // 4+ will cause indented code block\n );\n\n function getAdditionalSpaces() {\n const restSpaces = prefix.length % options.tabWidth;\n return restSpaces === 0 ? 0 : options.tabWidth - restSpaces;\n }\n }\n\n function getNthListSiblingIndex(node, parentNode) {\n return getNthSiblingIndex(node, parentNode, siblingNode => siblingNode.ordered === node.ordered);\n }\n\n function getNthSiblingIndex(node, parentNode, condition) {\n condition = condition || (() => true);\n\n let index = -1;\n\n for (const childNode of parentNode.children) {\n if (childNode.type === node.type && condition(childNode)) {\n index++;\n } else {\n index = -1;\n }\n\n if (childNode === node) {\n return index;\n }\n }\n }\n\n function getAncestorCounter$1(path, typeOrTypes) {\n const types = [].concat(typeOrTypes);\n let counter = -1;\n let ancestorNode;\n\n while (ancestorNode = path.getParentNode(++counter)) {\n if (types.includes(ancestorNode.type)) {\n return counter;\n }\n }\n\n return -1;\n }\n\n function getAncestorNode$2(path, typeOrTypes) {\n const counter = getAncestorCounter$1(path, typeOrTypes);\n return counter === -1 ? null : path.getParentNode(counter);\n }\n\n function printLine(path, value, options) {\n if (options.proseWrap === \"preserve\" && value === \"\\n\") {\n return hardline$c;\n }\n\n const isBreakable = options.proseWrap === \"always\" && !getAncestorNode$2(path, SINGLE_LINE_NODE_TYPES);\n return value !== \"\" ? isBreakable ? line$a : \" \" : isBreakable ? softline$7 : \"\";\n }\n\n function printTable(path, options, print) {\n const hardlineWithoutBreakParent = hardline$c.parts[0];\n const node = path.getValue();\n const contents = []; // { [rowIndex: number]: { [columnIndex: number]: string } }\n\n path.map(rowPath => {\n const rowContents = [];\n rowPath.map(cellPath => {\n rowContents.push(printDocToString$3(cellPath.call(print), options).formatted);\n }, \"children\");\n contents.push(rowContents);\n }, \"children\"); // Get the width of each column\n\n const columnMaxWidths = contents.reduce((currentWidths, rowContents) => currentWidths.map((width, columnIndex) => Math.max(width, util$1.getStringWidth(rowContents[columnIndex]))), contents[0].map(() => 3) // minimum width = 3 (---, :--, :-:, --:)\n );\n const alignedTable = join$b(hardlineWithoutBreakParent, [printRow(contents[0]), printSeparator(), join$b(hardlineWithoutBreakParent, contents.slice(1).map(rowContents => printRow(rowContents)))]);\n\n if (options.proseWrap !== \"never\") {\n return concat$g([breakParent$4, alignedTable]);\n } // Only if the --prose-wrap never is set and it exceeds the print width.\n\n\n const compactTable = join$b(hardlineWithoutBreakParent, [printRow(contents[0],\n /* isCompact */\n true), printSeparator(\n /* isCompact */\n true), join$b(hardlineWithoutBreakParent, contents.slice(1).map(rowContents => printRow(rowContents,\n /* isCompact */\n true)))]);\n return concat$g([breakParent$4, group$f(ifBreak$7(compactTable, alignedTable))]);\n\n function printSeparator(isCompact) {\n return concat$g([\"| \", join$b(\" | \", columnMaxWidths.map((width, index) => {\n const spaces = isCompact ? 3 : width;\n\n switch (node.align[index]) {\n case \"left\":\n return \":\" + \"-\".repeat(spaces - 1);\n\n case \"right\":\n return \"-\".repeat(spaces - 1) + \":\";\n\n case \"center\":\n return \":\" + \"-\".repeat(spaces - 2) + \":\";\n\n default:\n return \"-\".repeat(spaces);\n }\n })), \" |\"]);\n }\n\n function printRow(rowContents, isCompact) {\n return concat$g([\"| \", join$b(\" | \", isCompact ? rowContents : rowContents.map((rowContent, columnIndex) => {\n switch (node.align[columnIndex]) {\n case \"right\":\n return alignRight(rowContent, columnMaxWidths[columnIndex]);\n\n case \"center\":\n return alignCenter(rowContent, columnMaxWidths[columnIndex]);\n\n default:\n return alignLeft(rowContent, columnMaxWidths[columnIndex]);\n }\n })), \" |\"]);\n }\n\n function alignLeft(text, width) {\n const spaces = width - util$1.getStringWidth(text);\n return concat$g([text, \" \".repeat(spaces)]);\n }\n\n function alignRight(text, width) {\n const spaces = width - util$1.getStringWidth(text);\n return concat$g([\" \".repeat(spaces), text]);\n }\n\n function alignCenter(text, width) {\n const spaces = width - util$1.getStringWidth(text);\n const left = Math.floor(spaces / 2);\n const right = spaces - left;\n return concat$g([\" \".repeat(left), text, \" \".repeat(right)]);\n }\n }\n\n function printRoot(path, options, print) {\n /** @typedef {{ index: number, offset: number }} IgnorePosition */\n\n /** @type {Array<{start: IgnorePosition, end: IgnorePosition}>} */\n const ignoreRanges = [];\n /** @type {IgnorePosition | null} */\n\n let ignoreStart = null;\n const {\n children\n } = path.getValue();\n children.forEach((childNode, index) => {\n switch (isPrettierIgnore$1(childNode)) {\n case \"start\":\n if (ignoreStart === null) {\n ignoreStart = {\n index,\n offset: childNode.position.end.offset\n };\n }\n\n break;\n\n case \"end\":\n if (ignoreStart !== null) {\n ignoreRanges.push({\n start: ignoreStart,\n end: {\n index,\n offset: childNode.position.start.offset\n }\n });\n ignoreStart = null;\n }\n\n break;\n }\n });\n return printChildren$2(path, options, print, {\n processor: (childPath, index) => {\n if (ignoreRanges.length !== 0) {\n const ignoreRange = ignoreRanges[0];\n\n if (index === ignoreRange.start.index) {\n return concat$g([children[ignoreRange.start.index].value, options.originalText.slice(ignoreRange.start.offset, ignoreRange.end.offset), children[ignoreRange.end.index].value]);\n }\n\n if (ignoreRange.start.index < index && index < ignoreRange.end.index) {\n return false;\n }\n\n if (index === ignoreRange.end.index) {\n ignoreRanges.shift();\n return false;\n }\n }\n\n return childPath.call(print);\n }\n });\n }\n\n function printChildren$2(path, options, print, events) {\n events = events || {};\n const postprocessor = events.postprocessor || concat$g;\n\n const processor = events.processor || (childPath => childPath.call(print));\n\n const node = path.getValue();\n const parts = [];\n let lastChildNode;\n path.map((childPath, index) => {\n const childNode = childPath.getValue();\n const result = processor(childPath, index);\n\n if (result !== false) {\n const data = {\n parts,\n prevNode: lastChildNode,\n parentNode: node,\n options\n };\n\n if (!shouldNotPrePrintHardline(childNode, data)) {\n parts.push(hardline$c);\n\n if (lastChildNode && TRAILING_HARDLINE_NODES.includes(lastChildNode.type)) {\n if (shouldPrePrintTripleHardline(childNode, data)) {\n parts.push(hardline$c);\n }\n } else {\n if (shouldPrePrintDoubleHardline(childNode, data) || shouldPrePrintTripleHardline(childNode, data)) {\n parts.push(hardline$c);\n }\n\n if (shouldPrePrintTripleHardline(childNode, data)) {\n parts.push(hardline$c);\n }\n }\n }\n\n parts.push(result);\n lastChildNode = childNode;\n }\n }, \"children\");\n return postprocessor(parts);\n }\n\n function getLastDescendantNode(node) {\n let current = node;\n\n while (current.children && current.children.length !== 0) {\n current = current.children[current.children.length - 1];\n }\n\n return current;\n }\n /** @return {false | 'next' | 'start' | 'end'} */\n\n\n function isPrettierIgnore$1(node) {\n if (node.type !== \"html\") {\n return false;\n }\n\n const match = node.value.match(/^$/);\n return match === null ? false : match[1] ? match[1] : \"next\";\n }\n\n function shouldNotPrePrintHardline(node, data) {\n const isFirstNode = data.parts.length === 0;\n const isInlineNode = INLINE_NODE_TYPES$1.includes(node.type);\n const isInlineHTML = node.type === \"html\" && INLINE_NODE_WRAPPER_TYPES$1.includes(data.parentNode.type);\n return isFirstNode || isInlineNode || isInlineHTML;\n }\n\n function shouldPrePrintDoubleHardline(node, data) {\n const isSequence = (data.prevNode && data.prevNode.type) === node.type;\n const isSiblingNode = isSequence && SIBLING_NODE_TYPES.includes(node.type);\n const isInTightListItem = data.parentNode.type === \"listItem\" && !data.parentNode.loose;\n const isPrevNodeLooseListItem = data.prevNode && data.prevNode.type === \"listItem\" && data.prevNode.loose;\n const isPrevNodePrettierIgnore = isPrettierIgnore$1(data.prevNode) === \"next\";\n const isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === \"html\" && data.prevNode && data.prevNode.type === \"html\" && data.prevNode.position.end.line + 1 === node.position.start.line;\n const isHtmlDirectAfterListItem = node.type === \"html\" && data.parentNode.type === \"listItem\" && data.prevNode && data.prevNode.type === \"paragraph\" && data.prevNode.position.end.line + 1 === node.position.start.line;\n return isPrevNodeLooseListItem || !(isSiblingNode || isInTightListItem || isPrevNodePrettierIgnore || isBlockHtmlWithoutBlankLineBetweenPrevHtml || isHtmlDirectAfterListItem);\n }\n\n function shouldPrePrintTripleHardline(node, data) {\n const isPrevNodeList = data.prevNode && data.prevNode.type === \"list\";\n const isIndentedCode = node.type === \"code\" && node.isIndented;\n return isPrevNodeList && isIndentedCode;\n }\n\n function shouldRemainTheSameContent(path) {\n const ancestorNode = getAncestorNode$2(path, [\"linkReference\", \"imageReference\"]);\n return ancestorNode && (ancestorNode.type !== \"linkReference\" || ancestorNode.referenceType !== \"full\");\n }\n\n function normalizeDoc(doc) {\n return mapDoc$5(doc, currentDoc => {\n if (!currentDoc.parts) {\n return currentDoc;\n }\n\n if (currentDoc.type === \"concat\" && currentDoc.parts.length === 1) {\n return currentDoc.parts[0];\n }\n\n const parts = currentDoc.parts.reduce((parts, part) => {\n if (part.type === \"concat\") {\n parts.push(...part.parts);\n } else if (part !== \"\") {\n parts.push(part);\n }\n\n return parts;\n }, []);\n return Object.assign({}, currentDoc, {\n parts: normalizeParts$2(parts)\n });\n });\n }\n\n function printUrl(url, dangerousCharOrChars) {\n const dangerousChars = [\" \"].concat(dangerousCharOrChars || []);\n return new RegExp(dangerousChars.map(x => \"\\\\\".concat(x)).join(\"|\")).test(url) ? \"<\".concat(url, \">\") : url;\n }\n\n function printTitle(title, options, printSpace) {\n if (printSpace == null) {\n printSpace = true;\n }\n\n if (!title) {\n return \"\";\n }\n\n if (printSpace) {\n return \" \" + printTitle(title, options, false);\n }\n\n if (title.includes('\"') && title.includes(\"'\") && !title.includes(\")\")) {\n return \"(\".concat(title, \")\"); // avoid escaped quotes\n } // faster than using RegExps: https://jsperf.com/performance-of-match-vs-split\n\n\n const singleCount = title.split(\"'\").length - 1;\n const doubleCount = title.split('\"').length - 1;\n const quote = singleCount > doubleCount ? '\"' : doubleCount > singleCount ? \"'\" : options.singleQuote ? \"'\" : '\"';\n title = title.replace(new RegExp(\"(\".concat(quote, \")\"), \"g\"), \"\\\\$1\");\n return \"\".concat(quote).concat(title).concat(quote);\n }\n\n function normalizeParts$2(parts) {\n return parts.reduce((current, part) => {\n const lastPart = util$1.getLast(current);\n\n if (typeof lastPart === \"string\" && typeof part === \"string\") {\n current.splice(-1, 1, lastPart + part);\n } else {\n current.push(part);\n }\n\n return current;\n }, []);\n }\n\n function clamp(value, min, max) {\n return value < min ? min : value > max ? max : value;\n }\n\n function clean$6(ast, newObj, parent) {\n delete newObj.position;\n delete newObj.raw; // front-matter\n // for codeblock\n\n if (ast.type === \"code\" || ast.type === \"yaml\" || ast.type === \"import\" || ast.type === \"export\" || ast.type === \"jsx\") {\n delete newObj.value;\n }\n\n if (ast.type === \"list\") {\n delete newObj.isAligned;\n } // texts can be splitted or merged\n\n\n if (ast.type === \"text\") {\n return null;\n }\n\n if (ast.type === \"inlineCode\") {\n newObj.value = ast.value.replace(/[ \\t\\n]+/g, \" \");\n } // for insert pragma\n\n\n if (parent && parent.type === \"root\" && parent.children.length > 0 && (parent.children[0] === ast || (parent.children[0].type === \"yaml\" || parent.children[0].type === \"toml\") && parent.children[1] === ast) && ast.type === \"html\" && pragma$4.startWithPragma(ast.value)) {\n return null;\n }\n }\n\n function hasPrettierIgnore$6(path) {\n const index = +path.getName();\n\n if (index === 0) {\n return false;\n }\n\n const prevNode = path.getParentNode().children[index - 1];\n return isPrettierIgnore$1(prevNode) === \"next\";\n }\n\n var printerMarkdown = {\n preprocess: preprocess_1$2,\n print: genericPrint$5,\n embed: embed_1$2,\n massageAstNode: clean$6,\n hasPrettierIgnore: hasPrettierIgnore$6,\n insertPragma: pragma$4.insertPragma\n };\n\n var options$6 = {\n proseWrap: commonOptions.proseWrap,\n singleQuote: commonOptions.singleQuote\n };\n\n var name$g = \"Markdown\";\n var type$f = \"prose\";\n var aliases$5 = [\n \t\"pandoc\"\n ];\n var aceMode$f = \"markdown\";\n var codemirrorMode$b = \"gfm\";\n var codemirrorMimeType$b = \"text/x-gfm\";\n var wrap = true;\n var extensions$f = [\n \t\".md\",\n \t\".markdown\",\n \t\".mdown\",\n \t\".mdwn\",\n \t\".mdx\",\n \t\".mkd\",\n \t\".mkdn\",\n \t\".mkdown\",\n \t\".ronn\",\n \t\".workbook\"\n ];\n var filenames$3 = [\n \t\"contents.lr\"\n ];\n var tmScope$f = \"source.gfm\";\n var languageId$f = 222;\n var Markdown = {\n \tname: name$g,\n \ttype: type$f,\n \taliases: aliases$5,\n \taceMode: aceMode$f,\n \tcodemirrorMode: codemirrorMode$b,\n \tcodemirrorMimeType: codemirrorMimeType$b,\n \twrap: wrap,\n \textensions: extensions$f,\n \tfilenames: filenames$3,\n \ttmScope: tmScope$f,\n \tlanguageId: languageId$f\n };\n\n var Markdown$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$g,\n type: type$f,\n aliases: aliases$5,\n aceMode: aceMode$f,\n codemirrorMode: codemirrorMode$b,\n codemirrorMimeType: codemirrorMimeType$b,\n wrap: wrap,\n extensions: extensions$f,\n filenames: filenames$3,\n tmScope: tmScope$f,\n languageId: languageId$f,\n 'default': Markdown\n });\n\n var require$$0$7 = getCjsExportFromNamespace(Markdown$1);\n\n const languages$5 = [createLanguage(require$$0$7, data => ({\n since: \"1.8.0\",\n parsers: [\"markdown\"],\n vscodeLanguageIds: [\"markdown\"],\n filenames: data.filenames.concat([\"README\"]),\n extensions: data.extensions.filter(extension => extension !== \".mdx\")\n })), createLanguage(require$$0$7, () => ({\n name: \"MDX\",\n since: \"1.15.0\",\n parsers: [\"mdx\"],\n vscodeLanguageIds: [\"mdx\"],\n filenames: [],\n extensions: [\".mdx\"]\n }))];\n const printers$5 = {\n mdast: printerMarkdown\n };\n var languageMarkdown = {\n languages: languages$5,\n options: options$6,\n printers: printers$5\n };\n\n function isPragma(text) {\n return /^\\s*@(prettier|format)\\s*$/.test(text);\n }\n\n function hasPragma$4(text) {\n return /^\\s*#[^\\n\\S]*@(prettier|format)\\s*?(\\n|$)/.test(text);\n }\n\n function insertPragma$8(text) {\n return \"# @format\\n\\n\".concat(text);\n }\n\n var pragma$5 = {\n isPragma,\n hasPragma: hasPragma$4,\n insertPragma: insertPragma$8\n };\n\n const {\n getLast: getLast$5\n } = util$1;\n\n function getAncestorCount(path, filter) {\n let counter = 0;\n const pathStackLength = path.stack.length - 1;\n\n for (let i = 0; i < pathStackLength; i++) {\n const value = path.stack[i];\n\n if (isNode(value) && filter(value)) {\n counter++;\n }\n }\n\n return counter;\n }\n /**\n * @param {any} value\n * @param {string[]=} types\n */\n\n\n function isNode(value, types) {\n return value && typeof value.type === \"string\" && (!types || types.includes(value.type));\n }\n\n function mapNode(node, callback, parent) {\n return callback(\"children\" in node ? Object.assign({}, node, {\n children: node.children.map(childNode => mapNode(childNode, callback, node))\n }) : node, parent);\n }\n\n function defineShortcut(x, key, getter) {\n Object.defineProperty(x, key, {\n get: getter,\n enumerable: false\n });\n }\n\n function isNextLineEmpty$5(node, text) {\n let newlineCount = 0;\n const textLength = text.length;\n\n for (let i = node.position.end.offset - 1; i < textLength; i++) {\n const char = text[i];\n\n if (char === \"\\n\") {\n newlineCount++;\n }\n\n if (newlineCount === 1 && /\\S/.test(char)) {\n return false;\n }\n\n if (newlineCount === 2) {\n return true;\n }\n }\n\n return false;\n }\n\n function isLastDescendantNode(path) {\n const node = path.getValue();\n\n switch (node.type) {\n case \"tag\":\n case \"anchor\":\n case \"comment\":\n return false;\n }\n\n const pathStackLength = path.stack.length;\n\n for (let i = 1; i < pathStackLength; i++) {\n const item = path.stack[i];\n const parentItem = path.stack[i - 1];\n\n if (Array.isArray(parentItem) && typeof item === \"number\" && item !== parentItem.length - 1) {\n return false;\n }\n }\n\n return true;\n }\n\n function getLastDescendantNode$1(node) {\n return \"children\" in node && node.children.length !== 0 ? getLastDescendantNode$1(getLast$5(node.children)) : node;\n }\n\n function isPrettierIgnore$2(comment) {\n return comment.value.trim() === \"prettier-ignore\";\n }\n\n function hasPrettierIgnore$7(path) {\n const node = path.getValue();\n\n if (node.type === \"documentBody\") {\n const document = path.getParentNode();\n return hasEndComments(document.head) && isPrettierIgnore$2(getLast$5(document.head.endComments));\n }\n\n return hasLeadingComments(node) && isPrettierIgnore$2(getLast$5(node.leadingComments));\n }\n\n function isEmptyNode(node) {\n return (!node.children || node.children.length === 0) && !hasComments(node);\n }\n\n function hasComments(node) {\n return hasLeadingComments(node) || hasMiddleComments(node) || hasIndicatorComment(node) || hasTrailingComment$2(node) || hasEndComments(node);\n }\n\n function hasLeadingComments(node) {\n return node && node.leadingComments && node.leadingComments.length !== 0;\n }\n\n function hasMiddleComments(node) {\n return node && node.middleComments && node.middleComments.length !== 0;\n }\n\n function hasIndicatorComment(node) {\n return node && node.indicatorComment;\n }\n\n function hasTrailingComment$2(node) {\n return node && node.trailingComment;\n }\n\n function hasEndComments(node) {\n return node && node.endComments && node.endComments.length !== 0;\n }\n /**\n * \" a b c d e f \" -> [\" a b\", \"c d\", \"e f \"]\n */\n\n\n function splitWithSingleSpace(text) {\n const parts = [];\n let lastPart = undefined;\n\n for (const part of text.split(/( +)/g)) {\n if (part !== \" \") {\n if (lastPart === \" \") {\n parts.push(part);\n } else {\n parts.push((parts.pop() || \"\") + part);\n }\n } else if (lastPart === undefined) {\n parts.unshift(\"\");\n }\n\n lastPart = part;\n }\n\n if (lastPart === \" \") {\n parts.push((parts.pop() || \"\") + \" \");\n }\n\n if (parts[0] === \"\") {\n parts.shift();\n parts.unshift(\" \" + (parts.shift() || \"\"));\n }\n\n return parts;\n }\n\n function getFlowScalarLineContents(nodeType, content, options) {\n const rawLineContents = content.split(\"\\n\").map((lineContent, index, lineContents) => index === 0 && index === lineContents.length - 1 ? lineContent : index !== 0 && index !== lineContents.length - 1 ? lineContent.trim() : index === 0 ? lineContent.trimEnd() : lineContent.trimStart());\n\n if (options.proseWrap === \"preserve\") {\n return rawLineContents.map(lineContent => lineContent.length === 0 ? [] : [lineContent]);\n }\n\n return rawLineContents.map(lineContent => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords, index) => index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !( // trailing backslash in quoteDouble should be preserved\n nodeType === \"quoteDouble\" && getLast$5(getLast$5(reduced)).endsWith(\"\\\\\")) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]), []).map(lineContentWords => options.proseWrap === \"never\" ? [lineContentWords.join(\" \")] : lineContentWords);\n }\n\n function getBlockValueLineContents(node, {\n parentIndent,\n isLastDescendant,\n options\n }) {\n const content = node.position.start.line === node.position.end.line ? \"\" : options.originalText.slice(node.position.start.offset, node.position.end.offset) // exclude open line `>` or `|`\n .match(/^[^\\n]*?\\n([\\s\\S]*)$/)[1];\n const leadingSpaceCount = node.indent === null ? (match => match ? match[1].length : Infinity)(content.match(/^( *)\\S/m)) : node.indent - 1 + parentIndent;\n const rawLineContents = content.split(\"\\n\").map(lineContent => lineContent.slice(leadingSpaceCount));\n\n if (options.proseWrap === \"preserve\" || node.type === \"blockLiteral\") {\n return removeUnnecessaryTrailingNewlines(rawLineContents.map(lineContent => lineContent.length === 0 ? [] : [lineContent]));\n }\n\n return removeUnnecessaryTrailingNewlines(rawLineContents.map(lineContent => lineContent.length === 0 ? [] : splitWithSingleSpace(lineContent)).reduce((reduced, lineContentWords, index) => index !== 0 && rawLineContents[index - 1].length !== 0 && lineContentWords.length !== 0 && !/^\\s/.test(lineContentWords[0]) && !/^\\s|\\s$/.test(getLast$5(reduced)) ? reduced.concat([reduced.pop().concat(lineContentWords)]) : reduced.concat([lineContentWords]), []).map(lineContentWords => lineContentWords.reduce((reduced, word) => // disallow trailing spaces\n reduced.length !== 0 && /\\s$/.test(getLast$5(reduced)) ? reduced.concat(reduced.pop() + \" \" + word) : reduced.concat(word), [])).map(lineContentWords => options.proseWrap === \"never\" ? [lineContentWords.join(\" \")] : lineContentWords));\n\n function removeUnnecessaryTrailingNewlines(lineContents) {\n if (node.chomping === \"keep\") {\n return getLast$5(lineContents).length === 0 ? lineContents.slice(0, -1) : lineContents;\n }\n\n let trailingNewlineCount = 0;\n\n for (let i = lineContents.length - 1; i >= 0; i--) {\n if (lineContents[i].length === 0) {\n trailingNewlineCount++;\n } else {\n break;\n }\n }\n\n return trailingNewlineCount === 0 ? lineContents : trailingNewlineCount >= 2 && !isLastDescendant ? // next empty line\n lineContents.slice(0, -(trailingNewlineCount - 1)) : lineContents.slice(0, -trailingNewlineCount);\n }\n }\n\n var utils$7 = {\n getLast: getLast$5,\n getAncestorCount,\n isNode,\n isEmptyNode,\n mapNode,\n defineShortcut,\n isNextLineEmpty: isNextLineEmpty$5,\n isLastDescendantNode,\n getBlockValueLineContents,\n getFlowScalarLineContents,\n getLastDescendantNode: getLastDescendantNode$1,\n hasPrettierIgnore: hasPrettierIgnore$7,\n hasLeadingComments,\n hasMiddleComments,\n hasIndicatorComment,\n hasTrailingComment: hasTrailingComment$2,\n hasEndComments\n };\n\n const {\n insertPragma: insertPragma$9,\n isPragma: isPragma$1\n } = pragma$5;\n const {\n getAncestorCount: getAncestorCount$1,\n getBlockValueLineContents: getBlockValueLineContents$1,\n getFlowScalarLineContents: getFlowScalarLineContents$1,\n getLast: getLast$6,\n getLastDescendantNode: getLastDescendantNode$2,\n hasLeadingComments: hasLeadingComments$1,\n hasMiddleComments: hasMiddleComments$1,\n hasIndicatorComment: hasIndicatorComment$1,\n hasTrailingComment: hasTrailingComment$3,\n hasEndComments: hasEndComments$1,\n hasPrettierIgnore: hasPrettierIgnore$8,\n isLastDescendantNode: isLastDescendantNode$1,\n isNextLineEmpty: isNextLineEmpty$6,\n isNode: isNode$1,\n isEmptyNode: isEmptyNode$1,\n defineShortcut: defineShortcut$1,\n mapNode: mapNode$1\n } = utils$7;\n const docBuilders$2 = document.builders;\n const {\n conditionalGroup: conditionalGroup$2,\n breakParent: breakParent$5,\n concat: concat$h,\n dedent: dedent$3,\n dedentToRoot: dedentToRoot$3,\n fill: fill$6,\n group: group$g,\n hardline: hardline$d,\n ifBreak: ifBreak$8,\n join: join$c,\n line: line$b,\n lineSuffix: lineSuffix$2,\n literalline: literalline$7,\n markAsRoot: markAsRoot$5,\n softline: softline$8\n } = docBuilders$2;\n const {\n replaceEndOfLineWith: replaceEndOfLineWith$3\n } = util$1;\n\n function preprocess$3(ast) {\n return mapNode$1(ast, defineShortcuts);\n }\n\n function defineShortcuts(node) {\n switch (node.type) {\n case \"document\":\n defineShortcut$1(node, \"head\", () => node.children[0]);\n defineShortcut$1(node, \"body\", () => node.children[1]);\n break;\n\n case \"documentBody\":\n case \"sequenceItem\":\n case \"flowSequenceItem\":\n case \"mappingKey\":\n case \"mappingValue\":\n defineShortcut$1(node, \"content\", () => node.children[0]);\n break;\n\n case \"mappingItem\":\n case \"flowMappingItem\":\n defineShortcut$1(node, \"key\", () => node.children[0]);\n defineShortcut$1(node, \"value\", () => node.children[1]);\n break;\n }\n\n return node;\n }\n\n function genericPrint$6(path, options, print) {\n const node = path.getValue();\n const parentNode = path.getParentNode();\n const tag = !node.tag ? \"\" : path.call(print, \"tag\");\n const anchor = !node.anchor ? \"\" : path.call(print, \"anchor\");\n const nextEmptyLine = isNode$1(node, [\"mapping\", \"sequence\", \"comment\", \"directive\", \"mappingItem\", \"sequenceItem\"]) && !isLastDescendantNode$1(path) ? printNextEmptyLine(path, options.originalText) : \"\";\n return concat$h([node.type !== \"mappingValue\" && hasLeadingComments$1(node) ? concat$h([join$c(hardline$d, path.map(print, \"leadingComments\")), hardline$d]) : \"\", tag, tag && anchor ? \" \" : \"\", anchor, tag || anchor ? isNode$1(node, [\"sequence\", \"mapping\"]) && !hasMiddleComments$1(node) ? hardline$d : \" \" : \"\", hasMiddleComments$1(node) ? concat$h([node.middleComments.length === 1 ? \"\" : hardline$d, join$c(hardline$d, path.map(print, \"middleComments\")), hardline$d]) : \"\", hasPrettierIgnore$8(path) ? concat$h(replaceEndOfLineWith$3(options.originalText.slice(node.position.start.offset, node.position.end.offset), literalline$7)) : group$g(_print(node, parentNode, path, options, print)), hasTrailingComment$3(node) && !isNode$1(node, [\"document\", \"documentHead\"]) ? lineSuffix$2(concat$h([node.type === \"mappingValue\" && !node.content ? \"\" : \" \", parentNode.type === \"mappingKey\" && path.getParentNode(2).type === \"mapping\" && isInlineNode(node) ? \"\" : breakParent$5, path.call(print, \"trailingComment\")])) : \"\", nextEmptyLine, hasEndComments$1(node) && !isNode$1(node, [\"documentHead\", \"documentBody\"]) ? align$3(node.type === \"sequenceItem\" ? 2 : 0, concat$h([hardline$d, join$c(hardline$d, path.map(print, \"endComments\"))])) : \"\"]);\n }\n\n function _print(node, parentNode, path, options, print) {\n switch (node.type) {\n case \"root\":\n return concat$h([join$c(hardline$d, path.map((childPath, index) => {\n const document = node.children[index];\n const nextDocument = node.children[index + 1];\n return concat$h([print(childPath), shouldPrintDocumentEndMarker(document, nextDocument) ? concat$h([hardline$d, \"...\", hasTrailingComment$3(document) ? concat$h([\" \", path.call(print, \"trailingComment\")]) : \"\"]) : !nextDocument || hasTrailingComment$3(nextDocument.head) ? \"\" : concat$h([hardline$d, \"---\"])]);\n }, \"children\")), node.children.length === 0 || (lastDescendantNode => isNode$1(lastDescendantNode, [\"blockLiteral\", \"blockFolded\"]) && lastDescendantNode.chomping === \"keep\")(getLastDescendantNode$2(node)) ? \"\" : hardline$d]);\n\n case \"document\":\n {\n const nextDocument = parentNode.children[path.getName() + 1];\n return join$c(hardline$d, [shouldPrintDocumentHeadEndMarker(node, nextDocument, parentNode, options) === \"head\" ? join$c(hardline$d, [node.head.children.length === 0 && node.head.endComments.length === 0 ? \"\" : path.call(print, \"head\"), concat$h([\"---\", hasTrailingComment$3(node.head) ? concat$h([\" \", path.call(print, \"head\", \"trailingComment\")]) : \"\"])].filter(Boolean)) : \"\", shouldPrintDocumentBody(node) ? path.call(print, \"body\") : \"\"].filter(Boolean));\n }\n\n case \"documentHead\":\n return join$c(hardline$d, [].concat(path.map(print, \"children\"), path.map(print, \"endComments\")));\n\n case \"documentBody\":\n {\n const children = join$c(hardline$d, path.map(print, \"children\")).parts;\n const endComments = join$c(hardline$d, path.map(print, \"endComments\")).parts;\n const separator = children.length === 0 || endComments.length === 0 ? \"\" : (lastDescendantNode => isNode$1(lastDescendantNode, [\"blockFolded\", \"blockLiteral\"]) ? lastDescendantNode.chomping === \"keep\" ? // there's already a newline printed at the end of blockValue (chomping=keep, lastDescendant=true)\n \"\" : // an extra newline for better readability\n concat$h([hardline$d, hardline$d]) : hardline$d)(getLastDescendantNode$2(node));\n return concat$h([].concat(children, separator, endComments));\n }\n\n case \"directive\":\n return concat$h([\"%\", join$c(\" \", [node.name].concat(node.parameters))]);\n\n case \"comment\":\n return concat$h([\"#\", node.value]);\n\n case \"alias\":\n return concat$h([\"*\", node.value]);\n\n case \"tag\":\n return options.originalText.slice(node.position.start.offset, node.position.end.offset);\n\n case \"anchor\":\n return concat$h([\"&\", node.value]);\n\n case \"plain\":\n return printFlowScalarContent(node.type, options.originalText.slice(node.position.start.offset, node.position.end.offset), options);\n\n case \"quoteDouble\":\n case \"quoteSingle\":\n {\n const singleQuote = \"'\";\n const doubleQuote = '\"';\n const raw = options.originalText.slice(node.position.start.offset + 1, node.position.end.offset - 1);\n\n if (node.type === \"quoteSingle\" && raw.includes(\"\\\\\") || node.type === \"quoteDouble\" && /\\\\[^\"]/.test(raw)) {\n // only quoteDouble can use escape chars\n // and quoteSingle do not need to escape backslashes\n const originalQuote = node.type === \"quoteDouble\" ? doubleQuote : singleQuote;\n return concat$h([originalQuote, printFlowScalarContent(node.type, raw, options), originalQuote]);\n } else if (raw.includes(doubleQuote)) {\n return concat$h([singleQuote, printFlowScalarContent(node.type, node.type === \"quoteDouble\" ? raw // double quote needs to be escaped by backslash in quoteDouble\n .replace(/\\\\\"/g, doubleQuote).replace(/'/g, singleQuote.repeat(2)) : raw, options), singleQuote]);\n }\n\n if (raw.includes(singleQuote)) {\n return concat$h([doubleQuote, printFlowScalarContent(node.type, node.type === \"quoteSingle\" ? // single quote needs to be escaped by 2 single quotes in quoteSingle\n raw.replace(/''/g, singleQuote) : raw, options), doubleQuote]);\n }\n\n const quote = options.singleQuote ? singleQuote : doubleQuote;\n return concat$h([quote, printFlowScalarContent(node.type, raw, options), quote]);\n }\n\n case \"blockFolded\":\n case \"blockLiteral\":\n {\n const parentIndent = getAncestorCount$1(path, ancestorNode => isNode$1(ancestorNode, [\"sequence\", \"mapping\"]));\n const isLastDescendant = isLastDescendantNode$1(path);\n return concat$h([node.type === \"blockFolded\" ? \">\" : \"|\", node.indent === null ? \"\" : node.indent.toString(), node.chomping === \"clip\" ? \"\" : node.chomping === \"keep\" ? \"+\" : \"-\", hasIndicatorComment$1(node) ? concat$h([\" \", path.call(print, \"indicatorComment\")]) : \"\", (node.indent === null ? dedent$3 : dedentToRoot$3)(align$3(node.indent === null ? options.tabWidth : node.indent - 1 + parentIndent, concat$h(getBlockValueLineContents$1(node, {\n parentIndent,\n isLastDescendant,\n options\n }).reduce((reduced, lineWords, index, lineContents) => reduced.concat(index === 0 ? hardline$d : \"\", fill$6(join$c(line$b, lineWords).parts), index !== lineContents.length - 1 ? lineWords.length === 0 ? hardline$d : markAsRoot$5(literalline$7) : node.chomping === \"keep\" && isLastDescendant ? lineWords.length === 0 ? dedentToRoot$3(hardline$d) : dedentToRoot$3(literalline$7) : \"\"), []))))]);\n }\n\n case \"sequence\":\n return join$c(hardline$d, path.map(print, \"children\"));\n\n case \"sequenceItem\":\n return concat$h([\"- \", align$3(2, !node.content ? \"\" : path.call(print, \"content\"))]);\n\n case \"mappingKey\":\n return !node.content ? \"\" : path.call(print, \"content\");\n\n case \"mappingValue\":\n return !node.content ? \"\" : path.call(print, \"content\");\n\n case \"mapping\":\n return join$c(hardline$d, path.map(print, \"children\"));\n\n case \"mappingItem\":\n case \"flowMappingItem\":\n {\n const isEmptyMappingKey = isEmptyNode$1(node.key);\n const isEmptyMappingValue = isEmptyNode$1(node.value);\n\n if (isEmptyMappingKey && isEmptyMappingValue) {\n return concat$h([\": \"]);\n }\n\n const key = path.call(print, \"key\");\n const value = path.call(print, \"value\");\n\n if (isEmptyMappingValue) {\n return node.type === \"flowMappingItem\" && parentNode.type === \"flowMapping\" ? key : node.type === \"mappingItem\" && isAbsolutelyPrintedAsSingleLineNode(node.key.content, options) && !hasTrailingComment$3(node.key.content) && (!parentNode.tag || parentNode.tag.value !== \"tag:yaml.org,2002:set\") ? concat$h([key, needsSpaceInFrontOfMappingValue(node) ? \" \" : \"\", \":\"]) : concat$h([\"? \", align$3(2, key)]);\n }\n\n if (isEmptyMappingKey) {\n return concat$h([\": \", align$3(2, value)]);\n }\n\n const groupId = Symbol(\"mappingKey\");\n const forceExplicitKey = hasLeadingComments$1(node.value) || !isInlineNode(node.key.content);\n return forceExplicitKey ? concat$h([\"? \", align$3(2, key), hardline$d, join$c(\"\", path.map(print, \"value\", \"leadingComments\").map(comment => concat$h([comment, hardline$d]))), \": \", align$3(2, value)]) : // force singleline\n isSingleLineNode(node.key.content) && !hasLeadingComments$1(node.key.content) && !hasMiddleComments$1(node.key.content) && !hasTrailingComment$3(node.key.content) && !hasEndComments$1(node.key) && !hasLeadingComments$1(node.value.content) && !hasMiddleComments$1(node.value.content) && !hasEndComments$1(node.value) && isAbsolutelyPrintedAsSingleLineNode(node.value.content, options) ? concat$h([key, needsSpaceInFrontOfMappingValue(node) ? \" \" : \"\", \": \", value]) : conditionalGroup$2([concat$h([group$g(concat$h([ifBreak$8(\"? \"), group$g(align$3(2, key), {\n id: groupId\n })])), ifBreak$8(concat$h([hardline$d, \": \", align$3(2, value)]), indent(concat$h([needsSpaceInFrontOfMappingValue(node) ? \" \" : \"\", \":\", hasLeadingComments$1(node.value.content) || hasEndComments$1(node.value) && node.value.content && !isNode$1(node.value.content, [\"mapping\", \"sequence\"]) || parentNode.type === \"mapping\" && hasTrailingComment$3(node.key.content) && isInlineNode(node.value.content) || isNode$1(node.value.content, [\"mapping\", \"sequence\"]) && node.value.content.tag === null && node.value.content.anchor === null ? hardline$d : !node.value.content ? \"\" : line$b, value])), {\n groupId\n })])]);\n }\n\n case \"flowMapping\":\n case \"flowSequence\":\n {\n const openMarker = node.type === \"flowMapping\" ? \"{\" : \"[\";\n const closeMarker = node.type === \"flowMapping\" ? \"}\" : \"]\";\n const bracketSpacing = node.type === \"flowMapping\" && node.children.length !== 0 && options.bracketSpacing ? line$b : softline$8;\n\n const isLastItemEmptyMappingItem = node.children.length !== 0 && (lastItem => lastItem.type === \"flowMappingItem\" && isEmptyNode$1(lastItem.key) && isEmptyNode$1(lastItem.value))(getLast$6(node.children));\n\n return concat$h([openMarker, indent(concat$h([bracketSpacing, concat$h(path.map((childPath, index) => concat$h([print(childPath), index === node.children.length - 1 ? \"\" : concat$h([\",\", line$b, node.children[index].position.start.line !== node.children[index + 1].position.start.line ? printNextEmptyLine(childPath, options.originalText) : \"\"])]), \"children\")), ifBreak$8(\",\", \"\")])), isLastItemEmptyMappingItem ? \"\" : bracketSpacing, closeMarker]);\n }\n\n case \"flowSequenceItem\":\n return path.call(print, \"content\");\n // istanbul ignore next\n\n default:\n throw new Error(\"Unexpected node type \".concat(node.type));\n }\n\n function indent(doc) {\n return docBuilders$2.align(\" \".repeat(options.tabWidth), doc);\n }\n }\n\n function align$3(n, doc) {\n return typeof n === \"number\" && n > 0 ? docBuilders$2.align(\" \".repeat(n), doc) : docBuilders$2.align(n, doc);\n }\n\n function isInlineNode(node) {\n if (!node) {\n return true;\n }\n\n switch (node.type) {\n case \"plain\":\n case \"quoteDouble\":\n case \"quoteSingle\":\n case \"alias\":\n case \"flowMapping\":\n case \"flowSequence\":\n return true;\n\n default:\n return false;\n }\n }\n\n function isSingleLineNode(node) {\n if (!node) {\n return true;\n }\n\n switch (node.type) {\n case \"plain\":\n case \"quoteDouble\":\n case \"quoteSingle\":\n return node.position.start.line === node.position.end.line;\n\n case \"alias\":\n return true;\n\n default:\n return false;\n }\n }\n\n function shouldPrintDocumentBody(document) {\n return document.body.children.length !== 0 || hasEndComments$1(document.body);\n }\n\n function shouldPrintDocumentEndMarker(document, nextDocument) {\n return (\n /**\n *... # trailingComment\n */\n hasTrailingComment$3(document) || nextDocument && (\n /**\n * ...\n * %DIRECTIVE\n * ---\n */\n nextDocument.head.children.length !== 0 ||\n /**\n * ...\n * # endComment\n * ---\n */\n hasEndComments$1(nextDocument.head))\n );\n }\n\n function shouldPrintDocumentHeadEndMarker(document, nextDocument, root, options) {\n if (\n /**\n * ---\n * preserve the first document head end marker\n */\n root.children[0] === document && /---(\\s|$)/.test(options.originalText.slice(options.locStart(document), options.locStart(document) + 4)) ||\n /**\n * %DIRECTIVE\n * ---\n */\n document.head.children.length !== 0 ||\n /**\n * # end comment\n * ---\n */\n hasEndComments$1(document.head) ||\n /**\n * --- # trailing comment\n */\n hasTrailingComment$3(document.head)) {\n return \"head\";\n }\n\n if (shouldPrintDocumentEndMarker(document, nextDocument)) {\n return false;\n }\n\n return nextDocument ? \"root\" : false;\n }\n\n function isAbsolutelyPrintedAsSingleLineNode(node, options) {\n if (!node) {\n return true;\n }\n\n switch (node.type) {\n case \"plain\":\n case \"quoteSingle\":\n case \"quoteDouble\":\n break;\n\n case \"alias\":\n return true;\n\n default:\n return false;\n }\n\n if (options.proseWrap === \"preserve\") {\n return node.position.start.line === node.position.end.line;\n }\n\n if ( // backslash-newline\n /\\\\$/m.test(options.originalText.slice(node.position.start.offset, node.position.end.offset))) {\n return false;\n }\n\n switch (options.proseWrap) {\n case \"never\":\n return !node.value.includes(\"\\n\");\n\n case \"always\":\n return !/[\\n ]/.test(node.value);\n // istanbul ignore next\n\n default:\n return false;\n }\n }\n\n function needsSpaceInFrontOfMappingValue(node) {\n return node.key.content && node.key.content.type === \"alias\";\n }\n\n function printNextEmptyLine(path, originalText) {\n const node = path.getValue();\n const root = path.stack[0];\n root.isNextEmptyLinePrintedChecklist = root.isNextEmptyLinePrintedChecklist || [];\n\n if (!root.isNextEmptyLinePrintedChecklist[node.position.end.line]) {\n if (isNextLineEmpty$6(node, originalText)) {\n root.isNextEmptyLinePrintedChecklist[node.position.end.line] = true;\n return softline$8;\n }\n }\n\n return \"\";\n }\n\n function printFlowScalarContent(nodeType, content, options) {\n const lineContents = getFlowScalarLineContents$1(nodeType, content, options);\n return join$c(hardline$d, lineContents.map(lineContentWords => fill$6(join$c(line$b, lineContentWords).parts)));\n }\n\n function clean$7(node, newNode\n /*, parent */\n ) {\n if (isNode$1(newNode)) {\n delete newNode.position;\n\n switch (newNode.type) {\n case \"comment\":\n // insert pragma\n if (isPragma$1(newNode.value)) {\n return null;\n }\n\n break;\n\n case \"quoteDouble\":\n case \"quoteSingle\":\n newNode.type = \"quote\";\n break;\n }\n }\n }\n\n var printerYaml = {\n preprocess: preprocess$3,\n print: genericPrint$6,\n massageAstNode: clean$7,\n insertPragma: insertPragma$9\n };\n\n var options$7 = {\n bracketSpacing: commonOptions.bracketSpacing,\n singleQuote: commonOptions.singleQuote,\n proseWrap: commonOptions.proseWrap\n };\n\n var name$h = \"YAML\";\n var type$g = \"data\";\n var tmScope$g = \"source.yaml\";\n var aliases$6 = [\n \t\"yml\"\n ];\n var extensions$g = [\n \t\".yml\",\n \t\".mir\",\n \t\".reek\",\n \t\".rviz\",\n \t\".sublime-syntax\",\n \t\".syntax\",\n \t\".yaml\",\n \t\".yaml-tmlanguage\",\n \t\".yaml.sed\",\n \t\".yml.mysql\"\n ];\n var filenames$4 = [\n \t\".clang-format\",\n \t\".clang-tidy\",\n \t\".gemrc\",\n \t\"glide.lock\",\n \t\"yarn.lock\"\n ];\n var aceMode$g = \"yaml\";\n var codemirrorMode$c = \"yaml\";\n var codemirrorMimeType$c = \"text/x-yaml\";\n var languageId$g = 407;\n var YAML = {\n \tname: name$h,\n \ttype: type$g,\n \ttmScope: tmScope$g,\n \taliases: aliases$6,\n \textensions: extensions$g,\n \tfilenames: filenames$4,\n \taceMode: aceMode$g,\n \tcodemirrorMode: codemirrorMode$c,\n \tcodemirrorMimeType: codemirrorMimeType$c,\n \tlanguageId: languageId$g\n };\n\n var YAML$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$h,\n type: type$g,\n tmScope: tmScope$g,\n aliases: aliases$6,\n extensions: extensions$g,\n filenames: filenames$4,\n aceMode: aceMode$g,\n codemirrorMode: codemirrorMode$c,\n codemirrorMimeType: codemirrorMimeType$c,\n languageId: languageId$g,\n 'default': YAML\n });\n\n var require$$0$8 = getCjsExportFromNamespace(YAML$1);\n\n const languages$6 = [createLanguage(require$$0$8, data => ({\n since: \"1.14.0\",\n parsers: [\"yaml\"],\n vscodeLanguageIds: [\"yaml\"],\n // yarn.lock is not YAML: https://github.com/yarnpkg/yarn/issues/5629\n filenames: data.filenames.filter(filename => filename !== \"yarn.lock\")\n }))];\n var languageYaml = {\n languages: languages$6,\n printers: {\n yaml: printerYaml\n },\n options: options$7\n };\n\n const {\n version: version$2\n } = require$$0;\n const {\n getSupportInfo: getSupportInfo$2\n } = support;\n const internalPlugins = [languageCss, languageGraphql, languageHandlebars, languageHtml, languageJs, languageMarkdown, languageYaml];\n\n function withPlugins(fn, optsArgIdx = 1 // Usually `opts` is the 2nd argument\n ) {\n return (...args) => {\n const opts = args[optsArgIdx] || {};\n const plugins = opts.plugins || [];\n args[optsArgIdx] = Object.assign({}, opts, {\n plugins: [...internalPlugins, ...(Array.isArray(plugins) ? plugins : Object.values(plugins))]\n });\n return fn(...args);\n };\n }\n\n const formatWithCursor = withPlugins(core.formatWithCursor);\n var standalone = {\n formatWithCursor,\n\n format(text, opts) {\n return formatWithCursor(text, opts).formatted;\n },\n\n check(text, opts) {\n const {\n formatted\n } = formatWithCursor(text, opts);\n return formatted === text;\n },\n\n doc: document,\n getSupportInfo: withPlugins(getSupportInfo$2, 0),\n version: version$2,\n util: utilShared,\n __debug: {\n parse: withPlugins(core.parse),\n formatAST: withPlugins(core.formatAST),\n formatDoc: withPlugins(core.formatDoc),\n printToDoc: withPlugins(core.printToDoc),\n printDocToString: withPlugins(core.printDocToString)\n }\n };\n\n var standalone$1 = standalone;\n\n return standalone$1;\n\n})));\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","'use strict';\n\n/**\n * Module dependencies.\n */\nvar cheerio = require('cheerio');\nvar utils = require('./utils');\n\nvar cheerioLoad = function(html, options, encodeEntities) {\n options = utils.extend({decodeEntities: false}, options || {});\n html = encodeEntities(html);\n return cheerio.load(html,options);\n};\n\nvar createEntityConverters = function () {\n var codeBlockLookup = [];\n\n var encodeCodeBlocks = function(html) {\n var blocks = module.exports.codeBlocks;\n Object.keys(blocks).forEach(function(key) {\n var re = new RegExp(blocks[key].start + '([\\\\S\\\\s]*?)' + blocks[key].end, 'g');\n html = html.replace(re, function(match, subMatch) {\n codeBlockLookup.push(match);\n return 'JUICE_CODE_BLOCK_' + (codeBlockLookup.length - 1) + '_';\n });\n });\n return html;\n };\n\n var decodeCodeBlocks = function(html) {\n for(var index = 0; index < codeBlockLookup.length; index++) {\n var re = new RegExp('JUICE_CODE_BLOCK_' + index + '_(=\"\")?', 'gi');\n html = html.replace(re, function() {\n return codeBlockLookup[index];\n });\n }\n return html;\n };\n\n return {\n encodeEntities: encodeCodeBlocks,\n decodeEntities: decodeCodeBlocks,\n };\n};\n\n/**\n * Parses the input, calls the callback on the parsed DOM, and generates the output\n *\n * @param {String} html input html to be processed\n * @param {Object} options for the parser\n * @param {Function} callback to be invoked on the DOM\n * @param {Array} callbackExtraArguments to be passed to the callback\n * @return {String} resulting html\n */\nmodule.exports = function(html, options, callback, callbackExtraArguments) {\n var entityConverters = createEntityConverters();\n\n var $ = cheerioLoad(html, options, entityConverters.encodeEntities);\n var args = [ $ ];\n args.push.apply(args, callbackExtraArguments);\n var doc = callback.apply(undefined, args) || $;\n\n if (options && options.xmlMode) {\n return entityConverters.decodeEntities(doc.xml());\n }\n return entityConverters.decodeEntities(doc.html());\n};\n\nmodule.exports.codeBlocks = {\n EJS: { start: '<%', end: '%>' },\n HBS: { start: '{{', end: '}}' }\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery 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 */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\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 */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\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 */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\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 */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\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 */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\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 */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\n/**\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 */\nvar baseFor = createBaseFor();\n\n/**\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 */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\n/**\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 */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\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 */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\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 * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n objTag = objTag == argsTag ? objectTag : objTag;\n }\n if (!othIsArr) {\n othTag = getTag(other);\n othTag = othTag == argsTag ? objectTag : othTag;\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n }\n if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n };\n}\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!seen.has(othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n return seen.add(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, customizer, bitmask, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= UNORDERED_COMPARE_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var result,\n index = -1,\n length = path.length;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result) {\n return result;\n }\n var length = object ? object.length : 0;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\n/**\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 */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\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 */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\n/**\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 `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 */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\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 */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\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 */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\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 */\nvar isArray = Array.isArray;\n\n/**\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 */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\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 */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\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 */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\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 */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\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 */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\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 */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\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 */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\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 */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\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 process.\n * @returns {string} Returns the 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 */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\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 */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\n/**\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 */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\n/**\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 */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = map;\n","var ElementType = require(\"domelementtype\");\n\nvar re_whitespace = /\\s+/g;\nvar NodePrototype = require(\"./lib/node\");\nvar ElementPrototype = require(\"./lib/element\");\n\nfunction DomHandler(callback, options, elementCB){\n\tif(typeof callback === \"object\"){\n\t\telementCB = options;\n\t\toptions = callback;\n\t\tcallback = null;\n\t} else if(typeof options === \"function\"){\n\t\telementCB = options;\n\t\toptions = defaultOpts;\n\t}\n\tthis._callback = callback;\n\tthis._options = options || defaultOpts;\n\tthis._elementCB = elementCB;\n\tthis.dom = [];\n\tthis._done = false;\n\tthis._tagStack = [];\n\tthis._parser = this._parser || null;\n}\n\n//default options\nvar defaultOpts = {\n\tnormalizeWhitespace: false, //Replace all whitespace with single spaces\n\twithStartIndices: false, //Add startIndex properties to nodes\n\twithEndIndices: false, //Add endIndex properties to nodes\n};\n\nDomHandler.prototype.onparserinit = function(parser){\n\tthis._parser = parser;\n};\n\n//Resets the handler back to starting state\nDomHandler.prototype.onreset = function(){\n\tDomHandler.call(this, this._callback, this._options, this._elementCB);\n};\n\n//Signals the handler that parsing is done\nDomHandler.prototype.onend = function(){\n\tif(this._done) return;\n\tthis._done = true;\n\tthis._parser = null;\n\tthis._handleCallback(null);\n};\n\nDomHandler.prototype._handleCallback =\nDomHandler.prototype.onerror = function(error){\n\tif(typeof this._callback === \"function\"){\n\t\tthis._callback(error, this.dom);\n\t} else {\n\t\tif(error) throw error;\n\t}\n};\n\nDomHandler.prototype.onclosetag = function(){\n\t//if(this._tagStack.pop().name !== name) this._handleCallback(Error(\"Tagname didn't match!\"));\n\t\n\tvar elem = this._tagStack.pop();\n\n\tif(this._options.withEndIndices && elem){\n\t\telem.endIndex = this._parser.endIndex;\n\t}\n\n\tif(this._elementCB) this._elementCB(elem);\n};\n\nDomHandler.prototype._createDomElement = function(properties){\n\tif (!this._options.withDomLvl1) return properties;\n\n\tvar element;\n\tif (properties.type === \"tag\") {\n\t\telement = Object.create(ElementPrototype);\n\t} else {\n\t\telement = Object.create(NodePrototype);\n\t}\n\n\tfor (var key in properties) {\n\t\tif (properties.hasOwnProperty(key)) {\n\t\t\telement[key] = properties[key];\n\t\t}\n\t}\n\n\treturn element;\n};\n\nDomHandler.prototype._addDomElement = function(element){\n\tvar parent = this._tagStack[this._tagStack.length - 1];\n\tvar siblings = parent ? parent.children : this.dom;\n\tvar previousSibling = siblings[siblings.length - 1];\n\n\telement.next = null;\n\n\tif(this._options.withStartIndices){\n\t\telement.startIndex = this._parser.startIndex;\n\t}\n\tif(this._options.withEndIndices){\n\t\telement.endIndex = this._parser.endIndex;\n\t}\n\n\tif(previousSibling){\n\t\telement.prev = previousSibling;\n\t\tpreviousSibling.next = element;\n\t} else {\n\t\telement.prev = null;\n\t}\n\n\tsiblings.push(element);\n\telement.parent = parent || null;\n};\n\nDomHandler.prototype.onopentag = function(name, attribs){\n\tvar properties = {\n\t\ttype: name === \"script\" ? ElementType.Script : name === \"style\" ? ElementType.Style : ElementType.Tag,\n\t\tname: name,\n\t\tattribs: attribs,\n\t\tchildren: []\n\t};\n\n\tvar element = this._createDomElement(properties);\n\n\tthis._addDomElement(element);\n\n\tthis._tagStack.push(element);\n};\n\nDomHandler.prototype.ontext = function(data){\n\t//the ignoreWhitespace is officially dropped, but for now,\n\t//it's an alias for normalizeWhitespace\n\tvar normalize = this._options.normalizeWhitespace || this._options.ignoreWhitespace;\n\n\tvar lastTag;\n\n\tif(!this._tagStack.length && this.dom.length && (lastTag = this.dom[this.dom.length-1]).type === ElementType.Text){\n\t\tif(normalize){\n\t\t\tlastTag.data = (lastTag.data + data).replace(re_whitespace, \" \");\n\t\t} else {\n\t\t\tlastTag.data += data;\n\t\t}\n\t} else {\n\t\tif(\n\t\t\tthis._tagStack.length &&\n\t\t\t(lastTag = this._tagStack[this._tagStack.length - 1]) &&\n\t\t\t(lastTag = lastTag.children[lastTag.children.length - 1]) &&\n\t\t\tlastTag.type === ElementType.Text\n\t\t){\n\t\t\tif(normalize){\n\t\t\t\tlastTag.data = (lastTag.data + data).replace(re_whitespace, \" \");\n\t\t\t} else {\n\t\t\t\tlastTag.data += data;\n\t\t\t}\n\t\t} else {\n\t\t\tif(normalize){\n\t\t\t\tdata = data.replace(re_whitespace, \" \");\n\t\t\t}\n\n\t\t\tvar element = this._createDomElement({\n\t\t\t\tdata: data,\n\t\t\t\ttype: ElementType.Text\n\t\t\t});\n\n\t\t\tthis._addDomElement(element);\n\t\t}\n\t}\n};\n\nDomHandler.prototype.oncomment = function(data){\n\tvar lastTag = this._tagStack[this._tagStack.length - 1];\n\n\tif(lastTag && lastTag.type === ElementType.Comment){\n\t\tlastTag.data += data;\n\t\treturn;\n\t}\n\n\tvar properties = {\n\t\tdata: data,\n\t\ttype: ElementType.Comment\n\t};\n\n\tvar element = this._createDomElement(properties);\n\n\tthis._addDomElement(element);\n\tthis._tagStack.push(element);\n};\n\nDomHandler.prototype.oncdatastart = function(){\n\tvar properties = {\n\t\tchildren: [{\n\t\t\tdata: \"\",\n\t\t\ttype: ElementType.Text\n\t\t}],\n\t\ttype: ElementType.CDATA\n\t};\n\n\tvar element = this._createDomElement(properties);\n\n\tthis._addDomElement(element);\n\tthis._tagStack.push(element);\n};\n\nDomHandler.prototype.oncommentend = DomHandler.prototype.oncdataend = function(){\n\tthis._tagStack.pop();\n};\n\nDomHandler.prototype.onprocessinginstruction = function(name, data){\n\tvar element = this._createDomElement({\n\t\tname: name,\n\t\tdata: data,\n\t\ttype: ElementType.Directive\n\t});\n\n\tthis._addDomElement(element);\n};\n\nmodule.exports = DomHandler;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n return Array.isArray(val) ? [] : {}\n}\n\nfunction cloneIfNecessary(value, optionsArgument) {\n var clone = optionsArgument && optionsArgument.clone === true;\n return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value\n}\n\nfunction defaultArrayMerge(target, source, optionsArgument) {\n var destination = target.slice();\n source.forEach(function(e, i) {\n if (typeof destination[i] === 'undefined') {\n destination[i] = cloneIfNecessary(e, optionsArgument);\n } else if (isMergeableObject(e)) {\n destination[i] = deepmerge(target[i], e, optionsArgument);\n } else if (target.indexOf(e) === -1) {\n destination.push(cloneIfNecessary(e, optionsArgument));\n }\n });\n return destination\n}\n\nfunction mergeObject(target, source, optionsArgument) {\n var destination = {};\n if (isMergeableObject(target)) {\n Object.keys(target).forEach(function(key) {\n destination[key] = cloneIfNecessary(target[key], optionsArgument);\n });\n }\n Object.keys(source).forEach(function(key) {\n if (!isMergeableObject(source[key]) || !target[key]) {\n destination[key] = cloneIfNecessary(source[key], optionsArgument);\n } else {\n destination[key] = deepmerge(target[key], source[key], optionsArgument);\n }\n });\n return destination\n}\n\nfunction deepmerge(target, source, optionsArgument) {\n var sourceIsArray = Array.isArray(source);\n var targetIsArray = Array.isArray(target);\n var options = optionsArgument || { arrayMerge: defaultArrayMerge };\n var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n if (!sourceAndTargetTypesMatch) {\n return cloneIfNecessary(source, optionsArgument)\n } else if (sourceIsArray) {\n var arrayMerge = options.arrayMerge || defaultArrayMerge;\n return arrayMerge(target, source, optionsArgument)\n } else {\n return mergeObject(target, source, optionsArgument)\n }\n}\n\ndeepmerge.all = function deepmergeAll(array, optionsArgument) {\n if (!Array.isArray(array) || array.length < 2) {\n throw new Error('first argument should be an array with at least two elements')\n }\n\n // we are sure there are at least 2 values, so it is safe to have no initial value\n return array.reduce(function(prev, next) {\n return deepmerge(prev, next, optionsArgument)\n })\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","module.exports = {};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nexports.__esModule = true;\nexports.removeResizeListener = exports.addResizeListener = undefined;\n\nvar _resizeObserverPolyfill = require('resize-observer-polyfill');\n\nvar _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar isServer = typeof window === 'undefined';\n\n/* istanbul ignore next */\nvar resizeHandler = function resizeHandler(entries) {\n for (var _iterator = entries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var entry = _ref;\n\n var listeners = entry.target.__resizeListeners__ || [];\n if (listeners.length) {\n listeners.forEach(function (fn) {\n fn();\n });\n }\n }\n};\n\n/* istanbul ignore next */\nvar addResizeListener = exports.addResizeListener = function addResizeListener(element, fn) {\n if (isServer) return;\n if (!element.__resizeListeners__) {\n element.__resizeListeners__ = [];\n element.__ro__ = new _resizeObserverPolyfill2.default(resizeHandler);\n element.__ro__.observe(element);\n }\n element.__resizeListeners__.push(fn);\n};\n\n/* istanbul ignore next */\nvar removeResizeListener = exports.removeResizeListener = function removeResizeListener(element, fn) {\n if (!element || !element.__resizeListeners__) return;\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n if (!element.__resizeListeners__.length) {\n element.__ro__.disconnect();\n }\n};","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n forEach: forEach\n});\n","'use strict';\n\nexports.__esModule = true;\n\nvar _vue = require('vue');\n\nvar _vue2 = _interopRequireDefault(_vue);\n\nvar _dom = require('element-ui/lib/utils/dom');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar nodeList = [];\nvar ctx = '@@clickoutsideContext';\n\nvar startClick = void 0;\nvar seed = 0;\n\n!_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mousedown', function (e) {\n return startClick = e;\n});\n\n!_vue2.default.prototype.$isServer && (0, _dom.on)(document, 'mouseup', function (e) {\n nodeList.forEach(function (node) {\n return node[ctx].documentHandler(e, startClick);\n });\n});\n\nfunction createDocumentHandler(el, binding, vnode) {\n return function () {\n var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;\n\n if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {\n vnode.context[el[ctx].methodName]();\n } else {\n el[ctx].bindingFn && el[ctx].bindingFn();\n }\n };\n}\n\n/**\n * v-clickoutside\n * @desc 点击元素外面才会触发的事件\n * @example\n * ```vue\n *
    \n * ```\n */\nexports.default = {\n bind: function bind(el, binding, vnode) {\n nodeList.push(el);\n var id = seed++;\n el[ctx] = {\n id: id,\n documentHandler: createDocumentHandler(el, binding, vnode),\n methodName: binding.expression,\n bindingFn: binding.value\n };\n },\n update: function update(el, binding, vnode) {\n el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);\n el[ctx].methodName = binding.expression;\n el[ctx].bindingFn = binding.value;\n },\n unbind: function unbind(el) {\n var len = nodeList.length;\n\n for (var i = 0; i < len; i++) {\n if (nodeList[i][ctx].id === el[ctx].id) {\n nodeList.splice(i, 1);\n break;\n }\n }\n delete el[ctx];\n }\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.isVNode = isVNode;\n\nvar _util = require('element-ui/lib/utils/util');\n\nfunction isVNode(node) {\n return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && (0, _util.hasOwn)(node, 'componentOptions');\n};","var global = require('../internals/global');\n\nmodule.exports = global;\n","exports.nextTick = function nextTick(fn) {\n var args = Array.prototype.slice.call(arguments);\n args.shift();\n setTimeout(function () {\n fn.apply(null, args);\n }, 0);\n};\n\nexports.platform = exports.arch = \nexports.execPath = exports.title = 'browser';\nexports.pid = 1;\nexports.browser = true;\nexports.env = {};\nexports.argv = [];\n\nexports.binding = function (name) {\n\tthrow new Error('No such module. (Possibly not yet loaded)')\n};\n\n(function () {\n var cwd = '/';\n var path;\n exports.cwd = function () { return cwd };\n exports.chdir = function (dir) {\n if (!path) path = require('path');\n cwd = path.resolve(dir, cwd);\n };\n})();\n\nexports.exit = exports.kill = \nexports.umask = exports.dlopen = \nexports.uptime = exports.memoryUsage = \nexports.uvCounters = function() {};\nexports.features = {};\n","var parse = require(\"./parse.js\"),\n compile = require(\"./compile.js\");\n\nmodule.exports = function nthCheck(formula){\n\treturn compile(parse(formula));\n};\n\nmodule.exports.parse = parse;\nmodule.exports.compile = compile;","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar mensch = require('mensch');\nvar own = {}.hasOwnProperty;\nvar Selector = require('./selector');\nvar Property = require('./property');\n\nexports.Selector = Selector;\nexports.Property = Property;\n\n/**\n * Returns an array of the selectors.\n *\n * @license Sizzle CSS Selector Engine - MIT\n * @param {String} selectorText from mensch\n * @api public\n */\n\nexports.extract = function extract(selectorText) {\n var attr = 0;\n var sels = [];\n var sel = '';\n\n for (var i = 0, l = selectorText.length; i < l; i++) {\n var c = selectorText.charAt(i);\n\n if (attr) {\n if (']' === c || ')' === c) { attr--; }\n sel += c;\n } else {\n if (',' === c) {\n sels.push(sel);\n sel = '';\n } else {\n if ('[' === c || '(' === c) { attr++; }\n if (sel.length || (c !== ',' && c !== '\\n' && c !== ' ')) { sel += c; }\n }\n }\n }\n\n if (sel.length) {\n sels.push(sel);\n }\n\n return sels;\n};\n\n/**\n * Returns a parse tree for a CSS source.\n * If it encounters multiple selectors separated by a comma, it splits the\n * tree.\n *\n * @param {String} css source\n * @api public\n */\n\nexports.parseCSS = function(css) {\n var parsed = mensch.parse(css, {position: true, comments: true});\n var rules = typeof parsed.stylesheet != 'undefined' && parsed.stylesheet.rules ? parsed.stylesheet.rules : [];\n var ret = [];\n\n for (var i = 0, l = rules.length; i < l; i++) {\n if (rules[i].type == 'rule') {\n var rule = rules[i];\n var selectors = rule.selectors;\n\n for (var ii = 0, ll = selectors.length; ii < ll; ii++) {\n ret.push([selectors[ii], rule.declarations]);\n }\n }\n }\n\n return ret;\n};\n\n/**\n * Returns preserved text for a CSS source.\n *\n * @param {String} css source\n * @param {Object} options\n * @api public\n */\n\nexports.getPreservedText = function(css, options, ignoredPseudos) {\n var parsed = mensch.parse(css, {position: true, comments: true});\n var rules = typeof parsed.stylesheet != 'undefined' && parsed.stylesheet.rules ? parsed.stylesheet.rules : [];\n var preserved = [];\n var lastStart = null;\n\n for (var i = rules.length - 1; i >= 0; i--) {\n if ((options.fontFaces && rules[i].type === 'font-face') ||\n (options.mediaQueries && rules[i].type === 'media') ||\n (options.keyFrames && rules[i].type === 'keyframes') ||\n (options.pseudos && rules[i].selectors && this.matchesPseudo(rules[i].selectors[0], ignoredPseudos))) {\n preserved.unshift(\n mensch.stringify(\n { stylesheet: { rules: [ rules[i] ] }},\n { comments: false, indentation: ' ' }\n )\n );\n }\n lastStart = rules[i].position.start;\n }\n\n if (preserved.length === 0) {\n return false;\n }\n return '\\n' + preserved.join('\\n') + '\\n';\n};\n\nexports.normalizeLineEndings = function(text) {\n return text.replace(/\\r\\n/g, '\\n').replace(/\\n/g, '\\r\\n');\n};\n\nexports.matchesPseudo = function(needle, haystack) {\n return haystack.find(function (element) {\n return needle.indexOf(element) > -1;\n })\n}\n\n/**\n * Compares two specificity vectors, returning the winning one.\n *\n * @param {Array} vector a\n * @param {Array} vector b\n * @return {Array}\n * @api public\n */\n\nexports.compareFunc = function(a, b) {\n var min = Math.min(a.length, b.length);\n for (var i = 0; i < min; i++) {\n if (a[i] === b[i]) { continue; }\n if (a[i] > b[i]) { return 1; }\n return -1;\n }\n\n return a.length - b.length;\n};\n\nexports.compare = function(a, b) {\n return exports.compareFunc(a, b) == 1 ? a : b;\n};\n\nexports.extend = function(obj, src) {\n for (var key in src) {\n if (own.call(src, key)) {\n obj[key] = src[key];\n }\n }\n return obj;\n};\n\nexports.getDefaultOptions = function(options) {\n var result = exports.extend({\n extraCss: '',\n insertPreservedExtraCss: true,\n applyStyleTags: true,\n removeStyleTags: true,\n preserveMediaQueries: true,\n preserveFontFaces: true,\n preserveKeyFrames: true,\n preservePseudos: true,\n applyWidthAttributes: true,\n applyHeightAttributes: true,\n applyAttributesTableElements: true,\n url: ''\n }, options);\n\n result.webResources = result.webResources || {};\n\n return result;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","'use strict';\n\nvar cheerio = require('./lib/cheerio');\nvar makeJuiceClient = require('./lib/inline');\n\n/**\n * Note that makeJuiceClient will take a base object (in this case a function) and enhance it\n * with a lot of useful properties and functions.\n *\n * This client adopts cheerio as a DOM parser and adds an \"inlineContent\" function that let\n * users to specify the CSS to be inlined instead of extracting it from the html.\n * \n * The weird \"makeJuiceClient\" behaviour is there in order to keep backward API compatibility.\n */\nvar juiceClient = makeJuiceClient(function(html,options) {\n return cheerio(html, { xmlMode: options && options.xmlMode}, juiceDocument, [options]);\n});\n\nvar juiceDocument = function(html, options) {\n return juiceClient.juiceDocument(html, options);\n}\n\njuiceClient.inlineContent = function(html, css, options) {\n return cheerio(html, { xmlMode: options && options.xmlMode}, juiceClient.inlineDocument, [css, options]);\n};\n\nmodule.exports = juiceClient;\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 59);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return normalizeComponent; });\n/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nfunction normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n\n\n/***/ }),\n\n/***/ 14:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/scrollbar\");\n\n/***/ }),\n\n/***/ 18:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/checkbox\");\n\n/***/ }),\n\n/***/ 21:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/utils/shared\");\n\n/***/ }),\n\n/***/ 26:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"babel-helper-vue-jsx-merge-props\");\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/utils/util\");\n\n/***/ }),\n\n/***/ 31:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/utils/scroll-into-view\");\n\n/***/ }),\n\n/***/ 32:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/utils/aria-utils\");\n\n/***/ }),\n\n/***/ 51:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/radio\");\n\n/***/ }),\n\n/***/ 59:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&\nvar cascader_panelvue_type_template_id_34932346_render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n class: [\"el-cascader-panel\", _vm.border && \"is-bordered\"],\n on: { keydown: _vm.handleKeyDown }\n },\n _vm._l(_vm.menus, function(menu, index) {\n return _c(\"cascader-menu\", {\n key: index,\n ref: \"menu\",\n refInFor: true,\n attrs: { index: index, nodes: menu }\n })\n }),\n 1\n )\n}\nvar staticRenderFns = []\ncascader_panelvue_type_template_id_34932346_render._withStripped = true\n\n\n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&\n\n// EXTERNAL MODULE: external \"babel-helper-vue-jsx-merge-props\"\nvar external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(26);\nvar external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);\n\n// EXTERNAL MODULE: external \"element-ui/lib/scrollbar\"\nvar scrollbar_ = __webpack_require__(14);\nvar scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);\n\n// EXTERNAL MODULE: external \"element-ui/lib/checkbox\"\nvar checkbox_ = __webpack_require__(18);\nvar checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);\n\n// EXTERNAL MODULE: external \"element-ui/lib/radio\"\nvar radio_ = __webpack_require__(51);\nvar radio_default = /*#__PURE__*/__webpack_require__.n(radio_);\n\n// EXTERNAL MODULE: external \"element-ui/lib/utils/util\"\nvar util_ = __webpack_require__(3);\n\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&\n\n\n\n\n\n\nvar stopPropagation = function stopPropagation(e) {\n return e.stopPropagation();\n};\n\n/* harmony default export */ var cascader_nodevue_type_script_lang_js_ = ({\n inject: ['panel'],\n\n components: {\n ElCheckbox: checkbox_default.a,\n ElRadio: radio_default.a\n },\n\n props: {\n node: {\n required: true\n },\n nodeId: String\n },\n\n computed: {\n config: function config() {\n return this.panel.config;\n },\n isLeaf: function isLeaf() {\n return this.node.isLeaf;\n },\n isDisabled: function isDisabled() {\n return this.node.isDisabled;\n },\n checkedValue: function checkedValue() {\n return this.panel.checkedValue;\n },\n isChecked: function isChecked() {\n return this.node.isSameNode(this.checkedValue);\n },\n inActivePath: function inActivePath() {\n return this.isInPath(this.panel.activePath);\n },\n inCheckedPath: function inCheckedPath() {\n var _this = this;\n\n if (!this.config.checkStrictly) return false;\n\n return this.panel.checkedNodePaths.some(function (checkedPath) {\n return _this.isInPath(checkedPath);\n });\n },\n value: function value() {\n return this.node.getValueByOption();\n }\n },\n\n methods: {\n handleExpand: function handleExpand() {\n var _this2 = this;\n\n var panel = this.panel,\n node = this.node,\n isDisabled = this.isDisabled,\n config = this.config;\n var multiple = config.multiple,\n checkStrictly = config.checkStrictly;\n\n\n if (!checkStrictly && isDisabled || node.loading) return;\n\n if (config.lazy && !node.loaded) {\n panel.lazyLoad(node, function () {\n // do not use cached leaf value here, invoke this.isLeaf to get new value.\n var isLeaf = _this2.isLeaf;\n\n\n if (!isLeaf) _this2.handleExpand();\n if (multiple) {\n // if leaf sync checked state, else clear checked state\n var checked = isLeaf ? node.checked : false;\n _this2.handleMultiCheckChange(checked);\n }\n });\n } else {\n panel.handleExpand(node);\n }\n },\n handleCheckChange: function handleCheckChange() {\n var panel = this.panel,\n value = this.value,\n node = this.node;\n\n panel.handleCheckChange(value);\n panel.handleExpand(node);\n },\n handleMultiCheckChange: function handleMultiCheckChange(checked) {\n this.node.doCheck(checked);\n this.panel.calculateMultiCheckedValue();\n },\n isInPath: function isInPath(pathNodes) {\n var node = this.node;\n\n var selectedPathNode = pathNodes[node.level - 1] || {};\n return selectedPathNode.uid === node.uid;\n },\n renderPrefix: function renderPrefix(h) {\n var isLeaf = this.isLeaf,\n isChecked = this.isChecked,\n config = this.config;\n var checkStrictly = config.checkStrictly,\n multiple = config.multiple;\n\n\n if (multiple) {\n return this.renderCheckbox(h);\n } else if (checkStrictly) {\n return this.renderRadio(h);\n } else if (isLeaf && isChecked) {\n return this.renderCheckIcon(h);\n }\n\n return null;\n },\n renderPostfix: function renderPostfix(h) {\n var node = this.node,\n isLeaf = this.isLeaf;\n\n\n if (node.loading) {\n return this.renderLoadingIcon(h);\n } else if (!isLeaf) {\n return this.renderExpandIcon(h);\n }\n\n return null;\n },\n renderCheckbox: function renderCheckbox(h) {\n var node = this.node,\n config = this.config,\n isDisabled = this.isDisabled;\n\n var events = {\n on: { change: this.handleMultiCheckChange },\n nativeOn: {}\n };\n\n if (config.checkStrictly) {\n // when every node is selectable, click event should not trigger expand event.\n events.nativeOn.click = stopPropagation;\n }\n\n return h('el-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{\n attrs: {\n value: node.checked,\n indeterminate: node.indeterminate,\n disabled: isDisabled\n }\n }, events]));\n },\n renderRadio: function renderRadio(h) {\n var checkedValue = this.checkedValue,\n value = this.value,\n isDisabled = this.isDisabled;\n\n // to keep same reference if value cause radio's checked state is calculated by reference comparision;\n\n if (Object(util_[\"isEqual\"])(value, checkedValue)) {\n value = checkedValue;\n }\n\n return h(\n 'el-radio',\n {\n attrs: {\n value: checkedValue,\n label: value,\n disabled: isDisabled\n },\n on: {\n 'change': this.handleCheckChange\n },\n nativeOn: {\n 'click': stopPropagation\n }\n },\n [h('span')]\n );\n },\n renderCheckIcon: function renderCheckIcon(h) {\n return h('i', { 'class': 'el-icon-check el-cascader-node__prefix' });\n },\n renderLoadingIcon: function renderLoadingIcon(h) {\n return h('i', { 'class': 'el-icon-loading el-cascader-node__postfix' });\n },\n renderExpandIcon: function renderExpandIcon(h) {\n return h('i', { 'class': 'el-icon-arrow-right el-cascader-node__postfix' });\n },\n renderContent: function renderContent(h) {\n var panel = this.panel,\n node = this.node;\n\n var render = panel.renderLabelFn;\n var vnode = render ? render({ node: node, data: node.data }) : null;\n\n return h(\n 'span',\n { 'class': 'el-cascader-node__label' },\n [vnode || node.label]\n );\n }\n },\n\n render: function render(h) {\n var _this3 = this;\n\n var inActivePath = this.inActivePath,\n inCheckedPath = this.inCheckedPath,\n isChecked = this.isChecked,\n isLeaf = this.isLeaf,\n isDisabled = this.isDisabled,\n config = this.config,\n nodeId = this.nodeId;\n var expandTrigger = config.expandTrigger,\n checkStrictly = config.checkStrictly,\n multiple = config.multiple;\n\n var disabled = !checkStrictly && isDisabled;\n var events = { on: {} };\n\n if (expandTrigger === 'click') {\n events.on.click = this.handleExpand;\n } else {\n events.on.mouseenter = function (e) {\n _this3.handleExpand();\n _this3.$emit('expand', e);\n };\n events.on.focus = function (e) {\n _this3.handleExpand();\n _this3.$emit('expand', e);\n };\n }\n if (isLeaf && !isDisabled && !checkStrictly && !multiple) {\n events.on.click = this.handleCheckChange;\n }\n\n return h(\n 'li',\n external_babel_helper_vue_jsx_merge_props_default()([{\n attrs: {\n role: 'menuitem',\n id: nodeId,\n 'aria-expanded': inActivePath,\n tabindex: disabled ? null : -1\n },\n 'class': {\n 'el-cascader-node': true,\n 'is-selectable': checkStrictly,\n 'in-active-path': inActivePath,\n 'in-checked-path': inCheckedPath,\n 'is-active': isChecked,\n 'is-disabled': disabled\n }\n }, events]),\n [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]\n );\n }\n});\n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&\n /* harmony default export */ var src_cascader_nodevue_type_script_lang_js_ = (cascader_nodevue_type_script_lang_js_); \n// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js\nvar componentNormalizer = __webpack_require__(0);\n\n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue\nvar cascader_node_render, cascader_node_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar component = Object(componentNormalizer[\"a\" /* default */])(\n src_cascader_nodevue_type_script_lang_js_,\n cascader_node_render,\n cascader_node_staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"packages/cascader-panel/src/cascader-node.vue\"\n/* harmony default export */ var cascader_node = (component.exports);\n// EXTERNAL MODULE: external \"element-ui/lib/mixins/locale\"\nvar locale_ = __webpack_require__(6);\nvar locale_default = /*#__PURE__*/__webpack_require__.n(locale_);\n\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&\n\n\n\n\n\n\n\n/* harmony default export */ var cascader_menuvue_type_script_lang_js_ = ({\n name: 'ElCascaderMenu',\n\n mixins: [locale_default.a],\n\n inject: ['panel'],\n\n components: {\n ElScrollbar: scrollbar_default.a,\n CascaderNode: cascader_node\n },\n\n props: {\n nodes: {\n type: Array,\n required: true\n },\n index: Number\n },\n\n data: function data() {\n return {\n activeNode: null,\n hoverTimer: null,\n id: Object(util_[\"generateId\"])()\n };\n },\n\n\n computed: {\n isEmpty: function isEmpty() {\n return !this.nodes.length;\n },\n menuId: function menuId() {\n return 'cascader-menu-' + this.id + '-' + this.index;\n }\n },\n\n methods: {\n handleExpand: function handleExpand(e) {\n this.activeNode = e.target;\n },\n handleMouseMove: function handleMouseMove(e) {\n var activeNode = this.activeNode,\n hoverTimer = this.hoverTimer;\n var hoverZone = this.$refs.hoverZone;\n\n\n if (!activeNode || !hoverZone) return;\n\n if (activeNode.contains(e.target)) {\n clearTimeout(hoverTimer);\n\n var _$el$getBoundingClien = this.$el.getBoundingClientRect(),\n left = _$el$getBoundingClien.left;\n\n var startX = e.clientX - left;\n var _$el = this.$el,\n offsetWidth = _$el.offsetWidth,\n offsetHeight = _$el.offsetHeight;\n\n var top = activeNode.offsetTop;\n var bottom = top + activeNode.offsetHeight;\n\n hoverZone.innerHTML = '\\n \\n \\n ';\n } else if (!hoverTimer) {\n this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);\n }\n },\n clearHoverZone: function clearHoverZone() {\n var hoverZone = this.$refs.hoverZone;\n\n if (!hoverZone) return;\n hoverZone.innerHTML = '';\n },\n renderEmptyText: function renderEmptyText(h) {\n return h(\n 'div',\n { 'class': 'el-cascader-menu__empty-text' },\n [this.t('el.cascader.noData')]\n );\n },\n renderNodeList: function renderNodeList(h) {\n var menuId = this.menuId;\n var isHoverMenu = this.panel.isHoverMenu;\n\n var events = { on: {} };\n\n if (isHoverMenu) {\n events.on.expand = this.handleExpand;\n }\n\n var nodes = this.nodes.map(function (node, index) {\n var hasChildren = node.hasChildren;\n\n return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{\n key: node.uid,\n attrs: { node: node,\n 'node-id': menuId + '-' + index,\n 'aria-haspopup': hasChildren,\n 'aria-owns': hasChildren ? menuId : null\n }\n }, events]));\n });\n\n return [].concat(nodes, [isHoverMenu ? h('svg', { ref: 'hoverZone', 'class': 'el-cascader-menu__hover-zone' }) : null]);\n }\n },\n\n render: function render(h) {\n var isEmpty = this.isEmpty,\n menuId = this.menuId;\n\n var events = { nativeOn: {} };\n\n // optimize hover to expand experience (#8010)\n if (this.panel.isHoverMenu) {\n events.nativeOn.mousemove = this.handleMouseMove;\n // events.nativeOn.mouseleave = this.clearHoverZone;\n }\n\n return h(\n 'el-scrollbar',\n external_babel_helper_vue_jsx_merge_props_default()([{\n attrs: {\n tag: 'ul',\n role: 'menu',\n id: menuId,\n\n 'wrap-class': 'el-cascader-menu__wrap',\n 'view-class': {\n 'el-cascader-menu__list': true,\n 'is-empty': isEmpty\n }\n },\n 'class': 'el-cascader-menu' }, events]),\n [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]\n );\n }\n});\n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&\n /* harmony default export */ var src_cascader_menuvue_type_script_lang_js_ = (cascader_menuvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue\nvar cascader_menu_render, cascader_menu_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar cascader_menu_component = Object(componentNormalizer[\"a\" /* default */])(\n src_cascader_menuvue_type_script_lang_js_,\n cascader_menu_render,\n cascader_menu_staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var cascader_menu_api; }\ncascader_menu_component.options.__file = \"packages/cascader-panel/src/cascader-menu.vue\"\n/* harmony default export */ var cascader_menu = (cascader_menu_component.exports);\n// EXTERNAL MODULE: external \"element-ui/lib/utils/shared\"\nvar shared_ = __webpack_require__(21);\n\n// CONCATENATED MODULE: ./packages/cascader-panel/src/node.js\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n\nvar uid = 0;\n\nvar node_Node = function () {\n function Node(data, config, parentNode) {\n _classCallCheck(this, Node);\n\n this.data = data;\n this.config = config;\n this.parent = parentNode || null;\n this.level = !this.parent ? 1 : this.parent.level + 1;\n this.uid = uid++;\n\n this.initState();\n this.initChildren();\n }\n\n Node.prototype.initState = function initState() {\n var _config = this.config,\n valueKey = _config.value,\n labelKey = _config.label;\n\n\n this.value = this.data[valueKey];\n this.label = this.data[labelKey];\n this.pathNodes = this.calculatePathNodes();\n this.path = this.pathNodes.map(function (node) {\n return node.value;\n });\n this.pathLabels = this.pathNodes.map(function (node) {\n return node.label;\n });\n\n // lazy load\n this.loading = false;\n this.loaded = false;\n };\n\n Node.prototype.initChildren = function initChildren() {\n var _this = this;\n\n var config = this.config;\n\n var childrenKey = config.children;\n var childrenData = this.data[childrenKey];\n this.hasChildren = Array.isArray(childrenData);\n this.children = (childrenData || []).map(function (child) {\n return new Node(child, config, _this);\n });\n };\n\n Node.prototype.calculatePathNodes = function calculatePathNodes() {\n var nodes = [this];\n var parent = this.parent;\n\n while (parent) {\n nodes.unshift(parent);\n parent = parent.parent;\n }\n\n return nodes;\n };\n\n Node.prototype.getPath = function getPath() {\n return this.path;\n };\n\n Node.prototype.getValue = function getValue() {\n return this.value;\n };\n\n Node.prototype.getValueByOption = function getValueByOption() {\n return this.config.emitPath ? this.getPath() : this.getValue();\n };\n\n Node.prototype.getText = function getText(allLevels, separator) {\n return allLevels ? this.pathLabels.join(separator) : this.label;\n };\n\n Node.prototype.isSameNode = function isSameNode(checkedValue) {\n var value = this.getValueByOption();\n return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {\n return Object(util_[\"isEqual\"])(val, value);\n }) : Object(util_[\"isEqual\"])(checkedValue, value);\n };\n\n Node.prototype.broadcast = function broadcast(event) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var handlerName = 'onParent' + Object(util_[\"capitalize\"])(event);\n\n this.children.forEach(function (child) {\n if (child) {\n // bottom up\n child.broadcast.apply(child, [event].concat(args));\n child[handlerName] && child[handlerName].apply(child, args);\n }\n });\n };\n\n Node.prototype.emit = function emit(event) {\n var parent = this.parent;\n\n var handlerName = 'onChild' + Object(util_[\"capitalize\"])(event);\n if (parent) {\n for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n parent[handlerName] && parent[handlerName].apply(parent, args);\n parent.emit.apply(parent, [event].concat(args));\n }\n };\n\n Node.prototype.onParentCheck = function onParentCheck(checked) {\n if (!this.isDisabled) {\n this.setCheckState(checked);\n }\n };\n\n Node.prototype.onChildCheck = function onChildCheck() {\n var children = this.children;\n\n var validChildren = children.filter(function (child) {\n return !child.isDisabled;\n });\n var checked = validChildren.length ? validChildren.every(function (child) {\n return child.checked;\n }) : false;\n\n this.setCheckState(checked);\n };\n\n Node.prototype.setCheckState = function setCheckState(checked) {\n var totalNum = this.children.length;\n var checkedNum = this.children.reduce(function (c, p) {\n var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;\n return c + num;\n }, 0);\n\n this.checked = checked;\n this.indeterminate = checkedNum !== totalNum && checkedNum > 0;\n };\n\n Node.prototype.syncCheckState = function syncCheckState(checkedValue) {\n var value = this.getValueByOption();\n var checked = this.isSameNode(checkedValue, value);\n\n this.doCheck(checked);\n };\n\n Node.prototype.doCheck = function doCheck(checked) {\n if (this.checked !== checked) {\n if (this.config.checkStrictly) {\n this.checked = checked;\n } else {\n // bottom up to unify the calculation of the indeterminate state\n this.broadcast('check', checked);\n this.setCheckState(checked);\n this.emit('check');\n }\n }\n };\n\n _createClass(Node, [{\n key: 'isDisabled',\n get: function get() {\n var data = this.data,\n parent = this.parent,\n config = this.config;\n\n var disabledKey = config.disabled;\n var checkStrictly = config.checkStrictly;\n\n return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;\n }\n }, {\n key: 'isLeaf',\n get: function get() {\n var data = this.data,\n loaded = this.loaded,\n hasChildren = this.hasChildren,\n children = this.children;\n var _config2 = this.config,\n lazy = _config2.lazy,\n leafKey = _config2.leaf;\n\n if (lazy) {\n var isLeaf = Object(shared_[\"isDef\"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;\n this.hasChildren = !isLeaf;\n return isLeaf;\n }\n return !hasChildren;\n }\n }]);\n\n return Node;\n}();\n\n/* harmony default export */ var src_node = (node_Node);\n// CONCATENATED MODULE: ./packages/cascader-panel/src/store.js\nfunction store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n\nvar flatNodes = function flatNodes(data, leafOnly) {\n return data.reduce(function (res, node) {\n if (node.isLeaf) {\n res.push(node);\n } else {\n !leafOnly && res.push(node);\n res = res.concat(flatNodes(node.children, leafOnly));\n }\n return res;\n }, []);\n};\n\nvar store_Store = function () {\n function Store(data, config) {\n store_classCallCheck(this, Store);\n\n this.config = config;\n this.initNodes(data);\n }\n\n Store.prototype.initNodes = function initNodes(data) {\n var _this = this;\n\n data = Object(util_[\"coerceTruthyValueToArray\"])(data);\n this.nodes = data.map(function (nodeData) {\n return new src_node(nodeData, _this.config);\n });\n this.flattedNodes = this.getFlattedNodes(false, false);\n this.leafNodes = this.getFlattedNodes(true, false);\n };\n\n Store.prototype.appendNode = function appendNode(nodeData, parentNode) {\n var node = new src_node(nodeData, this.config, parentNode);\n var children = parentNode ? parentNode.children : this.nodes;\n\n children.push(node);\n };\n\n Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {\n var _this2 = this;\n\n nodeDataList = Object(util_[\"coerceTruthyValueToArray\"])(nodeDataList);\n nodeDataList.forEach(function (nodeData) {\n return _this2.appendNode(nodeData, parentNode);\n });\n };\n\n Store.prototype.getNodes = function getNodes() {\n return this.nodes;\n };\n\n Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {\n var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;\n return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);\n };\n\n Store.prototype.getNodeByValue = function getNodeByValue(value) {\n if (value) {\n var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {\n return Object(util_[\"valueEquals\"])(node.path, value) || node.value === value;\n });\n return nodes && nodes.length ? nodes[0] : null;\n }\n return null;\n };\n\n return Store;\n}();\n\n/* harmony default export */ var src_store = (store_Store);\n// EXTERNAL MODULE: external \"element-ui/lib/utils/merge\"\nvar merge_ = __webpack_require__(9);\nvar merge_default = /*#__PURE__*/__webpack_require__.n(merge_);\n\n// EXTERNAL MODULE: external \"element-ui/lib/utils/aria-utils\"\nvar aria_utils_ = __webpack_require__(32);\nvar aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);\n\n// EXTERNAL MODULE: external \"element-ui/lib/utils/scroll-into-view\"\nvar scroll_into_view_ = __webpack_require__(31);\nvar scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);\n\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\nvar KeyCode = aria_utils_default.a.keys;\n\nvar DefaultProps = {\n expandTrigger: 'click', // or hover\n multiple: false,\n checkStrictly: false, // whether all nodes can be selected\n emitPath: true, // wether to emit an array of all levels value in which node is located\n lazy: false,\n lazyLoad: util_[\"noop\"],\n value: 'value',\n label: 'label',\n children: 'children',\n leaf: 'leaf',\n disabled: 'disabled',\n hoverThreshold: 500\n};\n\nvar cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {\n return !el.getAttribute('aria-owns');\n};\n\nvar getSibling = function getSibling(el, distance) {\n var parentNode = el.parentNode;\n\n if (parentNode) {\n var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex=\"-1\"]');\n var index = Array.prototype.indexOf.call(siblings, el);\n return siblings[index + distance] || null;\n }\n return null;\n};\n\nvar getMenuIndex = function getMenuIndex(el, distance) {\n if (!el) return;\n var pieces = el.id.split('-');\n return Number(pieces[pieces.length - 2]);\n};\n\nvar focusNode = function focusNode(el) {\n if (!el) return;\n el.focus();\n !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();\n};\n\nvar checkNode = function checkNode(el) {\n if (!el) return;\n\n var input = el.querySelector('input');\n if (input) {\n input.click();\n } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {\n el.click();\n }\n};\n\n/* harmony default export */ var cascader_panelvue_type_script_lang_js_ = ({\n name: 'ElCascaderPanel',\n\n components: {\n CascaderMenu: cascader_menu\n },\n\n props: {\n value: {},\n options: Array,\n props: Object,\n border: {\n type: Boolean,\n default: true\n },\n renderLabel: Function\n },\n\n provide: function provide() {\n return {\n panel: this\n };\n },\n data: function data() {\n return {\n checkedValue: null,\n checkedNodePaths: [],\n store: [],\n menus: [],\n activePath: [],\n loadCount: 0\n };\n },\n\n\n computed: {\n config: function config() {\n return merge_default()(_extends({}, DefaultProps), this.props || {});\n },\n multiple: function multiple() {\n return this.config.multiple;\n },\n checkStrictly: function checkStrictly() {\n return this.config.checkStrictly;\n },\n leafOnly: function leafOnly() {\n return !this.checkStrictly;\n },\n isHoverMenu: function isHoverMenu() {\n return this.config.expandTrigger === 'hover';\n },\n renderLabelFn: function renderLabelFn() {\n return this.renderLabel || this.$scopedSlots.default;\n }\n },\n\n watch: {\n options: {\n handler: function handler() {\n this.initStore();\n },\n immediate: true,\n deep: true\n },\n value: function value() {\n this.syncCheckedValue();\n this.checkStrictly && this.calculateCheckedNodePaths();\n },\n checkedValue: function checkedValue(val) {\n if (!Object(util_[\"isEqual\"])(val, this.value)) {\n this.checkStrictly && this.calculateCheckedNodePaths();\n this.$emit('input', val);\n this.$emit('change', val);\n }\n }\n },\n\n mounted: function mounted() {\n if (!Object(util_[\"isEmpty\"])(this.value)) {\n this.syncCheckedValue();\n }\n },\n\n\n methods: {\n initStore: function initStore() {\n var config = this.config,\n options = this.options;\n\n if (config.lazy && Object(util_[\"isEmpty\"])(options)) {\n this.lazyLoad();\n } else {\n this.store = new src_store(options, config);\n this.menus = [this.store.getNodes()];\n this.syncMenuState();\n }\n },\n syncCheckedValue: function syncCheckedValue() {\n var value = this.value,\n checkedValue = this.checkedValue;\n\n if (!Object(util_[\"isEqual\"])(value, checkedValue)) {\n this.checkedValue = value;\n this.syncMenuState();\n }\n },\n syncMenuState: function syncMenuState() {\n var multiple = this.multiple,\n checkStrictly = this.checkStrictly;\n\n this.syncActivePath();\n multiple && this.syncMultiCheckState();\n checkStrictly && this.calculateCheckedNodePaths();\n this.$nextTick(this.scrollIntoView);\n },\n syncMultiCheckState: function syncMultiCheckState() {\n var _this = this;\n\n var nodes = this.getFlattedNodes(this.leafOnly);\n\n nodes.forEach(function (node) {\n node.syncCheckState(_this.checkedValue);\n });\n },\n syncActivePath: function syncActivePath() {\n var _this2 = this;\n\n var store = this.store,\n multiple = this.multiple,\n activePath = this.activePath,\n checkedValue = this.checkedValue;\n\n\n if (!Object(util_[\"isEmpty\"])(activePath)) {\n var nodes = activePath.map(function (node) {\n return _this2.getNodeByValue(node.getValue());\n });\n this.expandNodes(nodes);\n } else if (!Object(util_[\"isEmpty\"])(checkedValue)) {\n var value = multiple ? checkedValue[0] : checkedValue;\n var checkedNode = this.getNodeByValue(value) || {};\n var _nodes = (checkedNode.pathNodes || []).slice(0, -1);\n this.expandNodes(_nodes);\n } else {\n this.activePath = [];\n this.menus = [store.getNodes()];\n }\n },\n expandNodes: function expandNodes(nodes) {\n var _this3 = this;\n\n nodes.forEach(function (node) {\n return _this3.handleExpand(node, true /* silent */);\n });\n },\n calculateCheckedNodePaths: function calculateCheckedNodePaths() {\n var _this4 = this;\n\n var checkedValue = this.checkedValue,\n multiple = this.multiple;\n\n var checkedValues = multiple ? Object(util_[\"coerceTruthyValueToArray\"])(checkedValue) : [checkedValue];\n this.checkedNodePaths = checkedValues.map(function (v) {\n var checkedNode = _this4.getNodeByValue(v);\n return checkedNode ? checkedNode.pathNodes : [];\n });\n },\n handleKeyDown: function handleKeyDown(e) {\n var target = e.target,\n keyCode = e.keyCode;\n\n\n switch (keyCode) {\n case KeyCode.up:\n var prev = getSibling(target, -1);\n focusNode(prev);\n break;\n case KeyCode.down:\n var next = getSibling(target, 1);\n focusNode(next);\n break;\n case KeyCode.left:\n var preMenu = this.$refs.menu[getMenuIndex(target) - 1];\n if (preMenu) {\n var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded=\"true\"]');\n focusNode(expandedNode);\n }\n break;\n case KeyCode.right:\n var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];\n if (nextMenu) {\n var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex=\"-1\"]');\n focusNode(firstNode);\n }\n break;\n case KeyCode.enter:\n checkNode(target);\n break;\n case KeyCode.esc:\n case KeyCode.tab:\n this.$emit('close');\n break;\n default:\n return;\n }\n },\n handleExpand: function handleExpand(node, silent) {\n var activePath = this.activePath;\n var level = node.level;\n\n var path = activePath.slice(0, level - 1);\n var menus = this.menus.slice(0, level);\n\n if (!node.isLeaf) {\n path.push(node);\n menus.push(node.children);\n }\n\n this.activePath = path;\n this.menus = menus;\n\n if (!silent) {\n var pathValues = path.map(function (node) {\n return node.getValue();\n });\n var activePathValues = activePath.map(function (node) {\n return node.getValue();\n });\n if (!Object(util_[\"valueEquals\"])(pathValues, activePathValues)) {\n this.$emit('active-item-change', pathValues); // Deprecated\n this.$emit('expand-change', pathValues);\n }\n }\n },\n handleCheckChange: function handleCheckChange(value) {\n this.checkedValue = value;\n },\n lazyLoad: function lazyLoad(node, onFullfiled) {\n var _this5 = this;\n\n var config = this.config;\n\n if (!node) {\n node = node || { root: true, level: 0 };\n this.store = new src_store([], config);\n this.menus = [this.store.getNodes()];\n }\n node.loading = true;\n var resolve = function resolve(dataList) {\n var parent = node.root ? null : node;\n dataList && dataList.length && _this5.store.appendNodes(dataList, parent);\n node.loading = false;\n node.loaded = true;\n\n // dispose default value on lazy load mode\n if (Array.isArray(_this5.checkedValue)) {\n var nodeValue = _this5.checkedValue[_this5.loadCount++];\n var valueKey = _this5.config.value;\n var leafKey = _this5.config.leaf;\n\n if (Array.isArray(dataList) && dataList.filter(function (item) {\n return item[valueKey] === nodeValue;\n }).length > 0) {\n var checkedNode = _this5.store.getNodeByValue(nodeValue);\n\n if (!checkedNode.data[leafKey]) {\n _this5.lazyLoad(checkedNode, function () {\n _this5.handleExpand(checkedNode);\n });\n }\n\n if (_this5.loadCount === _this5.checkedValue.length) {\n _this5.$parent.computePresentText();\n }\n }\n }\n\n onFullfiled && onFullfiled(dataList);\n };\n config.lazyLoad(node, resolve);\n },\n\n\n /**\n * public methods\n */\n calculateMultiCheckedValue: function calculateMultiCheckedValue() {\n this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {\n return node.getValueByOption();\n });\n },\n scrollIntoView: function scrollIntoView() {\n if (this.$isServer) return;\n\n var menus = this.$refs.menu || [];\n menus.forEach(function (menu) {\n var menuElement = menu.$el;\n if (menuElement) {\n var container = menuElement.querySelector('.el-scrollbar__wrap');\n var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');\n scroll_into_view_default()(container, activeNode);\n }\n });\n },\n getNodeByValue: function getNodeByValue(val) {\n return this.store.getNodeByValue(val);\n },\n getFlattedNodes: function getFlattedNodes(leafOnly) {\n var cached = !this.config.lazy;\n return this.store.getFlattedNodes(leafOnly, cached);\n },\n getCheckedNodes: function getCheckedNodes(leafOnly) {\n var checkedValue = this.checkedValue,\n multiple = this.multiple;\n\n if (multiple) {\n var nodes = this.getFlattedNodes(leafOnly);\n return nodes.filter(function (node) {\n return node.checked;\n });\n } else {\n return Object(util_[\"isEmpty\"])(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];\n }\n },\n clearCheckedNodes: function clearCheckedNodes() {\n var config = this.config,\n leafOnly = this.leafOnly;\n var multiple = config.multiple,\n emitPath = config.emitPath;\n\n if (multiple) {\n this.getCheckedNodes(leafOnly).filter(function (node) {\n return !node.isDisabled;\n }).forEach(function (node) {\n return node.doCheck(false);\n });\n this.calculateMultiCheckedValue();\n } else {\n this.checkedValue = emitPath ? [] : null;\n }\n }\n }\n});\n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&\n /* harmony default export */ var src_cascader_panelvue_type_script_lang_js_ = (cascader_panelvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue\n\n\n\n\n\n/* normalize component */\n\nvar cascader_panel_component = Object(componentNormalizer[\"a\" /* default */])(\n src_cascader_panelvue_type_script_lang_js_,\n cascader_panelvue_type_template_id_34932346_render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var cascader_panel_api; }\ncascader_panel_component.options.__file = \"packages/cascader-panel/src/cascader-panel.vue\"\n/* harmony default export */ var cascader_panel = (cascader_panel_component.exports);\n// CONCATENATED MODULE: ./packages/cascader-panel/index.js\n\n\n/* istanbul ignore next */\ncascader_panel.install = function (Vue) {\n Vue.component(cascader_panel.name, cascader_panel);\n};\n\n/* harmony default export */ var packages_cascader_panel = __webpack_exports__[\"default\"] = (cascader_panel);\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/mixins/locale\");\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"element-ui/lib/utils/merge\");\n\n/***/ })\n\n/******/ });","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery 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 */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\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 */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\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 */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\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 */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\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 */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\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 */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\n/**\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 */\nvar baseFor = createBaseFor();\n\n/**\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 */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\n/**\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 */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\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 */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\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 * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n objTag = objTag == argsTag ? objectTag : objTag;\n }\n if (!othIsArr) {\n othTag = getTag(other);\n othTag = othTag == argsTag ? objectTag : othTag;\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n }\n if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n };\n}\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!seen.has(othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n return seen.add(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, customizer, bitmask, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= UNORDERED_COMPARE_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var result,\n index = -1,\n length = path.length;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result) {\n return result;\n }\n var length = object ? object.length : 0;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\n/**\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 */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\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 */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\n/**\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 `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 */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\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 */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\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 */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\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 */\nvar isArray = Array.isArray;\n\n/**\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 */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\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 */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\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 */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\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 */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\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 */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\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 */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\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 */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\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 */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\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 process.\n * @returns {string} Returns the 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 */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\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 */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\n/**\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 */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\n/**\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 */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = reduce;\n","'use strict';\n\nexports.__esModule = true;\nexports.i18n = exports.use = exports.t = undefined;\n\nvar _zhCN = require('element-ui/lib/locale/lang/zh-CN');\n\nvar _zhCN2 = _interopRequireDefault(_zhCN);\n\nvar _vue = require('vue');\n\nvar _vue2 = _interopRequireDefault(_vue);\n\nvar _deepmerge = require('deepmerge');\n\nvar _deepmerge2 = _interopRequireDefault(_deepmerge);\n\nvar _format = require('./format');\n\nvar _format2 = _interopRequireDefault(_format);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar format = (0, _format2.default)(_vue2.default);\nvar lang = _zhCN2.default;\nvar merged = false;\nvar i18nHandler = function i18nHandler() {\n var vuei18n = Object.getPrototypeOf(this || _vue2.default).$t;\n if (typeof vuei18n === 'function' && !!_vue2.default.locale) {\n if (!merged) {\n merged = true;\n _vue2.default.locale(_vue2.default.config.lang, (0, _deepmerge2.default)(lang, _vue2.default.locale(_vue2.default.config.lang) || {}, { clone: true }));\n }\n return vuei18n.apply(this, arguments);\n }\n};\n\nvar t = exports.t = function t(path, options) {\n var value = i18nHandler.apply(this, arguments);\n if (value !== null && value !== undefined) return value;\n\n var array = path.split('.');\n var current = lang;\n\n for (var i = 0, j = array.length; i < j; i++) {\n var property = array[i];\n value = current[property];\n if (i === j - 1) return format(value, options);\n if (!value) return '';\n current = value;\n }\n return '';\n};\n\nvar use = exports.use = function use(l) {\n lang = l || lang;\n};\n\nvar i18n = exports.i18n = function i18n(fn) {\n i18nHandler = fn || i18nHandler;\n};\n\nexports.default = { use: use, t: t, i18n: i18n };","'use strict';\n\nvar utils = require('./utils');\n\nmodule.exports = function makeJuiceClient(juiceClient) {\n\njuiceClient.ignoredPseudos = ['hover', 'active', 'focus', 'visited', 'link'];\njuiceClient.widthElements = ['TABLE', 'TD', 'TH', 'IMG'];\njuiceClient.heightElements = ['TABLE', 'TD', 'TH', 'IMG'];\njuiceClient.tableElements = ['TABLE', 'TH', 'TR', 'TD', 'CAPTION', 'COLGROUP', 'COL', 'THEAD', 'TBODY', 'TFOOT'];\njuiceClient.nonVisualElements = [ 'HEAD', 'TITLE', 'BASE', 'LINK', 'STYLE', 'META', 'SCRIPT', 'NOSCRIPT' ];\njuiceClient.styleToAttribute = {\n 'background-color': 'bgcolor',\n 'background-image': 'background',\n 'text-align': 'align',\n 'vertical-align': 'valign'\n};\njuiceClient.excludedProperties = [];\n\njuiceClient.juiceDocument = juiceDocument;\njuiceClient.inlineDocument = inlineDocument;\n\nfunction inlineDocument($, css, options) {\n\n options = options || {};\n var rules = utils.parseCSS(css);\n var editedElements = [];\n var styleAttributeName = 'style';\n\n if (options.styleAttributeName) {\n styleAttributeName = options.styleAttributeName;\n }\n\n rules.forEach(handleRule);\n editedElements.forEach(setStyleAttrs);\n\n if (options.inlinePseudoElements) {\n editedElements.forEach(inlinePseudoElements);\n }\n\n if (options.applyWidthAttributes) {\n editedElements.forEach(function(el) {\n setDimensionAttrs(el, 'width');\n });\n }\n\n if (options.applyHeightAttributes) {\n editedElements.forEach(function(el) {\n setDimensionAttrs(el, 'height');\n });\n }\n\n if (options.applyAttributesTableElements) {\n editedElements.forEach(setAttributesOnTableElements);\n }\n\n if (options.insertPreservedExtraCss && options.extraCss) {\n var preservedText = utils.getPreservedText(options.extraCss, {\n mediaQueries: options.preserveMediaQueries,\n fontFaces: options.preserveFontFaces,\n keyFrames: options.preserveKeyFrames\n });\n if (preservedText) {\n var $appendTo = null;\n if (options.insertPreservedExtraCss !== true) {\n $appendTo = $(options.insertPreservedExtraCss);\n } else {\n $appendTo = $('head');\n if (!$appendTo.length) { $appendTo = $('body'); }\n if (!$appendTo.length) { $appendTo = $.root(); }\n }\n\n $appendTo.first().append('');\n }\n }\n\n function handleRule(rule) {\n var sel = rule[0];\n var style = rule[1];\n var selector = new utils.Selector(sel);\n var parsedSelector = selector.parsed();\n var pseudoElementType = getPseudoElementType(parsedSelector);\n\n // skip rule if the selector has any pseudos which are ignored\n for (var i = 0; i < parsedSelector.length; ++i) {\n var subSel = parsedSelector[i];\n if (subSel.pseudos) {\n for (var j = 0; j < subSel.pseudos.length; ++j) {\n var subSelPseudo = subSel.pseudos[j];\n if (juiceClient.ignoredPseudos.indexOf(subSelPseudo.name) >= 0) {\n return;\n }\n }\n }\n }\n\n if (pseudoElementType) {\n var last = parsedSelector[parsedSelector.length - 1];\n var pseudos = last.pseudos;\n last.pseudos = filterElementPseudos(last.pseudos);\n sel = parsedSelector.toString();\n last.pseudos = pseudos;\n }\n\n var els;\n try {\n els = $(sel);\n } catch (err) {\n // skip invalid selector\n return;\n }\n\n els.each(function() {\n var el = this;\n\n if (el.name && juiceClient.nonVisualElements.indexOf(el.name.toUpperCase()) >= 0) {\n return;\n }\n\n if (pseudoElementType) {\n var pseudoElPropName = 'pseudo' + pseudoElementType;\n var pseudoEl = el[pseudoElPropName];\n if (!pseudoEl) {\n pseudoEl = el[pseudoElPropName] = $('').get(0);\n pseudoEl.pseudoElementType = pseudoElementType;\n pseudoEl.pseudoElementParent = el;\n el[pseudoElPropName] = pseudoEl;\n }\n el = pseudoEl;\n }\n\n if (!el.styleProps) {\n el.styleProps = {};\n\n // if the element has inline styles, fake selector with topmost specificity\n if ($(el).attr(styleAttributeName)) {\n var cssText = '* { ' + $(el).attr(styleAttributeName) + ' } ';\n addProps(utils.parseCSS(cssText)[0][1], new utils.Selector('