Greasy Fork is available in English.

tampermonkey-emoji-commit-github

to commit with emoji !!! !!!

  1. // ==UserScript==
  2. // @name tampermonkey-emoji-commit-github
  3. // @namespace https://github.com/cumtflyingstudio/tampermonkey-emoji-commit-github
  4. // @version 1.2
  5. // @description to commit with emoji !!! !!!
  6. // @author SoonIter
  7. // @match https://github.com/**
  8. // @icon data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBhcmlhLWhpZGRlbj0idHJ1ZSIgcm9sZT0iaW1nIiBjbGFzcz0iaWNvbmlmeSBpY29uaWZ5LS1iaSIgd2lkdGg9IjFlbSIgaGVpZ2h0PSIxZW0iIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi40OTMgMTMuMzY4YTcgNyAwIDEgMSAyLjQ4OS00Ljg1OGMuMzQ0LjAzMy42OC4xNDcuOTc1LjMyOGE4IDggMCAxIDAtMi42NTQgNS4xNTJhOC41OCA4LjU4IDAgMCAxLS44MS0uNjIyWm0tMy43MzEtMy4yMmExMyAxMyAwIDAgMC0xLjEwNy4zMThhLjUuNSAwIDEgMS0uMzEtLjk1Yy4zOC0uMTI1LjgwMi0uMjU0IDEuMTkyLS4zNDNjLjM3LS4wODYuNzgtLjE1MyAxLjEwMy0uMTA4Yy4xNi4wMjIuMzk0LjA4NS41NjEuMjg2Yy4xODguMjI2LjE4Ny40OTcuMTMxLjcwNWExLjg5MiAxLjg5MiAwIDAgMS0uMzEuNTkzYy0uMDc3LjEwNy0uMTY4LjIyLS4yNzUuMzQzYy4xMDcuMTI0LjE5OS4yNC4yNzYuMzQ3Yy4xNDIuMTk3LjI1Ni4zOTcuMzEuNTk1Yy4wNTUuMjA4LjA1Ni40NzktLjEzMi43MDZjLS4xNjguMi0uNDA0LjI2Mi0uNTYzLjI4NGMtLjMyMy4wNDMtLjczMy0uMDI3LTEuMTAyLS4xMTNhMTQuODcgMTQuODcgMCAwIDEtMS4xOTEtLjM0NWEuNS41IDAgMSAxIC4zMS0uOTVjLjM3MS4xMi43NjEuMjQgMS4xMDkuMzIxYy4xNzYuMDQxLjMyNS4wNjkuNDQ2LjA4NGE1LjYwOSA1LjYwOSAwIDAgMC0uNTAyLS41ODRhLjUuNSAwIDAgMSAuMDAyLS42OTVhNS41MiA1LjUyIDAgMCAwIC41LS41NzdhNC40NjUgNC40NjUgMCAwIDAtLjQ0OC4wODJabS43NjYtLjA4N2wtLjAwMy0uMDAxbC0uMDAzLS4wMDFjLjAwNCAwIC4wMDYuMDAyLjAwNi4wMDJabS4wMDIgMS44NjdsLS4wMDYuMDAxYS4wMzguMDM4IDAgMCAxIC4wMDYtLjAwMlpNNiA4Yy41NTIgMCAxLS42NzIgMS0xLjVTNi41NTIgNSA2IDVzLTEgLjY3Mi0xIDEuNVM1LjQ0OCA4IDYgOFptMi43NTctLjU2M2EuNS41IDAgMCAwIC42OC0uMTk0YS45MzQuOTM0IDAgMCAxIC44MTMtLjQ5M2MuMzM5IDAgLjY0NS4xOS44MTMuNDkzYS41LjUgMCAwIDAgLjg3NC0uNDg2QTEuOTM0IDEuOTM0IDAgMCAwIDEwLjI1IDUuNzVjLS43MyAwLTEuMzU2LjQxMi0xLjY4NyAxLjAwN2EuNS41IDAgMCAwIC4xOTQuNjhaTTE0IDkuODI4YzEuMTEtMS4xNCAzLjg4NC44NTYgMCAzLjQyMmMtMy44ODQtMi41NjYtMS4xMS00LjU2MiAwLTMuNDIxWiI+PC9wYXRoPjwvc3ZnPg==
  9.  
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13. (function(global, factory) {
  14. typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.Tampermonkey = factory());
  15. })(this, function() {
  16. "use strict";
  17. function noop() {
  18. }
  19. const identity = (x) => x;
  20. function run(fn) {
  21. return fn();
  22. }
  23. function blank_object() {
  24. return /* @__PURE__ */ Object.create(null);
  25. }
  26. function run_all(fns) {
  27. fns.forEach(run);
  28. }
  29. function is_function(thing) {
  30. return typeof thing === "function";
  31. }
  32. function safe_not_equal(a, b) {
  33. return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function");
  34. }
  35. function is_empty(obj) {
  36. return Object.keys(obj).length === 0;
  37. }
  38. const is_client = typeof window !== "undefined";
  39. let now = is_client ? () => window.performance.now() : () => Date.now();
  40. let raf = is_client ? (cb) => requestAnimationFrame(cb) : noop;
  41. const tasks = /* @__PURE__ */ new Set();
  42. function run_tasks(now2) {
  43. tasks.forEach((task) => {
  44. if (!task.c(now2)) {
  45. tasks.delete(task);
  46. task.f();
  47. }
  48. });
  49. if (tasks.size !== 0)
  50. raf(run_tasks);
  51. }
  52. function loop(callback) {
  53. let task;
  54. if (tasks.size === 0)
  55. raf(run_tasks);
  56. return {
  57. promise: new Promise((fulfill) => {
  58. tasks.add(task = { c: callback, f: fulfill });
  59. }),
  60. abort() {
  61. tasks.delete(task);
  62. }
  63. };
  64. }
  65. function append(target, node) {
  66. target.appendChild(node);
  67. }
  68. function append_styles(target, style_sheet_id, styles) {
  69. const append_styles_to = get_root_for_style(target);
  70. if (!append_styles_to.getElementById(style_sheet_id)) {
  71. const style = element("style");
  72. style.id = style_sheet_id;
  73. style.textContent = styles;
  74. append_stylesheet(append_styles_to, style);
  75. }
  76. }
  77. function get_root_for_style(node) {
  78. if (!node)
  79. return document;
  80. const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
  81. if (root && root.host) {
  82. return root;
  83. }
  84. return node.ownerDocument;
  85. }
  86. function append_empty_stylesheet(node) {
  87. const style_element = element("style");
  88. append_stylesheet(get_root_for_style(node), style_element);
  89. return style_element.sheet;
  90. }
  91. function append_stylesheet(node, style) {
  92. append(node.head || node, style);
  93. }
  94. function insert(target, node, anchor) {
  95. target.insertBefore(node, anchor || null);
  96. }
  97. function detach(node) {
  98. node.parentNode.removeChild(node);
  99. }
  100. function element(name) {
  101. return document.createElement(name);
  102. }
  103. function svg_element(name) {
  104. return document.createElementNS("http://www.w3.org/2000/svg", name);
  105. }
  106. function text(data) {
  107. return document.createTextNode(data);
  108. }
  109. function space() {
  110. return text(" ");
  111. }
  112. function empty() {
  113. return text("");
  114. }
  115. function listen(node, event, handler, options) {
  116. node.addEventListener(event, handler, options);
  117. return () => node.removeEventListener(event, handler, options);
  118. }
  119. function attr(node, attribute, value) {
  120. if (value == null)
  121. node.removeAttribute(attribute);
  122. else if (node.getAttribute(attribute) !== value)
  123. node.setAttribute(attribute, value);
  124. }
  125. function children(element2) {
  126. return Array.from(element2.childNodes);
  127. }
  128. function set_data(text2, data) {
  129. data = "" + data;
  130. if (text2.wholeText !== data)
  131. text2.data = data;
  132. }
  133. function set_input_value(input, value) {
  134. input.value = value == null ? "" : value;
  135. }
  136. function toggle_class(element2, name, toggle) {
  137. element2.classList[toggle ? "add" : "remove"](name);
  138. }
  139. function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
  140. const e = document.createEvent("CustomEvent");
  141. e.initCustomEvent(type, bubbles, cancelable, detail);
  142. return e;
  143. }
  144. const managed_styles = /* @__PURE__ */ new Map();
  145. let active = 0;
  146. function hash(str) {
  147. let hash2 = 5381;
  148. let i = str.length;
  149. while (i--)
  150. hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i);
  151. return hash2 >>> 0;
  152. }
  153. function create_style_information(doc, node) {
  154. const info = { stylesheet: append_empty_stylesheet(node), rules: {} };
  155. managed_styles.set(doc, info);
  156. return info;
  157. }
  158. function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {
  159. const step = 16.666 / duration;
  160. let keyframes = "{\n";
  161. for (let p = 0; p <= 1; p += step) {
  162. const t = a + (b - a) * ease(p);
  163. keyframes += p * 100 + `%{${fn(t, 1 - t)}}
  164. `;
  165. }
  166. const rule = keyframes + `100% {${fn(b, 1 - b)}}
  167. }`;
  168. const name = `__svelte_${hash(rule)}_${uid}`;
  169. const doc = get_root_for_style(node);
  170. const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);
  171. if (!rules[name]) {
  172. rules[name] = true;
  173. stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);
  174. }
  175. const animation = node.style.animation || "";
  176. node.style.animation = `${animation ? `${animation}, ` : ""}${name} ${duration}ms linear ${delay}ms 1 both`;
  177. active += 1;
  178. return name;
  179. }
  180. function delete_rule(node, name) {
  181. const previous = (node.style.animation || "").split(", ");
  182. const next = previous.filter(name ? (anim) => anim.indexOf(name) < 0 : (anim) => anim.indexOf("__svelte") === -1);
  183. const deleted = previous.length - next.length;
  184. if (deleted) {
  185. node.style.animation = next.join(", ");
  186. active -= deleted;
  187. if (!active)
  188. clear_rules();
  189. }
  190. }
  191. function clear_rules() {
  192. raf(() => {
  193. if (active)
  194. return;
  195. managed_styles.forEach((info) => {
  196. const { stylesheet } = info;
  197. let i = stylesheet.cssRules.length;
  198. while (i--)
  199. stylesheet.deleteRule(i);
  200. info.rules = {};
  201. });
  202. managed_styles.clear();
  203. });
  204. }
  205. let current_component;
  206. function set_current_component(component) {
  207. current_component = component;
  208. }
  209. const dirty_components = [];
  210. const binding_callbacks = [];
  211. const render_callbacks = [];
  212. const flush_callbacks = [];
  213. const resolved_promise = Promise.resolve();
  214. let update_scheduled = false;
  215. function schedule_update() {
  216. if (!update_scheduled) {
  217. update_scheduled = true;
  218. resolved_promise.then(flush);
  219. }
  220. }
  221. function add_render_callback(fn) {
  222. render_callbacks.push(fn);
  223. }
  224. const seen_callbacks = /* @__PURE__ */ new Set();
  225. let flushidx = 0;
  226. function flush() {
  227. const saved_component = current_component;
  228. do {
  229. while (flushidx < dirty_components.length) {
  230. const component = dirty_components[flushidx];
  231. flushidx++;
  232. set_current_component(component);
  233. update(component.$$);
  234. }
  235. set_current_component(null);
  236. dirty_components.length = 0;
  237. flushidx = 0;
  238. while (binding_callbacks.length)
  239. binding_callbacks.pop()();
  240. for (let i = 0; i < render_callbacks.length; i += 1) {
  241. const callback = render_callbacks[i];
  242. if (!seen_callbacks.has(callback)) {
  243. seen_callbacks.add(callback);
  244. callback();
  245. }
  246. }
  247. render_callbacks.length = 0;
  248. } while (dirty_components.length);
  249. while (flush_callbacks.length) {
  250. flush_callbacks.pop()();
  251. }
  252. update_scheduled = false;
  253. seen_callbacks.clear();
  254. set_current_component(saved_component);
  255. }
  256. function update($$) {
  257. if ($$.fragment !== null) {
  258. $$.update();
  259. run_all($$.before_update);
  260. const dirty = $$.dirty;
  261. $$.dirty = [-1];
  262. $$.fragment && $$.fragment.p($$.ctx, dirty);
  263. $$.after_update.forEach(add_render_callback);
  264. }
  265. }
  266. let promise;
  267. function wait() {
  268. if (!promise) {
  269. promise = Promise.resolve();
  270. promise.then(() => {
  271. promise = null;
  272. });
  273. }
  274. return promise;
  275. }
  276. function dispatch(node, direction, kind) {
  277. node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`));
  278. }
  279. const outroing = /* @__PURE__ */ new Set();
  280. let outros;
  281. function group_outros() {
  282. outros = {
  283. r: 0,
  284. c: [],
  285. p: outros
  286. };
  287. }
  288. function check_outros() {
  289. if (!outros.r) {
  290. run_all(outros.c);
  291. }
  292. outros = outros.p;
  293. }
  294. function transition_in(block, local) {
  295. if (block && block.i) {
  296. outroing.delete(block);
  297. block.i(local);
  298. }
  299. }
  300. function transition_out(block, local, detach2, callback) {
  301. if (block && block.o) {
  302. if (outroing.has(block))
  303. return;
  304. outroing.add(block);
  305. outros.c.push(() => {
  306. outroing.delete(block);
  307. if (callback) {
  308. if (detach2)
  309. block.d(1);
  310. callback();
  311. }
  312. });
  313. block.o(local);
  314. }
  315. }
  316. const null_transition = { duration: 0 };
  317. function create_in_transition(node, fn, params) {
  318. let config = fn(node, params);
  319. let running = false;
  320. let animation_name;
  321. let task;
  322. let uid = 0;
  323. function cleanup() {
  324. if (animation_name)
  325. delete_rule(node, animation_name);
  326. }
  327. function go() {
  328. const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
  329. if (css)
  330. animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);
  331. tick(0, 1);
  332. const start_time = now() + delay;
  333. const end_time = start_time + duration;
  334. if (task)
  335. task.abort();
  336. running = true;
  337. add_render_callback(() => dispatch(node, true, "start"));
  338. task = loop((now2) => {
  339. if (running) {
  340. if (now2 >= end_time) {
  341. tick(1, 0);
  342. dispatch(node, true, "end");
  343. cleanup();
  344. return running = false;
  345. }
  346. if (now2 >= start_time) {
  347. const t = easing((now2 - start_time) / duration);
  348. tick(t, 1 - t);
  349. }
  350. }
  351. return running;
  352. });
  353. }
  354. let started = false;
  355. return {
  356. start() {
  357. if (started)
  358. return;
  359. started = true;
  360. delete_rule(node);
  361. if (is_function(config)) {
  362. config = config();
  363. wait().then(go);
  364. } else {
  365. go();
  366. }
  367. },
  368. invalidate() {
  369. started = false;
  370. },
  371. end() {
  372. if (running) {
  373. cleanup();
  374. running = false;
  375. }
  376. }
  377. };
  378. }
  379. function create_out_transition(node, fn, params) {
  380. let config = fn(node, params);
  381. let running = true;
  382. let animation_name;
  383. const group = outros;
  384. group.r += 1;
  385. function go() {
  386. const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
  387. if (css)
  388. animation_name = create_rule(node, 1, 0, duration, delay, easing, css);
  389. const start_time = now() + delay;
  390. const end_time = start_time + duration;
  391. add_render_callback(() => dispatch(node, false, "start"));
  392. loop((now2) => {
  393. if (running) {
  394. if (now2 >= end_time) {
  395. tick(0, 1);
  396. dispatch(node, false, "end");
  397. if (!--group.r) {
  398. run_all(group.c);
  399. }
  400. return false;
  401. }
  402. if (now2 >= start_time) {
  403. const t = easing((now2 - start_time) / duration);
  404. tick(1 - t, t);
  405. }
  406. }
  407. return running;
  408. });
  409. }
  410. if (is_function(config)) {
  411. wait().then(() => {
  412. config = config();
  413. go();
  414. });
  415. } else {
  416. go();
  417. }
  418. return {
  419. end(reset) {
  420. if (reset && config.tick) {
  421. config.tick(1, 0);
  422. }
  423. if (running) {
  424. if (animation_name)
  425. delete_rule(node, animation_name);
  426. running = false;
  427. }
  428. }
  429. };
  430. }
  431. function outro_and_destroy_block(block, lookup) {
  432. transition_out(block, 1, 1, () => {
  433. lookup.delete(block.key);
  434. });
  435. }
  436. function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block2, next, get_context) {
  437. let o = old_blocks.length;
  438. let n = list.length;
  439. let i = o;
  440. const old_indexes = {};
  441. while (i--)
  442. old_indexes[old_blocks[i].key] = i;
  443. const new_blocks = [];
  444. const new_lookup = /* @__PURE__ */ new Map();
  445. const deltas = /* @__PURE__ */ new Map();
  446. i = n;
  447. while (i--) {
  448. const child_ctx = get_context(ctx, list, i);
  449. const key = get_key(child_ctx);
  450. let block = lookup.get(key);
  451. if (!block) {
  452. block = create_each_block2(key, child_ctx);
  453. block.c();
  454. } else if (dynamic) {
  455. block.p(child_ctx, dirty);
  456. }
  457. new_lookup.set(key, new_blocks[i] = block);
  458. if (key in old_indexes)
  459. deltas.set(key, Math.abs(i - old_indexes[key]));
  460. }
  461. const will_move = /* @__PURE__ */ new Set();
  462. const did_move = /* @__PURE__ */ new Set();
  463. function insert2(block) {
  464. transition_in(block, 1);
  465. block.m(node, next);
  466. lookup.set(block.key, block);
  467. next = block.first;
  468. n--;
  469. }
  470. while (o && n) {
  471. const new_block = new_blocks[n - 1];
  472. const old_block = old_blocks[o - 1];
  473. const new_key = new_block.key;
  474. const old_key = old_block.key;
  475. if (new_block === old_block) {
  476. next = new_block.first;
  477. o--;
  478. n--;
  479. } else if (!new_lookup.has(old_key)) {
  480. destroy(old_block, lookup);
  481. o--;
  482. } else if (!lookup.has(new_key) || will_move.has(new_key)) {
  483. insert2(new_block);
  484. } else if (did_move.has(old_key)) {
  485. o--;
  486. } else if (deltas.get(new_key) > deltas.get(old_key)) {
  487. did_move.add(new_key);
  488. insert2(new_block);
  489. } else {
  490. will_move.add(old_key);
  491. o--;
  492. }
  493. }
  494. while (o--) {
  495. const old_block = old_blocks[o];
  496. if (!new_lookup.has(old_block.key))
  497. destroy(old_block, lookup);
  498. }
  499. while (n)
  500. insert2(new_blocks[n - 1]);
  501. return new_blocks;
  502. }
  503. function create_component(block) {
  504. block && block.c();
  505. }
  506. function mount_component(component, target, anchor, customElement) {
  507. const { fragment, on_mount, on_destroy, after_update } = component.$$;
  508. fragment && fragment.m(target, anchor);
  509. if (!customElement) {
  510. add_render_callback(() => {
  511. const new_on_destroy = on_mount.map(run).filter(is_function);
  512. if (on_destroy) {
  513. on_destroy.push(...new_on_destroy);
  514. } else {
  515. run_all(new_on_destroy);
  516. }
  517. component.$$.on_mount = [];
  518. });
  519. }
  520. after_update.forEach(add_render_callback);
  521. }
  522. function destroy_component(component, detaching) {
  523. const $$ = component.$$;
  524. if ($$.fragment !== null) {
  525. run_all($$.on_destroy);
  526. $$.fragment && $$.fragment.d(detaching);
  527. $$.on_destroy = $$.fragment = null;
  528. $$.ctx = [];
  529. }
  530. }
  531. function make_dirty(component, i) {
  532. if (component.$$.dirty[0] === -1) {
  533. dirty_components.push(component);
  534. schedule_update();
  535. component.$$.dirty.fill(0);
  536. }
  537. component.$$.dirty[i / 31 | 0] |= 1 << i % 31;
  538. }
  539. function init(component, options, instance2, create_fragment2, not_equal, props, append_styles2, dirty = [-1]) {
  540. const parent_component = current_component;
  541. set_current_component(component);
  542. const $$ = component.$$ = {
  543. fragment: null,
  544. ctx: null,
  545. props,
  546. update: noop,
  547. not_equal,
  548. bound: blank_object(),
  549. on_mount: [],
  550. on_destroy: [],
  551. on_disconnect: [],
  552. before_update: [],
  553. after_update: [],
  554. context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
  555. callbacks: blank_object(),
  556. dirty,
  557. skip_bound: false,
  558. root: options.target || parent_component.$$.root
  559. };
  560. append_styles2 && append_styles2($$.root);
  561. let ready = false;
  562. $$.ctx = instance2 ? instance2(component, options.props || {}, (i, ret, ...rest) => {
  563. const value = rest.length ? rest[0] : ret;
  564. if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
  565. if (!$$.skip_bound && $$.bound[i])
  566. $$.bound[i](value);
  567. if (ready)
  568. make_dirty(component, i);
  569. }
  570. return ret;
  571. }) : [];
  572. $$.update();
  573. ready = true;
  574. run_all($$.before_update);
  575. $$.fragment = create_fragment2 ? create_fragment2($$.ctx) : false;
  576. if (options.target) {
  577. if (options.hydrate) {
  578. const nodes = children(options.target);
  579. $$.fragment && $$.fragment.l(nodes);
  580. nodes.forEach(detach);
  581. } else {
  582. $$.fragment && $$.fragment.c();
  583. }
  584. if (options.intro)
  585. transition_in(component.$$.fragment);
  586. mount_component(component, options.target, options.anchor, options.customElement);
  587. flush();
  588. }
  589. set_current_component(parent_component);
  590. }
  591. class SvelteComponent {
  592. $destroy() {
  593. destroy_component(this, 1);
  594. this.$destroy = noop;
  595. }
  596. $on(type, callback) {
  597. const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
  598. callbacks.push(callback);
  599. return () => {
  600. const index = callbacks.indexOf(callback);
  601. if (index !== -1)
  602. callbacks.splice(index, 1);
  603. };
  604. }
  605. $set($$props) {
  606. if (this.$$set && !is_empty($$props)) {
  607. this.$$.skip_bound = true;
  608. this.$$set($$props);
  609. this.$$.skip_bound = false;
  610. }
  611. }
  612. }
  613. const clipboard = {};
  614. clipboard.write = async (text2) => {
  615. await navigator.clipboard.writeText(text2);
  616. };
  617. clipboard.read = async () => navigator.clipboard.readText();
  618. clipboard.readSync = () => {
  619. throw new Error("`.readSync()` is not supported in browsers!");
  620. };
  621. clipboard.writeSync = () => {
  622. throw new Error("`.writeSync()` is not supported in browsers!");
  623. };
  624. function add_css$1(target) {
  625. append_styles(target, "svelte-d0op9", ".copied.svelte-d0op9{transform:scale(1.2);transition:all 0.5s}.copy-success.svelte-d0op9{background-color:#86efac;@apply bg-green-300;}@keyframes svelte-d0op9-randomMovearound{from{transform:translate(0, 0)}50%{transform:translate(0, 2px)}to{transform:translate(0, 0)}}.hovering.svelte-d0op9{animation:svelte-d0op9-randomMovearound 2s infinite ease-in}");
  626. }
  627. function create_fragment$3(ctx) {
  628. let div2;
  629. let div0;
  630. let span;
  631. let t0;
  632. let t1;
  633. let div1;
  634. let t2_value = ctx[0].represent + "";
  635. let t2;
  636. let mounted;
  637. let dispose;
  638. return {
  639. c() {
  640. div2 = element("div");
  641. div0 = element("div");
  642. span = element("span");
  643. t0 = text(ctx[3]);
  644. t1 = space();
  645. div1 = element("div");
  646. t2 = text(t2_value);
  647. attr(span, "class", "select-none svelte-d0op9");
  648. toggle_class(span, "copied", ctx[1]);
  649. attr(div0, "class", "h-14 w-14 hover:shadow-lg p-2 hover:bg-gray-700 bg-gray-200 opacity-70 flex justify-center items-center cursor-pointer rounded-full hover:ring-4 shadow-inner text-2xl transition-all duration-200 svelte-d0op9");
  650. attr(div0, "draggable", "true");
  651. toggle_class(div0, "hovering", ctx[2]);
  652. toggle_class(div0, "copy-success", ctx[1]);
  653. attr(div1, "class", "text-md");
  654. toggle_class(div1, "text-xs", ctx[0].represent.length > 10);
  655. attr(div2, "class", "flex flex-col justify-center items-center");
  656. },
  657. m(target, anchor) {
  658. insert(target, div2, anchor);
  659. append(div2, div0);
  660. append(div0, span);
  661. append(span, t0);
  662. append(div2, t1);
  663. append(div2, div1);
  664. append(div1, t2);
  665. if (!mounted) {
  666. dispose = [
  667. listen(div0, "mouseover", ctx[5]),
  668. listen(div0, "focus", ctx[5]),
  669. listen(div0, "mouseleave", ctx[6]),
  670. listen(div0, "click", ctx[4]),
  671. listen(div0, "dragstart", ctx[7])
  672. ];
  673. mounted = true;
  674. }
  675. },
  676. p(ctx2, [dirty]) {
  677. if (dirty & 8)
  678. set_data(t0, ctx2[3]);
  679. if (dirty & 2) {
  680. toggle_class(span, "copied", ctx2[1]);
  681. }
  682. if (dirty & 4) {
  683. toggle_class(div0, "hovering", ctx2[2]);
  684. }
  685. if (dirty & 2) {
  686. toggle_class(div0, "copy-success", ctx2[1]);
  687. }
  688. if (dirty & 1 && t2_value !== (t2_value = ctx2[0].represent + ""))
  689. set_data(t2, t2_value);
  690. if (dirty & 1) {
  691. toggle_class(div1, "text-xs", ctx2[0].represent.length > 10);
  692. }
  693. },
  694. i: noop,
  695. o: noop,
  696. d(detaching) {
  697. if (detaching)
  698. detach(div2);
  699. mounted = false;
  700. run_all(dispose);
  701. }
  702. };
  703. }
  704. function instance$2($$self, $$props, $$invalidate) {
  705. let innerText;
  706. let { emoji = {
  707. name: "",
  708. content: "",
  709. represent: "",
  710. description: ""
  711. } } = $$props;
  712. let copied = false;
  713. let hovering = false;
  714. async function copy() {
  715. try {
  716. await clipboard.write(innerText);
  717. $$invalidate(1, copied = true);
  718. setTimeout(() => {
  719. $$invalidate(1, copied = false);
  720. }, 500);
  721. } catch (err) {
  722. console.error(err);
  723. }
  724. }
  725. function hover() {
  726. $$invalidate(2, hovering = true);
  727. }
  728. const mouseleave_handler = () => {
  729. $$invalidate(2, hovering = false);
  730. };
  731. const dragstart_handler = (ev) => {
  732. ev.dataTransfer.setData("text/plain", innerText);
  733. };
  734. $$self.$$set = ($$props2) => {
  735. if ("emoji" in $$props2)
  736. $$invalidate(0, emoji = $$props2.emoji);
  737. };
  738. $$self.$$.update = () => {
  739. if ($$self.$$.dirty & 1) {
  740. $$invalidate(3, innerText = emoji.content);
  741. }
  742. };
  743. return [
  744. emoji,
  745. copied,
  746. hovering,
  747. innerText,
  748. copy,
  749. hover,
  750. mouseleave_handler,
  751. dragstart_handler
  752. ];
  753. }
  754. class CopyButton extends SvelteComponent {
  755. constructor(options) {
  756. super();
  757. init(this, options, instance$2, create_fragment$3, safe_not_equal, { emoji: 0 }, add_css$1);
  758. }
  759. }
  760. function cubicOut(t) {
  761. const f = t - 1;
  762. return f * f * f + 1;
  763. }
  764. function fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {
  765. const style = getComputedStyle(node);
  766. const target_opacity = +style.opacity;
  767. const transform = style.transform === "none" ? "" : style.transform;
  768. const od = target_opacity * (1 - opacity);
  769. return {
  770. delay,
  771. duration,
  772. easing,
  773. css: (t, u) => `
  774. transform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);
  775. opacity: ${target_opacity - od * u}`
  776. };
  777. }
  778. var emojis = [
  779. {
  780. name: "\u706B\u82B1",
  781. content: "\u2728",
  782. description: "\u5F15\u5165\u65B0\u529F\u80FD",
  783. represent: "feat"
  784. },
  785. {
  786. name: "bug",
  787. content: "\u{1F41B}",
  788. description: "\u4FEE\u590D bug",
  789. represent: "fix"
  790. },
  791. {
  792. name: "\u5E86\u795D",
  793. content: "\u{1F389}",
  794. description: "\u521D\u6B21\u63D0\u4EA4",
  795. represent: "init"
  796. },
  797. {
  798. name: "\u8C03\u8272\u677F",
  799. content: "\u{1F3A8}",
  800. description: "\u6539\u8FDB\u4EE3\u7801\u7ED3\u6784/\u4EE3\u7801\u683C\u5F0F",
  801. represent: "refactor"
  802. },
  803. {
  804. name: "\u95EA\u7535",
  805. content: "\u26A1\uFE0F",
  806. description: "\u63D0\u5347\u6027\u80FD",
  807. represent: "perf"
  808. },
  809. {
  810. name: "\u706B\u7130",
  811. content: "\u{1F525}",
  812. description: "\u79FB\u9664\u4EE3\u7801\u6216\u6587\u4EF6",
  813. represent: "delete"
  814. },
  815. {
  816. name: "\u6025\u6551\u8F66",
  817. content: "\u{1F691}",
  818. description: "\u91CD\u8981\u8865\u4E01",
  819. represent: "fix(important)"
  820. },
  821. {
  822. name: "\u94C5\u7B14",
  823. content: "\u{1F4DD}",
  824. description: "\u64B0\u5199\u6587\u6863",
  825. represent: "docs"
  826. },
  827. {
  828. name: "\u706B\u7BAD",
  829. content: "\u{1F680}",
  830. description: "\u90E8\u7F72\u529F\u80FD",
  831. represent: "build"
  832. },
  833. {
  834. name: "\u53E3\u7EA2",
  835. content: "\u{1F484}",
  836. description: "\u66F4\u65B0 UI \u548C\u6837\u5F0F\u6587\u4EF6",
  837. represent: "style"
  838. },
  839. {
  840. name: "\u767D\u8272\u590D\u9009\u6846",
  841. content: "\u2705",
  842. description: "\u589E\u52A0\u6D4B\u8BD5",
  843. represent: "test"
  844. },
  845. {
  846. name: "\u9501",
  847. content: "\u{1F512}",
  848. description: "\u4FEE\u590D\u5B89\u5168\u95EE\u9898",
  849. represent: "fix(security)"
  850. },
  851. {
  852. name: "\u82F9\u679C",
  853. content: "\u{1F34E}",
  854. description: "\u4FEE\u590D macOS \u4E0B\u7684\u95EE\u9898",
  855. represent: "fix(macos)"
  856. },
  857. {
  858. name: "\u4F01\u9E45",
  859. content: "\u{1F427}",
  860. description: "\u4FEE\u590D Linux \u4E0B\u7684\u95EE\u9898",
  861. represent: "fix(linux)"
  862. },
  863. {
  864. name: "\u65D7\u5E1C",
  865. content: "\u{1F3C1}",
  866. description: "\u4FEE\u590D Windows \u4E0B\u7684\u95EE\u9898",
  867. represent: "fix(windows)"
  868. },
  869. {
  870. name: "\u4E66\u7B7E",
  871. content: "\u{1F516}",
  872. description: "\u53D1\u884C/\u7248\u672C\u6807\u7B7E",
  873. represent: "publish"
  874. },
  875. {
  876. name: "\u6273\u624B",
  877. content: "\u{1F527}",
  878. description: "\u4FEE\u6539\u914D\u7F6E\u6587\u4EF6",
  879. represent: "chore(config)"
  880. },
  881. {
  882. name: "\u65BD\u5DE5",
  883. content: "\u{1F6A7}",
  884. description: "\u5DE5\u4F5C\u8FDB\u884C\u4E2D",
  885. represent: "doing"
  886. },
  887. {
  888. name: "\u7EFF\u5FC3",
  889. content: "\u{1F49A}",
  890. description: "\u4FEE\u590D CI \u6784\u5EFA\u95EE\u9898",
  891. represent: "fix(CI)"
  892. },
  893. {
  894. name: "\u4E0B\u964D\u7BAD\u5934",
  895. content: "\u2B07\uFE0F",
  896. description: "\u964D\u7EA7\u4F9D\u8D56",
  897. represent: "chore(dependency)"
  898. },
  899. {
  900. name: "\u4E0A\u5347\u7BAD\u5934",
  901. content: "\u2B06\uFE0F",
  902. description: "\u5347\u7EA7\u4F9D\u8D56",
  903. represent: "chore(dependency)"
  904. },
  905. {
  906. name: "\u4E0A\u5347\u8D8B\u52BF\u56FE",
  907. content: "\u{1F4C8}",
  908. description: "\u6DFB\u52A0\u5206\u6790\u6216\u8DDF\u8E2A\u4EE3\u7801",
  909. represent: "UI(debug)"
  910. },
  911. {
  912. name: "\u9524\u5B50",
  913. content: "\u{1F528}",
  914. description: "\u91CD\u5927\u91CD\u6784",
  915. represent: "refactor(important)"
  916. },
  917. {
  918. name: "\u9CB8\u9C7C",
  919. content: "\u{1F433}",
  920. description: "Docker \u76F8\u5173\u5DE5\u4F5C",
  921. represent: "chore(docker)"
  922. },
  923. {
  924. name: "\u5730\u7403",
  925. content: "\u{1F310}",
  926. description: "\u56FD\u9645\u5316\u4E0E\u672C\u5730\u5316",
  927. represent: "i18"
  928. }
  929. ];
  930. function create_if_block_1(ctx) {
  931. let svg;
  932. let path;
  933. return {
  934. c() {
  935. svg = svg_element("svg");
  936. path = svg_element("path");
  937. attr(path, "fill", "currentColor");
  938. attr(path, "d", "M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z");
  939. attr(svg, "xmlns", "http://www.w3.org/2000/svg");
  940. attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink");
  941. attr(svg, "width", "1em");
  942. attr(svg, "height", "1em");
  943. attr(svg, "viewBox", "0 0 1024 1024");
  944. },
  945. m(target, anchor) {
  946. insert(target, svg, anchor);
  947. append(svg, path);
  948. },
  949. d(detaching) {
  950. if (detaching)
  951. detach(svg);
  952. }
  953. };
  954. }
  955. function create_if_block$1(ctx) {
  956. let svg;
  957. let path;
  958. return {
  959. c() {
  960. svg = svg_element("svg");
  961. path = svg_element("path");
  962. attr(path, "fill", "currentColor");
  963. attr(path, "d", "M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8l-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0z");
  964. attr(svg, "xmlns", "http://www.w3.org/2000/svg");
  965. attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink");
  966. attr(svg, "width", "1em");
  967. attr(svg, "height", "1em");
  968. attr(svg, "viewBox", "0 0 1024 1024");
  969. },
  970. m(target, anchor) {
  971. insert(target, svg, anchor);
  972. append(svg, path);
  973. },
  974. d(detaching) {
  975. if (detaching)
  976. detach(svg);
  977. }
  978. };
  979. }
  980. function create_fragment$2(ctx) {
  981. let if_block_anchor;
  982. function select_block_type(ctx2, dirty) {
  983. if (ctx2[0] === "right")
  984. return create_if_block$1;
  985. if (ctx2[0] === "left")
  986. return create_if_block_1;
  987. }
  988. let current_block_type = select_block_type(ctx);
  989. let if_block = current_block_type && current_block_type(ctx);
  990. return {
  991. c() {
  992. if (if_block)
  993. if_block.c();
  994. if_block_anchor = empty();
  995. },
  996. m(target, anchor) {
  997. if (if_block)
  998. if_block.m(target, anchor);
  999. insert(target, if_block_anchor, anchor);
  1000. },
  1001. p(ctx2, [dirty]) {
  1002. if (current_block_type !== (current_block_type = select_block_type(ctx2))) {
  1003. if (if_block)
  1004. if_block.d(1);
  1005. if_block = current_block_type && current_block_type(ctx2);
  1006. if (if_block) {
  1007. if_block.c();
  1008. if_block.m(if_block_anchor.parentNode, if_block_anchor);
  1009. }
  1010. }
  1011. },
  1012. i: noop,
  1013. o: noop,
  1014. d(detaching) {
  1015. if (if_block) {
  1016. if_block.d(detaching);
  1017. }
  1018. if (detaching)
  1019. detach(if_block_anchor);
  1020. }
  1021. };
  1022. }
  1023. function instance$1($$self, $$props, $$invalidate) {
  1024. let { type = "right" } = $$props;
  1025. $$self.$$set = ($$props2) => {
  1026. if ("type" in $$props2)
  1027. $$invalidate(0, type = $$props2.type);
  1028. };
  1029. return [type];
  1030. }
  1031. class ShowButton extends SvelteComponent {
  1032. constructor(options) {
  1033. super();
  1034. init(this, options, instance$1, create_fragment$2, safe_not_equal, { type: 0 });
  1035. }
  1036. }
  1037. function add_css(target) {
  1038. append_styles(target, "svelte-184jni4", ".bg-main.svelte-184jni4{background-color:rgba(255, 255, 255, 0.7)}.main.svelte-184jni4{height:400px;width:300px}.top-center.svelte-184jni4{top:calc(10rem + 200px)}.no-scrollbar.svelte-184jni4::-webkit-scrollbar{width:5px !important}");
  1039. }
  1040. function get_each_context(ctx, list, i) {
  1041. const child_ctx = ctx.slice();
  1042. child_ctx[5] = list[i];
  1043. return child_ctx;
  1044. }
  1045. function create_else_block(ctx) {
  1046. let button;
  1047. let showbutton;
  1048. let current;
  1049. let mounted;
  1050. let dispose;
  1051. showbutton = new ShowButton({ props: { type: "left" } });
  1052. return {
  1053. c() {
  1054. button = element("button");
  1055. create_component(showbutton.$$.fragment);
  1056. attr(button, "class", "fixed right-0 top-center svelte-184jni4");
  1057. },
  1058. m(target, anchor) {
  1059. insert(target, button, anchor);
  1060. mount_component(showbutton, button, null);
  1061. current = true;
  1062. if (!mounted) {
  1063. dispose = listen(button, "click", ctx[3]);
  1064. mounted = true;
  1065. }
  1066. },
  1067. p: noop,
  1068. i(local) {
  1069. if (current)
  1070. return;
  1071. transition_in(showbutton.$$.fragment, local);
  1072. current = true;
  1073. },
  1074. o(local) {
  1075. transition_out(showbutton.$$.fragment, local);
  1076. current = false;
  1077. },
  1078. d(detaching) {
  1079. if (detaching)
  1080. detach(button);
  1081. destroy_component(showbutton);
  1082. mounted = false;
  1083. dispose();
  1084. }
  1085. };
  1086. }
  1087. function create_if_block(ctx) {
  1088. let div4;
  1089. let button;
  1090. let showbutton;
  1091. let t0;
  1092. let div3;
  1093. let div0;
  1094. let input_1;
  1095. let t1;
  1096. let div2;
  1097. let div1;
  1098. let each_blocks = [];
  1099. let each_1_lookup = /* @__PURE__ */ new Map();
  1100. let div4_intro;
  1101. let div4_outro;
  1102. let current;
  1103. let mounted;
  1104. let dispose;
  1105. showbutton = new ShowButton({ props: { type: "right" } });
  1106. let each_value = ctx[1];
  1107. const get_key = (ctx2) => ctx2[5].content;
  1108. for (let i = 0; i < each_value.length; i += 1) {
  1109. let child_ctx = get_each_context(ctx, each_value, i);
  1110. let key = get_key(child_ctx);
  1111. each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
  1112. }
  1113. return {
  1114. c() {
  1115. div4 = element("div");
  1116. button = element("button");
  1117. create_component(showbutton.$$.fragment);
  1118. t0 = space();
  1119. div3 = element("div");
  1120. div0 = element("div");
  1121. input_1 = element("input");
  1122. t1 = space();
  1123. div2 = element("div");
  1124. div1 = element("div");
  1125. for (let i = 0; i < each_blocks.length; i += 1) {
  1126. each_blocks[i].c();
  1127. }
  1128. attr(input_1, "type", "text");
  1129. attr(input_1, "class", "w-full h-10 px-4 rounded-full bg-gray-200 ");
  1130. attr(input_1, "placeholder", "search something");
  1131. attr(div0, "class", "w-full py-4");
  1132. attr(div1, "class", "grid grid-cols-2 gap-4");
  1133. attr(div2, "class", "main overflow-y-scroll p-4 no-scrollbar svelte-184jni4");
  1134. attr(div3, "class", "");
  1135. attr(div4, "class", "fixed right-0 top-40 flex justify-center items-center rounded-l-3xl border shadow-lg backdrop:filter bg-main svelte-184jni4");
  1136. },
  1137. m(target, anchor) {
  1138. insert(target, div4, anchor);
  1139. append(div4, button);
  1140. mount_component(showbutton, button, null);
  1141. append(div4, t0);
  1142. append(div4, div3);
  1143. append(div3, div0);
  1144. append(div0, input_1);
  1145. set_input_value(input_1, ctx[0]);
  1146. append(div3, t1);
  1147. append(div3, div2);
  1148. append(div2, div1);
  1149. for (let i = 0; i < each_blocks.length; i += 1) {
  1150. each_blocks[i].m(div1, null);
  1151. }
  1152. current = true;
  1153. if (!mounted) {
  1154. dispose = [
  1155. listen(button, "click", ctx[3]),
  1156. listen(input_1, "input", ctx[4])
  1157. ];
  1158. mounted = true;
  1159. }
  1160. },
  1161. p(ctx2, dirty) {
  1162. if (dirty & 1 && input_1.value !== ctx2[0]) {
  1163. set_input_value(input_1, ctx2[0]);
  1164. }
  1165. if (dirty & 2) {
  1166. each_value = ctx2[1];
  1167. group_outros();
  1168. each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, div1, outro_and_destroy_block, create_each_block, null, get_each_context);
  1169. check_outros();
  1170. }
  1171. },
  1172. i(local) {
  1173. if (current)
  1174. return;
  1175. transition_in(showbutton.$$.fragment, local);
  1176. for (let i = 0; i < each_value.length; i += 1) {
  1177. transition_in(each_blocks[i]);
  1178. }
  1179. add_render_callback(() => {
  1180. if (div4_outro)
  1181. div4_outro.end(1);
  1182. div4_intro = create_in_transition(div4, fly, { x: 100, duration: 500 });
  1183. div4_intro.start();
  1184. });
  1185. current = true;
  1186. },
  1187. o(local) {
  1188. transition_out(showbutton.$$.fragment, local);
  1189. for (let i = 0; i < each_blocks.length; i += 1) {
  1190. transition_out(each_blocks[i]);
  1191. }
  1192. if (div4_intro)
  1193. div4_intro.invalidate();
  1194. div4_outro = create_out_transition(div4, fly, { x: 100, duration: 500 });
  1195. current = false;
  1196. },
  1197. d(detaching) {
  1198. if (detaching)
  1199. detach(div4);
  1200. destroy_component(showbutton);
  1201. for (let i = 0; i < each_blocks.length; i += 1) {
  1202. each_blocks[i].d();
  1203. }
  1204. if (detaching && div4_outro)
  1205. div4_outro.end();
  1206. mounted = false;
  1207. run_all(dispose);
  1208. }
  1209. };
  1210. }
  1211. function create_each_block(key_1, ctx) {
  1212. let first;
  1213. let copybutton;
  1214. let current;
  1215. copybutton = new CopyButton({ props: { emoji: ctx[5] } });
  1216. return {
  1217. key: key_1,
  1218. first: null,
  1219. c() {
  1220. first = empty();
  1221. create_component(copybutton.$$.fragment);
  1222. this.first = first;
  1223. },
  1224. m(target, anchor) {
  1225. insert(target, first, anchor);
  1226. mount_component(copybutton, target, anchor);
  1227. current = true;
  1228. },
  1229. p(new_ctx, dirty) {
  1230. ctx = new_ctx;
  1231. const copybutton_changes = {};
  1232. if (dirty & 2)
  1233. copybutton_changes.emoji = ctx[5];
  1234. copybutton.$set(copybutton_changes);
  1235. },
  1236. i(local) {
  1237. if (current)
  1238. return;
  1239. transition_in(copybutton.$$.fragment, local);
  1240. current = true;
  1241. },
  1242. o(local) {
  1243. transition_out(copybutton.$$.fragment, local);
  1244. current = false;
  1245. },
  1246. d(detaching) {
  1247. if (detaching)
  1248. detach(first);
  1249. destroy_component(copybutton, detaching);
  1250. }
  1251. };
  1252. }
  1253. function create_fragment$1(ctx) {
  1254. let current_block_type_index;
  1255. let if_block;
  1256. let if_block_anchor;
  1257. let current;
  1258. const if_block_creators = [create_if_block, create_else_block];
  1259. const if_blocks = [];
  1260. function select_block_type(ctx2, dirty) {
  1261. if (ctx2[2])
  1262. return 0;
  1263. return 1;
  1264. }
  1265. current_block_type_index = select_block_type(ctx);
  1266. if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
  1267. return {
  1268. c() {
  1269. if_block.c();
  1270. if_block_anchor = empty();
  1271. },
  1272. m(target, anchor) {
  1273. if_blocks[current_block_type_index].m(target, anchor);
  1274. insert(target, if_block_anchor, anchor);
  1275. current = true;
  1276. },
  1277. p(ctx2, [dirty]) {
  1278. let previous_block_index = current_block_type_index;
  1279. current_block_type_index = select_block_type(ctx2);
  1280. if (current_block_type_index === previous_block_index) {
  1281. if_blocks[current_block_type_index].p(ctx2, dirty);
  1282. } else {
  1283. group_outros();
  1284. transition_out(if_blocks[previous_block_index], 1, 1, () => {
  1285. if_blocks[previous_block_index] = null;
  1286. });
  1287. check_outros();
  1288. if_block = if_blocks[current_block_type_index];
  1289. if (!if_block) {
  1290. if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
  1291. if_block.c();
  1292. } else {
  1293. if_block.p(ctx2, dirty);
  1294. }
  1295. transition_in(if_block, 1);
  1296. if_block.m(if_block_anchor.parentNode, if_block_anchor);
  1297. }
  1298. },
  1299. i(local) {
  1300. if (current)
  1301. return;
  1302. transition_in(if_block);
  1303. current = true;
  1304. },
  1305. o(local) {
  1306. transition_out(if_block);
  1307. current = false;
  1308. },
  1309. d(detaching) {
  1310. if_blocks[current_block_type_index].d(detaching);
  1311. if (detaching)
  1312. detach(if_block_anchor);
  1313. }
  1314. };
  1315. }
  1316. function instance($$self, $$props, $$invalidate) {
  1317. let arr = emojis;
  1318. let visible = true;
  1319. const toggle = () => $$invalidate(2, visible = !visible);
  1320. let input = "";
  1321. function input_1_input_handler() {
  1322. input = this.value;
  1323. $$invalidate(0, input);
  1324. }
  1325. $$self.$$.update = () => {
  1326. if ($$self.$$.dirty & 1) {
  1327. $$invalidate(1, arr = emojis.filter((i) => {
  1328. if (input === "")
  1329. return true;
  1330. let flag = false;
  1331. Object.keys(i).forEach((k) => {
  1332. typeof i[k] === "string" && i[k].includes(input) && (flag = true);
  1333. });
  1334. return flag;
  1335. }));
  1336. }
  1337. };
  1338. return [input, arr, visible, toggle, input_1_input_handler];
  1339. }
  1340. class Table extends SvelteComponent {
  1341. constructor(options) {
  1342. super();
  1343. init(this, options, instance, create_fragment$1, safe_not_equal, {}, add_css);
  1344. }
  1345. }
  1346. function create_fragment(ctx) {
  1347. let main;
  1348. let table;
  1349. let current;
  1350. table = new Table({});
  1351. return {
  1352. c() {
  1353. main = element("main");
  1354. create_component(table.$$.fragment);
  1355. },
  1356. m(target, anchor) {
  1357. insert(target, main, anchor);
  1358. mount_component(table, main, null);
  1359. current = true;
  1360. },
  1361. p: noop,
  1362. i(local) {
  1363. if (current)
  1364. return;
  1365. transition_in(table.$$.fragment, local);
  1366. current = true;
  1367. },
  1368. o(local) {
  1369. transition_out(table.$$.fragment, local);
  1370. current = false;
  1371. },
  1372. d(detaching) {
  1373. if (detaching)
  1374. detach(main);
  1375. destroy_component(table);
  1376. }
  1377. };
  1378. }
  1379. class App extends SvelteComponent {
  1380. constructor(options) {
  1381. super();
  1382. init(this, options, null, create_fragment, safe_not_equal, {});
  1383. }
  1384. }
  1385. var tailwindBase = /* @__PURE__ */ (() => "/*\n! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::-webkit-backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.visible {\n visibility: visible;\n}\n.\\!visible {\n visibility: visible !important;\n}\n.fixed {\n position: fixed;\n}\n.right-0 {\n right: 0px;\n}\n.top-40 {\n top: 10rem;\n}\n.flex {\n display: flex;\n}\n.grid {\n display: grid;\n}\n.h-14 {\n height: 3.5rem;\n}\n.h-10 {\n height: 2.5rem;\n}\n.w-14 {\n width: 3.5rem;\n}\n.w-full {\n width: 100%;\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.flex-col {\n flex-direction: column;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.gap-4 {\n gap: 1rem;\n}\n.overflow-y-scroll {\n overflow-y: scroll;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-l-3xl {\n border-top-left-radius: 1.5rem;\n border-bottom-left-radius: 1.5rem;\n}\n.border {\n border-width: 1px;\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.opacity-70 {\n opacity: 0.7;\n}\n.shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition {\n transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n\n:root {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n}\n\n.backdrop\\:filter::-webkit-backdrop {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.backdrop\\:filter::backdrop {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n\n.hover\\:bg-gray-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n\n.hover\\:shadow-lg:hover {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.hover\\:ring-4:hover {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}")();
  1386. function createContainerInDocument() {
  1387. const container = document.createElement("div");
  1388. container.id = "tempermonkey-app";
  1389. container.style.zIndex = "2147483647";
  1390. container.style.position = "fixed";
  1391. return container;
  1392. }
  1393. function containerInShadowRoot() {
  1394. const container = document.createElement("div");
  1395. container.id = "tempermonkey-app-shadow-container";
  1396. return container;
  1397. }
  1398. function createDom() {
  1399. const container = createContainerInDocument();
  1400. const shadowRoot = container.attachShadow({ mode: "closed" });
  1401. const containerInShadow = containerInShadowRoot();
  1402. shadowRoot.appendChild(containerInShadow);
  1403. document.body.appendChild(container);
  1404. return containerInShadow;
  1405. }
  1406. function copyCssFromMainDocument(container) {
  1407. const styleDom = document.createElement("style");
  1408. styleDom.innerText = tailwindBase;
  1409. container.appendChild(styleDom);
  1410. }
  1411. const appDom = createDom();
  1412. copyCssFromMainDocument(appDom);
  1413. const app = new App({
  1414. target: appDom
  1415. });
  1416. return app;
  1417. });