repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery.validate.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery.validate.js
/*! * jQuery Validation Plugin v1.17.0 * * https://jqueryvalidation.org/ * * Copyright (c) 2017 Jörn Zaefferer * Released under the MIT license */ (function( factory ) { if ( typeof define === "function" && define.amd ) { define( ["jquery"], factory ); } else if (typeof module === "object" && module.exports)...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery-3.3.1.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery-3.3.1.min.js
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery-3.3.1.slim.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery-3.3.1.slim.min.js
/*! jQuery v3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery.validate.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery.validate.min.js
/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017 * https://jqueryvalidation.org/ * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a....
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/bootstrap.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/bootstrap.min.js
/*! * Bootstrap v4.3.1 (https://getbootstrap.com/) * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery.validate.unobtrusive.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/jquery.validate.unobtrusive.js
/* NUGET: BEGIN LICENSE TEXT * * Microsoft grants you the right to use these script files for the sole * purpose of either: (i) interacting through your browser with the Microsoft * website or online service, subject to the applicable licensing or use * terms; or (ii) using the files as included with a Microsoft p...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/popper.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/popper.js
/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/popper-utils.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/popper-utils.js
/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/init-clip.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/init-clip.js
new ClipboardJS('#copy-button');
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper.min.js
/* Copyright (C) Federico Zivolo 2018 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';funct...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper-utils.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper-utils.min.js
/* Copyright (C) Federico Zivolo 2018 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?b(exports):'function'==typeof define&&define.amd?define(['exports'],b):b(a.PopperUtils={})})(this,function(a){'use s...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper.js
/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper-utils.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/umd/popper-utils.js
/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper.min.js
/* Copyright (C) Federico Zivolo 2018 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */for(var e='undefined'!=typeof window&&'undefined'!=typeof document,t=['Edge','Trident','Firefox'],o=0,n=0;n<t.length;n+=1)if(e&&0<=navigator.userAgent.indexOf(t[n])){o=1;break}function...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper-utils.min.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper-utils.min.js
/* Copyright (C) Federico Zivolo 2018 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). */function a(a,b){if(1!==a.nodeType)return[];var c=getComputedStyle(a,null);return b?c[b]:c}function b(a){return'HTML'===a.nodeName?a:a.parentNode||a.host}function c(d){if(!d)return docu...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
false
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper.js
/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
lithnet/laps-web
https://github.com/lithnet/laps-web/blob/0e478beeee01cdf6b542d3900634a8c1a7c2446f/src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper-utils.js
src/Lithnet.Laps.Web/Lithnet.Laps.Web/Scripts/esm/popper-utils.js
/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files...
javascript
MIT
0e478beeee01cdf6b542d3900634a8c1a7c2446f
2026-01-05T03:39:35.880945Z
true
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/.config/webpack.config/index.js
.config/webpack.config/index.js
require('babel-register') const ENV = process.env.NODE_ENV || 'development' module.exports = require(`./${ENV}`)
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/.config/webpack.config/production.js
.config/webpack.config/production.js
import webpack from 'webpack' import merge from 'webpack-merge' import common from './common' const config = { bail: true, //debug: false, profile: false, devtool: 'source-map', plugins: [ new webpack.NoErrorsPlugin(), new webpack.optimize.OccurrenceOrderPlugin(true), new w...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/.config/webpack.config/common.js
.config/webpack.config/common.js
import path from 'path' import webpack from 'webpack' const ENV = process.env.NODE_ENV || 'development' const PATHS = { root: path.resolve(__dirname, '..', '..'), dist: path.resolve(__dirname, '..', '..', 'build') } export { ENV, PATHS } export default { context: path.resolve(__dirname, '..', '..', 'lib'...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/.config/webpack.config/development.js
.config/webpack.config/development.js
import merge from 'webpack-merge' import common from './common' const config = { cache: true, module: { loaders: [] } } export default merge(common, config)
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/test/utils.test.js
test/utils.test.js
import { hasGzipEncoding } from '../lib/utils' test('can detect gzip files', () => { expect(hasGzipEncoding({ headers: {} })).toBe(false) expect(hasGzipEncoding({ headers: {'accept-encoding': false} })).toBe(false) expect(hasGzipEncoding({ headers: {'accept-encoding': 'none'} })).toBe(false) expect(has...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/proxy.js
lib/proxy.js
import os from 'os' import fs from 'fs' import url from 'url' import ejs from 'ejs' import path from 'path' import cheerio from 'cheerio' import isOnline from 'is-online' import serveFavicon from 'serve-favicon' import request from 'request-promise-native' import { v4 as uuidV4 } from 'uuid' import { DEFAULT_PORT } fr...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/index.js
lib/index.js
import fs from 'fs' import path from 'path' import io from 'socket.io' import ejs from 'ejs' import express from 'express' import bodyParser from 'body-parser' import cookieParser from 'cookie-parser' import cors from 'cors' import logger from './logger' import Backend from './backend' import Proxy from './proxy' impo...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/logger.js
lib/logger.js
import fs from 'fs' import path from 'path' import npmlog from 'npmlog' import pkg from '../package.json' /** * levels that are available from `npmlog` */ const NPM_LEVELS = ['silly', 'verbose', 'debug', 'info', 'http', 'warn', 'error'] let globalLogFile let isLogging = Boolean(process.env.LOGGING_PATH) /** * ens...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/utils.js
lib/utils.js
import fs from 'fs' import os from 'os' import path from 'path' const CONFIG_FILE_PATH = path.resolve(__dirname, '..', 'config.json') export function hasGzipEncoding (req) { return Boolean( typeof req.headers['accept-encoding'] === 'string' && req.headers['accept-encoding'].includes('gzip') ) ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/index.js
lib/backend/index.js
import url from 'url' import Page from './page' import domains from './domains' import Request from './utils/request' import logger from '../logger' /** * Debugger Service * ================ * * Contains the actual devtools backend logic. It manages devtools pages and analyses network * connection if it is run ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/page.js
lib/backend/page.js
import url from 'url' import EventEmitter from 'events' import WebSocket from 'ws' import domains from './domains' import middleware from './middleware' import logger from '../logger' import { getDomain } from '../utils' const SERVER_DOMAINS = ['Network', 'Log', 'Webdriver'] /** * Page model * ========== * * Ma...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/middleware/index.js
lib/backend/middleware/index.js
import * as Page from './page' import * as Debugger from './debugger' export default { Page, Debugger }
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/middleware/page.js
lib/backend/middleware/page.js
/** * Information about the Frame hierarchy along with their cached resources. * @return {Object} frame tree */ export function getResourceTree (result, requestList = []) { const id = result.frameTree.frame.id.split('.')[0] const resources = requestList.filter( (request) => request.requestId && reque...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/middleware/debugger.js
lib/backend/middleware/debugger.js
/** * helper for Debugger.getScriptSource to return script content if script was fetched * from external source */ export function getScriptSource (result, requestList = []) { /** * return if result already contains script content */ if (typeof result.src !== 'string') { return result }...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/domains/webdriver.js
lib/backend/domains/webdriver.js
/** * Custom Webdriver domain */ /** * Return page infos */ export function info () { const { uuid, hostname, url, title, description, metadata } = this return { uuid, hostname, url, title, description, metadata } }
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/domains/index.js
lib/backend/domains/index.js
import * as Network from './network' import * as Page from './page' import * as Log from './log' import * as Target from './target' import * as Webdriver from './webdriver' export default { Network, Page, Log, Target, Webdriver }
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/domains/target.js
lib/backend/domains/target.js
/** * Events */ /** * Issued when a possible inspection target is created. * @param {String} uuid page target passed in by debugger service * @return {Object} target info */ export function targetCreated () { const { uuid: targetId, title, url } = this this.send({ method: 'Target.targetCr...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/domains/page.js
lib/backend/domains/page.js
import zlib from 'zlib' import { hasGzipEncoding } from '../../utils' const FRAME_ID_REGEXP = /frameId=(\d+\.\d+)/ /** * Fired once navigation of the frame has completed. Frame is now associated with * the new loader. */ export function frameNavigated (frameId, origin, url) { this.send({ method: 'Page....
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/domains/network.js
lib/backend/domains/network.js
import zlib from 'zlib' import { hasGzipEncoding } from '../../utils' export function getResponseBodyData ({ id, params }) { const request = this.requestList.filter((req) => req.requestId === params.requestId)[0] if (!request) { return Promise.reject( new Error(`Couldn't find request with ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/domains/log.js
lib/backend/domains/log.js
/** * Issued when new message was logged. * * @param {LogEntry} entry the entry */ export function entryAdded (request, error) { this.send({ method: 'Log.entryAdded', params: { entry: { level: 'error', source: 'network', text: error.m...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/backend/utils/request.js
lib/backend/utils/request.js
import path from 'path' import mime from 'mime-types' import mimeDB from 'mime-db' import logger from '../../logger' export default class Request { constructor (req) { this.req = req this.log = logger('Request') this.origin = `${req.protocol}://${req.headers.host}` this.fullUrl = t...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/launcher.bundle.js
lib/frontend/launcher.bundle.js
import Promise from 'promise-polyfill' import { getTitle, getDescription, request } from './utils/common' import RemoteDebugger from './remoteDebugger' window.io = require('../../node_modules/socket.io-client/dist/socket.io.js') const NOOP = () => {} window.MutationObserver = window.MutationObserver || window.W...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/remoteDebugger.js
lib/frontend/remoteDebugger.js
import domains from './domains' import CSSStore from './models/CSSStore' import { setNodeIds } from './utils/dom' import { getTitle, getDescription, getDriverOrigin } from './utils/common' const SUPPORTED_DOMAINS = Object.keys(domains) /** * Pure implementation of the Chrome Remote Debugger Protocol (tip-of-tree) in...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/debugger.bundle.js
lib/frontend/debugger.bundle.js
import RemoteDebugger from './remoteDebugger' import registerPolyfills from './utils/polyfills' import { getStacktrace } from './utils/runtime' registerPolyfills() const uuid = document.currentScript ? document.currentScript.getAttribute('data-uuid') : window._uuid const remoteDebugger = window.remoteDebugger = new R...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/webdriver.js
lib/frontend/domains/webdriver.js
import Node from '../models/Node' import ObjectStore from '../models/ObjectStore' import { getTitle } from '../utils/common' import { setNodeIds } from '../utils/dom' const W3C_ELEMENT_ID = 'element-6066-11e4-a52e-4f735466cecf' let elementCache = [] /** * Helper */ /** * find elements by css selector * @param {S...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/css.js
lib/frontend/domains/css.js
import Node from '../models/Node' import arrayFind from 'core-js/library/fn/array/find' let enabled = false const name = 'CSS' /** * Returns the computed style for a DOM node identified by nodeId. * * @param {NodeId} nodeId Id of the element to get computed styles from * @return {[CSSComputedSty...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/runtime.js
lib/frontend/domains/runtime.js
import { scriptParsed } from './debugger' import ObjectStore from '../models/ObjectStore' import { getConsoleArg, getStacktrace, getFakeError, getObjectProperties, callFn } from '../utils/runtime' export const scripts = [] /** * internal methods */ /** * overwrite console */ export function overwriteConsole (con...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/index.js
lib/frontend/domains/index.js
import * as CSS from './css' import * as DOM from './dom' import * as Debugger from './debugger' import * as Input from './input' import * as Network from './network' import * as Overlay from './overlay' import * as Page from './page' import * as Runtime from './runtime' import * as Target from './target' import * as W...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/overlay.js
lib/frontend/domains/overlay.js
/** * contains some methods that have been moved to this new domain according to latest * devtools developments */ import { highlightNode, hideHighlight } from './dom' /** * Paints viewport size upon main frame resize. * @param {Boolean} show Whether to paint size or not. */ export function setShowViewportSizeO...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/input.js
lib/frontend/domains/input.js
import BitField from '../models/BitField' /** * helper method to emulate key event on page * * @param {Number} keyCode key code to be simulated */ function triggerKeyboardEvent ( keyCode, type = 'keydown', bubbles = true, cancelable = true, altKeyArg = false, ctrlKeyArg = false, metaKeyArg = false, shiftK...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/target.js
lib/frontend/domains/target.js
/** * Methods */ /** * Enables target discovery for the specified locations, when setDiscoverTargets was * set to true. * * @param {RemoteLocation[]} locations List of remote locations. */ export function setRemoteLocations () { return {} } /** * Controls whether to discover available targets and notify ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/page.js
lib/frontend/domains/page.js
let enabled = false const name = 'Page' /** * Reloads given page optionally ignoring the cache. * * @param {Boolean} ignoreCache If true, browser cache is ignored (as if the user pressed Shift+refresh). */ export function reload ({ ignoreCache }) { window.location.reload(Boolean(ignoreCache)) return {} } ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/dom.js
lib/frontend/domains/dom.js
import Node from '../models/Node' import ObjectStore from '../models/ObjectStore' import { PropertyObject } from '../models/PropertyObject' import { getDomNodes, getColorFormatted, setNodeIds } from '../utils/dom' import { getAttributes as _getAttributes } from '../utils/common' let enabled = false const name = 'DOM' ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/debugger.js
lib/frontend/domains/debugger.js
/** * Methods */ /** * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions * or no exceptions. Initial pause on exceptions state is `none`. * * @param {String} state Pause on exceptions mode. Allowed values: none, uncaught, all. */ export function setPauseOnExceptions ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/domains/network.js
lib/frontend/domains/network.js
import Cookies from 'js-cookie' /** * Returns all browser cookies for the current URL. Depending on the backend support, will return detailed * cookie information in the cookies field. (EXPERIMENTAL) */ export function getCookies ({ urls }) { const cookies = Cookies.get() return Object.keys(cookies).map((na...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/models/PropertyObject.js
lib/frontend/models/PropertyObject.js
import ObjectStore from '../models/ObjectStore' export const SUB_TYPES = [ 'array', 'null', 'node', 'regexp', 'date', 'map', 'set', 'iterator', 'generator', 'error', 'promise', 'typedarray' ] /** * Facade for subtype property */ export class PropertyObject { constructor (object) { const subtype ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/models/StyleSheet.js
lib/frontend/models/StyleSheet.js
import parseCss from 'css/lib/parse' import first from 'lodash.first' export default class StyleSheet { constructor (id, styleSheet) { this.media = [] // ToDo: figure out media usage this.origin = styleSheet.origin || 'regular' this.styleSheetId = id this.cssText = styleSheet.cssTex...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/models/BitField.js
lib/frontend/models/BitField.js
export default class BitField { constructor (value) { this.values = [value] } get (i) { var index = (i / 32) | 0 // | 0 converts to an int. Math.floor works too. var bit = i % 32 return (this.values[index] & (1 << bit)) !== 0 } set (i) { var index = (i / 32)...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/models/CSSStore.js
lib/frontend/models/CSSStore.js
import arrayFind from 'core-js/library/fn/array/find' import StyleSheet from './StyleSheet' export default class CSSStore { constructor (requestId) { this.requestId = requestId this.styleSheets = {} } add (cssStyleSheet) { let id = this.requestId.split('.') id = id[0] + '....
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/models/ObjectStore.js
lib/frontend/models/ObjectStore.js
export class ObjectStore { constructor () { this.objects = [] } get (id) { const object = this.objects[id] if (!object) { return } return object } get size () { return this.objects.length } getByObjectId (objectId) { co...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/models/Node.js
lib/frontend/models/Node.js
import { getAttributes } from '../utils/common' import { HIGHLIGHT_NODE_ID } from '../domains/dom' import { setNodeIds } from '../utils/dom' let nodeCount = 0 let nodes = {} let elements = {} export default class Node { nodeId = nodeCount++ constructor (node) { this.nodeId = node._nodeId this...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/utils/runtime.js
lib/frontend/utils/runtime.js
import ObjectStore from '../models/ObjectStore' import { PropertyObject } from '../models/PropertyObject' /** * parse console properties properly * @param {*} arg any kind of primitive or object * @return {RemoteObject} Mirror object referencing original JavaScript object. */ export function ge...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/utils/polyfills.js
lib/frontend/utils/polyfills.js
export default function () { if (!('remove' in Element.prototype)) { Element.prototype.remove = function () { this.parentNode.removeChild(this) } } window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/utils/common.js
lib/frontend/utils/common.js
import xhr from 'xhr' const flatten = arr => arr.reduce( (acc, val) => acc.concat( Array.isArray(val) ? flatten(val) : val ), [] ) export function getAttributes (namedNodeMap) { /** * ensure text nodes aren't accidentely being parsed for attributes */ if (!namedNodeMap) { ...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
christian-bromann/devtools-backend
https://github.com/christian-bromann/devtools-backend/blob/9fa7730210a6d4057a938d991826082400fb3eb4/lib/frontend/utils/dom.js
lib/frontend/utils/dom.js
/** * parses through root children to create Node objects * @param {NodeElement} root element to start with * @param {number} depth number of child depth to parse through * @param {Object} pierce unknown * @return {Node} root element with children elements */ export function getDomNo...
javascript
Apache-2.0
9fa7730210a6d4057a938d991826082400fb3eb4
2026-01-05T03:39:39.538172Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/postcss.config.js
postcss.config.js
module.exports = function(ctx) { ctx = ctx || {}; ctx.env = ctx.env || 'development'; return { map: ctx.env === 'development' ? ctx.map : false, plugins: { 'postcss-import': {}, 'postcss-preset-env': {}, cssnano: ctx.env === 'production' ? {} : false, }, }; };
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/babel.config.js
babel.config.js
module.exports = { presets: [ [ '@babel/preset-env', { targets: { ie: '11', }, }, ], '@babel/preset-react', ], plugins: [ '@babel/plugin-proposal-class-properties', '@babel/plugin-transform-runtime', ], };
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/index.js
src/index.js
import View2D from './VTKViewport/View2D'; import View3D from './VTKViewport/View3D'; import vtkInteractorStyleMPRSlice from './VTKViewport/vtkInteractorStyleMPRSlice.js'; import vtkInteractorStyleMPRWindowLevel from './VTKViewport/vtkInteractorStyleMPRWindowLevel.js'; import vtkInteractorStyleMPRCrosshairs from './VTK...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/events.js
src/events.js
const EVENTS = { VIEWPORT_ROTATED: 'viewportRotated', }; export default EVENTS;
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/test.js
src/test.js
import VTKViewport from './CornerstoneViewport/CornerstoneViewport.js'; describe('CornerstoneViewport', () => { it('is truthy', () => { expect(VTKViewport).toBeTruthy(); }); });
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/Custom/VTKMPRViewport.js
src/Custom/VTKMPRViewport.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import vtkGenericRenderWindow from 'vtk.js/Sources/Rendering/Misc/GenericRenderWindow'; import vtkWidgetManager from 'vtk.js/Sources/Widgets/Core/WidgetManager'; import vtkVolume from 'vtk.js/Sources/Rendering/Core/Volume'; import vtkVolumeMa...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/uuidv4.js
src/helpers/uuidv4.js
// From: https://stackoverflow.com/a/2117523/1867984 // prettier-ignore export default function uuidv4() { return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) ); }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/liangBarksyClip.js
src/helpers/liangBarksyClip.js
// Pulled from source: https://github.com/w8r/liang-barsky // MIT Licensed. /** * @preserve * Fast, destructive implemetation of Liang-Barsky line clipping algorithm. * It clips a 2D segment by a rectangle. * @author Alexander Milevski <info@w8r.name> * @license MIT */ const EPSILON = 1e-6; const INSIDE = 1; co...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/formatPN.js
src/helpers/formatPN.js
/** * Formats a patient name for display purposes */ export default function formatPN(name) { if (!name) { return; } // Convert the first ^ to a ', '. String.replace() only affects // the first appearance of the character. const commaBetweenFirstAndLast = name.replace('^', ', '); // Replace any rema...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/index.js
src/helpers/index.js
import formatPN from './formatPN'; import formatDA from './formatDA'; import formatTM from './formatTM'; import formatNumberPrecision from './formatNumberPrecision'; import isValidNumber from './isValidNumber'; import uuidv4 from './uuidv4.js'; const helpers = { formatPN, formatDA, formatTM, formatNumberPrecis...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/formatDA.js
src/helpers/formatDA.js
import { parse, format } from 'date-fns'; export default function formatDA(date, strFormat = 'MMM D, YYYY') { if (!date) { return; } try { const parsedDateTime = parse(date, 'yyyyMMdd', new Date()); const formattedDateTime = format(parsedDateTime, strFormat); return formattedDateTime; } catch...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/formatTM.js
src/helpers/formatTM.js
import { parse, format } from 'date-fns'; export default function formatTM(time, strFormat = 'HH:mm:ss') { if (!time) { return; } try { const inputFormat = 'HHmmss.SSS'; const strTime = time.toString().substring(0, inputFormat.length); const parsedDateTime = parse(strTime, 'HHmmss.SSS', new Date...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/isValidNumber.js
src/helpers/isValidNumber.js
export default function isValidNumber(value) { return typeof value === 'number' && !isNaN(value); }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/helpers/formatNumberPrecision.js
src/helpers/formatNumberPrecision.js
export default function formatNumberPrecision(number, precision) { if (number !== null) { return parseFloat(number).toFixed(precision); } }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/ViewportOverlay/ViewportOverlay.js
src/ViewportOverlay/ViewportOverlay.js
import { PureComponent } from 'react'; import React from 'react'; import PropTypes from 'prop-types'; import { helpers } from '../helpers/index.js'; import './ViewportOverlay.css'; const { formatPN, formatDA, formatNumberPrecision, formatTM, isValidNumber, } = helpers; class ViewportOverlay extends PureComp...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/logMemoryUsage.js
src/lib/logMemoryUsage.js
export function logMemoryUsage() { if (!window.performance || !window.performance.memory) { return; } const memory = window.performance.memory; const kb = 1024; const mb = kb * kb; console.log( 'total %d KB %d MB', memory.totalJSHeapSize / kb, memory.totalJSHeapSize / mb ); console.log...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/loadImageData.js
src/lib/loadImageData.js
import cornerstone from 'cornerstone-core'; import insertSlice from './data/insertSlice.js'; import getPatientWeightAndCorrectedDose from './data/getPatientWeightAndCorrectedDose.js'; // TODO: If we attempt to load multiple imageDataObjects at once this will break. export default function loadImageDataProgressively(im...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/index.js
src/lib/index.js
import { getImageData } from './getImageData.js'; import loadImageData from './loadImageData.js'; import { logMemoryUsage } from './logMemoryUsage.js'; import { math } from './math/index.js'; import { MPR } from './MPR/index.js'; import { switchToMPRMode } from './switchToMPRMode.js'; import ohifInteractorStyleSlice fr...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/ohifInteractorStyleSlice.js
src/lib/ohifInteractorStyleSlice.js
import macro from 'vtk.js/Sources/macro'; import vtkImageMapper from 'vtk.js/Sources/Rendering/Core/ImageMapper'; import vtkConstants from 'vtk.js/Sources/Rendering/Core/InteractorStyle/Constants.js'; import vtkInteractorStyleTrackballCamera from 'vtk.js/Sources/Interaction/Style/InteractorStyleTrackballCamera'; /** ...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/ohifInteractorObserver.js
src/lib/ohifInteractorObserver.js
import macro from 'vtk.js/Sources/macro'; import vtkInteractorObserver from 'vtk.js/Sources/Rendering/Core/InteractorObserver'; /** * vtkInteractorObserverClass. * @param publicAPI * @param model */ function ohifInteractorObserver(publicAPI, model) { model.classHierarchy.push('ohifInteractorObserver'); macro....
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/throttle.js
src/lib/throttle.js
export default function throttle(fn, threshhold, scope) { threshhold || (threshhold = 250); var last, deferTimer; return function() { var context = scope || this; var now = +new Date(), args = arguments; if (last && now < last + threshhold) { // hold on to it clearTimeout(deferTimer...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/invertVolume.js
src/lib/invertVolume.js
/** * @param {vtkVolume} volume A vtkVolume object to invert * @param {()=>void|{render:()=>void}} [rendering] - A function to render the volume after * being inverted or a RenderWindow object. Can be null. * @returns void */ export default (volume, rendering = null) => { if (!volume) { return; } const ...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/getImageData.js
src/lib/getImageData.js
import { vec3 } from 'gl-matrix'; import vtkImageData from 'vtk.js/Sources/Common/DataModel/ImageData'; import vtkDataArray from 'vtk.js/Sources/Common/Core/DataArray'; import vtkMath from 'vtk.js/Sources/Common/Core/Math'; import buildMetadata from './data/buildMetadata.js'; import imageDataCache from './data/imageDa...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/createSub.js
src/lib/createSub.js
export function createSub(sub) { let s = sub; const unsubscribe = () => { if (s) { s.unsubscribe(); s = null; } }; return { sub(newSub) { unsubscribe(); s = newSub; }, unsubscribe, }; }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/windowLevelRangeConverter.js
src/lib/windowLevelRangeConverter.js
export function toWindowLevel(low, high) { const windowWidth = Math.abs(low - high); const windowCenter = low + windowWidth / 2; return { windowWidth, windowCenter }; } export function toLowHighRange(windowWidth, windowCenter) { const lower = windowCenter - windowWidth / 2.0; const upper = windowCenter + wi...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/math/realsApproximatelyEqual.js
src/lib/math/realsApproximatelyEqual.js
// eps is up to you to determine based on your application. export default function realsApproximatelyEqual(a, b, eps = 0.00001) { return Math.abs(a - b) < eps; }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/math/index.js
src/lib/math/index.js
import sum from './sum.js'; import diff from './diff.js'; import mean from './mean.js'; import realsApproximatelyEqual from './realsApproximatelyEqual.js'; // TODO: Use a library for this? const math = { sum, diff, mean, realsApproximatelyEqual, }; export { math };
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/math/mean.js
src/lib/math/mean.js
import sum from './sum.js'; export default function mean(array) { return sum(array) / array.length; }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/math/diff.js
src/lib/math/diff.js
export default function diff(array) { let resultArray = []; for (let i = 1; i < array.length; i++) { resultArray.push(array[i] - array[i - 1]); } return resultArray; }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/math/sum.js
src/lib/math/sum.js
export default function sum(array) { let sum = 0; for (let i = 0; i < array.length; i++) { sum += array[i]; } return sum; }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/math/angles.js
src/lib/math/angles.js
export function degrees2radians(degrees) { return (degrees * Math.PI) / 180; } export function radians2degrees(rads) { return (rads * 180) / Math.PI; }
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/buildMetadata.js
src/lib/data/buildMetadata.js
import cornerstone from 'cornerstone-core'; export default function buildMetadata(imageIds) { // Retrieve the Cornerstone imageIds from the display set // TODO: In future, we want to get the metadata independently from Cornerstone const imageId0 = imageIds[0]; const { pixelRepresentation, bitsAllocate...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/imageDataCache.js
src/lib/data/imageDataCache.js
const imageDataCache = new Map(); export default imageDataCache;
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/determineOrientation.js
src/lib/data/determineOrientation.js
// Based on David Clunie's various postings // on the dicom google groupd. export default function determineOrientation(v) { let axis; const oX = v.x < 0 ? 'R' : 'L'; const oY = v.y < 0 ? 'A' : 'P'; const oZ = v.z < 0 ? 'I' : 'S'; const aX = Math.abs(v.x); const aY = Math.abs(v.y); const aZ = Math.abs(v....
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/computeZAxis.js
src/lib/data/computeZAxis.js
import { mean } from '../math/mean.js'; import { diff } from '../math/diff.js'; // given the text orientation, determine the index (0,1,2) // of the z axis function determineOrientationIndex(orientation) { switch (orientation) { case 'A': case 'P': return 1; case 'L': case 'R': return 0; ...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/sortDatasetsByImagePosition.js
src/lib/data/sortDatasetsByImagePosition.js
import { vec3 } from 'gl-matrix'; /** * * @param {*} scanAxisNormal - [x, y, z] array or gl-matrix vec3 * @param {*} imageMetaDataMap - one of the results from BuildMetadata() */ export default function sortDatasetsByImagePosition( scanAxisNormal, imageMetaDataMap ) { // See https://github.com/dcmjs-org/dcmj...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/insertSlice.js
src/lib/data/insertSlice.js
/** * * @param {Object} imageData - The vtkImageData * @param {*} sliceIndex - The index of the slice you are inserting. * @param {*} image The cornerstone image to pull pixel data data from. * @param {*} modality The modality of the image. * @param {*} modalitySpecificScalingParameters Specific scaling paramater...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false
OHIF/react-vtkjs-viewport
https://github.com/OHIF/react-vtkjs-viewport/blob/e5824538fcecf77e75d31589a2712c3558463468/src/lib/data/getPatientWeightAndCorrectedDose.js
src/lib/data/getPatientWeightAndCorrectedDose.js
import cornerstone from 'cornerstone-core'; export default function getPatientWeightAndCorrectedDose(imageId) { const seriesModule = cornerstone.metaData.get('generalSeriesModule', imageId); const patientStudyModule = cornerstone.metaData.get( 'patientStudyModule', imageId ); if (!patientStudyModule)...
javascript
MIT
e5824538fcecf77e75d31589a2712c3558463468
2026-01-05T03:39:07.567611Z
false