├── .babelrc
├── .gitignore
├── LICENSE.md
├── README.md
├── dist
├── VueFileTree.css
├── VueFileTree.css.map
├── vue-file-tree.js
└── vue-file-tree.js.map
├── package.json
├── src
├── path-splitdirs.js
└── vue-file-tree.vue
└── webpack.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "comments": false,
3 | "env": {
4 | "main": {
5 | "presets": [
6 | ["env", {
7 | "targets": { "node": 7 }
8 | }],
9 | "stage-0"
10 | ]
11 | },
12 | "renderer": {
13 | "presets": [
14 | ["env", {
15 | "modules": false
16 | }],
17 | "stage-0"
18 | ]
19 | },
20 | "web": {
21 | "presets": [
22 | ["env", {
23 | "modules": false
24 | }],
25 | "stage-0"
26 | ]
27 | }
28 | },
29 | "plugins": ["transform-runtime"]
30 | }
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 |
17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
18 | .grunt
19 |
20 | # node-waf configuration
21 | .lock-wscript
22 |
23 | # Compiled binary addons (http://nodejs.org/api/addons.html)
24 | build/Release
25 |
26 | # Dependency directory
27 | # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
28 | node_modules
29 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "{}"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright {yyyy} {name of copyright owner}
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-file-tree
2 |
3 | Customizable draggable file-system-tree component for Vue.js. This component is meant to display files in the file system. It is a wrapper around [sl-vue-tree](https://www.npmjs.com/package/sl-vue-tree) and therefore quite a lot of the documentation for that Vue.js component applies to this one.
4 |
5 | For a blog post describing what is here, see: https://techsparx.com//nodejs/electron/file-browser-component.html
6 |
7 | For a demo application see: https://github.com/robogeek/vue-file-tree-demo
8 |
9 | # Installation
10 |
11 | In `package.json` put this into the `package.json` of your Vue.js project.
12 |
13 | ```json
14 | "dependencies": {
15 | ...
16 | "vue-file-tree": "github:robogeek/vue-file-tree"
17 | ...
18 | }
19 | ```
20 |
21 | Then run `npm install`
22 |
23 | # Quick Start
24 |
25 | In your application, add this:
26 |
27 | ```js
28 | import FileBrowserTree from 'vue-file-tree';
29 | ```
30 |
31 | That's the Vue component. You can declare it as a global component:
32 |
33 | ```js
34 | Vue.component('file-browser-tree', FileBrowserTree);
35 | ```
36 |
37 | Or add it to an application description:
38 |
39 | ```js
40 | components: {
41 | 'file-browser-tree': FileBrowserTree,
42 | },
43 | ```
44 |
45 | Then in the application template:
46 |
47 | ```html
48 |
55 |
56 |
57 | Dashboard
58 | Customers
59 |
60 |
61 |
62 | ```
63 |
64 | Then add these methods:
65 |
66 | ```js
67 | methods: {
68 | nodeClick(event, node) {
69 | console.log(`nodeClick ${util.inspect(node)}`);
70 | },
71 | nodeDoubleClick(node) {
72 | console.log(`nodeDoubleClick ${util.inspect(node)}`);
73 | },
74 | nodeDrop(node) {
75 | console.log(`nodeDrop ${util.inspect(node)}`);
76 | },
77 | doCustomers() {
78 | console.log(`doCustomers`);
79 | this.$refs.filetree.contextMenuIsVisible = false;
80 | },
81 | doDashboard() {
82 | console.log(`doDashboard`);
83 | this.$refs.filetree.contextMenuIsVisible = false;
84 | }
85 | }
86 | ```
87 |
88 | Finally, to add files to the component call this function
89 |
90 | ```js
91 | created: function() {
92 | messageBus.$on('file', (fn, stat) => {
93 | this.$refs.filetree.addPathToTree(fn, stat, false);
94 | });
95 | messageBus.$on('directory', (fn, stat) => {
96 | this.$refs.filetree.addPathToTree(fn, stat, true);
97 | });
98 | }
99 | ```
100 |
101 | Adding files and directories to the tree occurs by handling these messages multiple times.
--------------------------------------------------------------------------------
/dist/VueFileTree.css:
--------------------------------------------------------------------------------
1 | .sl-vue-tree {
2 | position: relative;
3 | cursor: default;
4 | user-select: none;
5 | }
6 |
7 | .sl-vue-tree.sl-vue-tree-root {
8 | border: 1px solid rgb(9, 22, 29);
9 | background-color: rgb(9, 22, 29);
10 | color: rgba(255, 255, 255, 0.5);
11 | border-radius: 3px;
12 | }
13 |
14 | .sl-vue-tree-root > .sl-vue-tree-nodes-list {
15 | overflow: hidden;
16 | position: relative;
17 | padding-bottom: 4px;
18 | }
19 |
20 | .sl-vue-tree-selected > .sl-vue-tree-node-item {
21 | background-color: #13242d;
22 | color: white;
23 | }
24 |
25 | .sl-vue-tree-node-item:hover,
26 | .sl-vue-tree-node-item.sl-vue-tree-cursor-hover {
27 | color: white;
28 | }
29 |
30 | .sl-vue-tree-node-item {
31 | position: relative;
32 | display: flex;
33 | flex-direction: row;
34 |
35 | padding-left: 10px;
36 | padding-right: 10px;
37 | line-height: 28px;
38 | border: 1px solid transparent;
39 | }
40 |
41 |
42 | .sl-vue-tree-node-item.sl-vue-tree-cursor-inside {
43 | border: 1px solid rgba(255, 255, 255, 0.5);
44 | }
45 |
46 | .sl-vue-tree-gap {
47 | width: 25px;
48 | min-height: 1px;
49 |
50 | }
51 |
52 | .sl-vue-tree-toggle {
53 | display: inline-block;
54 | text-align: left;
55 | width: 20px;
56 | }
57 |
58 | .sl-vue-tree-sidebar {
59 | margin-left: auto;
60 | }
61 |
62 | .sl-vue-tree-cursor {
63 | position: absolute;
64 | border: 1px solid rgba(255, 255, 255, 0.5);
65 | height: 1px;
66 | width: 100%;
67 | }
68 |
69 | .sl-vue-tree-drag-info {
70 | position: absolute;
71 | background-color: rgba(0,0,0,0.5);
72 | opacity: 0.5;
73 | margin-left: 20px;
74 | padding: 5px 10px;
75 | }
76 |
77 | /*# sourceMappingURL=VueFileTree.css.map*/
--------------------------------------------------------------------------------
/dist/VueFileTree.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack://VueFileTree/./node_modules/sl-vue-tree/dist/sl-vue-tree-dark.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"VueFileTree.css","sourcesContent":[".sl-vue-tree {\r\n position: relative;\r\n cursor: default;\r\n user-select: none;\r\n}\r\n\r\n.sl-vue-tree.sl-vue-tree-root {\r\n border: 1px solid rgb(9, 22, 29);\r\n background-color: rgb(9, 22, 29);\r\n color: rgba(255, 255, 255, 0.5);\r\n border-radius: 3px;\r\n}\r\n\r\n.sl-vue-tree-root > .sl-vue-tree-nodes-list {\r\n overflow: hidden;\r\n position: relative;\r\n padding-bottom: 4px;\r\n}\r\n\r\n.sl-vue-tree-selected > .sl-vue-tree-node-item {\r\n background-color: #13242d;\r\n color: white;\r\n}\r\n\r\n.sl-vue-tree-node-item:hover,\r\n.sl-vue-tree-node-item.sl-vue-tree-cursor-hover {\r\n color: white;\r\n}\r\n\r\n.sl-vue-tree-node-item {\r\n position: relative;\r\n display: flex;\r\n flex-direction: row;\r\n\r\n padding-left: 10px;\r\n padding-right: 10px;\r\n line-height: 28px;\r\n border: 1px solid transparent;\r\n}\r\n\r\n\r\n.sl-vue-tree-node-item.sl-vue-tree-cursor-inside {\r\n border: 1px solid rgba(255, 255, 255, 0.5);\r\n}\r\n\r\n.sl-vue-tree-gap {\r\n width: 25px;\r\n min-height: 1px;\r\n\r\n}\r\n\r\n.sl-vue-tree-toggle {\r\n display: inline-block;\r\n text-align: left;\r\n width: 20px;\r\n}\r\n\r\n.sl-vue-tree-sidebar {\r\n margin-left: auto;\r\n}\r\n\r\n.sl-vue-tree-cursor {\r\n position: absolute;\r\n border: 1px solid rgba(255, 255, 255, 0.5);\r\n height: 1px;\r\n width: 100%;\r\n}\r\n\r\n.sl-vue-tree-drag-info {\r\n position: absolute;\r\n background-color: rgba(0,0,0,0.5);\r\n opacity: 0.5;\r\n margin-left: 20px;\r\n padding: 5px 10px;\r\n}"],"sourceRoot":""}
--------------------------------------------------------------------------------
/dist/vue-file-tree.js:
--------------------------------------------------------------------------------
1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueFileTree=e():t.VueFileTree=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=30)}([function(t,e,n){(function(t,i){var a=/%[sdj%]/g;e.format=function(t){if(!h(t)){for(var e=[],n=0;n=o)return t;switch(t){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(t){return"[Circular]"}default:return t}}),l=i[n];n=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),m(n)?i.showHidden=n:n&&e._extend(i,n),x(i.showHidden)&&(i.showHidden=!1),x(i.depth)&&(i.depth=2),x(i.colors)&&(i.colors=!1),x(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=l),p(i,t,i.depth)}function l(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function p(t,n,i){if(t.customInspect&&n&&k(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var a=n.inspect(i,t);return h(a)||(a=p(t,a,i)),a}var o=function(t,e){if(x(e))return t.stylize("undefined","undefined");if(h(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(m(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,n);if(o)return o;var r=Object.keys(n),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(r);if(t.showHidden&&(r=Object.getOwnPropertyNames(n)),A(n)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return d(n);if(0===r.length){if(k(n)){var l=n.name?": "+n.name:"";return t.stylize("[Function"+l+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(A(n))return d(n)}var c,y="",C=!1,S=["{","}"];(f(n)&&(C=!0,S=["[","]"]),k(n))&&(y=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(y=" "+RegExp.prototype.toString.call(n)),w(n)&&(y=" "+Date.prototype.toUTCString.call(n)),A(n)&&(y=" "+d(n)),0!==r.length||C&&0!=n.length?i<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=C?function(t,e,n,i,a){for(var o=[],r=0,s=e.length;r=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,y,S)):S[0]+y+S[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,i,a,o){var r,s,l;if((l=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),_(i,a)||(r="["+a+"]"),s||(t.seen.indexOf(l.value)<0?(s=v(n)?p(t,l.value,null):p(t,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),x(r)){if(o&&a.match(/^\d+$/))return s;(r=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=t.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=t.stylize(r,"string"))}return r+": "+s}function f(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function v(t){return null===t}function g(t){return"number"==typeof t}function h(t){return"string"==typeof t}function x(t){return void 0===t}function b(t){return y(t)&&"[object RegExp]"===C(t)}function y(t){return"object"==typeof t&&null!==t}function w(t){return y(t)&&"[object Date]"===C(t)}function A(t){return y(t)&&("[object Error]"===C(t)||t instanceof Error)}function k(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(x(o)&&(o=i.env.NODE_DEBUG||""),t=t.toUpperCase(),!r[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=i.pid;r[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,i)}}else r[t]=function(){};return r[t]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=f,e.isBoolean=m,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=h,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=x,e.isRegExp=b,e.isObject=y,e.isDate=w,e.isError=A,e.isFunction=k,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(15);var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),j[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=n(16),e._extend=function(t,e){if(!e||!y(e))return t;for(var n=Object.keys(e),i=n.length;i--;)t[n[i]]=e[n[i]];return t}}).call(this,n(7),n(3))},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return r}),n.d(e,"e",function(){return s}),n.d(e,"f",function(){return l}),n.d(e,"g",function(){return c});
2 | /*!
3 | * Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com
4 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
5 | */
6 | var i={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"]},a={prefix:"fas",iconName:"caret-right",icon:[192,512,[],"f0da","M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"]},o={prefix:"fas",iconName:"circle",icon:[512,512,[],"f111","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"]},r={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"]},s={prefix:"fas",iconName:"file",icon:[384,512,[],"f15b","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"]},l={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"]},c={prefix:"fas",iconName:"table",icon:[512,512,[],"f0ce","M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"]}},function(t,e,n){(function(t){function n(t,e){for(var n=0,i=t.length-1;i>=0;i--){var a=t[i];"."===a?t.splice(i,1):".."===a?(t.splice(i,1),n++):n&&(t.splice(i,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(t){return i.exec(t).slice(1)};function o(t,e){if(t.filter)return t.filter(e);for(var n=[],i=0;i=-1&&!i;a--){var r=a>=0?arguments[a]:t.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,i="/"===r.charAt(0))}return e=n(o(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===r(t,-1);return(t=n(o(t.split("/"),function(t){return!!t}),!i).join("/"))||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(o(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function i(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var a=i(t.split("/")),o=i(n.split("/")),r=Math.min(a.length,o.length),s=r,l=0;l1)for(var n=1;n({nodes:[],contextMenuIsVisible:!1}),components:{"sl-vue-tree":u.a,"font-awesome-icon":g.FontAwesomeIcon},created(){"undefined"!=typeof window&&document.addEventListener("click",this.clickedOutside)},methods:{nodeClick(t,e){this.$emit("nodeClick",e,t)},nodeDoubleClick(t,e){console.log(`nodeDoubleClick ${t.title} ${t.data.type} isLeaf ${t.isLeaf} ${r.a.inspect(t)}`),t.isLeaf?this.$emit("nodeDoubleClick",t):this.$refs.slvuetree.onToggleHandler(e,t)},nodeSelect(t){console.log(`nodeSelect ${r.a.inspect(t)}`)},nodeToggle(t){console.log(`nodeToggle ${r.a.inspect(t)}`)},nodeDrop(t){console.log(`nodeDrop ${r.a.inspect(t)}`),this.$emit("nodeDrop",t)},nodeContextMenu(t,e){console.log(`nodeContextMenu ${r.a.inspect(t)}`),this.contextMenuIsVisible=!0;const n=this.$refs.contextmenu;n.style.left=e.clientX+"px",n.style.top=e.clientY+"px"},clickedOutside(t){this.isInWhiteList(t.target)||(this.contextMenuIsVisible=!1)},isInWhiteList:t=>!1,onExternalDropHandler(t,e){console.log("external drop",t,r.a.inspect(e))},addPathToTree(e,n,i){console.log(`addPathToTree ${e} ${r.a.inspect(n)} ${i}`),console.log(`addPathToTree ${r.a.inspect(t)}`),console.log(r.a.inspect(a.a)),e=a.a.normalize(e),console.log(`addPathToTree NORMALIZED ${e}`);const o=a.a.basename(e);console.log(`addPathToTree BASENAME ${o}`);const s=l()(e);console.log(`addPathToTree dirs ${r.a.inspect(s)}`);let c=this.nodes;for(let t of s.dirs){if("."===t)continue;let i=void 0;for(let e of c)if(!1===e.isLeaf&&e.title===t){i=e;break}if(i)c=i.children;else{let i={title:t,isLeaf:!1,children:[],data:{type:"DIRECTORY",pathname:e,stat:n}};console.log(`addPathToTree !found push newnode ${r.a.inspect(i)}`),c.push(i),c=i.children}}let d={title:o,isLeaf:!i,data:{type:p.a.getType(e),pathname:e,stat:n}};d.data.type||(d.data.type="text/plain"),d.data.type.startsWith("image/")&&(d.data.type="IMAGE"),e.endsWith(".ejs")&&(d.data.type="EJS"),e.endsWith(".vue")&&(d.data.type="VUEJS"),d.isLeaf||(d.children=[]),console.log(`addPathToTree FINAL push newnode ${r.a.inspect(d)}`),c.push(d)}}}}).call(this,n(3))},function(t,e,n){"use strict";n.r(e),n.d(e,"icon",function(){return ce}),n.d(e,"noAuto",function(){return oe}),n.d(e,"config",function(){return P}),n.d(e,"toHtml",function(){return wt}),n.d(e,"layer",function(){return ue}),n.d(e,"text",function(){return pe}),n.d(e,"counter",function(){return de}),n.d(e,"library",function(){return ae}),n.d(e,"dom",function(){return se}),n.d(e,"parse",function(){return le}),n.d(e,"findIconDefinition",function(){return ie});
7 | /*!
8 | * Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com
9 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
10 | */
11 | var i=function(){},a={},o={},r=null,s={mark:i,measure:i};try{"undefined"!=typeof window&&(a=window),"undefined"!=typeof document&&(o=document),"undefined"!=typeof MutationObserver&&(r=MutationObserver),"undefined"!=typeof performance&&(s=performance)}catch(t){}var l=(a.navigator||{}).userAgent,c=void 0===l?"":l,p=a,d=o,u=r,f=s,m=!!d.documentElement&&!!d.head&&"function"==typeof d.addEventListener&&"function"==typeof d.createElement,v=~c.indexOf("MSIE")||~c.indexOf("Trident/"),g=16,h="data-fa-i2svg",x="data-fa-pseudo-element",b="data-prefix",y="data-icon",w="fontawesome-i2svg",A=["HTML","HEAD","STYLE","SCRIPT"],k=function(){try{return!0}catch(t){return!1}}(),C=[1,2,3,4,5,6,7,8,9,10],S=C.concat([11,12,13,14,15,16,17,18,19,20]),j=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],_=["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter"].concat(C.map(function(t){return t+"x"})).concat(S.map(function(t){return"w-"+t})),z=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},N=function(){function t(t,e){for(var n=0;n-1;a--){var o=n[a],r=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(r)>-1&&(i=o)}return d.head.insertBefore(e,i),t}}var V=0;function F(){return++V}function W(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function U(t){return t.classList?W(t.classList):(t.getAttribute("class")||"").split(" ").filter(function(t){return t})}function J(t,e){var n=e.split("-"),i=n[0],a=n.slice(1).join("-");return i!==t||""===a||function(t){return~_.indexOf(t)}(a)?null:a}function Y(t){return(""+t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function X(t){return Object.keys(t||{}).reduce(function(e,n){return e+(n+": ")+t[n]+";"},"")}function G(t){return t.size!==H.size||t.x!==H.x||t.y!==H.y||t.rotate!==H.rotate||t.flipX||t.flipY}function K(t){var e=t.transform,n=t.containerWidth,i=t.iconWidth;return{outer:{transform:"translate("+n/2+" 256)"},inner:{transform:"translate("+32*e.x+", "+32*e.y+") "+" "+("scale("+e.size/16*(e.flipX?-1:1)+", "+e.size/16*(e.flipY?-1:1)+") ")+" "+("rotate("+e.rotate+" 0 0)")},path:{transform:"translate("+i/2*-1+" -256)"}}}var Z={x:0,y:0,width:"100%",height:"100%"},Q=function(t){var e=t.children,n=t.attributes,i=t.main,a=t.mask,o=t.transform,r=i.width,s=i.icon,l=a.width,c=a.icon,p=K({transform:o,containerWidth:l,iconWidth:r}),d={tag:"rect",attributes:E({},Z,{fill:"white"})},u={tag:"g",attributes:E({},p.inner),children:[{tag:"path",attributes:E({},s.attributes,p.path,{fill:"black"})}]},f={tag:"g",attributes:E({},p.outer),children:[u]},m="mask-"+F(),v="clip-"+F(),g={tag:"defs",children:[{tag:"clipPath",attributes:{id:v},children:[c]},{tag:"mask",attributes:E({},Z,{id:m,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[d,f]}]};return e.push(g,{tag:"rect",attributes:E({fill:"currentColor","clip-path":"url(#"+v+")",mask:"url(#"+m+")"},Z)}),{children:e,attributes:n}},tt=function(t){var e=t.children,n=t.attributes,i=t.main,a=t.transform,o=X(t.styles);if(o.length>0&&(n.style=o),G(a)){var r=K({transform:a,containerWidth:i.width,iconWidth:i.width});e.push({tag:"g",attributes:E({},r.outer),children:[{tag:"g",attributes:E({},r.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:E({},i.icon.attributes,r.path)}]}]})}else e.push(i.icon);return{children:e,attributes:n}},et=function(t){var e=t.children,n=t.main,i=t.mask,a=t.attributes,o=t.styles,r=t.transform;if(G(r)&&n.found&&!i.found){var s={x:n.width/n.height/2,y:.5};a.style=X(E({},o,{"transform-origin":s.x+r.x/16+"em "+(s.y+r.y/16)+"em"}))}return[{tag:"svg",attributes:a,children:e}]},nt=function(t){var e=t.prefix,n=t.iconName,i=t.children,a=t.attributes,o=t.symbol,r=!0===o?e+"-"+P.familyPrefix+"-"+n:o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:E({},a,{id:r}),children:i}]}]};function it(t){var e=t.icons,n=e.main,i=e.mask,a=t.prefix,o=t.iconName,r=t.transform,s=t.symbol,l=t.title,c=t.extra,p=t.watchable,d=void 0!==p&&p,u=i.found?i:n,f=u.width,m=u.height,v="fa-w-"+Math.ceil(f/m*16),g=[P.replacementClass,o?P.familyPrefix+"-"+o:"",v].filter(function(t){return-1===c.classes.indexOf(t)}).concat(c.classes).join(" "),x={children:[],attributes:E({},c.attributes,{"data-prefix":a,"data-icon":o,class:g,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 "+f+" "+m})};d&&(x.attributes[h]=""),l&&x.children.push({tag:"title",attributes:{id:x.attributes["aria-labelledby"]||"title-"+F()},children:[l]});var b=E({},x,{prefix:a,iconName:o,main:n,mask:i,transform:r,symbol:s,styles:c.styles}),y=i.found&&n.found?Q(b):tt(b),w=y.children,A=y.attributes;return b.children=w,b.attributes=A,s?nt(b):et(b)}function at(t){var e=t.content,n=t.width,i=t.height,a=t.transform,o=t.title,r=t.extra,s=t.watchable,l=void 0!==s&&s,c=E({},r.attributes,o?{title:o}:{},{class:r.classes.join(" ")});l&&(c[h]="");var p=E({},r.styles);G(a)&&(p.transform=function(t){var e=t.transform,n=t.width,i=void 0===n?g:n,a=t.height,o=void 0===a?g:a,r=t.startCentered,s=void 0!==r&&r,l="";return l+=s&&v?"translate("+(e.x/B-i/2)+"em, "+(e.y/B-o/2)+"em) ":s?"translate(calc(-50% + "+e.x/B+"em), calc(-50% + "+e.y/B+"em)) ":"translate("+e.x/B+"em, "+e.y/B+"em) ",l+="scale("+e.size/B*(e.flipX?-1:1)+", "+e.size/B*(e.flipY?-1:1)+") ",l+="rotate("+e.rotate+"deg) "}({transform:a,startCentered:!0,width:n,height:i}),p["-webkit-transform"]=p.transform);var d=X(p);d.length>0&&(c.style=d);var u=[];return u.push({tag:"span",attributes:c,children:[e]}),o&&u.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),u}var ot=function(){},rt=P.measurePerformance&&f&&f.mark&&f.measure?f:{mark:ot,measure:ot},st=function(t){rt.mark('FA "5.2.0" '+t+" ends"),rt.measure('FA "5.2.0" '+t,'FA "5.2.0" '+t+" begins",'FA "5.2.0" '+t+" ends")},lt={begin:function(t){return rt.mark('FA "5.2.0" '+t+" begins"),function(){return st(t)}},end:st},ct=function(t,e,n,i){var a,o,r,s=Object.keys(t),l=s.length,c=void 0!==i?function(t,e){return function(n,i,a,o){return t.call(e,n,i,a,o)}}(e,i):e;for(void 0===n?(a=1,r=t[s[0]]):(a=0,r=n);a"+o.map(wt).join("")+""+e+">"}var At=function(){};function kt(t){return"string"==typeof(t.getAttribute?t.getAttribute(h):null)}var Ct={replace:function(t){var e=t[0],n=t[1].map(function(t){return wt(t)}).join("\n");if(e.parentNode&&e.outerHTML)e.outerHTML=n+(P.keepOriginalSource&&"svg"!==e.tagName.toLowerCase()?"\x3c!-- "+e.outerHTML+" --\x3e":"");else if(e.parentNode){var i=document.createElement("span");e.parentNode.replaceChild(i,e),i.outerHTML=n}},nest:function(t){var e=t[0],n=t[1];if(~U(e).indexOf(P.replacementClass))return Ct.replace(t);var i=new RegExp(P.familyPrefix+"-.*");delete n[0].attributes.style;var a=n[0].attributes.class.split(" ").reduce(function(t,e){return e===P.replacementClass||e.match(i)?t.toSvg.push(e):t.toNode.push(e),t},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" ");var o=n.map(function(t){return wt(t)}).join("\n");e.setAttribute("class",a.toNode.join(" ")),e.setAttribute(h,""),e.innerHTML=o}};function St(t,e){var n="function"==typeof e?e:At;0===t.length?n():(p.requestAnimationFrame||function(t){return t()})(function(){var e=!0===P.autoReplaceSvg?Ct.replace:Ct[P.autoReplaceSvg]||Ct.replace,i=lt.begin("mutate");t.map(e),i(),n()})}var jt=!1;var _t=null;var zt=function(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce(function(t,e){var n=e.split(":"),i=n[0],a=n.slice(1);return i&&a.length>0&&(t[i]=a.join(":").trim()),t},{})),n};function Nt(t){for(var e="",n=0;n1?a.iconName=function(t,e){return ft[t][e]}(a.prefix,t.innerText):a.prefix&&1===i.length&&(a.iconName=gt(a.prefix,Nt(t.innerText))),a},Ot=function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce(function(t,e){var n=e.toLowerCase().split("-"),i=n[0],a=n.slice(1).join("-");if(i&&"h"===a)return t.flipX=!0,t;if(i&&"v"===a)return t.flipY=!0,t;if(a=parseFloat(a),isNaN(a))return t;switch(i){case"grow":t.size=t.size+a;break;case"shrink":t.size=t.size-a;break;case"left":t.x=t.x-a;break;case"right":t.x=t.x+a;break;case"up":t.y=t.y-a;break;case"down":t.y=t.y+a;break;case"rotate":t.rotate=t.rotate+a}return t},e):e},Mt=function(t){return Ot(t.getAttribute("data-fa-transform"))},Tt=function(t){var e=t.getAttribute("data-fa-symbol");return null!==e&&(""===e||e)},It=function(t){var e=W(t.attributes).reduce(function(t,e){return"class"!==t.name&&"style"!==t.name&&(t[e.name]=e.value),t},{}),n=t.getAttribute("title");return P.autoA11y&&(n?e["aria-labelledby"]=P.replacementClass+"-title-"+F():e["aria-hidden"]="true"),e},Pt=function(t){var e=t.getAttribute("data-fa-mask");return e?bt(e.split(" ").map(function(t){return t.trim()})):xt()},Lt={iconName:null,title:null,prefix:null,transform:H,symbol:!1,mask:null,extra:{classes:[],styles:{},attributes:{}}};function Dt(t){this.name="MissingIcon",this.message=t||"Icon unavailable",this.stack=(new Error).stack}Dt.prototype=Object.create(Error.prototype),Dt.prototype.constructor=Dt;var Rt={fill:"currentColor"},$t={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Bt={tag:"path",attributes:E({},Rt,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},Ht=E({},$t,{attributeName:"opacity"}),qt={tag:"g",children:[Bt,{tag:"circle",attributes:E({},Rt,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:E({},$t,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:E({},Ht,{values:"1;0;1;1;0;1;"})}]},{tag:"path",attributes:E({},Rt,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:E({},Ht,{values:"1;0;0;0;0;1;"})}]},{tag:"path",attributes:E({},Rt,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:E({},Ht,{values:"0;0;1;1;0;0;"})}]}]},Vt=D.styles,Ft="fa-layers-text",Wt=/Font Awesome 5 (Solid|Regular|Light|Brands|Free|Pro)/,Ut={Solid:"fas",Regular:"far",Light:"fal",Brands:"fab"},Jt={900:"fas",400:"far",300:"fal"};function Yt(t,e){var n={found:!1,width:512,height:512,icon:qt};if(t&&e&&Vt[e]&&Vt[e][t]){var i=Vt[e][t];n={found:!0,width:i[0],height:i[1],icon:{tag:"path",attributes:{fill:"currentColor",d:i.slice(4)[0]}}}}else if(t&&e&&!P.showMissingIcons)throw new Dt("Icon is missing for prefix "+e+" with icon name "+t);return n}function Xt(t){var e=function(t){var e=Et(t),n=e.iconName,i=e.prefix,a=e.rest,o=zt(t),r=Mt(t),s=Tt(t),l=It(t),c=Pt(t);return{iconName:n,title:t.getAttribute("title"),prefix:i,transform:r,symbol:s,mask:c,extra:{classes:a,styles:o,attributes:l}}}(t);return~e.extra.classes.indexOf(Ft)?function(t,e){var n=e.title,i=e.transform,a=e.extra,o=null,r=null;if(v){var s=parseInt(getComputedStyle(t).fontSize,10),l=t.getBoundingClientRect();o=l.width/s,r=l.height/s}return P.autoA11y&&!n&&(a.attributes["aria-hidden"]="true"),[t,at({content:t.innerHTML,width:o,height:r,transform:i,title:n,extra:a,watchable:!0})]}(t,e):function(t,e){var n=e.iconName,i=e.title,a=e.prefix,o=e.transform,r=e.symbol,s=e.mask,l=e.extra;return[t,it({icons:{main:Yt(n,a),mask:Yt(s.iconName,s.prefix)},prefix:a,iconName:n,transform:o,symbol:r,mask:s,title:i,extra:l,watchable:!0})]}(t,e)}function Gt(t){if(m){var e=lt.begin("searchPseudoElements");!function(t){jt=!0,t(),jt=!1}(function(){W(t.querySelectorAll("*")).filter(function(t){return!(t.parentNode===document.head||~A.indexOf(t.tagName.toUpperCase())||t.getAttribute(x)||t.parentNode&&"svg"===t.parentNode.tagName)}).forEach(function(t){[":before",":after"].forEach(function(e){var n=W(t.children).filter(function(t){return t.getAttribute(x)===e})[0],i=p.getComputedStyle(t,e),a=i.getPropertyValue("font-family").match(Wt),o=i.getPropertyValue("font-weight");if(n&&!a)t.removeChild(n);else if(a){var r=i.getPropertyValue("content"),s=~["Light","Regular","Solid","Brands"].indexOf(a[1])?Ut[a[1]]:Jt[o],l=gt(s,Nt(3===r.length?r.substr(1,1):r));if(!n||n.getAttribute(b)!==s||n.getAttribute(y)!==l){n&&t.removeChild(n);var c=Lt.extra;c.attributes[x]=e;var u=it(E({},Lt,{icons:{main:Yt(l,s),mask:xt()},prefix:s,iconName:l,extra:c,watchable:!0})),f=d.createElement("svg");":before"===e?t.insertBefore(f,t.firstChild):t.appendChild(f),f.outerHTML=u.map(function(t){return wt(t)}).join("\n")}}})})}),e()}}function Kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(m){var n=d.documentElement.classList,i=function(t){return n.add(w+"-"+t)},a=function(t){return n.remove(w+"-"+t)},o=Object.keys(Vt),r=["."+Ft+":not(["+h+"])"].concat(o.map(function(t){return"."+t+":not(["+h+"])"})).join(", ");if(0!==r.length){var s=W(t.querySelectorAll(r));if(s.length>0){i("pending"),a("complete");var l=lt.begin("onTree"),c=s.reduce(function(t,e){try{var n=Xt(e);n&&t.push(n)}catch(t){k||t instanceof Dt&&console.error(t)}return t},[]);l(),St(c,function(){i("active"),i("complete"),a("pending"),"function"==typeof e&&e()})}}}}function Zt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Xt(t);n&&St([n],e)}var Qt=function(){var t="svg-inline--fa",e=P.familyPrefix,n=P.replacementClass,i='svg:not(:root).svg-inline--fa {\n overflow: visible; }\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -.125em; }\n .svg-inline--fa.fa-lg {\n vertical-align: -.225em; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n width: 2em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -.125em;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -.0667em; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n';if("fa"!==e||n!==t){var a=new RegExp("\\.fa\\-","g"),o=new RegExp("\\."+t,"g");i=i.replace(a,"."+e+"-").replace(o,"."+n)}return i};function te(t){return{found:!0,width:t[0],height:t[1],icon:{tag:"path",attributes:{fill:"currentColor",d:t.slice(4)[0]}}}}function ee(){P.autoAddCss&&!re&&(q(Qt()),re=!0)}function ne(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(function(t){return wt(t)})}}),Object.defineProperty(t,"node",{get:function(){if(m){var e=d.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function ie(t){var e=t.prefix,n=void 0===e?"fa":e,i=t.iconName;if(i)return yt(ae.definitions,n,i)||yt(D.styles,n,i)}var ae=new(function(){function t(){z(this,t),this.definitions={}}return N(t,[{key:"add",value:function(){for(var t=this,e=arguments.length,n=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};if(m){ee();var e=t.node,n=void 0===e?d:e,i=t.callback,a=void 0===i?function(){}:i;P.searchPseudoElements&&Gt(n),Kt(n,a)}},css:Qt,insertCss:function(){re||(q(Qt()),re=!0)},watch:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.autoReplaceSvgRoot,n=t.observeMutationsRoot;!1===P.autoReplaceSvg&&(P.autoReplaceSvg=!0),P.observeMutations=!0,function(t){m&&($?setTimeout(t,0):R.push(t))}(function(){me({autoReplaceSvgRoot:e}),function(t){if(u&&P.observeMutations){var e=t.treeCallback,n=t.nodeCallback,i=t.pseudoElementsCallback,a=t.observeMutationsRoot,o=void 0===a?d.body:a;_t=new u(function(t){jt||W(t).forEach(function(t){if("childList"===t.type&&t.addedNodes.length>0&&!kt(t.addedNodes[0])&&(P.searchPseudoElements&&i(t.target),e(t.target)),"attributes"===t.type&&t.target.parentNode&&P.searchPseudoElements&&i(t.target.parentNode),"attributes"===t.type&&kt(t.target)&&~j.indexOf(t.attributeName))if("class"===t.attributeName){var a=bt(U(t.target)),o=a.prefix,r=a.iconName;o&&t.target.setAttribute("data-prefix",o),r&&t.target.setAttribute("data-icon",r)}else n(t.target)})}),m&&_t.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}({treeCallback:Kt,nodeCallback:Zt,pseudoElementsCallback:Gt,observeMutationsRoot:n})})}},le={transform:function(t){return Ot(t)}},ce=function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(e||{}).icon?e:ie(e||{}),a=n.mask;return a&&(a=(a||{}).icon?a:ie(a||{})),t(i,E({},n,{mask:a}))}}(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?H:n,a=e.symbol,o=void 0!==a&&a,r=e.mask,s=void 0===r?null:r,l=e.title,c=void 0===l?null:l,p=e.classes,d=void 0===p?[]:p,u=e.attributes,f=void 0===u?{}:u,m=e.styles,v=void 0===m?{}:m;if(t){var g=t.prefix,h=t.iconName,x=t.icon;return ne(E({type:"icon"},t),function(){return ee(),P.autoA11y&&(c?f["aria-labelledby"]=P.replacementClass+"-title-"+F():f["aria-hidden"]="true"),it({icons:{main:te(x),mask:s?te(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:h,transform:E({},H,i),symbol:o,title:c,extra:{attributes:f,styles:v,classes:d}})})}}),pe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?H:n,a=e.title,o=void 0===a?null:a,r=e.classes,s=void 0===r?[]:r,l=e.attributes,c=void 0===l?{}:l,p=e.styles,d=void 0===p?{}:p;return ne({type:"text",content:t},function(){return ee(),at({content:t,transform:E({},H,i),title:o,extra:{attributes:c,styles:d,classes:[P.familyPrefix+"-layers-text"].concat(M(s))}})})},de=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.title,i=void 0===n?null:n,a=e.classes,o=void 0===a?[]:a,r=e.attributes,s=void 0===r?{}:r,l=e.styles,c=void 0===l?{}:l;return ne({type:"counter",content:t},function(){return ee(),function(t){var e=t.content,n=t.title,i=t.extra,a=E({},i.attributes,n?{title:n}:{},{class:i.classes.join(" ")}),o=X(i.styles);o.length>0&&(a.style=o);var r=[];return r.push({tag:"span",attributes:a,children:[e]}),n&&r.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),r}({content:t.toString(),title:i,extra:{attributes:s,styles:c,classes:[P.familyPrefix+"-layers-counter"].concat(M(o))}})})},ue=function(t){return ne({type:"layer"},function(){ee();var e=[];return t(function(t){Array.isArray(t)?t.map(function(t){e=e.concat(t.abstract)}):e=e.concat(t.abstract)}),[{tag:"span",attributes:{class:P.familyPrefix+"-layers"},children:e}]})},fe={noAuto:oe,config:P,dom:se,library:ae,parse:le,findIconDefinition:ie,icon:ce,text:pe,counter:de,layer:ue,toHtml:wt},me=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,e=void 0===t?d:t;Object.keys(D.styles).length>0&&m&&P.autoReplaceSvg&&fe.dom.i2svg({node:e})}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return a});
12 | /*!
13 | * Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com
14 | * License - https://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
15 | */
16 | var i={prefix:"fab",iconName:"js",icon:[448,512,[],"f3b8","M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z"]},a={prefix:"fab",iconName:"vuejs",icon:[448,512,[],"f41f","M356.9 64.3H280l-56 88.6-48-88.6H0L224 448 448 64.3h-91.1zm-301.2 32h53.8L224 294.5 338.4 96.3h53.8L224 384.5 55.7 96.3z"]}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){const i=n(2),a=n(17),o=n(18);let r=!1,s=!0;t.exports=function(t){(t=a(t)).match(/^[a-zA-Z]\:/)&&(r=!0,s=!1),t.indexOf("\\")>=0&&(r=!0,s=!1);let e=r?i.win32:i.posix;e||(e=i);let n=e.parse?e.parse(t):o(t);""===n.root&&(n.root=".");let l=n.dir,c=[];do{c.unshift(e.basename(l)),l=e.dirname(l)}while(l!==n.root);return n.dirs=c,n}},function(t,e,n){"use strict";var i=n(27);t.exports=new i(n(28),n(29))},function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var i={name:"sl-vue-tree",props:{value:{type:Array,default:()=>[]},edgeSize:{type:Number,default:3},showBranches:{type:Boolean,default:!1},level:{type:Number,default:0},parentInd:{type:Number},allowMultiselect:{type:Boolean,default:!0},scrollAreaHeight:{type:Number,default:70},maxScrollSpeed:{type:Number,default:20}},data(){return{rootCursorPosition:null,scrollIntervalId:0,scrollSpeed:0,lastSelectedNode:null,mouseIsDown:!1,isDragging:!1,lastMousePos:{x:0,y:0},preventDrag:!1,currentValue:this.value}},mounted(){this.isRoot&&document.addEventListener("mouseup",this.onDocumentMouseupHandler)},beforeDestroy(){document.removeEventListener("mouseup",this.onDocumentMouseupHandler)},watch:{value:function(t){this.currentValue=t}},computed:{cursorPosition(){return this.isRoot?this.rootCursorPosition:this.getParent().cursorPosition},nodes(){if(this.isRoot){const t=this.copy(this.currentValue);return this.getNodes(t)}return this.getParent().nodes[this.parentInd].children},gaps(){const t=[];let e=this.level-1;for(this.showBranches||e++;e-- >0;)t.push(e);return t},isRoot(){return!this.level},selectionSize(){return this.getSelected().length},dragSize(){return this.getDraggable().length}},methods:{setCursorPosition(t){this.isRoot?this.rootCursorPosition=t:this.getParent().setCursorPosition(t)},getNodes(t,e=[],n=!0){return t.map((i,a)=>{const o=e.concat(a);return this.getNode(o,i,t,n)})},getNode(t,e=null,n=null,i=null){const a=t.slice(-1)[0];if(n=n||this.getNodeSiblings(this.currentValue,t),e=e||n&&n[a]||null,null==i&&(i=this.isVisible(t)),!e)return null;const o=void 0==e.isExpanded||!!e.isExpanded,r=void 0==e.isDraggable||!!e.isDraggable,s=void 0==e.isSelectable||!!e.isSelectable;return{title:e.title,isLeaf:!!e.isLeaf,children:e.children?this.getNodes(e.children,t,o):[],isSelected:!!e.isSelected,isExpanded:o,isVisible:i,isDraggable:r,isSelectable:s,data:void 0!==e.data?e.data:{},path:t,pathStr:JSON.stringify(t),level:t.length,ind:a,isFirstChild:0==a,isLastChild:a===n.length-1}},isVisible(t){if(t.length<2)return!0;let e=this.currentValue;for(let n=0;n{o?(t.pathStr!==i.pathStr&&t.pathStr!==this.lastSelectedNode.pathStr||(n.isSelected=t.isSelectable,s=!s),s&&(n.isSelected=t.isSelectable)):t.pathStr===i.pathStr?n.isSelected=t.isSelectable:e||n.isSelected&&(n.isSelected=!1),n.isSelected&&r.push(t)},a),this.lastSelectedNode=i,this.emitInput(a),this.emitSelect(r,n),i},onMousemoveHandler(t){if(!this.isRoot)return void this.getRoot().onMousemoveHandler(t);if(this.preventDrag)return;const e=this.isDragging,n=this.isDragging||this.mouseIsDown&&(this.lastMousePos.x!==t.clientX||this.lastMousePos.y!==t.clientY),i=!1===e&&!0===n;if(this.lastMousePos={x:t.clientX,y:t.clientY},!n)return;const a=this.getRoot().$el,o=a.getBoundingClientRect(),r=this.$refs.dragInfo,s=t.clientY-o.top+a.scrollTop-(0|r.style.marginBottom),l=t.clientX-o.left;r.style.top=s+"px",r.style.left=l+"px";const c=document.elementFromPoint(t.clientX,t.clientY),p=c.getAttribute("path")?c:c.closest("[path]"),d=t.offsetY;let u,f;if(p){if(!p)return;u=this.getNode(JSON.parse(p.getAttribute("path"))),i&&!u.isSelected&&this.select(u.path,!1,t);const e=p.offsetHeight,n=this.edgeSize;f=u.isLeaf?d>=e/2?"after":"before":d<=n?"before":d>=e-n?"after":"inside"}else{if(d0?this.startScroll(v):h>0?this.startScroll(-h):this.stopScroll()},onMouseleaveHandler(t){if(!this.isRoot||!this.isDragging)return;const e=this.getRoot().$el.getBoundingClientRect();t.clientY>=e.bottom?this.setCursorPosition({node:this.nodes.slice(-1)[0],placement:"after"}):t.clientY{t=e}),t},getFirstNode(){return this.getNode([0])},getNextNode(t,e=null){let n=null;return this.traverse(i=>{if(!(this.comparePaths(i.path,t)<1))return!e||e(i)?(n=i,!1):void 0}),n},getPrevNode(t,e){let n=[];this.traverse(e=>{if(this.comparePaths(e.path,t)>=0)return!1;n.push(e)});let i=n.length;for(;i--;){const t=n[i];if(!e||e(t))return t}return null},comparePaths(t,e){for(let n=0;ne[n])return 1;if(t[n]{e.scrollTop+=this.maxScrollSpeed*t},20))},stopScroll(){clearInterval(this.scrollIntervalId),this.scrollIntervalId=0,this.scrollSpeed=0},onDocumentMouseupHandler(t){this.isDragging&&this.onNodeMouseupHandler(t)},onNodeMouseupHandler(t,e=null){if(0!==t.button)return;if(!this.isRoot)return void this.getRoot().onNodeMouseupHandler(t,e);if(this.mouseIsDown=!1,this.isDragging||!e||this.preventDrag||this.select(e.path,!1,t),this.preventDrag=!1,!this.cursorPosition)return void this.stopDrag();const n=this.getDraggable();for(let t of n){if(t.pathStr==this.cursorPosition.node.pathStr)return void this.stopDrag();if(this.checkNodeIsParent(t,this.cursorPosition.node))return void this.stopDrag()}const i=this.copy(this.currentValue),a=[];for(let t of n){const e=this.getNodeSiblings(i,t.path)[t.ind];a.push(this.copy(e)),e._markToDelete=!0}const o=this.cursorPosition.node,r=this.getNodeSiblings(i,o.path),s=r[o.ind];if("inside"===this.cursorPosition.placement)s.children=s.children||[],s.children.unshift(...a);else{const t="before"===this.cursorPosition.placement?o.ind:o.ind+1;r.splice(t,0,...a)}this.traverseModels((t,e,n)=>{t._markToDelete&&e.splice(n,1)},i),this.lastSelectedNode=null,this.emitInput(i),this.emitDrop(n,this.cursorPosition,t),this.stopDrag()},onToggleHandler(t,e){this.updateNode(e.path,{isExpanded:!e.isExpanded}),this.emitToggle(e,t),t.stopPropagation()},stopDrag(){this.isDragging=!1,this.mouseIsDown=!1,this.setCursorPosition(null),this.stopScroll()},getParent(){return this.$parent},getRoot(){return this.isRoot?this:this.getParent().getRoot()},getNodeSiblings(t,e){return 1===e.length?t:this.getNodeSiblings(t[e[0]].children,e.slice(1))},updateNode(t,e){if(!this.isRoot)return void this.getParent().updateNode(t,e);const n=JSON.stringify(t),i=this.copy(this.currentValue);this.traverse((t,i)=>{t.pathStr===n&&Object.assign(i,e)},i),this.emitInput(i)},getSelected(){const t=[];return this.traverse(e=>{e.isSelected&&t.push(e)}),t},getDraggable(){const t=[];return this.traverse(e=>{e.isSelected&&e.isDraggable&&t.push(e)}),t},traverse(t,e=null,n=[]){e||(e=this.currentValue);let i=!1;const a=[];for(let o=0;oJSON.stringify(t)),n=this.copy(this.currentValue);this.traverse((t,n,i)=>{for(const i of e)t.pathStr===i&&(n._markToDelete=!0)},n),this.traverseModels((t,e,n)=>{t._markToDelete&&e.splice(n,1)},n),this.emitInput(n)},checkNodeIsParent(t,e){const n=e.path;return JSON.stringify(n.slice(0,t.path.length))==t.pathStr},copy:t=>JSON.parse(JSON.stringify(t))}},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sl-vue-tree",class:{"sl-vue-tree-root":t.isRoot},on:{mousemove:t.onMousemoveHandler,mouseleave:t.onMouseleaveHandler}},[n("div",{ref:"nodes",staticClass:"sl-vue-tree-nodes-list"},[t._l(t.nodes,function(e,i){return n("div",{staticClass:"sl-vue-tree-node",class:{"sl-vue-tree-selected":e.isSelected}},[n("div",{staticClass:"sl-vue-tree-cursor sl-vue-tree-cursor_before",style:{visibility:t.cursorPosition&&t.cursorPosition.node.pathStr===e.pathStr&&"before"===t.cursorPosition.placement?"visible":"hidden"},on:{dragover:function(t){t.preventDefault()}}}),t._v(" "),n("div",{staticClass:"sl-vue-tree-node-item",class:{"sl-vue-tree-cursor-hover":t.cursorPosition&&t.cursorPosition.node.pathStr===e.pathStr,"sl-vue-tree-cursor-inside":t.cursorPosition&&"inside"===t.cursorPosition.placement&&t.cursorPosition.node.pathStr===e.pathStr,"sl-vue-tree-node-is-leaf":e.isLeaf,"sl-vue-tree-node-is-folder":!e.isLeaf},attrs:{path:e.pathStr},on:{mousedown:function(n){t.onNodeMousedownHandler(n,e)},mouseup:function(n){t.onNodeMouseupHandler(n,e)},contextmenu:function(n){t.emitNodeContextmenu(e,n)},dblclick:function(n){t.emitNodeDblclick(e,n)},click:function(n){t.emitNodeClick(e,n)}}},[t._l(t.gaps,function(t){return n("div",{staticClass:"sl-vue-tree-gap"})}),t._v(" "),t.level&&t.showBranches?n("div",{staticClass:"sl-vue-tree-branch"},[t._t("branch",[e.isLastChild?t._e():n("span",[t._v("\n "+t._s(String.fromCharCode(9500))+t._s(String.fromCharCode(9472))+" \n ")]),t._v(" "),e.isLastChild?n("span",[t._v("\n "+t._s(String.fromCharCode(9492))+t._s(String.fromCharCode(9472))+" \n ")]):t._e()],{node:e})],2):t._e(),t._v(" "),n("div",{staticClass:"sl-vue-tree-title"},[e.isLeaf?t._e():n("span",{staticClass:"sl-vue-tree-toggle",on:{click:function(n){t.onToggleHandler(n,e)}}},[t._t("toggle",[n("span",[t._v("\n "+t._s(e.isLeaf?"":e.isExpanded?"-":"+")+"\n ")])],{node:e})],2),t._v(" "),t._t("title",[t._v(t._s(e.title))],{node:e})],2),t._v(" "),n("div",{staticClass:"sl-vue-tree-sidebar"},[t._t("sidebar",null,{node:e})],2)],2),t._v(" "),e.children&&e.children.length&&e.isExpanded?n("sl-vue-tree",{attrs:{value:e.children,level:e.level,parentInd:i,allowMultiselect:t.allowMultiselect,edgeSize:t.edgeSize,showBranches:t.showBranches},on:{dragover:function(t){t.preventDefault()}},scopedSlots:t._u([{key:"title",fn:function(e){var n=e.node;return[t._t("title",[t._v(t._s(n.title))],{node:n})]}},{key:"toggle",fn:function(e){var i=e.node;return[t._t("toggle",[n("span",[t._v("\n "+t._s(i.isLeaf?"":i.isExpanded?"-":"+")+"\n ")])],{node:i})]}},{key:"sidebar",fn:function(e){var n=e.node;return[t._t("sidebar",null,{node:n})]}}])}):t._e(),t._v(" "),n("div",{staticClass:"sl-vue-tree-cursor sl-vue-tree-cursor_after",style:{visibility:t.cursorPosition&&t.cursorPosition.node.pathStr===e.pathStr&&"after"===t.cursorPosition.placement?"visible":"hidden"},on:{dragover:function(t){t.preventDefault()}}})],1)}),t._v(" "),t.isRoot?n("div",{directives:[{name:"show",rawName:"v-show",value:t.isDragging,expression:"isDragging"}],ref:"dragInfo",staticClass:"sl-vue-tree-drag-info"},[t._t("draginfo",[t._v("\n Items: "+t._s(t.selectionSize)+"\n ")])],2):t._e()],2)])};a._withStripped=!0;var o=function(t,e,n,i,a,o,r,s){var l=typeof(t=t||{}).default;"object"!==l&&"function"!==l||(t=t.default);var c,p="function"==typeof t?t.options:t;if(e&&(p.render=e,p.staticRenderFns=[],p._compiled=!0),c)if(p.functional){p._injectStyles=c;var d=p.render;p.render=function(t,e){return c.call(e),d(t,e)}}else{var u=p.beforeCreate;p.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:p}}(i,a);o.options.__file="src\\sl-vue-tree.vue",e.default=o.exports}]).default},function(t,e,n){(function(t){!function(t,i){i(e,n(5))}(0,function(e,n){"use strict";var i="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var a=function(t,e){return t(e={exports:{}},e.exports),e.exports}(function(t){!function(e){var n=function(t,e,i){if(!l(e)||p(e)||d(e)||u(e)||s(e))return e;var a,o=0,r=0;if(c(e))for(a=[],r=e.length;o=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n};function c(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=(e.children||[]).map(c.bind(null,t)),r=Object.keys(e.attributes||{}).reduce(function(t,n){var i=e.attributes[n];switch(n){case"class":t.class=function(t){return t.split(/\s+/).reduce(function(t,e){return t[e]=!0,t},{})}(i);break;case"style":t.style=function(t){return t.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var n=e.indexOf(":"),i=a.camelize(e.slice(0,n)),o=e.slice(n+1).trim();return t[i]=o,t},{})}(i);break;default:t.attrs[n]=i}return t},{class:{},style:{},attrs:{}}),p=i.class,d=void 0===p?{}:p,u=i.style,f=void 0===u?{}:u,m=i.attrs,v=void 0===m?{}:m,g=l(i,["class","style","attrs"]);return"string"==typeof e?e:t(e.tag,s({class:function(){for(var t=arguments.length,e=Array(t),n=0;n0||!Array.isArray(e)&&e?r({},t,e):{}}function u(t){return null===t?null:"object"===(void 0===t?"undefined":o(t))&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:"fas",iconName:t}:void 0}var f={name:"FontAwesomeIcon",functional:!0,props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:String,default:null,validator:function(t){return["horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:Number,default:null,validator:function(t){return[90,180,270].indexOf(t)>-1}},size:{type:String,default:null,validator:function(t){return["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1}},render:function(t,e){var i=e.props,a=i.icon,o=i.mask,l=i.symbol,f=u(a),m=d("classes",function(t){var e,n=(e={"fa-spin":t.spin,"fa-pulse":t.pulse,"fa-fw":t.fixedWidth,"fa-border":t.border,"fa-li":t.listItem,"fa-flip-horizontal":"horizontal"===t.flip||"both"===t.flip,"fa-flip-vertical":"vertical"===t.flip||"both"===t.flip},r(e,"fa-"+t.size,null!==t.size),r(e,"fa-rotate-"+t.rotation,null!==t.rotation),r(e,"fa-pull-"+t.pull,null!==t.pull),e);return Object.keys(n).map(function(t){return n[t]?t:null}).filter(function(t){return t})}(i)),v=d("transform","string"==typeof i.transform?n.parse.transform(i.transform):i.transform),g=d("mask",u(o)),h=n.icon(f,s({},m,v,g,{symbol:l}));if(!h)return function(){var t;!p&&console&&"function"==typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find one or more icon(s)",f,g);var x=h.abstract;return c.bind(null,t)(x[0],{},e.data)}},m={name:"FontAwesomeLayers",functional:!0,props:{fixedWidth:{type:Boolean,default:!1}},render:function(t,e){var i=n.config.familyPrefix,a=e.data.staticClass,o=[i+"-layers"].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e div {\n padding: 10px;\n}\n.vue-file-tree-contextmenu > div:hover {\n background-color: rgba(100, 100, 255, 0.5);\n}\n#vue-file-tree {\n height: 100%;\n}\n.sl-vue-tree {\n position: relative;\n cursor: default;\n user-select: none;\n}\n.sl-vue-tree.sl-vue-tree-root {\n border: 1px solid rgb(9, 22, 29);\n background-color: rgb(9, 22, 29);\n color: rgba(255, 255, 255, 0.5);\n border-radius: 3px;\n}\n.sl-vue-tree-root > .sl-vue-tree-nodes-list {\n overflow: hidden;\n position: relative;\n padding-bottom: 4px;\n}\n.sl-vue-tree-selected > .sl-vue-tree-node-item {\n background-color: #13242d;\n color: white;\n}\n.sl-vue-tree-node-item:hover,\n.sl-vue-tree-node-item.sl-vue-tree-cursor-hover {\n color: white;\n}\n.sl-vue-tree-node-item {\n position: relative;\n display: flex;\n flex-direction: row;\n\n padding-left: 10px;\n padding-right: 10px;\n line-height: 28px;\n border: 1px solid transparent;\n}\n.sl-vue-tree-node-item.sl-vue-tree-cursor-inside {\n border: 1px solid rgba(255, 255, 255, 0.5);\n}\n.sl-vue-tree-gap {\n width: 25px;\n min-height: 1px;\n}\n.sl-vue-tree-toggle {\n display: inline-block;\n text-align: left;\n width: 20px;\n}\n.sl-vue-tree-sidebar {\n margin-left: auto;\n}\n.sl-vue-tree-cursor {\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n height: 1px;\n width: 100%;\n}\n.sl-vue-tree-drag-info {\n position: absolute;\n background-color: rgba(0,0,0,0.5);\n opacity: 0.5;\n margin-left: 20px;\n padding: 5px 10px;\n}\n\n","",{version:3,sources:["/Volumes/Extra/akasha-tools/vue-file-tree/src/src/vue-file-tree.vue"],names:[],mappings:";AAgOA;IACA,mBAAA;IACA,wBAAA;IACA,aAAA;IACA,mBAAA;IACA,gBAAA;CACA;AAEA;IACA,cAAA;CACA;AAEA;IACA,2CAAA;CACA;AAEA;IACA,aAAA;CACA;AAEA;IACA,mBAAA;IACA,gBAAA;IACA,kBAAA;CACA;AAEA;IACA,iCAAA;IACA,iCAAA;IACA,gCAAA;IACA,mBAAA;CACA;AAEA;IACA,iBAAA;IACA,mBAAA;IACA,oBAAA;CACA;AAEA;IACA,0BAAA;IACA,aAAA;CACA;AAEA;;IAEA,aAAA;CACA;AAEA;IACA,mBAAA;IACA,cAAA;IACA,oBAAA;;IAEA,mBAAA;IACA,oBAAA;IACA,kBAAA;IACA,8BAAA;CACA;AAGA;IACA,2CAAA;CACA;AAEA;IACA,YAAA;IACA,gBAAA;CAEA;AAEA;IACA,sBAAA;IACA,iBAAA;IACA,YAAA;CACA;AAEA;IACA,kBAAA;CACA;AAEA;IACA,mBAAA;IACA,2CAAA;IACA,YAAA;IACA,YAAA;CACA;AAEA;IACA,mBAAA;IACA,kCAAA;IACA,aAAA;IACA,kBAAA;IACA,kBAAA;CACA",file:"vue-file-tree.vue",sourcesContent:['\n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{ node.title }} \n\n\n \n \n \n \n\n\n \n\n \n\n\n
234 |
235 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const BabiliWebpackPlugin = require('babili-webpack-plugin');
3 | const CopyWebpackPlugin = require('copy-webpack-plugin');
4 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5 |
6 | module.exports = {
7 | entry: {
8 | 'VueFileTree': './src/vue-file-tree.vue'
9 | },
10 | output: {
11 | path: __dirname + '/dist',
12 | filename: 'vue-file-tree.js',
13 | library: 'VueFileTree',
14 | libraryTarget: 'umd',
15 | libraryExport: 'default'
16 | },
17 |
18 | devtool: 'sourcemap',
19 |
20 |
21 | resolve: {
22 | extensions: [ '.js' , '.json' ],
23 | modules: [path.resolve(__dirname, 'src'), 'node_modules']
24 | },
25 |
26 | externals: {
27 | 'Vue': 'vue'
28 | },
29 |
30 | module: {
31 | rules: [
32 | {
33 | test: /\.css$/,
34 | use: [
35 | {
36 | loader: MiniCssExtractPlugin.loader,
37 | options: {
38 | // you can specify a publicPath here
39 | // by default it use publicPath in webpackOptions.output
40 | publicPath: '../'
41 | }
42 | },
43 | "css-loader"
44 | ]
45 | },
46 | {
47 | test: /\.html$/,
48 | use: 'vue-html-loader'
49 | },
50 | {
51 | test: /\.vue$/,
52 | loader: 'vue-loader',
53 | options: {
54 | esModule: true,
55 | transformToRequire: {
56 | video: 'src',
57 | source: 'src'
58 | }
59 | }
60 | },
61 | {
62 | test: /\.js$/,
63 | loader: 'babel-loader',
64 | exclude: /node_modules/,
65 | },
66 | {
67 | test: /\.(png|jpe?g|gif|svg|mp4|ico|wav)(\?.*)?$/,
68 | loader: 'file-loader',
69 | options: {
70 | name: '[name]-[hash].[ext]',
71 | outputPath: 'media/',
72 | publicPath: 'bundles/media/'
73 | }
74 | },
75 | // Handles custom fonts. Currently used for icons.
76 | {
77 | test: /\.woff$/,
78 | loader: 'file-loader',
79 | options: {
80 | name: '[name].[ext]',
81 | outputPath: 'fonts/',
82 | publicPath: 'bundles/fonts/'
83 | }
84 | }
85 | ]
86 | },
87 |
88 | plugins: [
89 | // new BabiliWebpackPlugin(),
90 | new CopyWebpackPlugin([
91 | { from: 'src/*.css', to: '[name].css'},
92 | { from: 'src/*.d.ts', to: '[name].ts'}
93 | ]),
94 | new MiniCssExtractPlugin({
95 | // Options similar to the same options in webpackOptions.output
96 | // both options are optional
97 | filename: "[name].css",
98 | chunkFilename: "[id].css"
99 | })
100 | ]
101 | };
102 |
--------------------------------------------------------------------------------