restore backup and add opencode support

This commit is contained in:
libretech committed 2025-09-23 12:02:03 +02:00
1 parent b99d2ff835
commit c295660631
72 files changed
+7035 -7198

No files matched your search

File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"nls-guilloche.js.map","sources":["ng://nls-guilloche/nls/services/canvas.service.ts","ng://nls-guilloche/nls/services/history.service.ts","ng://nls-guilloche/nls/services/math.service.ts","ng://nls-guilloche/nls/services/graph.service.ts","ng://nls-guilloche/nls/components/graphs.component.ts","ng://nls-guilloche/nls/directives/guilloche.directive.ts","ng://nls-guilloche/nls/services/animation.service.ts","ng://nls-guilloche/nls/nls-guilloche.module.ts"],"sourcesContent":["/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport * as Selection from 'd3-selection';\n\n@Injectable()\nexport class NlsCanvasService {\n private renderer: Renderer2;\n\n public canvas: any;\n\n constructor(\n private rendererFactory: RendererFactory2\n ) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n public get get() {\n return this.canvas;\n }\n\n public set(el) {\n this.canvas = el;\n }\n\n public adjustToWindow() {\n if (this.canvas) {\n this.renderer.setStyle(\n this.canvas,\n 'width',\n this.canvas.innerWidth\n );\n this.renderer.setStyle(\n this.canvas,\n 'height',\n this.canvas.innerHeight\n );\n }\n }\n}\n","/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable, Optional, ViewChild } from '@angular/core';\nimport * as Selection from 'd3-selection';\n\nimport { Graph } from '../models/graph.model';\n\n@Injectable()\nexport class NlsHistoryService {\n\n public history: any[];\n\n constructor() {\n this.history = [];\n }\n\n public save(graphs: Graph[], config) {\n this.history.push({\n date: new Date(),\n graphs: graphs,\n config: config,\n hash: this.hash(graphs)\n });\n }\n\n public hash(graphs) {\n return btoa(JSON.stringify(graphs));\n }\n\n public list() {\n return this.history;\n }\n}\n\n","/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable } from '@angular/core';\nimport * as Selection from 'd3-selection';\nimport * as Random from 'd3-random';\n\nimport { Point } from './../models/point.model';\nimport { Graph } from './../models/graph.model';\n\n@Injectable()\nexport class NlsMathService {\n\n /**\n * Calculate distance between to points with coordinates.\n * @param a\n * @param b\n */\n public Δ(a: Point, b: Point) {\n return Math.pow(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2), 0.5);\n }\n\n public getClosestCenter(point: Point, matrix: any) {\n if (this.Δ(point, matrix.start) < this.Δ(point, matrix.end)) {\n return matrix.start;\n } else {\n return matrix.end;\n }\n }\n\n public getFarestCenter(point: Point, matrix: any) {\n if (this.Δ(point, matrix.start) > this.Δ(point, matrix.end)) {\n return matrix.start;\n } else {Line truncated