profile-viewer 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. data/dist/022efb839d22fa54a716.svg +28 -0
  3. data/dist/0c510afd6169a0a83f97.svg +14 -0
  4. data/dist/0d5cf282780cd1a5ec64.svg +8 -0
  5. data/dist/119.cc58ce313e67f80f50f3.bundle.js +2 -0
  6. data/dist/119.cc58ce313e67f80f50f3.bundle.js.map +1 -0
  7. data/dist/11c5dca6d97c9e10e5b7.svg +9 -0
  8. data/dist/131.c21d348572deab4ece66.bundle.js +2 -0
  9. data/dist/131.c21d348572deab4ece66.bundle.js.map +1 -0
  10. data/dist/18e7fdd45099134897d2.svg +8 -0
  11. data/dist/2d4b477bc424d35a0245.svg +25 -0
  12. data/dist/2e43ad991eb141fc017f.svg +9 -0
  13. data/dist/2ea5b50b7361e6de561c.svg +11 -0
  14. data/dist/308.4d236ce7e6451807cb54.bundle.js +2 -0
  15. data/dist/308.4d236ce7e6451807cb54.bundle.js.map +1 -0
  16. data/dist/31fe933f3a12be1aa7f3.svg +4 -0
  17. data/dist/390aa266f451c1005f61.svg +10 -0
  18. data/dist/3c3fda7c08bcc9544c64.svg +6 -0
  19. data/dist/4260d5db8309a6f83637.svg +10 -0
  20. data/dist/4536fd0738f36c3463bc.svg +1 -0
  21. data/dist/490065792b7e903c9f3e.svg +6 -0
  22. data/dist/49da6a2153f62ef73d17.svg +7 -0
  23. data/dist/4d26f0e38c22eedde178.jpg +0 -0
  24. data/dist/4ecb077d8715f89c0f87.svg +13 -0
  25. data/dist/524e896f487119a0b832.svg +13 -0
  26. data/dist/58c5415e952fb6dddd6b.png +0 -0
  27. data/dist/6bd0589a27236471fdab.svg +4 -0
  28. data/dist/6c6b49af3a86dfdd44e6.svg +4 -0
  29. data/dist/6c8063be3afa1d95c902.svg +3 -0
  30. data/dist/71730566d6c47ffdc965.svg +12 -0
  31. data/dist/7273fadce89da05535e5.svg +4 -0
  32. data/dist/731673c749e57bf6f544.svg +13 -0
  33. data/dist/76e5b29823c9fd62d90d.svg +3 -0
  34. data/dist/7853c71223701f30d495.svg +19 -0
  35. data/dist/79856ce399cb305fafb8.svg +19 -0
  36. data/dist/79eaad4fc0c398100809.svg +6 -0
  37. data/dist/7c7ac3c7df370340cfd2.svg +7 -0
  38. data/dist/7e3ac9afb25cfe809520.svg +1 -0
  39. data/dist/81762b0b1aacd3686a6b.svg +12 -0
  40. data/dist/86e81402ef76d28ff55f.svg +15 -0
  41. data/dist/8aae7b979b04407f71a4.svg +3 -0
  42. data/dist/8b8b909e42722172d494.svg +7 -0
  43. data/dist/8dab2a6ba757bcc6e9a5.svg +3 -0
  44. data/dist/9.071a712ea648c8b30416.bundle.js +2 -0
  45. data/dist/9.071a712ea648c8b30416.bundle.js.map +1 -0
  46. data/dist/9103e94f1d34c15d44be.svg +6 -0
  47. data/dist/914.b9bc213d93173ce6b0cb.bundle.js +2 -0
  48. data/dist/914.b9bc213d93173ce6b0cb.bundle.js.map +1 -0
  49. data/dist/9a7bd6ec36312a2baa7e.svg +1 -0
  50. data/dist/9d858d1a3ab57f8ee2e1.svg +4 -0
  51. data/dist/9eb1fab2684d1e1f0e26.svg +13 -0
  52. data/dist/_headers +37 -0
  53. data/dist/_redirects +2 -0
  54. data/dist/a3196e840709b18a3119.svg +1 -0
  55. data/dist/aa867391c311267af5a9.svg +4 -0
  56. data/dist/acb8393f3fb9c59b15c9.svg +20 -0
  57. data/dist/ad13da76642d8099fe70.module.wasm +0 -0
  58. data/dist/b45b29da558efa211628.jpg +0 -0
  59. data/dist/b5698a02eef37ce29146.svg +10 -0
  60. data/dist/b805360fcc91834556c9.svg +4 -0
  61. data/dist/before-load.js +1 -0
  62. data/dist/c3432220f657733ed05f.svg +10 -0
  63. data/dist/ca2af827049e9039ef9c.svg +8 -0
  64. data/dist/contribute.json +37 -0
  65. data/dist/d09537c705fb0878eb63.svg +4 -0
  66. data/dist/d9c199b3e3e469cc5713.svg +10 -0
  67. data/dist/da1f21c60c7217745dd8.svg +1 -0
  68. data/dist/docs/README.md +7 -0
  69. data/dist/docs/_navbar.md +3 -0
  70. data/dist/docs/_sidebar.md +27 -0
  71. data/dist/docs/advanced-topics.md +9 -0
  72. data/dist/docs/bunny-2.md +78 -0
  73. data/dist/docs/bunny.md +281 -0
  74. data/dist/docs/case-studies.md +5 -0
  75. data/dist/docs/css/style-overrides.css +160 -0
  76. data/dist/docs/css/vue_v4.12.2.min.css +858 -0
  77. data/dist/docs/gitpod.md +39 -0
  78. data/dist/docs/guide-android-profiling.md +46 -0
  79. data/dist/docs/guide-filtering-call-trees.md +87 -0
  80. data/dist/docs/guide-getting-started.md +115 -0
  81. data/dist/docs/guide-perf-profiling.md +76 -0
  82. data/dist/docs/guide-profiler-fundamentals.md +33 -0
  83. data/dist/docs/guide-profiling-android-directly-on-device.md +34 -0
  84. data/dist/docs/guide-profiling-firefox-android.md +7 -0
  85. data/dist/docs/guide-remote-profiling.md +90 -0
  86. data/dist/docs/guide-removing-profiler.md +4 -0
  87. data/dist/docs/guide-stack-samples-and-call-trees.md +57 -0
  88. data/dist/docs/guide-startup-shutdown.md +108 -0
  89. data/dist/docs/guide-ui-tour-panels.md +95 -0
  90. data/dist/docs/guide-ui-tour-timeline.md +76 -0
  91. data/dist/docs/images/about-debugging-remote-profiling-panel.png +0 -0
  92. data/dist/docs/images/about-debugging-remote.png +0 -0
  93. data/dist/docs/images/about-url.png +0 -0
  94. data/dist/docs/images/allocation-calltree-2019-12-11.png +0 -0
  95. data/dist/docs/images/allocation-feature.png +0 -0
  96. data/dist/docs/images/allocation-flame-graph-2019-12-11.png +0 -0
  97. data/dist/docs/images/allocation-js.png +0 -0
  98. data/dist/docs/images/allocation-track.png +0 -0
  99. data/dist/docs/images/bunny-analysis/bunny.png +0 -0
  100. data/dist/docs/images/bunny-analysis/clone-flame-content.png +0 -0
  101. data/dist/docs/images/bunny-analysis/clone-flame-worker.png +0 -0
  102. data/dist/docs/images/bunny-analysis/clone-thread-list.png +0 -0
  103. data/dist/docs/images/bunny-analysis/fillstyle-thread-list-measure.png +0 -0
  104. data/dist/docs/images/bunny-analysis/fillstyle-thread-list.png +0 -0
  105. data/dist/docs/images/bunny-analysis/flame-graph-content.png +0 -0
  106. data/dist/docs/images/bunny-analysis/flame-graph-set-fillstyle.png +0 -0
  107. data/dist/docs/images/bunny-analysis/flame-graph-worker.png +0 -0
  108. data/dist/docs/images/bunny-analysis/focus-subtree.png +0 -0
  109. data/dist/docs/images/bunny-analysis/threads-list-measure.png +0 -0
  110. data/dist/docs/images/bunny-analysis/threads-list.png +0 -0
  111. data/dist/docs/images/bunny-analysis/threads-parallel.png +0 -0
  112. data/dist/docs/images/bunny-analysis/threads-sync.png +0 -0
  113. data/dist/docs/images/bunny-analysis/threads-work-parallel.png +0 -0
  114. data/dist/docs/images/bunny-analysis/threads-work-sync.png +0 -0
  115. data/dist/docs/images/call-tree-running-time.svg +82 -0
  116. data/dist/docs/images/call-tree-self-time.svg +82 -0
  117. data/dist/docs/images/call-tree.svg +131 -0
  118. data/dist/docs/images/favicon.svg +4 -0
  119. data/dist/docs/images/filter-search.svg +78 -0
  120. data/dist/docs/images/getting-started-delete-profile.png +0 -0
  121. data/dist/docs/images/getting-started-devtools-panel.png +0 -0
  122. data/dist/docs/images/getting-started-enable-popup.png +0 -0
  123. data/dist/docs/images/getting-started-list-uploaded-profiles.png +0 -0
  124. data/dist/docs/images/getting-started-naming-profiles.png +0 -0
  125. data/dist/docs/images/getting-started-popup.png +0 -0
  126. data/dist/docs/images/getting-started-upload-permalink.webm +0 -0
  127. data/dist/docs/images/getting-started-upload.png +0 -0
  128. data/dist/docs/images/getting-started-use-icon.webm +0 -0
  129. data/dist/docs/images/getting-started-use-popup.webm +0 -0
  130. data/dist/docs/images/implementation-2022-06-16.png +0 -0
  131. data/dist/docs/images/implementation-filter.svg +101 -0
  132. data/dist/docs/images/interval-2020-05.png +0 -0
  133. data/dist/docs/images/invert-2022-06-16.png +0 -0
  134. data/dist/docs/images/invert-after.svg +161 -0
  135. data/dist/docs/images/invert-before.svg +144 -0
  136. data/dist/docs/images/invert-call-tree.svg +113 -0
  137. data/dist/docs/images/ipc-messages-feature.png +0 -0
  138. data/dist/docs/images/ipc-messages-io-threads.png +0 -0
  139. data/dist/docs/images/ipc-messages-popup.png +0 -0
  140. data/dist/docs/images/popup.png +0 -0
  141. data/dist/docs/images/qr-gve-nightly.gif +0 -0
  142. data/dist/docs/images/qr-reference-browser-nightly.gif +0 -0
  143. data/dist/docs/images/samples.svg +116 -0
  144. data/dist/docs/images/screenshot-2022-04-25.png +0 -0
  145. data/dist/docs/images/search-2022-06-16.png +0 -0
  146. data/dist/docs/images/secret-menu-toast.png +0 -0
  147. data/dist/docs/images/settings-menu.png +0 -0
  148. data/dist/docs/images/simple-call-tree-self-time.svg +41 -0
  149. data/dist/docs/images/simple-call-tree.svg +41 -0
  150. data/dist/docs/images/simple-stacks-self-time.svg +96 -0
  151. data/dist/docs/images/simple-stacks.svg +118 -0
  152. data/dist/docs/images/start-profiler.png +0 -0
  153. data/dist/docs/images/transform-collapse-direct-recursion.svg +47 -0
  154. data/dist/docs/images/transform-collapse-resource.svg +83 -0
  155. data/dist/docs/images/transform-focus-function.svg +81 -0
  156. data/dist/docs/images/transform-focus-node.svg +86 -0
  157. data/dist/docs/images/transform-merge-function.svg +95 -0
  158. data/dist/docs/images/transform-merge-node.svg +96 -0
  159. data/dist/docs/images/transforms-2022-06-16.png +0 -0
  160. data/dist/docs/images/ui-tour-activity-graph.png +0 -0
  161. data/dist/docs/images/ui-tour-panels-call-tree.png +0 -0
  162. data/dist/docs/images/ui-tour-panels-flame-graph.png +0 -0
  163. data/dist/docs/images/ui-tour-panels-marker-chart.png +0 -0
  164. data/dist/docs/images/ui-tour-panels-network-chart.png +0 -0
  165. data/dist/docs/images/ui-tour-panels-stack-chart.png +0 -0
  166. data/dist/docs/images/ui-tour-panels.png +0 -0
  167. data/dist/docs/images/ui-tour-ranges.png +0 -0
  168. data/dist/docs/images/ui-tour-selection.webm +0 -0
  169. data/dist/docs/images/ui-tour-timeline-markers.png +0 -0
  170. data/dist/docs/images/ui-tour-timeline-memory.png +0 -0
  171. data/dist/docs/images/ui-tour-timeline-network.png +0 -0
  172. data/dist/docs/images/ui-tour-timeline-screenshots.png +0 -0
  173. data/dist/docs/images/ui-tour-timeline-track-selection.png +0 -0
  174. data/dist/docs/images/ui-tour-timeline.png +0 -0
  175. data/dist/docs/index.html +21 -0
  176. data/dist/docs/ipc-messages.md +44 -0
  177. data/dist/docs/js/docsify_v4.12.2+.min.js +1 -0
  178. data/dist/docs/js/ga_v4.12.2.min.js +1 -0
  179. data/dist/docs/js/init.js +1 -0
  180. data/dist/docs/js/search_v4.12.2.min.js +1 -0
  181. data/dist/docs/memory-allocations.md +70 -0
  182. data/dist/docs/videos-call-tree-1.md +5 -0
  183. data/dist/docs/videos-call-tree-2.md +5 -0
  184. data/dist/docs/videos-call-tree-3.md +5 -0
  185. data/dist/docs/videos-intro.md +7 -0
  186. data/dist/docs/videos-samples-markers.md +5 -0
  187. data/dist/docs/videos-threads.md +5 -0
  188. data/dist/docs/videos.md +32 -0
  189. data/dist/e4ed50222911c5af9a32.svg +12 -0
  190. data/dist/e70722c0fe0ac3d4227b.svg +10 -0
  191. data/dist/f0599659345cf76717cd.svg +4 -0
  192. data/dist/f8e25c2ebeb0a0725a9e.svg +12 -0
  193. data/dist/favicon.png +0 -0
  194. data/dist/fcb532a05dd4b09c2d08.svg +10 -0
  195. data/dist/fd040fb5f4e7a515bb3c.svg +15 -0
  196. data/dist/index.html +1 -0
  197. data/dist/locales/README.md +26 -0
  198. data/dist/locales/be/app.ftl +1003 -0
  199. data/dist/locales/de/app.ftl +994 -0
  200. data/dist/locales/el/app.ftl +1013 -0
  201. data/dist/locales/en-GB/app.ftl +1018 -0
  202. data/dist/locales/en-US/app.ftl +1125 -0
  203. data/dist/locales/es-CL/app.ftl +948 -0
  204. data/dist/locales/fr/app.ftl +942 -0
  205. data/dist/locales/fy-NL/app.ftl +1018 -0
  206. data/dist/locales/ia/app.ftl +1007 -0
  207. data/dist/locales/it/app.ftl +936 -0
  208. data/dist/locales/kab/app.ftl +557 -0
  209. data/dist/locales/nl/app.ftl +1018 -0
  210. data/dist/locales/pt-BR/app.ftl +947 -0
  211. data/dist/locales/ru/app.ftl +1032 -0
  212. data/dist/locales/sv-SE/app.ftl +1013 -0
  213. data/dist/locales/uk/app.ftl +1019 -0
  214. data/dist/locales/zh-CN/app.ftl +931 -0
  215. data/dist/locales/zh-TW/app.ftl +930 -0
  216. data/dist/main.8208fda2d35ddbe38d55.bundle.js +199 -0
  217. data/dist/main.8208fda2d35ddbe38d55.bundle.js.LICENSE.txt +92 -0
  218. data/dist/main.8208fda2d35ddbe38d55.bundle.js.map +1 -0
  219. data/dist/photon/31fe933f3a12be1aa7f3.svg +4 -0
  220. data/dist/photon/49da6a2153f62ef73d17.svg +7 -0
  221. data/dist/photon/6bd0589a27236471fdab.svg +4 -0
  222. data/dist/photon/6c8063be3afa1d95c902.svg +3 -0
  223. data/dist/photon/76e5b29823c9fd62d90d.svg +3 -0
  224. data/dist/photon/8aae7b979b04407f71a4.svg +3 -0
  225. data/dist/photon/8dab2a6ba757bcc6e9a5.svg +3 -0
  226. data/dist/photon/9103e94f1d34c15d44be.svg +6 -0
  227. data/dist/photon/aa867391c311267af5a9.svg +4 -0
  228. data/dist/photon/f0599659345cf76717cd.svg +4 -0
  229. data/dist/photon/index.html +214 -0
  230. data/dist/photon/main.8c8260452e7439ec6df9.bundle.js +2 -0
  231. data/dist/photon/main.8c8260452e7439ec6df9.bundle.js.map +1 -0
  232. data/dist/service-worker-compat.js +1 -0
  233. data/dist/sw.js +2 -0
  234. data/dist/sw.js.map +1 -0
  235. data/dist/workbox-27b29e6f.js +2 -0
  236. data/dist/workbox-27b29e6f.js.map +1 -0
  237. data/dist/zee-worker.js +1 -0
  238. data/ruby-bin/profile-viewer +87 -0
  239. metadata +281 -0
@@ -0,0 +1,9 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16px" height="16px" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
5
+ <g transform="matrix(.96081 0 0 1.063 -.19979 -.084155)" fill="#0c0c0d" aria-label="{}">
6
+ <path d="m6.4527 13.984v1.1468h-0.49374q-1.9829 0-2.6598-0.5893-0.66894-0.5893-0.66894-2.3492v-1.9033q0-1.2025-0.43003-1.6644-0.43003-0.46189-1.5609-0.46189h-0.48578v-1.1388h0.48578q1.1388 0 1.5609-0.45392 0.43003-0.46189 0.43003-1.6485v-1.9113q0-1.7599 0.66894-2.3413 0.6769-0.5893 2.6598-0.5893h0.49374v1.1388h-0.54152q-1.1229 0-1.4653 0.3504-0.34243 0.3504-0.34243 1.4733v1.975q0 1.2503-0.36632 1.8157-0.35836 0.56541-1.2343 0.7645 0.88395 0.21502 1.2423 0.78043 0.35836 0.56541 0.35836 1.8077v1.975q0 1.1229 0.34243 1.4733 0.34243 0.3504 1.4653 0.3504z"/>
7
+ <path d="m10.538 13.984h0.55745q1.1149 0 1.4494-0.34243 0.34243-0.34243 0.34243-1.4812v-1.975q0-1.2423 0.35836-1.8077 0.35836-0.56541 1.2423-0.78043-0.88395-0.19909-1.2423-0.7645-0.35836-0.56541-0.35836-1.8157v-1.975q0-1.1308-0.34243-1.4733-0.33447-0.3504-1.4494-0.3504h-0.55745v-1.1388h0.5017q1.9829 0 2.6439 0.5893 0.66894 0.58134 0.66894 2.3413v1.9113q0 1.1866 0.43003 1.6485 0.43003 0.45392 1.5609 0.45392h0.49374v1.1388h-0.49374q-1.1308 0-1.5609 0.46189-0.43003 0.46189-0.43003 1.6644v1.9033q0 1.7599-0.66894 2.3492-0.66097 0.5893-2.6439 0.5893h-0.5017z"/>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[131],{3131:(e,t,s)=>{s.r(t),s.d(t,{SourceViewEditor:()=>g});var n=s(2864),i=s(8120),o=s(9119),c=s(5524),r=s(487),a=s(6905),d=s(360),l=s(5627),h=s.n(l),f=s(2265);const u=new i.F6;function m(e){return null===e?[]:e.endsWith(".rs")?(0,a.Q)():e.endsWith(".js")||e.endsWith(".jsm")||e.endsWith(".jsx")||e.endsWith(".mjs")||e.endsWith(".ts")||e.endsWith(".tsx")?(0,d.eJ)():e.endsWith(".c")||e.endsWith(".cc")||e.endsWith(".cpp")||e.endsWith(".cxx")||e.endsWith(".h")||e.endsWith(".hpp")||e.endsWith(".m")||e.endsWith(".mm")?(0,r.N)():[]}const p=[n.tk.editable.of(!1),n.tk.contentAttributes.of({tabindex:"0"})];class g{constructor(e,t,s,r){this._view=void 0;let a=i.yy.create({doc:e,extensions:[f.l$,(0,n.Eu)(),u.of(m(t)),(0,o.nF)(c.$d),p]});a=a.update({effects:f.gR.of(s)}).state,this._view=new n.tk({state:a,parent:r})}updateLanguageForFilePath(e){this._view.dispatch({effects:u.reconfigure(m(e))})}setContents(e){this._view.dispatch(this._view.state.update({changes:{insert:e,from:0,to:this._view.state.doc.length}}))}setTimings(e){this._view.dispatch({effects:f.gR.of(e)})}scrollToLine(e){e=h()(e,1,this._view.state.doc.lines);const t=this._view.state.doc.line(e).from;this._view.dispatch({effects:n.tk.scrollIntoView(t,{y:"start",yMargin:0})}),this._view.coordsAtPos(0)}}},2265:(e,t,s)=>{s.d(t,{cW:()=>u,gR:()=>a,l$:()=>g});var n=s(2864),i=s(8120),o=s(6093);const c=new class extends n.SJ{constructor(...e){super(...e),this.elementClass="cm-nonZeroLine"}},r=n.p.line({class:"cm-nonZeroLine"}),a=i.Py.define(),d=i.QQ.define({create:()=>o.KM,update(e,t){let s=e;for(const e of t.effects)e.is(a)&&(s=e.value);return s}});function l(e){const t=e.field(d),s=new Set;for(const e of t.totalLineHits.keys())s.add(e);for(const e of t.selfLineHits.keys())s.add(e);const n=e.doc.lines,i=[...s].filter((e=>e<=n)).map((t=>e.doc.line(t).from));return i.sort(((e,t)=>e-t)),i}const h=n.v7.compute(["doc",d],(e=>{const t=l(e);return i.Xs.of(t.map((e=>c.range(e))))})),f=n.tk.decorations.compute(["doc",d],(e=>{const t=l(e);return i.Xs.of(t.map((e=>r.range(e))))}));class u extends n.SJ{constructor(e){super(),this._s=void 0,this._s=e}toDOM(){return document.createTextNode(this._s)}}const m=(0,n.v5)({class:"cm-total-timings-gutter",lineMarker(e,t){const s=e.state.doc.lineAt(t.from).number,n=e.state.field(d).totalLineHits.get(s);return void 0!==n?new u(n):null},lineMarkerChange:e=>e.transactions.some((e=>e.effects.some((e=>e.is(a)))))}),p=(0,n.v5)({class:"cm-self-timings-gutter",lineMarker(e,t){const s=e.state.doc.lineAt(t.from).number,n=e.state.field(d).selfLineHits.get(s);return void 0!==n?new u(n):null},lineMarkerChange:e=>e.transactions.some((e=>e.effects.some((e=>e.is(a)))))}),g=[d,m,p,h,f]}}]);
2
+ //# sourceMappingURL=131.c21d348572deab4ece66.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"131.c21d348572deab4ece66.bundle.js","mappings":"2OAuCA,MAAMA,EAAe,IAAIC,EAAAA,GAGzB,SAASC,EACPC,GAEA,OAAa,OAATA,EACK,GAELA,EAAKC,SAAS,QACTC,EAAAA,EAAAA,KAGPF,EAAKC,SAAS,QACdD,EAAKC,SAAS,SACdD,EAAKC,SAAS,SACdD,EAAKC,SAAS,SACdD,EAAKC,SAAS,QACdD,EAAKC,SAAS,SAEPE,EAAAA,EAAAA,MAGPH,EAAKC,SAAS,OACdD,EAAKC,SAAS,QACdD,EAAKC,SAAS,SACdD,EAAKC,SAAS,SACdD,EAAKC,SAAS,OACdD,EAAKC,SAAS,SACdD,EAAKC,SAAS,OACdD,EAAKC,SAAS,QAEPG,EAAAA,EAAAA,KAEF,EACT,CAGA,MAAMC,EAAsB,CAE1BC,EAAAA,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AAAA,IAAO,CAChC3C,MAAO,0BACP4C,WAAWC,EAAMxD,GAEf,MAAMJ,EAAa4D,EAAKtF,MAAMG,IAAIoF,OAAOzD,EAAKT,MAAMmE,OAE9CC,EADUH,EAAKtF,MAAMqD,MAAMT,GACPY,cAAckC,IAAIhE,GAC5C,YAAqBiE,IAAdF,EAA0B,IAAIb,EAAaa,GAAa,IACjE,EACAG,iBAAiBnF,GAERA,EAAOoF,aAAaC,MAAMC,GAC/BA,EAAErF,QAAQoF,MAAME,GAAMA,EAAE9C,GAAGvC,SAO3BsF,GAAoBb,EAAAA,EAAAA,IAAO,CAC/B3C,MAAO,yBACP4C,WAAWC,EAAMxD,GAEf,MAAMJ,EAAa4D,EAAKtF,MAAMG,IAAIoF,OAAOzD,EAAKT,MAAMmE,OAE9CU,EADUZ,EAAKtF,MAAMqD,MAAMT,GACRe,aAAa+B,IAAIhE,GAC1C,YAAoBiE,IAAbO,EAAyB,IAAItB,EAAasB,GAAY,IAC/D,EACAN,iBAAiBnF,GAERA,EAAOoF,aAAaC,MAAMC,GAC/BA,EAAErF,QAAQoF,MAAME,GAAMA,EAAE9C,GAAGvC,SAMpBN,EAAmB,CAC9BuC,EACAuC,EACAc,EACA7B,EACAM,E","sources":["webpack:///./src/components/shared/SourceView-codemirror.js","webpack:///./src/utils/codemirror-shared.js"],"sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n// @flow\n\n/**\n * This module wraps all the interaction with the CodeMirror API into a\n * SourceViewEditor class.\n *\n * This module is intended to be imported asynchronously, so that all the\n * CodeMirror code can be split into a separate bundle chunk.\n *\n * This file implements the following features:\n * - Display source code with syntax highlighting.\n * - Display a gutter with:\n * - \"Total\" timings for each line\n * - \"Self\" timings for each line\n * - The line number for each line\n * - Highlight source code lines which have a non-zero timing, by applying\n * a cm-nonZeroLine class to them. This highlight line goes across the entire\n * width of the editor, it covers both the gutter and the main area.\n */\nimport { EditorView, lineNumbers } from '@codemirror/view';\nimport { EditorState, Compartment } from '@codemirror/state';\nimport { syntaxHighlighting } from '@codemirror/language';\nimport { classHighlighter } from '@lezer/highlight';\nimport { cpp } from '@codemirror/lang-cpp';\nimport { rust } from '@codemirror/lang-rust';\nimport { javascript } from '@codemirror/lang-javascript';\nimport clamp from 'clamp';\n\nimport type { LineTimings } from 'firefox-profiler/types';\nimport {\n timingsExtension,\n updateTimingsEffect,\n} from 'firefox-profiler/utils/codemirror-shared';\n\n// This \"compartment\" allows us to swap the syntax highlighting language when\n// the file path changes.\nconst languageConf = new Compartment();\n\n// Detect the right language based on the file extension.\nfunction _languageExtForPath(\n path: string | null\n): any /* LanguageSupport | [] */ {\n if (path === null) {\n return [];\n }\n if (path.endsWith('.rs')) {\n return rust();\n }\n if (\n path.endsWith('.js') ||\n path.endsWith('.jsm') ||\n path.endsWith('.jsx') ||\n path.endsWith('.mjs') ||\n path.endsWith('.ts') ||\n path.endsWith('.tsx')\n ) {\n return javascript();\n }\n if (\n path.endsWith('.c') ||\n path.endsWith('.cc') ||\n path.endsWith('.cpp') ||\n path.endsWith('.cxx') ||\n path.endsWith('.h') ||\n path.endsWith('.hpp') ||\n path.endsWith('.m') ||\n path.endsWith('.mm')\n ) {\n return cpp();\n }\n return [];\n}\n\n// Adjustments to make a CodeMirror editor work as a non-editable code viewer.\nconst codeViewerExtension = [\n // Make the editor non-editable.\n EditorView.editable.of(false),\n // Allow tabbing to the view (to an element *inside* the scroller so that the\n // up / down keys trigger scrolling), and take focus on mousedown.\n EditorView.contentAttributes.of({ tabindex: '0' }),\n];\n\nexport class SourceViewEditor {\n _view: EditorView;\n\n // Create a CodeMirror editor and add it as a child element of domParent.\n constructor(\n initialText: string,\n path: string,\n timings: LineTimings,\n domParent: Element\n ) {\n let state = EditorState.create({\n doc: initialText,\n extensions: [\n timingsExtension,\n lineNumbers(),\n languageConf.of(_languageExtForPath(path)),\n syntaxHighlighting(classHighlighter),\n codeViewerExtension,\n ],\n });\n state = state.update({\n effects: updateTimingsEffect.of(timings),\n }).state;\n this._view = new EditorView({\n state,\n parent: domParent,\n });\n }\n\n updateLanguageForFilePath(path: string | null) {\n this._view.dispatch({\n effects: languageConf.reconfigure(_languageExtForPath(path)),\n });\n }\n\n setContents(text: string) {\n // The CodeMirror way of replacing the entire contents is to insert new text\n // and overwrite the full range of existing text.\n this._view.dispatch(\n this._view.state.update({\n changes: {\n insert: text,\n from: 0,\n to: this._view.state.doc.length,\n },\n })\n );\n }\n\n setTimings(timings: LineTimings) {\n // Update the value of the timings field by dispatching an updateTimingsEffect.\n this._view.dispatch({\n effects: updateTimingsEffect.of(timings),\n });\n }\n\n scrollToLine(lineNumber: number) {\n // Clamp the line number to the document's line count.\n lineNumber = clamp(lineNumber, 1, this._view.state.doc.lines);\n\n // Convert the line number into a position.\n const pos = this._view.state.doc.line(lineNumber).from;\n // Dispatch the scroll action.\n this._view.dispatch({\n effects: EditorView.scrollIntoView(pos, { y: 'start', yMargin: 0 }),\n });\n // Trigger a measure flush, to work around\n // https://github.com/codemirror/codemirror.next/issues/676\n this._view.coordsAtPos(0);\n }\n}\n","/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n// @flow\n\nimport {\n EditorView,\n Decoration,\n GutterMarker,\n gutter,\n gutterLineClass,\n} from '@codemirror/view';\nimport {\n EditorState,\n StateField,\n StateEffect,\n RangeSet,\n} from '@codemirror/state';\n\nimport type { LineTimings } from 'firefox-profiler/types';\n\nimport { emptyLineTimings } from 'firefox-profiler/profile-logic/line-timings';\n\n// This gutter marker applies the \"cm-nonZeroLine\" class to gutter elements.\nconst nonZeroLineGutterMarker = new (class extends GutterMarker {\n elementClass = 'cm-nonZeroLine';\n})();\n\n// This \"decoration\" applies the \"cm-nonZeroLine\" class to the line of assembly\n// code in the main editor contents (not the gutter).\nconst nonZeroLineDecoration = Decoration.line({ class: 'cm-nonZeroLine' });\n\n// An \"effect\" is like a redux action. This effect is used to replace the value\n// of the timingsField state field.\nexport const updateTimingsEffect = StateEffect.define<LineTimings>();\n\n// A \"state field\" for the timings.\nconst timingsField = StateField.define<LineTimings>({\n create() {\n return emptyLineTimings;\n },\n update(timings, transaction) {\n // This is like a reducer. Find an updateTimingsEffect in the transaction\n // and set this field to the timings in it.\n let newTimings = timings;\n for (const effect of transaction.effects) {\n if (effect.is(updateTimingsEffect)) {\n newTimings = effect.value;\n }\n }\n return newTimings;\n },\n});\n\n// Finds all lines with non-zero line timings, for the highlight line.\n// The line numbers are then converted into \"positions\", i.e. character offsets\n// in the document, for the start of the line.\n// Then they are sorted, because our caller wants to have a sorted list.\nfunction getSortedStartPositionsOfNonZeroLines(state: EditorState): number[] {\n const timings = state.field(timingsField);\n const nonZeroLines = new Set();\n for (const lineNumber of timings.totalLineHits.keys()) {\n nonZeroLines.add(lineNumber);\n }\n for (const lineNumber of timings.selfLineHits.keys()) {\n nonZeroLines.add(lineNumber);\n }\n const lineCount = state.doc.lines;\n const positions = [...nonZeroLines]\n .filter((l) => l <= lineCount)\n .map((lineNumber) => state.doc.line(lineNumber).from);\n positions.sort((a, b) => a - b);\n return positions;\n}\n\n// This is an \"extension\" which applies the \"cm-nonZeroLine\" class to all gutter\n// elements for lines with non-zero timings. It is like a piece of derived state;\n// it needs to be recomputed whenever one of the input states change. The input\n// states are the editor contents (\"doc\") and the value of the timings field.\n// The editor contents are relevant because the output is expressed in terms of\n// positions, i.e. character offsets from the document start, and those positions\n// need to be updated if the amount of text in a line changes. This happens when\n// we replace the file placeholder content with the actual file content.\nconst nonZeroLineGutterHighlighter = gutterLineClass.compute(\n ['doc', timingsField],\n (state) => {\n const positions = getSortedStartPositionsOfNonZeroLines(state);\n return RangeSet.of(positions.map((p) => nonZeroLineGutterMarker.range(p)));\n }\n);\n\n// Same as the previous extension, but this one is for the main editor. There\n// doesn't seem to be a way to set a class for the entire line, i.e. both the\n// gutter elements and the main editor elements of that line.\nconst nonZeroLineDecorationHighlighter = EditorView.decorations.compute(\n ['doc', timingsField],\n (state) => {\n const positions = getSortedStartPositionsOfNonZeroLines(state);\n return RangeSet.of(positions.map((p) => nonZeroLineDecoration.range(p)));\n }\n);\n\n// This is a \"gutter marker\" which renders just a string and nothing else.\n// It is used for the AddressTimings annotations, i.e. for the numbers in the\n// gutter.\nexport class StringMarker extends GutterMarker {\n _s: string;\n\n constructor(s: string) {\n super();\n this._s = s;\n }\n\n toDOM() {\n return document.createTextNode(this._s);\n }\n}\n\n// The \"extension\" which manages the elements in the gutter for the \"total\"\n// column.\nconst totalTimingsGutter = gutter({\n class: 'cm-total-timings-gutter',\n lineMarker(view, line) {\n // Return a gutter marker for this line, or null.\n const lineNumber = view.state.doc.lineAt(line.from).number;\n const timings = view.state.field(timingsField);\n const totalTime = timings.totalLineHits.get(lineNumber);\n return totalTime !== undefined ? new StringMarker(totalTime) : null;\n },\n lineMarkerChange(update) {\n // Return true if the update affects the total timings in the gutter.\n return update.transactions.some((t) =>\n t.effects.some((e) => e.is(updateTimingsEffect))\n );\n },\n});\n\n// The \"extension\" which manages the elements in the gutter for the \"self\"\n// column.\nconst selfTimingsGutter = gutter({\n class: 'cm-self-timings-gutter',\n lineMarker(view, line) {\n // Return a gutter marker for this line, or null.\n const lineNumber = view.state.doc.lineAt(line.from).number;\n const timings = view.state.field(timingsField);\n const selfTime = timings.selfLineHits.get(lineNumber);\n return selfTime !== undefined ? new StringMarker(selfTime) : null;\n },\n lineMarkerChange(update) {\n // Return true if the update affects the self timings in the gutter.\n return update.transactions.some((t) =>\n t.effects.some((e) => e.is(updateTimingsEffect))\n );\n },\n});\n\n// All extensions which have to do with timings, grouped into one extension.\nexport const timingsExtension = [\n timingsField,\n totalTimingsGutter,\n selfTimingsGutter,\n nonZeroLineGutterHighlighter,\n nonZeroLineDecorationHighlighter,\n];\n"],"names":["languageConf","Compartment","_languageExtForPath","path","endsWith","rust","javascript","cpp","codeViewerExtension","EditorView","editable","of","contentAttributes","tabindex","SourceViewEditor","constructor","initialText","timings","domParent","_view","state","EditorState","create","doc","extensions","timingsExtension","lineNumbers","syntaxHighlighting","classHighlighter","update","effects","updateTimingsEffect","this","parent","updateLanguageForFilePath","dispatch","reconfigure","setContents","text","changes","insert","from","to","length","setTimings","scrollToLine","lineNumber","clamp","lines","pos","line","scrollIntoView","y","yMargin","coordsAtPos","nonZeroLineGutterMarker","GutterMarker","args","elementClass","nonZeroLineDecoration","Decoration","class","StateEffect","define","timingsField","StateField","emptyLineTimings","transaction","newTimings","effect","is","value","getSortedStartPositionsOfNonZeroLines","field","nonZeroLines","Set","totalLineHits","keys","add","selfLineHits","lineCount","positions","filter","l","map","sort","a","b","nonZeroLineGutterHighlighter","gutterLineClass","compute","RangeSet","p","range","nonZeroLineDecorationHighlighter","decorations","StringMarker","s","super","_s","toDOM","document","createTextNode","totalTimingsGutter","gutter","lineMarker","view","lineAt","number","totalTime","get","undefined","lineMarkerChange","transactions","some","t","e","selfTimingsGutter","selfTime"],"sourceRoot":""}
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg width="12px" height="12px" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
6
+ <path d="m1 2v8.0124c0 0.50319 0.50439 0.98758 0.98758 0.98758h7.9752c0.52853 0 1.0373-0.47685 1.0373-0.98758v-8c0-0.53457-0.48433-1.0124-0.98758-1.0124h-8.0248c-0.54378 0-0.98758 0.48961-0.98758 1zm9 8h-8v-8h8z" fill="#0c0c0d" fill-opacity=".8"/>
7
+ <path d="m4 7h1v1c0 1 0.5 1 1 1s1 0 1-1v-1h1c1 0 1-0.5 1-1s0-1-1-1h-1v-1c0-1-0.5-1-1-1s-1 0-1 1v1h-1c-1 0-1 0.5-1 1s0 1 1 1z" fill="#0c0c0d" fill-opacity=".8"/>
8
+ </svg>
@@ -0,0 +1,25 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg"
5
+ xmlns:xlink="http://www.w3.org/1999/xlink"
6
+ width="48" height="48" viewBox="0 0 24 24">
7
+ <defs>
8
+ <filter id="filter" filterSpaceUnits="objectBoundingBox" x="-100%" y="-20%" width="300%" height="140%">
9
+ <feFlood flood-color="rgba(0, 0, 0, 0.6)"/>
10
+ <feComposite operator="out" in2="SourceAlpha"/>
11
+ <feGaussianBlur stdDeviation="0.2"/>
12
+ <feOffset dx="-1"/>
13
+ <feComposite operator="in" in2="SourceAlpha"/>
14
+ </filter>
15
+ <linearGradient id="gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="0%" y2="100%">
16
+ <stop offset="0.1" stop-color="black"/>
17
+ <stop offset="0.5" stop-color="white"/>
18
+ <stop offset="0.9" stop-color="black"/>
19
+ </linearGradient>
20
+ <mask id="mask">
21
+ <rect x="0%" y="0%" width="100%" height="100%" fill="url(#gradient)"/>
22
+ </mask>
23
+ </defs>
24
+ <polyline points="4 0 6 0 18 12 6 24 4 24 16 12" style="filter:url(#filter); mask:url(#mask)"/>
25
+ </svg>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
6
+ <g transform="translate(0.000000, 2.000000)" fill="rgba(12, 12, 13, .8)" fill-rule="nonzero">
7
+ <path d="M11.1999997,7 C10.7581719,7 10.3999997,6.66434202 10.3999997,6.25028692 C10.4012388,4.47423183 9.96105957,2.41644287 7.60870361,1.75811768 C5.25634766,1.09979248 3.52069092,2.5 2.78090443,4.50602423 L4.81441042,4.50602423 C5.25623821,4.50602423 5.6144104,4.8416822 5.6144104,5.2557373 C5.6144104,5.6697924 5.25623821,6 4.81441042,6 L0.811210539,6 C0.369382752,6 0,5.6697924 0,5.2557373 L0,1.50717191 C0,1.09311681 0.369382752,0.757458836 0.811210539,0.757458836 C1.25303833,0.757458836 1.61121052,1.09311681 1.61121052,1.50717191 L1.61121052,3.3004856 C2.53070068,1.09130859 5.28404654,-0.566101074 8.1293335,0.304748535 C10.9746205,1.17559814 11.9989328,3.40267358 12,6.25028692 C12,6.66434202 11.6418275,7 11.1999997,7 Z"></path>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,11 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
5
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6
+ <g fill="#FFFFFF">
7
+ <path d="M15.707,4.293 L11.707,0.293 C11.3146211,-0.0859722095 10.6909152,-0.0805523739 10.3051814,0.305181425 C9.91944763,0.690915223 9.91402779,1.31462111 10.293,1.707 L12.585,4 L11,4 C7.13583434,4.00440864 4.00440864,7.13583434 4,11 C4.00000001,11.5522847 4.44771526,12 5,12 C5.55228474,12 5.99999999,11.5522847 6,11 C6.00330612,8.23994685 8.23994685,6.00330612 11,6 L12.585,6 L10.292,8.293 C10.0320434,8.54407447 9.9277874,8.91587789 10.0193028,9.26550732 C10.1108183,9.61513676 10.3838632,9.88818172 10.7334927,9.97969716 C11.0831221,10.0712126 11.4549255,9.96695658 11.706,9.707 L15.706,5.707 C16.0966582,5.31677629 16.0971059,4.68377588 15.707,4.293 Z"></path>
8
+ <path d="M13,11 C12.4477153,11 12,11.4477153 12,12 L12,13 C12,13.5522847 11.5522847,14 11,14 L3,14 C2.44771525,14 2,13.5522847 2,13 L2,6 C2,5.44771525 2.44771525,5 3,5 L4,5 C4.55228475,5 5,4.55228475 5,4 C5,3.44771525 4.55228475,3 4,3 L3,3 C1.34314575,3 2.02906125e-16,4.34314575 0,6 L0,13 C2.02906125e-16,14.6568542 1.34314575,16 3,16 L11,16 C12.6568542,16 14,14.6568542 14,13 L14,12 C14,11.4477153 13.5522847,11 13,11 Z"></path>
9
+ </g>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[308],{7308:(s,e,t)=>{t.r(e),t.d(e,{AssemblyViewEditor:()=>T});var n=t(2864),i=t(8120),o=t(9119),r=t(5524),d=t(5627),a=t.n(d),c=t(7365),l=t(2265);const f=i.Py.define(),u=i.QQ.define({create:()=>[],update(s,e){let t=s;for(const s of e.effects)s.is(f)&&(t=s.value);return t}}),h=(0,n.v5)({class:"cm-instruction-address-gutter",lineMarker(s,e){const t=s.state.doc.lineAt(e.from).number,n=s.state.field(u).lineToAddress(t);return null!==n?new l.cW(`0x${n.toString(16)}`):null},lineMarkerChange:s=>s.transactions.some((s=>s.effects.some((s=>s.is(f)))))});function m(s){return s.map((s=>s.decodedString)).join("\n")}class p{constructor(s){this._instructionAddresses=void 0,this._instructionAddresses=s}addressToLine(s){const e=(0,c.e)(this._instructionAddresses,s);return 0===e?null:e-1+1}lineToAddress(s){if(s<1||s>this._instructionAddresses.length)return null;const e=s-1;return this._instructionAddresses[e]}}function _(s){return s.map((s=>s.address))}function g(s,e){const t=new Map;for(const[n,i]of s.totalAddressHits){const s=e.addressToLine(n);if(null!==s){const e=t.get(s)??0;t.set(s,e+i)}}const n=new Map;for(const[t,i]of s.selfAddressHits){const s=e.addressToLine(t);if(null!==s){const e=n.get(s)??0;n.set(s,e+i)}}return{totalLineHits:t,selfLineHits:n}}class T{constructor(s,e,t,d){this._view=void 0,this._addressToLineMap=void 0,this._addressTimings=void 0,this._addressToLineMap=new p(_(s)),this._addressTimings=t;let a=i.yy.create({doc:m(s),extensions:[l.l$,u,h,(0,o.nF)(r.$d),i.yy.readOnly.of(!0),n.tk.editable.of(!1)]});const c=g(this._addressTimings,this._addressToLineMap);a=a.update({effects:[f.of(this._addressToLineMap),l.gR.of(c)]}).state,this._view=new n.tk({state:a,parent:d})}setContents(s){this._addressToLineMap=new p(_(s));const e=g(this._addressTimings,this._addressToLineMap),t=m(s);this._view.dispatch(this._view.state.update({changes:{insert:t,from:0,to:this._view.state.doc.length}})),this._view.dispatch({effects:[f.of(this._addressToLineMap),l.gR.of(e)]})}setTimings(s){this._addressTimings=s;const e=g(this._addressTimings,this._addressToLineMap);this._view.dispatch({effects:l.gR.of(e)})}scrollToLine(s){s=a()(s,1,this._view.state.doc.lines);const e=this._view.state.doc.line(s).from;this._view.dispatch({effects:n.tk.scrollIntoView(e,{y:"start",yMargin:0})}),this._view.coordsAtPos(0)}scrollToAddress(s){const e=this._addressToLineMap.addressToLine(s);null!==e&&this.scrollToLine(e)}scrollToAddressWithSpaceOnTop(s,e){const t=this._addressToLineMap.addressToLine(s);null!==t&&this.scrollToLine(t-e)}}},2265:(s,e,t)=>{t.d(e,{cW:()=>h,gR:()=>a,l$:()=>_});var n=t(2864),i=t(8120),o=t(6093);const r=new class extends n.SJ{constructor(...s){super(...s),this.elementClass="cm-nonZeroLine"}},d=n.p.line({class:"cm-nonZeroLine"}),a=i.Py.define(),c=i.QQ.define({create:()=>o.KM,update(s,e){let t=s;for(const s of e.effects)s.is(a)&&(t=s.value);return t}});function l(s){const e=s.field(c),t=new Set;for(const s of e.totalLineHits.keys())t.add(s);for(const s of e.selfLineHits.keys())t.add(s);const n=s.doc.lines,i=[...t].filter((s=>s<=n)).map((e=>s.doc.line(e).from));return i.sort(((s,e)=>s-e)),i}const f=n.v7.compute(["doc",c],(s=>{const e=l(s);return i.Xs.of(e.map((s=>r.range(s))))})),u=n.tk.decorations.compute(["doc",c],(s=>{const e=l(s);return i.Xs.of(e.map((s=>d.range(s))))}));class h extends n.SJ{constructor(s){super(),this._s=void 0,this._s=s}toDOM(){return document.createTextNode(this._s)}}const m=(0,n.v5)({class:"cm-total-timings-gutter",lineMarker(s,e){const t=s.state.doc.lineAt(e.from).number,n=s.state.field(c).totalLineHits.get(t);return void 0!==n?new h(n):null},lineMarkerChange:s=>s.transactions.some((s=>s.effects.some((s=>s.is(a)))))}),p=(0,n.v5)({class:"cm-self-timings-gutter",lineMarker(s,e){const t=s.state.doc.lineAt(e.from).number,n=s.state.field(c).selfLineHits.get(t);return void 0!==n?new h(n):null},lineMarkerChange:s=>s.transactions.some((s=>s.effects.some((s=>s.is(a)))))}),_=[c,m,p,f,u]}}]);
2
+ //# sourceMappingURL=308.4d236ce7e6451807cb54.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"308.4d236ce7e6451807cb54.bundle.js","mappings":"2NA8CA,MAAMA,EAA+BC,EAAAA,GAAYC,SAI3CC,EAAwBC,EAAAA,GAAWF,OAAyB,CAChEG,OAAMA,IACG,GAETC,OAAOC,EAAsBC,GAE3B,IAAIC,EAAqBF,EACzB,IAAK,MAAMG,KAAUF,EAAYG,QAC3BD,EAAOE,GAAGZ,KACZS,EAAqBC,EAAOG,OAGhC,OAAOJ,CACT,IAIIK,GAA2BC,EAAAA,EAAAA,IAAO,CACtCC,MAAO,gCAGPC,WAAWC,EAAMC,GACf,MAAMC,EAAaF,EAAKG,MAAMC,IAAIC,OAAOJ,EAAKK,MAAMC,OAE9CC,EADMR,EAAKG,MAAMM,MAAMxB,GACTyB,cAAcR,GAClC,OAAmB,OAAZM,EACH,IAAIG,EAAAA,GAAc,KAAIH,EAAQI,SAAS,O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EACA7G,iBAAiBzB,GAERA,EAAO0B,aAAaC,MAAMC,GAC/BA,EAAEvB,QAAQsB,MAAME,GAAMA,EAAEvB,GAAGoE,SAMpBR,EAAmB,CAC9BkC,EACA8B,EACAG,EACAjB,EACAM,E","sources":["webpack:///./src/components/shared/AssemblyView-codemirror.js","webpack:///./src/utils/codemirror-shared.js"],"sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n// @flow\n\n/**\n * This module wraps all the interaction with the CodeMirror API into a\n * AssemblyViewEditor class.\n *\n * This module is intended to be imported asynchronously, so that all the\n * CodeMirror code can be split into a separate bundle chunk.\n *\n * This file implements the following features:\n * - Display assembly code.\n * - Display a gutter with:\n * - \"Total\" timings for each instruction\n * - \"Self\" timings for each instruction\n * - The address for each instruction\n * - Highlight assembly code lines which have a non-zero timing, by applying\n * a cm-nonZeroLine class to them. This highlight line goes across the entire\n * width of the editor, it covers both the gutter and the main area.\n */\nimport { EditorView, gutter } from '@codemirror/view';\nimport { EditorState, StateField, StateEffect } from '@codemirror/state';\nimport { syntaxHighlighting } from '@codemirror/language';\nimport { classHighlighter } from '@lezer/highlight';\nimport clamp from 'clamp';\n\nimport type {\n AddressTimings,\n Address,\n LineTimings,\n LineNumber,\n NativeSymbolInfo,\n DecodedInstruction,\n} from 'firefox-profiler/types';\n\nimport { bisectionRight } from 'firefox-profiler/utils/bisect';\nimport {\n timingsExtension,\n updateTimingsEffect,\n StringMarker,\n} from 'firefox-profiler/utils/codemirror-shared';\n\n// An \"effect\" is like a redux action. This effect is used to replace the value\n// of the state field addressToLineMapField.\nconst updateAddressToLineMapEffect = StateEffect.define<AddressToLineMap>();\n\n// This \"state field\" stores the current AddressToLineMap. This field allows the\n// instructionAddressGutter to map line numbers to addresses.\nconst addressToLineMapField = StateField.define<AddressToLineMap>({\n create() {\n return [];\n },\n update(instructionAddresses, transaction) {\n // Get the new value from an effect in the transaction.\n let newSortedAddresses = instructionAddresses;\n for (const effect of transaction.effects) {\n if (effect.is(updateAddressToLineMapEffect)) {\n newSortedAddresses = effect.value;\n }\n }\n return newSortedAddresses;\n },\n});\n\n// A gutter which displays the address of each instruction.\nconst instructionAddressGutter = gutter({\n class: 'cm-instruction-address-gutter',\n\n // Returns a gutter marker for this line, or null.\n lineMarker(view, line) {\n const lineNumber = view.state.doc.lineAt(line.from).number;\n const map = view.state.field(addressToLineMapField);\n const address = map.lineToAddress(lineNumber);\n return address !== null\n ? new StringMarker(`0x${address.toString(16)}`)\n : null;\n },\n\n // Returns true if the update affects the instruction addresses in the gutter.\n lineMarkerChange(update) {\n return update.transactions.some((t) =>\n t.effects.some((e) => e.is(updateAddressToLineMapEffect))\n );\n },\n});\n\nfunction instructionsToText(assemblyCode: DecodedInstruction[]): string {\n return assemblyCode.map((instr) => instr.decodedString).join('\\n');\n}\n\n/**\n * This map is used to convert between instruction addresses and editor line\n * numbers.\n */\nclass AddressToLineMap {\n // The address of each instruction. This stays constant for the entire lifetime\n // of this AddressToLineMap instance.\n //\n // _instructionAddresses[0] contains the address of the instruction which is\n // displayed in line 1. (Line numbers are 1-based.)\n //\n // The addresses need to be ordered from low to high, so that the binary search\n // works.\n _instructionAddresses: Address[];\n\n constructor(instructionAddresses) {\n this._instructionAddresses = instructionAddresses;\n }\n\n // Find the line which displays the instruction which covers `address`.\n // `address` doesn't need to be a perfect match for the instruction address;\n // for example, in the example below, address 0x10e4 is mapped to line 3:\n //\n // 1: 0x10da: mov r14, rdi\n // 2: 0x10dd: mov rdi, rsi\n // 3: 0x10e0: call _malloc_usable_size\n // 4: 0x10e5: test rax, rax\n // 5: 0x10e8: je loc_10f6\n addressToLine(address: Address): LineNumber | null {\n const insertionIndex = bisectionRight(this._instructionAddresses, address);\n if (insertionIndex === 0) {\n // address < instructionAddresses[0]\n return null;\n }\n\n const elementIndex = insertionIndex - 1;\n const lineNumber = elementIndex + 1;\n return lineNumber;\n }\n\n // Return the address of the instruction which is displayed in line `lineNumber`.\n lineToAddress(lineNumber: LineNumber): Address | null {\n if (lineNumber < 1 || lineNumber > this._instructionAddresses.length) {\n return null;\n }\n\n const elementIndex = lineNumber - 1;\n return this._instructionAddresses[elementIndex];\n }\n}\n\nfunction getInstructionAddresses(\n assemblyCode: DecodedInstruction[]\n): Address[] {\n return assemblyCode.map((instr) => instr.address);\n}\n\n// Convert AddressTimings to LineTimings with the help of an AddressToLineMap.\nfunction addressTimingsToLineTimings(\n addressTimings: AddressTimings,\n map: AddressToLineMap\n): LineTimings {\n const totalLineHits = new Map();\n for (const [address, hitCount] of addressTimings.totalAddressHits) {\n const line = map.addressToLine(address);\n if (line !== null) {\n const currentHitCount = totalLineHits.get(line) ?? 0;\n totalLineHits.set(line, currentHitCount + hitCount);\n }\n }\n\n const selfLineHits = new Map();\n for (const [address, hitCount] of addressTimings.selfAddressHits) {\n const line = map.addressToLine(address);\n if (line !== null) {\n const currentHitCount = selfLineHits.get(line) ?? 0;\n selfLineHits.set(line, currentHitCount + hitCount);\n }\n }\n\n return { totalLineHits, selfLineHits };\n}\n\nexport class AssemblyViewEditor {\n _view: EditorView;\n _addressToLineMap: AddressToLineMap;\n _addressTimings: AddressTimings;\n\n // Create a CodeMirror editor and add it as a child element of domParent.\n constructor(\n initialAssemblyCode: DecodedInstruction[],\n nativeSymbol: NativeSymbolInfo,\n addressTimings: AddressTimings,\n domParent: Element\n ) {\n this._addressToLineMap = new AddressToLineMap(\n getInstructionAddresses(initialAssemblyCode)\n );\n this._addressTimings = addressTimings;\n let state = EditorState.create({\n doc: instructionsToText(initialAssemblyCode),\n extensions: [\n timingsExtension,\n addressToLineMapField,\n instructionAddressGutter,\n syntaxHighlighting(classHighlighter),\n EditorState.readOnly.of(true),\n EditorView.editable.of(false),\n ],\n });\n const lineTimings = addressTimingsToLineTimings(\n this._addressTimings,\n this._addressToLineMap\n );\n state = state.update({\n effects: [\n updateAddressToLineMapEffect.of(this._addressToLineMap),\n updateTimingsEffect.of(lineTimings),\n ],\n }).state;\n this._view = new EditorView({\n state,\n parent: domParent,\n });\n }\n\n setContents(assemblyCode: DecodedInstruction[]) {\n this._addressToLineMap = new AddressToLineMap(\n getInstructionAddresses(assemblyCode)\n );\n const lineTimings = addressTimingsToLineTimings(\n this._addressTimings,\n this._addressToLineMap\n );\n // The CodeMirror way of replacing the entire contents is to insert new text\n // and overwrite the full range of existing text.\n const text = instructionsToText(assemblyCode);\n this._view.dispatch(\n this._view.state.update({\n changes: {\n insert: text,\n from: 0,\n to: this._view.state.doc.length,\n },\n })\n );\n this._view.dispatch({\n effects: [\n updateAddressToLineMapEffect.of(this._addressToLineMap),\n updateTimingsEffect.of(lineTimings),\n ],\n });\n }\n\n setTimings(addressTimings: AddressTimings) {\n // Update the value of the timings field by dispatching an updateTimingsEffect.\n this._addressTimings = addressTimings;\n const lineTimings = addressTimingsToLineTimings(\n this._addressTimings,\n this._addressToLineMap\n );\n this._view.dispatch({\n effects: updateTimingsEffect.of(lineTimings),\n });\n }\n\n scrollToLine(lineNumber: number) {\n // Clamp the line number to the document's line count.\n lineNumber = clamp(lineNumber, 1, this._view.state.doc.lines);\n\n // Convert the line number into a position.\n const pos = this._view.state.doc.line(lineNumber).from;\n // Dispatch the scroll action.\n this._view.dispatch({\n effects: EditorView.scrollIntoView(pos, { y: 'start', yMargin: 0 }),\n });\n // Trigger a measure flush, to work around\n // https://github.com/codemirror/codemirror.next/issues/676\n this._view.coordsAtPos(0);\n }\n\n scrollToAddress(address: Address) {\n const lineNumber = this._addressToLineMap.addressToLine(address);\n if (lineNumber !== null) {\n this.scrollToLine(lineNumber);\n }\n }\n\n scrollToAddressWithSpaceOnTop(address: Address, topSpaceLines: number) {\n const lineNumber = this._addressToLineMap.addressToLine(address);\n if (lineNumber !== null) {\n this.scrollToLine(lineNumber - topSpaceLines);\n }\n }\n}\n","/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n// @flow\n\nimport {\n EditorView,\n Decoration,\n GutterMarker,\n gutter,\n gutterLineClass,\n} from '@codemirror/view';\nimport {\n EditorState,\n StateField,\n StateEffect,\n RangeSet,\n} from '@codemirror/state';\n\nimport type { LineTimings } from 'firefox-profiler/types';\n\nimport { emptyLineTimings } from 'firefox-profiler/profile-logic/line-timings';\n\n// This gutter marker applies the \"cm-nonZeroLine\" class to gutter elements.\nconst nonZeroLineGutterMarker = new (class extends GutterMarker {\n elementClass = 'cm-nonZeroLine';\n})();\n\n// This \"decoration\" applies the \"cm-nonZeroLine\" class to the line of assembly\n// code in the main editor contents (not the gutter).\nconst nonZeroLineDecoration = Decoration.line({ class: 'cm-nonZeroLine' });\n\n// An \"effect\" is like a redux action. This effect is used to replace the value\n// of the timingsField state field.\nexport const updateTimingsEffect = StateEffect.define<LineTimings>();\n\n// A \"state field\" for the timings.\nconst timingsField = StateField.define<LineTimings>({\n create() {\n return emptyLineTimings;\n },\n update(timings, transaction) {\n // This is like a reducer. Find an updateTimingsEffect in the transaction\n // and set this field to the timings in it.\n let newTimings = timings;\n for (const effect of transaction.effects) {\n if (effect.is(updateTimingsEffect)) {\n newTimings = effect.value;\n }\n }\n return newTimings;\n },\n});\n\n// Finds all lines with non-zero line timings, for the highlight line.\n// The line numbers are then converted into \"positions\", i.e. character offsets\n// in the document, for the start of the line.\n// Then they are sorted, because our caller wants to have a sorted list.\nfunction getSortedStartPositionsOfNonZeroLines(state: EditorState): number[] {\n const timings = state.field(timingsField);\n const nonZeroLines = new Set();\n for (const lineNumber of timings.totalLineHits.keys()) {\n nonZeroLines.add(lineNumber);\n }\n for (const lineNumber of timings.selfLineHits.keys()) {\n nonZeroLines.add(lineNumber);\n }\n const lineCount = state.doc.lines;\n const positions = [...nonZeroLines]\n .filter((l) => l <= lineCount)\n .map((lineNumber) => state.doc.line(lineNumber).from);\n positions.sort((a, b) => a - b);\n return positions;\n}\n\n// This is an \"extension\" which applies the \"cm-nonZeroLine\" class to all gutter\n// elements for lines with non-zero timings. It is like a piece of derived state;\n// it needs to be recomputed whenever one of the input states change. The input\n// states are the editor contents (\"doc\") and the value of the timings field.\n// The editor contents are relevant because the output is expressed in terms of\n// positions, i.e. character offsets from the document start, and those positions\n// need to be updated if the amount of text in a line changes. This happens when\n// we replace the file placeholder content with the actual file content.\nconst nonZeroLineGutterHighlighter = gutterLineClass.compute(\n ['doc', timingsField],\n (state) => {\n const positions = getSortedStartPositionsOfNonZeroLines(state);\n return RangeSet.of(positions.map((p) => nonZeroLineGutterMarker.range(p)));\n }\n);\n\n// Same as the previous extension, but this one is for the main editor. There\n// doesn't seem to be a way to set a class for the entire line, i.e. both the\n// gutter elements and the main editor elements of that line.\nconst nonZeroLineDecorationHighlighter = EditorView.decorations.compute(\n ['doc', timingsField],\n (state) => {\n const positions = getSortedStartPositionsOfNonZeroLines(state);\n return RangeSet.of(positions.map((p) => nonZeroLineDecoration.range(p)));\n }\n);\n\n// This is a \"gutter marker\" which renders just a string and nothing else.\n// It is used for the AddressTimings annotations, i.e. for the numbers in the\n// gutter.\nexport class StringMarker extends GutterMarker {\n _s: string;\n\n constructor(s: string) {\n super();\n this._s = s;\n }\n\n toDOM() {\n return document.createTextNode(this._s);\n }\n}\n\n// The \"extension\" which manages the elements in the gutter for the \"total\"\n// column.\nconst totalTimingsGutter = gutter({\n class: 'cm-total-timings-gutter',\n lineMarker(view, line) {\n // Return a gutter marker for this line, or null.\n const lineNumber = view.state.doc.lineAt(line.from).number;\n const timings = view.state.field(timingsField);\n const totalTime = timings.totalLineHits.get(lineNumber);\n return totalTime !== undefined ? new StringMarker(totalTime) : null;\n },\n lineMarkerChange(update) {\n // Return true if the update affects the total timings in the gutter.\n return update.transactions.some((t) =>\n t.effects.some((e) => e.is(updateTimingsEffect))\n );\n },\n});\n\n// The \"extension\" which manages the elements in the gutter for the \"self\"\n// column.\nconst selfTimingsGutter = gutter({\n class: 'cm-self-timings-gutter',\n lineMarker(view, line) {\n // Return a gutter marker for this line, or null.\n const lineNumber = view.state.doc.lineAt(line.from).number;\n const timings = view.state.field(timingsField);\n const selfTime = timings.selfLineHits.get(lineNumber);\n return selfTime !== undefined ? new StringMarker(selfTime) : null;\n },\n lineMarkerChange(update) {\n // Return true if the update affects the self timings in the gutter.\n return update.transactions.some((t) =>\n t.effects.some((e) => e.is(updateTimingsEffect))\n );\n },\n});\n\n// All extensions which have to do with timings, grouped into one extension.\nexport const timingsExtension = [\n timingsField,\n totalTimingsGutter,\n selfTimingsGutter,\n nonZeroLineGutterHighlighter,\n nonZeroLineDecorationHighlighter,\n];\n"],"names":["updateAddressToLineMapEffect","StateEffect","define","addressToLineMapField","StateField","create","update","instructionAddresses","transaction","newSortedAddresses","effect","effects","is","value","instructionAddressGutter","gutter","class","lineMarker","view","line","lineNumber","state","doc","lineAt","from","number","address","field","lineToAddress","StringMarker","toString","lineMarkerChange","transactions","some","t","e","instructionsToText","assemblyCode","map","instr","decodedString","join","AddressToLineMap","constructor","_instructionAddresses","this","addressToLine","insertionIndex","bisectionRight","length","elementIndex","getInstructionAddresses","addressTimingsToLineTimings","addressTimings","totalLineHits","Map","hitCount","totalAddressHits","currentHitCount","get","set","selfLineHits","selfAddressHits","AssemblyViewEditor","initialAssemblyCode","nativeSymbol","domParent","_view","_addressToLineMap","_addressTimings","EditorState","extensions","timingsExtension","syntaxHighlighting","classHighlighter","readOnly","of","EditorView","editable","lineTimings","updateTimingsEffect","parent","setContents","text","dispatch","changes","insert","to","setTimings","scrollToLine","clamp","lines","pos","scrollIntoView","y","yMargin","coordsAtPos","scrollToAddress","scrollToAddressWithSpaceOnTop","topSpaceLines","nonZeroLineGutterMarker","GutterMarker","args","elementClass","nonZeroLineDecoration","Decoration","timingsField","emptyLineTimings","timings","newTimings","getSortedStartPositionsOfNonZeroLines","nonZeroLines","Set","keys","add","lineCount","positions","filter","l","sort","a","b","nonZeroLineGutterHighlighter","gutterLineClass","compute","RangeSet","p","range","nonZeroLineDecorationHighlighter","decorations","s","super","_s","toDOM","document","createTextNode","totalTimingsGutter","totalTime","undefined","selfTimingsGutter","selfTime"],"sourceRoot":""}
@@ -0,0 +1,4 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm0 2c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zm1-14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-1 3a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1z" fill="#0C0C0D" fill-opacity=".8"></path></svg>
@@ -0,0 +1,10 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16px" height="16px" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
5
+ <g>
6
+ <rect id="range" x="13" width="3" height="16" ry="0" fill="#b1b1b3"/>
7
+ <rect id="range-border" x="12" width="1" height="16" fill="#737373"/>
8
+ <rect id="marker" x="3.5" y="5.5" width="9" height="5" ry="0" fill="#fff" stroke="#0c0c0d"/>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,6 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" fill="#d70022">
5
+ <path fill-rule="evenodd" d="M12 6A6 6 0 1 1 0 6a6 6 0 0 1 12 0zM5.75 8a.75.75 0 0 0-.75.75v.5c0 .41.34.75.75.75h.5c.41 0 .75-.34.75-.75v-.5A.75.75 0 0 0 6.25 8h-.5zM5 6c0 .54.46 1 1 1s1-.46 1-1V3.15c0-.54-.46-1-1-1s-1 .46-1 1V6z"/>
6
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
6
+ <g fill="rgba(12, 12, 13, .8)" fill-rule="nonzero">
7
+ <path d="M6.00026517,2.46439017 C6.41447873,2.46439017 6.75026517,2.8001766 6.75026517,3.21439017 L6.75026517,8.78614017 C6.75026517,9.20035373 6.41447873,9.53614017 6.00026517,9.53614017 C5.5860516,9.53614017 5.25026517,9.20035373 5.25026517,8.78614017 L5.25026517,3.21439017 C5.25026517,2.8001766 5.5860516,2.46439017 6.00026517,2.46439017 Z" id="Rectangle" transform="translate(6.000265, 6.000265) rotate(-45.000000) translate(-6.000265, -6.000265) "></path>
8
+ <path d="M1.7655,3.3915 L3.36375,1.7925 C3.43419143,1.72127641 3.53020117,1.681197 3.630375,1.681197 C3.73054883,1.681197 3.82655857,1.72127641 3.897,1.7925 L6.2895,4.185 L6.3,4.17375 C6.8820826,3.5886064 6.8820826,2.6431436 6.3,2.058 L4.704,0.462 C4.1188564,-0.120082601 3.1733936,-0.120082601 2.58825,0.462 L0.462,2.58825 C-0.120082601,3.1733936 -0.120082601,4.1188564 0.462,4.704 L2.058,6.3 C2.63599902,6.87871134 3.57179308,6.88539558 4.158,6.315 L1.7655,3.9255 C1.69404449,3.85503006 1.6538173,3.75885887 1.6538173,3.6585 C1.6538173,3.55814113 1.69404449,3.46196994 1.7655,3.3915 Z M11.562,7.31925 L9.96525,5.7225 C9.3801064,5.1404174 8.4346436,5.1404174 7.8495,5.7225 L7.83825,5.73375 L10.23,8.1255 C10.3012236,8.19594143 10.341303,8.29195117 10.341303,8.392125 C10.341303,8.49229883 10.3012236,8.58830857 10.23,8.65875 L8.631,10.25775 C8.56055857,10.3289736 8.46454883,10.369053 8.364375,10.369053 C8.26420117,10.369053 8.16819143,10.3289736 8.09775,10.25775 L5.7075,7.8675 C5.13710442,8.45370692 5.14378866,9.38950098 5.7225,9.9675 L7.3185,11.5635 C7.9036436,12.1455826 8.8491064,12.1455826 9.43425,11.5635 L11.5605,9.43725 C12.1444911,8.85225876 12.1451619,7.90506784 11.562,7.31925 L11.562,7.31925 Z"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Apple icon</title><path d="M7.078 23.55c-.473-.316-.893-.703-1.244-1.15-.383-.463-.738-.95-1.064-1.454-.766-1.12-1.365-2.345-1.78-3.636-.5-1.502-.743-2.94-.743-4.347 0-1.57.34-2.94 1.002-4.09.49-.9 1.22-1.653 2.1-2.182.85-.53 1.84-.82 2.84-.84.35 0 .73.05 1.13.15.29.08.64.21 1.07.37.55.21.85.34.95.37.32.12.59.17.8.17.16 0 .39-.05.645-.13.145-.05.42-.14.81-.31.386-.14.692-.26.935-.35.37-.11.728-.21 1.05-.26.39-.06.777-.08 1.148-.05.71.05 1.36.2 1.94.42 1.02.41 1.843 1.05 2.457 1.96-.26.16-.5.346-.725.55-.487.43-.9.94-1.23 1.505-.43.77-.65 1.64-.644 2.52.015 1.083.29 2.035.84 2.86.387.6.904 1.114 1.534 1.536.31.21.582.355.84.45-.12.375-.252.74-.405 1.1-.347.807-.76 1.58-1.25 2.31-.432.63-.772 1.1-1.03 1.41-.402.48-.79.84-1.18 1.097-.43.285-.935.436-1.452.436-.35.015-.7-.03-1.034-.127-.29-.095-.576-.202-.856-.323-.293-.134-.596-.248-.905-.34-.38-.1-.77-.148-1.164-.147-.4 0-.79.05-1.16.145-.31.088-.61.196-.907.325-.42.175-.695.29-.855.34-.324.096-.656.154-.99.175-.52 0-1.004-.15-1.486-.45zm6.854-18.46c-.68.34-1.326.484-1.973.436-.1-.646 0-1.31.27-2.037.24-.62.56-1.18 1-1.68.46-.52 1.01-.95 1.63-1.26.66-.34 1.29-.52 1.89-.55.08.68 0 1.35-.25 2.07-.228.64-.568 1.23-1 1.76-.435.52-.975.95-1.586 1.26z"/></svg>
@@ -0,0 +1,6 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
5
+ <path fill="#0060df" d="M8 1a7 7 0 1 0 7 7 7.008 7.008 0 0 0-7-7zm0 13a6 6 0 1 1 6-6 6.007 6.007 0 0 1-6 6zM8 3.125A2.7 2.7 0 0 0 5.125 6a.875.875 0 0 0 1.75 0c0-1 .6-1.125 1.125-1.125a1.105 1.105 0 0 1 1.13.744.894.894 0 0 1-.53 1.016A2.738 2.738 0 0 0 7.125 9v.337a.875.875 0 0 0 1.75 0v-.37a1.041 1.041 0 0 1 .609-.824A2.637 2.637 0 0 0 10.82 5.16 2.838 2.838 0 0 0 8 3.125zm0 7.625A1.25 1.25 0 1 0 9.25 12 1.25 1.25 0 0 0 8 10.75z"></path>
6
+ </svg>
@@ -0,0 +1,7 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="#0b0b0b">
5
+ <path fill-opacity=".3" d="M4 13H2V3h2v10zm7-6.9v3.8L8 8l3-1.9z"></path>
6
+ <path d="M2 14h12c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1H2c-.6 0-1 .4-1 1v10c0 .6.4 1 1 1zM14 3v10H5V3h9zM2 3h2v10H2V3zm5.5 5.8l3 1.9c1 .6 1.5.3 1.5-.8V6.1c0-1.1-.6-1.4-1.5-.8l-3 1.9c-1 .5-1 1 0 1.6zM11 6.1v3.8L8 8l3-1.9z"></path>
7
+ </svg>
Binary file
@@ -0,0 +1,13 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="m14 1a1 1 0 1 0 1 1 1 1 0 0 0-1-1z" fill="#0c0c0d" fill-opacity=".53333"/>
6
+ <path d="m11 1h-9a1 1 0 0 0 0 2h9a1 1 0 0 0 0-2z" fill="#0c0c0d" fill-opacity=".8"/>
7
+ <path d="m11 9a1 1 0 1 0 1 1 1 1 0 0 0-1-1z" fill="#0c0c0d" fill-opacity=".53333"/>
8
+ <path d="m8 9h-6a1 1 0 0 0 0 2h6a1 1 0 0 0 0-2z" fill="#0c0c0d" fill-opacity=".8"/>
9
+ <path d="m8 5a1 1 0 1 0 1 1 1 1 0 0 0-1-1z" fill="#0c0c0d" fill-opacity=".53333"/>
10
+ <path d="m5 5h-3a1 1 0 0 0 0 2h3a1 1 0 0 0 0-2z" fill="#0c0c0d" fill-opacity=".8"/>
11
+ <path d="m14 13a1 1 0 1 0 1 1 1 1 0 0 0-1-1z" fill="#0c0c0d" fill-opacity=".53333"/>
12
+ <path d="m11 13h-9a1 1 0 0 0 0 2h9a1 1 0 0 0 0-2z" fill="#0c0c0d" fill-opacity=".8"/>
13
+ </svg>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
6
+ <g>
7
+ <g transform="translate(3, 8) rotate(-45)" fill="#000">
8
+ <rect x="0" y="0" width="7" height="2"></rect>
9
+ <rect x="0" y="0" width="2" height="7"></rect>
10
+ </g>
11
+ <rect fill="#000" x="5" y="7" width="8" height="2"></rect>
12
+ </g>
13
+ </svg>
Binary file
@@ -0,0 +1,4 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="rgba(12, 12, 13, .8)" d="M9.061 8l3.47-3.47a.75.75 0 0 0-1.061-1.06L8 6.939 4.53 3.47a.75.75 0 1 0-1.06 1.06L6.939 8 3.47 11.47a.75.75 0 1 0 1.06 1.06L8 9.061l3.47 3.47a.75.75 0 0 0 1.06-1.061z"></path></svg>
@@ -0,0 +1,4 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="rgba(12, 12, 13, .8)" d="M8 0a8 8 0 1 0 8 8 8.009 8.009 0 0 0-8-8zm5.163 4.958h-1.552a7.7 7.7 0 0 0-1.051-2.376 6.03 6.03 0 0 1 2.603 2.376zM14 8a5.963 5.963 0 0 1-.335 1.958h-1.821A12.327 12.327 0 0 0 12 8a12.327 12.327 0 0 0-.156-1.958h1.821A5.963 5.963 0 0 1 14 8zm-6 6c-1.075 0-2.037-1.2-2.567-2.958h5.135C10.037 12.8 9.075 14 8 14zM5.174 9.958a11.084 11.084 0 0 1 0-3.916h5.651A11.114 11.114 0 0 1 11 8a11.114 11.114 0 0 1-.174 1.958zM2 8a5.963 5.963 0 0 1 .335-1.958h1.821a12.361 12.361 0 0 0 0 3.916H2.335A5.963 5.963 0 0 1 2 8zm6-6c1.075 0 2.037 1.2 2.567 2.958H5.433C5.963 3.2 6.925 2 8 2zm-2.56.582a7.7 7.7 0 0 0-1.051 2.376H2.837A6.03 6.03 0 0 1 5.44 2.582zm-2.6 8.46h1.549a7.7 7.7 0 0 0 1.051 2.376 6.03 6.03 0 0 1-2.603-2.376zm7.723 2.376a7.7 7.7 0 0 0 1.051-2.376h1.552a6.03 6.03 0 0 1-2.606 2.376z"></path></svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
2
+ <path d="M6.52,12.5a1,1,0,0,1-.705-.291l-3.52-3.5a1,1,0,1,1,1.41-1.418l2.812,2.8,5.774-5.793a1,1,0,0,1,1.416,1.412l-6.479,6.5A1,1,0,0,1,6.52,12.5Z" fill="#fff"/>
3
+ </svg>
@@ -0,0 +1,12 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
5
+ <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6
+ <circle fill="#000000" cx="3" cy="3" r="2"></circle>
7
+ <circle fill="#000000" cx="13" cy="13" r="2"></circle>
8
+ <path d="M12.5,12.5 L9.5,9.5" stroke="#000000" stroke-linecap="square"></path>
9
+ <circle stroke="#0A0A0A" cx="8" cy="8" r="1.5"></circle>
10
+ <path d="M6.5,6.5 L3.5,3.5" stroke="#000000" stroke-linecap="square"></path>
11
+ </g>
12
+ </svg>
@@ -0,0 +1,4 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="rgba(12, 12, 13, .8)" d="M14.707 8.293l-3-3A1 1 0 0 0 11 5h-1V4a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 6 0H3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3v3a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V9a1 1 0 0 0-.293-.707zM12.586 9H11V7.414zm-5-5H6V2.414zM6 7v2H3V2h2v2.5a.5.5 0 0 0 .5.5H8a2 2 0 0 0-2 2zm2 7V7h2v2.5a.5.5 0 0 0 .5.5H13v4z"></path></svg>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
6
+ <path
7
+ d="M2.82536496,4.3002101 L2.73255082,4.72363915 L2.31932038,4.8545866 C1.39257067,5.14826175 0.75,6.01210962 0.75,7 C0.75,8.24264069 1.75735931,9.25 3,9.25 L9.5,9.25 C10.4664983,9.25 11.25,8.46649831 11.25,7.5 C11.25,6.66399038 10.6589245,5.94895398 9.85058754,5.78497571 L9.24215446,5.66154972 L9.2497507,5.0407703 C9.24995835,5.02040899 9.24995835,5.02040899 9.25,5 C9.25,3.20507456 7.79492544,1.75 6,1.75 C4.46584561,1.75 3.14943679,2.82175618 2.82536496,4.3002101 Z"
8
+ stroke="rgba(12, 12, 13, .8)"
9
+ stroke-width="1.5"
10
+ fill="none"
11
+ fill-rule="evenodd">
12
+ </path>
13
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
2
+ <circle cx="6.5" cy="6.4" r="3" fill="#fff"/>
3
+ </svg>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11" height="11" viewBox="0 0 11 11">
6
+ <style>
7
+ circle {
8
+ fill: none;
9
+ }
10
+
11
+ circle, line {
12
+ stroke: rgba(0,0,0,0.65);
13
+ stroke-width: 0.8px;
14
+ }
15
+ </style>
16
+
17
+ <circle cx="4.65" cy="4.15" r="3.85"/>
18
+ <line x1="7.5" y1="7" x2="10.5" y2="10"/>
19
+ </svg>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
3
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
5
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
6
+ width="64" height="64" viewBox="0 0 64 64">
7
+ <defs>
8
+ <style>
9
+ .style-puzzle-piece {
10
+ fill: url('#gradient-linear-puzzle-piece');
11
+ }
12
+ </style>
13
+ <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">
14
+ <stop offset="0%" stop-color="#66cc52" stop-opacity="1"/>
15
+ <stop offset="100%" stop-color="#60bf4c" stop-opacity="1"/>
16
+ </linearGradient>
17
+ </defs>
18
+ <path class="style-puzzle-piece" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/>
19
+ </svg>
@@ -0,0 +1,6 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="context-fill">
5
+ <path d="M8.71 3.29l-3-3a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21l-3 3a1 1 0 0 0 1.42 1.42L4 3.41V9a1 1 0 0 0 2 0V3.41l1.29 1.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zm6 8a1 1 0 0 0-1.42 0L12 12.59V7a1 1 0 0 0-2 0v5.59l-1.29-1.3a1 1 0 1 0-1.42 1.42l3 3a1 1 0 0 0 .33.21.94.94 0 0 0 .76 0 1 1 0 0 0 .33-.21l3-3a1 1 0 0 0 0-1.42z"></path>
6
+ </svg>
@@ -0,0 +1,7 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#0b0b0b">
5
+ <path fill-opacity=".3" d="M6.6 8.4c0-.6-1.7.3-1.7-.3 0-.4-1.7-2.7-1.7-2.7H13s-1.8 2-1.8 2.7c0 .3-2.1-.1-2.1.3v6.1H7s-.4-4.1-.4-6.1z"></path>
6
+ <path d="M2 2v2.3L4.7 9H6v5.4l2.1 1 1.8-.9V9h1.3L14 4.3V2H2zm11 2l-2.2 4H9v5.8l-.9.4-1.1-.5V8H5.2L3 4V3h10v1z"></path>
7
+ </svg>
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Linux icon</title><path d="M12.503 0c-.155 0-.315.008-.479.021-4.227.333-3.106 4.807-3.17 6.298-.077 1.093-.3 1.954-1.051 3.021-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489-.039.034-.076.068-.111.135-.26.268-.449.601-.662.839-.199.199-.485.267-.797.4-.313.136-.658.269-.864.681-.09.188-.136.393-.132.601 0 .199.027.401.055.536.058.399.116.729.039.97-.248.68-.279 1.146-.105 1.485.174.334.535.469.939.601.811.2 1.91.135 2.775.599.926.467 1.866.671 2.616.47.526-.115.97-.463 1.208-.945.587-.003 1.23-.269 2.26-.334.699-.058 1.574.267 2.578.199.025.135.063.199.114.334l.003.003c.391.778 1.113 1.132 1.884 1.071.771-.06 1.592-.536 2.257-1.306.631-.765 1.683-1.084 2.378-1.503.348-.199.629-.469.649-.853.023-.4-.199-.812-.714-1.377v-.097l-.003-.003c-.17-.2-.25-.535-.338-.926-.085-.401-.182-.786-.492-1.046h-.003c-.059-.054-.123-.067-.188-.135-.056-.038-.121-.062-.19-.064.431-1.278.264-2.55-.173-3.694-.533-1.41-1.465-2.638-2.175-3.483-.796-1.005-1.576-1.957-1.561-3.369.027-2.152.237-6.133-3.544-6.139zm.529 3.405h.013c.213 0 .396.062.584.198.191.135.33.332.439.533.105.259.158.459.166.724 0-.02.006-.04.006-.059v.104c-.002-.007-.004-.015-.004-.021l-.004-.024c-.002.243-.053.483-.15.706-.047.125-.119.24-.213.335-.029-.016-.057-.03-.088-.042-.105-.045-.199-.064-.285-.133-.071-.028-.145-.051-.219-.066.049-.059.145-.133.182-.198.053-.128.082-.264.088-.402v-.019c.002-.135-.018-.271-.061-.4-.045-.135-.101-.201-.183-.334-.084-.066-.167-.132-.267-.132h-.016c-.093 0-.176.03-.262.132-.095.094-.166.207-.205.334-.053.127-.084.264-.09.4v.019c.002.089.008.179.02.267-.193-.067-.438-.135-.607-.202-.01-.065-.016-.132-.018-.199v-.02c-.008-.264.043-.526.15-.769.082-.219.232-.406.43-.533.171-.129.379-.199.594-.199zm-2.962.059h.036c.142 0 .27.048.399.135.146.129.264.288.344.465.09.199.141.401.153.667v.004c.007.134.006.201-.002.266v.08c-.03.007-.056.018-.083.024-.152.055-.274.135-.393.2.012-.089.013-.179.003-.267v-.015c-.012-.133-.039-.199-.082-.333-.031-.102-.088-.193-.166-.267-.049-.045-.115-.068-.183-.064h-.021c-.071.006-.13.041-.186.132-.064.077-.105.171-.12.27-.027.108-.035.219-.023.331v.014c.012.135.037.201.081.334.045.134.097.2.165.268.011.009.021.018.034.024-.07.057-.117.07-.176.136-.037.028-.08.06-.131.068-.104-.125-.196-.26-.275-.402-.096-.21-.146-.438-.155-.667-.017-.226.011-.452.08-.668.055-.197.152-.379.283-.535.128-.133.26-.2.418-.2zm1.371 1.706c.331 0 .732.065 1.215.399.293.2.523.269 1.053.468h.003c.255.136.405.266.478.399v-.131c.073.147.078.318.016.47-.123.311-.516.644-1.064.843v.002c-.268.135-.501.333-.775.465-.276.135-.588.292-1.012.267-.152.008-.305-.015-.448-.067-.11-.06-.218-.126-.322-.198-.195-.135-.363-.332-.612-.465v-.005h-.005c-.4-.246-.616-.512-.686-.711-.069-.268-.005-.469.193-.6.224-.135.38-.271.483-.336.104-.074.143-.102.176-.131h.002v-.003c.169-.202.436-.469.839-.601.139-.036.294-.065.466-.065zm2.799 2.143c.359 1.417 1.197 3.475 1.736 4.473.286.534.855 1.659 1.102 3.024.156-.005.329.018.513.064.646-1.671-.546-3.467-1.089-3.966-.221-.201-.232-.335-.123-.335.589.534 1.365 1.572 1.646 2.757.129.535.159 1.104.021 1.67.067.028.135.061.205.067 1.032.534 1.413.938 1.23 1.537v-.043c-.061-.003-.12 0-.181 0h-.015c.151-.467-.182-.825-1.065-1.224-.915-.4-1.646-.336-1.771.465-.007.043-.012.066-.017.135-.068.023-.139.053-.209.064-.43.268-.662.669-.793 1.187-.13.533-.17 1.156-.205 1.869v.003c-.021.334-.171.838-.319 1.351-1.5 1.072-3.58 1.538-5.349.334-.111-.193-.246-.374-.402-.533-.074-.125-.168-.237-.275-.334.182 0 .338-.029.465-.067.145-.067.257-.188.314-.334.108-.267 0-.697-.345-1.163-.345-.467-.931-.995-1.788-1.521-.63-.399-.986-.87-1.15-1.396-.165-.534-.143-1.085-.015-1.645.245-1.07.873-2.11 1.274-2.763.107-.065.037.135-.408.974-.396.751-1.141 2.497-.122 3.854.038-.989.258-1.965.647-2.876.564-1.278 1.743-3.504 1.836-5.268.048.036.217.135.289.202.218.133.38.333.59.465.211.201.477.335.876.335.039.003.075.006.111.006.411 0 .729-.134.996-.268.29-.134.521-.334.74-.4h.005c.467-.135.836-.402 1.045-.7zm2.186 8.958c.037.601.343 1.245.882 1.377.588.134 1.434-.333 1.791-.765l.211-.009c.315-.008.577.01.847.267l.003.003c.208.199.305.531.391.876.085.401.154.78.409 1.066.486.527.645.906.636 1.14l.003-.006v.018l-.003-.012c-.015.262-.185.396-.498.595-.63.401-1.746.712-2.457 1.57-.618.737-1.371 1.139-2.036 1.191-.664.053-1.237-.2-1.574-.898l-.005-.003c-.21-.401-.12-1.025.056-1.69.176-.668.428-1.345.463-1.898.037-.714.076-1.335.195-1.814.12-.465.308-.797.641-.984l.045-.022zm-10.815.049h.01c.053 0 .105.005.157.014.376.055.706.333 1.023.752l.91 1.664.003.003c.243.533.754 1.064 1.189 1.638.434.598.77 1.131.729 1.57v.006c-.057.744-.479 1.148-1.125 1.294-.645.135-1.52.002-2.395-.464-.968-.536-2.118-.469-2.857-.602-.369-.066-.611-.201-.723-.401-.111-.199-.113-.601.123-1.23v-.003l.002-.003c.117-.334.03-.753-.027-1.119-.055-.401-.083-.709.043-.94.16-.334.396-.399.689-.533.295-.135.641-.202.916-.469h.002v-.003c.256-.268.445-.601.668-.838.19-.201.38-.336.663-.336zm7.159-9.074c-.435.201-.945.535-1.488.535-.542 0-.97-.267-1.279-.466-.155-.134-.28-.268-.374-.335-.164-.134-.144-.334-.074-.334.109.016.129.135.199.201.096.066.215.199.361.333.291.2.68.467 1.166.467.485 0 1.053-.267 1.398-.466.195-.135.445-.334.648-.467.156-.137.149-.268.279-.268.129.016.034.134-.147.333-.181.135-.461.335-.69.468v-.001zm-1.082-1.584V5.64c-.006-.019.013-.042.029-.05.074-.043.18-.027.26.004.063 0 .16.067.15.135-.006.049-.085.066-.135.066-.055 0-.092-.043-.141-.068-.052-.018-.146-.008-.163-.065zm-.551 0c-.02.058-.113.049-.166.066-.047.025-.086.068-.139.068-.051 0-.131-.019-.137-.068-.009-.066.088-.133.15-.133.081-.031.184-.047.259-.005.019.009.036.03.03.05v.021h.003z"/></svg>
@@ -0,0 +1,12 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg"
5
+ xmlns:xlink="http://www.w3.org/1999/xlink"
6
+ width="20" height="20" viewBox="0 0 80 80">
7
+ <g stroke="black" stroke-width="5" fill="none">
8
+ <circle cx="33" cy="33" r="20"/>
9
+ <line x1="23" x2="43" y1="33" y2="33"/>
10
+ <line y1="23" y2="43" x1="33" x2="33"/>
11
+ <line x1="49" y1="49" x2="65" y2="65" stroke-width="10" stroke-linecap="round"/>
12
+ </g></svg>
@@ -0,0 +1,15 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ viewBox="0 0 12 12"
7
+ height="12"
8
+ width="12">
9
+ <path
10
+ d="M 3.8590613,1.0001427 H 3.144796 A 2.142796,2.142796 0 0 0 1.002,3.1429387 V 8.857061 a 2.142796,2.142796 0 0 0 2.142796,2.142796 H 8.858919 A 2.142796,2.142796 0 0 0 11.001715,8.857061 V 8.142796 a 0.7142655,0.7142655 0 0 0 -1.428531,0 V 8.857061 A 0.71426533,0.71426533 0 0 1 8.858919,9.571327 H 3.144796 A 0.71426533,0.71426533 0 0 1 2.4305307,8.857061 V 3.1429387 A 0.71426533,0.71426533 0 0 1 3.144796,2.4286734 h 0.7142653 a 0.71426535,0.71426535 0 1 0 0,-1.4285307 z"
11
+ fill="rgba(12, 12, 13, .8)" />
12
+ <path
13
+ d="M 10.955287,1.4415587 A 0.71426533,0.71426533 0 0 0 10.29602,1.0001427 H 6.7246938 a 0.71426535,0.71426535 0 1 0 0,1.4285307 H 8.571784 L 6.2197082,4.7807491 A 0.71441004,0.71441004 0 1 0 7.2303936,5.7907203 L 9.582469,3.4386445 v 1.8470902 a 0.7142655,0.7142655 0 1 0 1.428531,0 V 1.714408 A 0.71426533,0.71426533 0 0 0 10.956,1.4415587 Z"
14
+ fill="rgba(12, 12, 13, .8)" />
15
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
2
+ <path d="M5.52,9.5 C5.25578464,9.4999449 5.00232869,9.3953269 4.815,9.209 L2.295,6.709 C2.03443209,6.45863981 1.92920015,6.08718015 2.01973935,5.73735375 C2.11027856,5.38752735 2.3825034,5.11375796 2.73181196,5.021241 C3.08112053,4.92872405 3.45316961,5.03185272 3.705,5.291 L5.517,7.091 L9.291,3.298 C9.6828367,2.91843498 10.3065809,2.92295488 10.6928758,3.30815854 C11.0791707,3.6933622 11.0854551,4.31709114 10.707,4.71 L6.228,9.21 C6.0397717,9.3966949 5.78511106,9.5010051 5.52,9.5 Z" fill="#fff"/>
3
+ </svg>
@@ -0,0 +1,7 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="#0b0b0b">
5
+ <path fill-opacity=".3" d="M12 3h2v10h-2V3zM5 9.9V6.1L8 8 5 9.9z"></path>
6
+ <path d="M14 2H2c-.6 0-1 .4-1 1v10c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1zM2 13V3h9v10H2zm12 0h-2V3h2v10zM8.5 7.2l-3-1.9C4.6 4.7 4 5 4 6.1v3.8c0 1.1.6 1.4 1.5.8l3-1.9c1-.5 1-1 0-1.6zM5 9.9V6.1L8 8 5 9.9z"></path>
7
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
2
+ <circle cx="8" cy="8" r="4" fill="#fff"/>
3
+ </svg>