@tscircuit/schematic-viewer 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/index.d.ts +6 -1
  2. package/dist/index.js +1257 -8707
  3. package/dist/index.js.map +1 -1
  4. package/package.json +18 -15
  5. package/dist/Schematic.d.ts +0 -6
  6. package/dist/Schematic.js +0 -9650
  7. package/dist/Schematic.js.map +0 -1
  8. package/dist/lib/hooks/index.d.ts +0 -1
  9. package/dist/lib/hooks/index.js +0 -2170
  10. package/dist/lib/hooks/index.js.map +0 -1
  11. package/dist/lib/hooks/use-maybe-promise.d.ts +0 -3
  12. package/dist/lib/hooks/use-maybe-promise.js +0 -2170
  13. package/dist/lib/hooks/use-maybe-promise.js.map +0 -1
  14. package/dist/lib/render-context/index.d.ts +0 -10
  15. package/dist/lib/render-context/index.js +0 -45
  16. package/dist/lib/render-context/index.js.map +0 -1
  17. package/dist/lib/types/core.d.ts +0 -149
  18. package/dist/lib/types/core.js +0 -18
  19. package/dist/lib/types/core.js.map +0 -1
  20. package/dist/lib/types/index.d.ts +0 -4
  21. package/dist/lib/types/index.js +0 -18
  22. package/dist/lib/types/index.js.map +0 -1
  23. package/dist/lib/types/route-solver.d.ts +0 -24
  24. package/dist/lib/types/route-solver.js +0 -18
  25. package/dist/lib/types/route-solver.js.map +0 -1
  26. package/dist/lib/types/source-component.d.ts +0 -44
  27. package/dist/lib/types/source-component.js +0 -18
  28. package/dist/lib/types/source-component.js.map +0 -1
  29. package/dist/lib/types/util.d.ts +0 -14
  30. package/dist/lib/types/util.js +0 -18
  31. package/dist/lib/types/util.js.map +0 -1
  32. package/dist/lib/utils/direction-to-vec.d.ts +0 -13
  33. package/dist/lib/utils/direction-to-vec.js +0 -96
  34. package/dist/lib/utils/direction-to-vec.js.map +0 -1
  35. package/dist/lib/utils/get-svg-path-bounds.d.ts +0 -10
  36. package/dist/lib/utils/get-svg-path-bounds.js +0 -51
  37. package/dist/lib/utils/get-svg-path-bounds.js.map +0 -1
  38. package/dist/lib/utils/point-math.d.ts +0 -20
  39. package/dist/lib/utils/point-math.js +0 -57
  40. package/dist/lib/utils/point-math.js.map +0 -1
  41. package/dist/pages/_app.d.ts +0 -5
  42. package/dist/pages/_app.js +0 -3656
  43. package/dist/pages/_app.js.map +0 -1
  44. package/dist/pages/index.d.ts +0 -3
  45. package/dist/pages/index.js +0 -9662
  46. package/dist/pages/index.js.map +0 -1
  47. package/dist/pages/led-circuit-react.d.ts +0 -3
  48. package/dist/pages/led-circuit-react.js +0 -9731
  49. package/dist/pages/led-circuit-react.js.map +0 -1
  50. package/dist/pages/led-circuit.d.ts +0 -3
  51. package/dist/pages/led-circuit.js +0 -9711
  52. package/dist/pages/led-circuit.js.map +0 -1
  53. package/dist/schematic-components/MovableGrid/MovableGrid.stories.d.ts +0 -7
  54. package/dist/schematic-components/MovableGrid/MovableGrid.stories.js +0 -3107
  55. package/dist/schematic-components/MovableGrid/MovableGrid.stories.js.map +0 -1
  56. package/dist/schematic-components/MovableGrid/index.d.ts +0 -3
  57. package/dist/schematic-components/MovableGrid/index.js +0 -3091
  58. package/dist/schematic-components/MovableGrid/index.js.map +0 -1
  59. package/dist/schematic-components/ProjectComponent.d.ts +0 -10
  60. package/dist/schematic-components/ProjectComponent.js +0 -9622
  61. package/dist/schematic-components/ProjectComponent.js.map +0 -1
  62. package/dist/schematic-components/RenderError.d.ts +0 -6
  63. package/dist/schematic-components/RenderError.js +0 -3098
  64. package/dist/schematic-components/RenderError.js.map +0 -1
  65. package/dist/schematic-components/SVGPathComponent.d.ts +0 -19
  66. package/dist/schematic-components/SVGPathComponent.js +0 -3151
  67. package/dist/schematic-components/SVGPathComponent.js.map +0 -1
  68. package/dist/schematic-components/SchematicBug.d.ts +0 -13
  69. package/dist/schematic-components/SchematicBug.js +0 -3532
  70. package/dist/schematic-components/SchematicBug.js.map +0 -1
  71. package/dist/schematic-components/SchematicComponent.d.ts +0 -13
  72. package/dist/schematic-components/SchematicComponent.js +0 -9464
  73. package/dist/schematic-components/SchematicComponent.js.map +0 -1
  74. package/dist/schematic-components/SchematicGroup.d.ts +0 -3
  75. package/dist/schematic-components/SchematicGroup.js +0 -32
  76. package/dist/schematic-components/SchematicGroup.js.map +0 -1
  77. package/dist/schematic-components/SchematicPort.d.ts +0 -13
  78. package/dist/schematic-components/SchematicPort.js +0 -9327
  79. package/dist/schematic-components/SchematicPort.js.map +0 -1
  80. package/dist/schematic-components/SchematicText.d.ts +0 -10
  81. package/dist/schematic-components/SchematicText.js +0 -3124
  82. package/dist/schematic-components/SchematicText.js.map +0 -1
  83. package/dist/schematic-components/SchematicTrace.d.ts +0 -13
  84. package/dist/schematic-components/SchematicTrace.js +0 -3210
  85. package/dist/schematic-components/SchematicTrace.js.map +0 -1
  86. package/dist/schematic-components/SimpleCapacitor.d.ts +0 -13
  87. package/dist/schematic-components/SimpleCapacitor.js +0 -3170
  88. package/dist/schematic-components/SimpleCapacitor.js.map +0 -1
  89. package/dist/schematic-components/SimpleDiode.d.ts +0 -13
  90. package/dist/schematic-components/SimpleDiode.js +0 -3168
  91. package/dist/schematic-components/SimpleDiode.js.map +0 -1
  92. package/dist/schematic-components/SimpleGround.d.ts +0 -13
  93. package/dist/schematic-components/SimpleGround.js +0 -3169
  94. package/dist/schematic-components/SimpleGround.js.map +0 -1
  95. package/dist/schematic-components/SimpleInductor.d.ts +0 -13
  96. package/dist/schematic-components/SimpleInductor.js +0 -3169
  97. package/dist/schematic-components/SimpleInductor.js.map +0 -1
  98. package/dist/schematic-components/SimplePowerSource.d.ts +0 -13
  99. package/dist/schematic-components/SimplePowerSource.js +0 -3171
  100. package/dist/schematic-components/SimplePowerSource.js.map +0 -1
  101. package/dist/schematic-components/SimpleResistor.d.ts +0 -13
  102. package/dist/schematic-components/SimpleResistor.js +0 -3169
  103. package/dist/schematic-components/SimpleResistor.js.map +0 -1
  104. package/dist/schematic-components/index.d.ts +0 -18
  105. package/dist/schematic-components/index.js +0 -9656
  106. package/dist/schematic-components/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../node_modules/lodash._objecttypes/index.js","../../node_modules/lodash.isobject/index.js","../../node_modules/lodash._renative/index.js","../../node_modules/lodash._shimkeys/index.js","../../node_modules/lodash.keys/index.js","../../node_modules/lodash.noop/index.js","../../node_modules/lodash._basecreate/index.js","../../node_modules/lodash._setbinddata/index.js","../../node_modules/lodash._basebind/index.js","../../node_modules/lodash._slice/index.js","../../node_modules/lodash._basecreatewrapper/index.js","../../node_modules/lodash.isfunction/index.js","../../node_modules/lodash._createwrapper/index.js","../../node_modules/lodash.bind/index.js","../../node_modules/lodash.identity/index.js","../../node_modules/lodash.support/index.js","../../node_modules/lodash._basecreatecallback/index.js","../../node_modules/lodash.forown/index.js","../../node_modules/lodash.foreach/index.js","../../node_modules/convert-units/lib/definitions/length.js","../../node_modules/convert-units/lib/definitions/area.js","../../node_modules/convert-units/lib/definitions/mass.js","../../node_modules/convert-units/lib/definitions/volume.js","../../node_modules/convert-units/lib/definitions/each.js","../../node_modules/convert-units/lib/definitions/temperature.js","../../node_modules/convert-units/lib/definitions/time.js","../../node_modules/convert-units/lib/definitions/digital.js","../../node_modules/convert-units/lib/definitions/partsPer.js","../../node_modules/convert-units/lib/definitions/speed.js","../../node_modules/convert-units/lib/definitions/pace.js","../../node_modules/convert-units/lib/definitions/pressure.js","../../node_modules/convert-units/lib/definitions/current.js","../../node_modules/convert-units/lib/definitions/voltage.js","../../node_modules/convert-units/lib/definitions/power.js","../../node_modules/convert-units/lib/definitions/reactivePower.js","../../node_modules/convert-units/lib/definitions/apparentPower.js","../../node_modules/convert-units/lib/definitions/energy.js","../../node_modules/convert-units/lib/definitions/reactiveEnergy.js","../../node_modules/convert-units/lib/definitions/volumeFlowRate.js","../../node_modules/convert-units/lib/definitions/illuminance.js","../../node_modules/convert-units/lib/definitions/frequency.js","../../node_modules/convert-units/lib/definitions/angle.js","../../node_modules/convert-units/lib/index.js","../../node_modules/@lume/kiwi/es/maptype.js","../../node_modules/@lume/kiwi/es/variable.js","../../node_modules/@lume/kiwi/es/expression.js","../../node_modules/@lume/kiwi/es/strength.js","../../node_modules/@lume/kiwi/es/constraint.js","../../node_modules/@lume/kiwi/es/solver.js","../../node_modules/@lume/kiwi/es/kiwi.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_arrayPush.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_freeGlobal.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_root.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_Symbol.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_getRawTag.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_objectToString.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_baseGetTag.js","../../node_modules/@tscircuit/builder/node_modules/lodash/isObjectLike.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_baseIsArguments.js","../../node_modules/@tscircuit/builder/node_modules/lodash/isArguments.js","../../node_modules/@tscircuit/builder/node_modules/lodash/isArray.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_isFlattenable.js","../../node_modules/@tscircuit/builder/node_modules/lodash/_baseFlatten.js","../../node_modules/@tscircuit/builder/node_modules/lodash/flatten.js","../../node_modules/@tscircuit/builder/src/index.ts","../../node_modules/@tscircuit/builder/src/lib/builder/ports-builder/port-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/ports-builder/ports-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/footprint-builder/plated-hole-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/footprint-builder/hole-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/footprint-builder/via-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/footprint-builder/smt-pad-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/footprint-builder/footprint-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/schematic-symbol-builder/schematic-symbol-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/simple-data-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/schematic-symbol-builder/schematic-box-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/schematic-symbol-builder/schematic-line-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/schematic-symbol-builder/schematic-text-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/ComponentBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/utils/direction-to-vec.ts","../../node_modules/@tscircuit/builder/src/lib/builder/transform-elements.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/ResistorBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/CapacitorBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/InductorBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/BugBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/get-port-position.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/DiodeBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/PowerSourceBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/component-builder/GroundBuilder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/group-builder.ts","../../node_modules/@tscircuit/builder/src/lib/apply-selector/index.ts","../../node_modules/@tscircuit/builder/src/lib/apply-selector/convert-abbr-to-ftype.ts","../../node_modules/@tscircuit/builder/src/lib/builder/trace-builder/convert-to-readable-route-tree.ts","../../node_modules/@tscircuit/builder/src/lib/builder/trace-builder/straight-route-solver.ts","../../node_modules/@tscircuit/builder/src/lib/builder/trace-builder/rmst-solver.ts","../../node_modules/@tscircuit/builder/src/lib/utils/point-math.ts","../../node_modules/@tscircuit/builder/src/lib/builder/trace-builder/index.ts","../../node_modules/@tscircuit/builder/src/lib/project/defaults.ts","../../node_modules/@tscircuit/builder/src/lib/project/create-project-from-elements.ts","../../node_modules/@tscircuit/builder/src/lib/builder/project-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/constrained-layout-builder/constrained-layout-builder.ts","../../node_modules/@tscircuit/builder/src/lib/builder/constrained-layout-builder/constraint-builder.ts","../../node_modules/@tscircuit/builder/src/lib/project/project-class.ts","../../node_modules/react/cjs/react.production.min.js","../../node_modules/react/cjs/react.development.js","../../node_modules/react/index.js","../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../node_modules/react/cjs/react-jsx-runtime.development.js","../../node_modules/react/jsx-runtime.js","../../node_modules/lodash/_baseRange.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObject.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/isLength.js","../../node_modules/lodash/isArrayLike.js","../../node_modules/lodash/_isIndex.js","../../node_modules/lodash/_isIterateeCall.js","../../node_modules/lodash/_trimmedEndIndex.js","../../node_modules/lodash/_baseTrim.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/isSymbol.js","../../node_modules/lodash/toNumber.js","../../node_modules/lodash/toFinite.js","../../node_modules/lodash/_createRange.js","../../node_modules/lodash/range.js","../../src/pages/led-circuit.tsx","../../src/lib/hooks/use-maybe-promise.ts","../../src/Schematic.tsx","../../src/schematic-components/MovableGrid/index.tsx","../../src/lib/render-context/index.ts","../../src/lib/utils/get-svg-path-bounds.ts","../../src/schematic-components/SVGPathComponent.tsx","../../src/schematic-components/SimpleResistor.tsx","../../src/schematic-components/SimpleCapacitor.tsx","../../src/schematic-components/ProjectComponent.tsx","../../src/schematic-components/SchematicComponent.tsx","../../src/lib/utils/direction-to-vec.ts","../../src/schematic-components/SchematicPort.tsx","../../src/schematic-components/SchematicText.tsx","../../src/schematic-components/SchematicTrace.tsx","../../src/schematic-components/RenderError.tsx","../../src/schematic-components/SchematicBug.tsx","../../src/schematic-components/SimplePowerSource.tsx","../../src/schematic-components/SimpleGround.tsx","../../src/schematic-components/SimpleInductor.tsx","../../src/schematic-components/SimpleDiode.tsx"],"sourcesContent":["/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\n\n/** Used to determine if values are of the language type Object */\nvar objectTypes = {\n 'boolean': false,\n 'function': true,\n 'object': true,\n 'number': false,\n 'string': false,\n 'undefined': false\n};\n\nmodule.exports = objectTypes;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar objectTypes = require('lodash._objecttypes');\n\n/**\n * Checks if `value` is the language type of Object.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Objects\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if the `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // check if the value is the ECMAScript language type of Object\n // http://es5.github.io/#x8\n // and avoid a V8 bug\n // http://code.google.com/p/v8/issues/detail?id=2291\n return !!(value && objectTypes[typeof value]);\n}\n\nmodule.exports = isObject;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\n\n/** Used for native method references */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the internal [[Class]] of values */\nvar toString = objectProto.toString;\n\n/** Used to detect if a method is native */\nvar reNative = RegExp('^' +\n String(toString)\n .replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n .replace(/toString| for [^\\]]+/g, '.*?') + '$'\n);\n\nmodule.exports = reNative;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar objectTypes = require('lodash._objecttypes');\n\n/** Used for native method references */\nvar objectProto = Object.prototype;\n\n/** Native method shortcuts */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which produces an array of the\n * given object's own enumerable property names.\n *\n * @private\n * @type Function\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns an array of property names.\n */\nvar shimKeys = function(object) {\n var index, iterable = object, result = [];\n if (!iterable) return result;\n if (!(objectTypes[typeof object])) return result;\n for (index in iterable) {\n if (hasOwnProperty.call(iterable, index)) {\n result.push(index);\n }\n }\n return result\n};\n\nmodule.exports = shimKeys;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar isObject = require('lodash.isobject'),\n reNative = require('lodash._renative'),\n shimKeys = require('lodash._shimkeys');\n\n/* Native method shortcuts for methods with the same name as other `lodash` methods */\nvar nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys;\n\n/**\n * Creates an array composed of the own enumerable property names of an object.\n *\n * @static\n * @memberOf _\n * @category Objects\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns an array of property names.\n * @example\n *\n * _.keys({ 'one': 1, 'two': 2, 'three': 3 });\n * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n if (!isObject(object)) {\n return [];\n }\n return nativeKeys(object);\n};\n\nmodule.exports = keys;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\n\n/**\n * A no-operation function.\n *\n * @static\n * @memberOf _\n * @category Utilities\n * @example\n *\n * var object = { 'name': 'fred' };\n * _.noop(object) === undefined;\n * // => true\n */\nfunction noop() {\n // no operation performed\n}\n\nmodule.exports = noop;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar isObject = require('lodash.isobject'),\n noop = require('lodash.noop'),\n reNative = require('lodash._renative');\n\n/* Native method shortcuts for methods with the same name as other `lodash` methods */\nvar nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(prototype, properties) {\n return isObject(prototype) ? nativeCreate(prototype) : {};\n}\n// fallback for browsers without `Object.create`\nif (!nativeCreate) {\n baseCreate = (function() {\n function Object() {}\n return function(prototype) {\n if (isObject(prototype)) {\n Object.prototype = prototype;\n var result = new Object;\n Object.prototype = null;\n }\n return result || global.Object();\n };\n }());\n}\n\nmodule.exports = baseCreate;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar noop = require('lodash.noop'),\n reNative = require('lodash._renative');\n\n/** Used as the property descriptor for `__bindData__` */\nvar descriptor = {\n 'configurable': false,\n 'enumerable': false,\n 'value': null,\n 'writable': false\n};\n\n/** Used to set meta data on functions */\nvar defineProperty = (function() {\n // IE 8 only accepts DOM elements\n try {\n var o = {},\n func = reNative.test(func = Object.defineProperty) && func,\n result = func(o, o, o) && func;\n } catch(e) { }\n return result;\n}());\n\n/**\n * Sets `this` binding data on a given function.\n *\n * @private\n * @param {Function} func The function to set data on.\n * @param {Array} value The data array to set.\n */\nvar setBindData = !defineProperty ? noop : function(func, value) {\n descriptor.value = value;\n defineProperty(func, '__bindData__', descriptor);\n};\n\nmodule.exports = setBindData;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar baseCreate = require('lodash._basecreate'),\n isObject = require('lodash.isobject'),\n setBindData = require('lodash._setbinddata');\n\n/**\n * Used for `Array` method references.\n *\n * Normally `Array.prototype` would suffice, however, using an array literal\n * avoids issues in Narwhal.\n */\nvar arrayRef = [];\n\n/** Native method shortcuts */\nvar push = arrayRef.push;\n\n/**\n * The base implementation of `_.bind` that creates the bound function and\n * sets its meta data.\n *\n * @private\n * @param {Array} bindData The bind data array.\n * @returns {Function} Returns the new bound function.\n */\nfunction baseBind(bindData) {\n var func = bindData[0],\n partialArgs = bindData[2],\n thisArg = bindData[4];\n\n function bound() {\n // `Function#bind` spec\n // http://es5.github.io/#x15.3.4.5\n if (partialArgs) {\n var args = partialArgs.slice();\n push.apply(args, arguments);\n }\n // mimic the constructor's `return` behavior\n // http://es5.github.io/#x13.2.2\n if (this instanceof bound) {\n // ensure `new bound` is an instance of `func`\n var thisBinding = baseCreate(func.prototype),\n result = func.apply(thisBinding, args || arguments);\n return isObject(result) ? result : thisBinding;\n }\n return func.apply(thisArg, args || arguments);\n }\n setBindData(bound, bindData);\n return bound;\n}\n\nmodule.exports = baseBind;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\n\n/**\n * Slices the `collection` from the `start` index up to, but not including,\n * the `end` index.\n *\n * Note: This function is used instead of `Array#slice` to support node lists\n * in IE < 9 and to ensure dense arrays are returned.\n *\n * @private\n * @param {Array|Object|string} collection The collection to slice.\n * @param {number} start The start index.\n * @param {number} end The end index.\n * @returns {Array} Returns the new array.\n */\nfunction slice(array, start, end) {\n start || (start = 0);\n if (typeof end == 'undefined') {\n end = array ? array.length : 0;\n }\n var index = -1,\n length = end - start || 0,\n result = Array(length < 0 ? 0 : length);\n\n while (++index < length) {\n result[index] = array[start + index];\n }\n return result;\n}\n\nmodule.exports = slice;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar baseCreate = require('lodash._basecreate'),\n isObject = require('lodash.isobject'),\n setBindData = require('lodash._setbinddata'),\n slice = require('lodash._slice');\n\n/**\n * Used for `Array` method references.\n *\n * Normally `Array.prototype` would suffice, however, using an array literal\n * avoids issues in Narwhal.\n */\nvar arrayRef = [];\n\n/** Native method shortcuts */\nvar push = arrayRef.push;\n\n/**\n * The base implementation of `createWrapper` that creates the wrapper and\n * sets its meta data.\n *\n * @private\n * @param {Array} bindData The bind data array.\n * @returns {Function} Returns the new function.\n */\nfunction baseCreateWrapper(bindData) {\n var func = bindData[0],\n bitmask = bindData[1],\n partialArgs = bindData[2],\n partialRightArgs = bindData[3],\n thisArg = bindData[4],\n arity = bindData[5];\n\n var isBind = bitmask & 1,\n isBindKey = bitmask & 2,\n isCurry = bitmask & 4,\n isCurryBound = bitmask & 8,\n key = func;\n\n function bound() {\n var thisBinding = isBind ? thisArg : this;\n if (partialArgs) {\n var args = partialArgs.slice();\n push.apply(args, arguments);\n }\n if (partialRightArgs || isCurry) {\n args || (args = slice(arguments));\n if (partialRightArgs) {\n push.apply(args, partialRightArgs);\n }\n if (isCurry && args.length < arity) {\n bitmask |= 16 & ~32;\n return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]);\n }\n }\n args || (args = arguments);\n if (isBindKey) {\n func = thisBinding[key];\n }\n if (this instanceof bound) {\n thisBinding = baseCreate(func.prototype);\n var result = func.apply(thisBinding, args);\n return isObject(result) ? result : thisBinding;\n }\n return func.apply(thisBinding, args);\n }\n setBindData(bound, bindData);\n return bound;\n}\n\nmodule.exports = baseCreateWrapper;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\n\n/**\n * Checks if `value` is a function.\n *\n * @static\n * @memberOf _\n * @category Objects\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if the `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n */\nfunction isFunction(value) {\n return typeof value == 'function';\n}\n\nmodule.exports = isFunction;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar baseBind = require('lodash._basebind'),\n baseCreateWrapper = require('lodash._basecreatewrapper'),\n isFunction = require('lodash.isfunction');\n\n/**\n * Used for `Array` method references.\n *\n * Normally `Array.prototype` would suffice, however, using an array literal\n * avoids issues in Narwhal.\n */\nvar arrayRef = [];\n\n/** Native method shortcuts */\nvar push = arrayRef.push;\n\n/**\n * Creates a function that, when called, either curries or invokes `func`\n * with an optional `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to reference.\n * @param {number} bitmask The bitmask of method flags to compose.\n * The bitmask may be composed of the following flags:\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry`\n * 8 - `_.curry` (bound)\n * 16 - `_.partial`\n * 32 - `_.partialRight`\n * @param {Array} [partialArgs] An array of arguments to prepend to those\n * provided to the new function.\n * @param {Array} [partialRightArgs] An array of arguments to append to those\n * provided to the new function.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new function.\n */\nfunction createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {\n var isBind = bitmask & 1,\n isBindKey = bitmask & 2,\n isCurry = bitmask & 4,\n isCurryBound = bitmask & 8,\n isPartial = bitmask & 16,\n isPartialRight = bitmask & 32;\n\n if (!isBindKey && !isFunction(func)) {\n throw new TypeError;\n }\n if (isPartial && !partialArgs.length) {\n bitmask &= ~16;\n isPartial = partialArgs = false;\n }\n if (isPartialRight && !partialRightArgs.length) {\n bitmask &= ~32;\n isPartialRight = partialRightArgs = false;\n }\n var bindData = func && func.__bindData__;\n if (bindData && bindData !== true) {\n bindData = bindData.slice();\n\n // set `thisBinding` is not previously bound\n if (isBind && !(bindData[1] & 1)) {\n bindData[4] = thisArg;\n }\n // set if previously bound but not currently (subsequent curried functions)\n if (!isBind && bindData[1] & 1) {\n bitmask |= 8;\n }\n // set curried arity if not yet set\n if (isCurry && !(bindData[1] & 4)) {\n bindData[5] = arity;\n }\n // append partial left arguments\n if (isPartial) {\n push.apply(bindData[2] || (bindData[2] = []), partialArgs);\n }\n // append partial right arguments\n if (isPartialRight) {\n push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);\n }\n // merge flags\n bindData[1] |= bitmask;\n return createWrapper.apply(null, bindData);\n }\n // fast path for `_.bind`\n var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper;\n return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]);\n}\n\nmodule.exports = createWrapper;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar createWrapper = require('lodash._createwrapper'),\n reNative = require('lodash._renative'),\n slice = require('lodash._slice');\n\n/**\n * Creates a function that, when called, invokes `func` with the `this`\n * binding of `thisArg` and prepends any additional `bind` arguments to those\n * provided to the bound function.\n *\n * @static\n * @memberOf _\n * @category Functions\n * @param {Function} func The function to bind.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {...*} [arg] Arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var func = function(greeting) {\n * return greeting + ' ' + this.name;\n * };\n *\n * func = _.bind(func, { 'name': 'fred' }, 'hi');\n * func();\n * // => 'hi fred'\n */\nfunction bind(func, thisArg) {\n return arguments.length > 2\n ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)\n : createWrapper(func, 1, null, null, thisArg);\n}\n\nmodule.exports = bind;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\n\n/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utilities\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'name': 'fred' };\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar reNative = require('lodash._renative');\n\n/** Used to detect functions containing a `this` reference */\nvar reThis = /\\bthis\\b/;\n\n/**\n * An object used to flag environments features.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n/**\n * Detect if functions can be decompiled by `Function#toString`\n * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).\n *\n * @memberOf _.support\n * @type boolean\n */\nsupport.funcDecomp = !reNative.test(global.WinRTError) && reThis.test(function() { return this; });\n\n/**\n * Detect if `Function#name` is supported (all but IE).\n *\n * @memberOf _.support\n * @type boolean\n */\nsupport.funcNames = typeof Function.name == 'string';\n\nmodule.exports = support;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar bind = require('lodash.bind'),\n identity = require('lodash.identity'),\n setBindData = require('lodash._setbinddata'),\n support = require('lodash.support');\n\n/** Used to detected named functions */\nvar reFuncName = /^\\s*function[ \\n\\r\\t]+\\w/;\n\n/** Used to detect functions containing a `this` reference */\nvar reThis = /\\bthis\\b/;\n\n/** Native method shortcuts */\nvar fnToString = Function.prototype.toString;\n\n/**\n * The base implementation of `_.createCallback` without support for creating\n * \"_.pluck\" or \"_.where\" style callbacks.\n *\n * @private\n * @param {*} [func=identity] The value to convert to a callback.\n * @param {*} [thisArg] The `this` binding of the created callback.\n * @param {number} [argCount] The number of arguments the callback accepts.\n * @returns {Function} Returns a callback function.\n */\nfunction baseCreateCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n // exit early for no `thisArg` or already bound by `Function#bind`\n if (typeof thisArg == 'undefined' || !('prototype' in func)) {\n return func;\n }\n var bindData = func.__bindData__;\n if (typeof bindData == 'undefined') {\n if (support.funcNames) {\n bindData = !func.name;\n }\n bindData = bindData || !support.funcDecomp;\n if (!bindData) {\n var source = fnToString.call(func);\n if (!support.funcNames) {\n bindData = !reFuncName.test(source);\n }\n if (!bindData) {\n // checks if `func` references the `this` keyword and stores the result\n bindData = reThis.test(source);\n setBindData(func, bindData);\n }\n }\n }\n // exit early if there are no `this` references or `func` is bound\n if (bindData === false || (bindData !== true && bindData[1] & 1)) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 2: return function(a, b) {\n return func.call(thisArg, a, b);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n }\n return bind(func, thisArg);\n}\n\nmodule.exports = baseCreateCallback;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar baseCreateCallback = require('lodash._basecreatecallback'),\n keys = require('lodash.keys'),\n objectTypes = require('lodash._objecttypes');\n\n/**\n * Iterates over own enumerable properties of an object, executing the callback\n * for each property. The callback is bound to `thisArg` and invoked with three\n * arguments; (value, key, object). Callbacks may exit iteration early by\n * explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Objects\n * @param {Object} object The object to iterate over.\n * @param {Function} [callback=identity] The function called per iteration.\n * @param {*} [thisArg] The `this` binding of `callback`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {\n * console.log(key);\n * });\n * // => logs '0', '1', and 'length' (property order is not guaranteed across environments)\n */\nvar forOwn = function(collection, callback, thisArg) {\n var index, iterable = collection, result = iterable;\n if (!iterable) return result;\n if (!objectTypes[typeof iterable]) return result;\n callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n if (callback(iterable[index], index, collection) === false) return result;\n }\n return result\n};\n\nmodule.exports = forOwn;\n","/**\n * Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>\n * Build: `lodash modularize modern exports=\"npm\" -o ./npm/`\n * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <http://lodash.com/license>\n */\nvar baseCreateCallback = require('lodash._basecreatecallback'),\n forOwn = require('lodash.forown');\n\n/**\n * Iterates over elements of a collection, executing the callback for each\n * element. The callback is bound to `thisArg` and invoked with three arguments;\n * (value, index|key, collection). Callbacks may exit iteration early by\n * explicitly returning `false`.\n *\n * Note: As with other \"Collections\" methods, objects with a `length` property\n * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`\n * may be used for object iteration.\n *\n * @static\n * @memberOf _\n * @alias each\n * @category Collections\n * @param {Array|Object|string} collection The collection to iterate over.\n * @param {Function} [callback=identity] The function called per iteration.\n * @param {*} [thisArg] The `this` binding of `callback`.\n * @returns {Array|Object|string} Returns `collection`.\n * @example\n *\n * _([1, 2, 3]).forEach(function(num) { console.log(num); }).join(',');\n * // => logs each number and returns '1,2,3'\n *\n * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); });\n * // => logs each number and returns the object (property order is not guaranteed across environments)\n */\nfunction forEach(collection, callback, thisArg) {\n var index = -1,\n length = collection ? collection.length : 0;\n\n callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);\n if (typeof length == 'number') {\n while (++index < length) {\n if (callback(collection[index], index, collection) === false) {\n break;\n }\n }\n } else {\n forOwn(collection, callback);\n }\n return collection;\n}\n\nmodule.exports = forEach;\n","var metric,\nimperial;\n\nmetric = {\n mm: {\n name: {\n singular: 'Millimeter',\n plural: 'Millimeters'\n },\n to_anchor: 1/1000\n },\n cm: {\n name: {\n singular: 'Centimeter',\n plural: 'Centimeters'\n },\n to_anchor: 1/100\n },\n m: {\n name: {\n singular: 'Meter',\n plural: 'Meters'\n },\n to_anchor: 1\n },\n km: {\n name: {\n singular: 'Kilometer',\n plural: 'Kilometers'\n },\n to_anchor: 1000\n }\n};\n\nimperial = {\n 'in': {\n name: {\n singular: 'Inch',\n plural: 'Inches'\n },\n to_anchor: 1/12\n },\n yd: {\n name: {\n singular: 'Yard',\n plural: 'Yards'\n },\n to_anchor: 3\n },\n 'ft-us': {\n name: {\n singular: 'US Survey Foot',\n plural: 'US Survey Feet'\n },\n to_anchor: 1.000002\n },\n ft: {\n name: {\n singular: 'Foot',\n plural: 'Feet'\n },\n to_anchor: 1\n },\n mi: {\n name: {\n singular: 'Mile',\n plural: 'Miles'\n },\n to_anchor: 5280\n }\n};\n\nmodule.exports = {\n metric: metric,\n imperial: imperial,\n _anchors: {\n metric: {\n unit: 'm',\n ratio: 3.28084\n },\n imperial: {\n unit: 'ft',\n ratio: 1/3.28084\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n mm2: {\n name: {\n singular: 'Square Millimeter'\n , plural: 'Square Millimeters'\n }\n , to_anchor: 1/1000000\n }\n, cm2: {\n name: {\n singular: 'Centimeter'\n , plural: 'Centimeters'\n }\n , to_anchor: 1/10000\n }\n, m2: {\n name: {\n singular: 'Square Meter'\n , plural: 'Square Meters'\n }\n , to_anchor: 1\n }\n, ha: {\n name: {\n singular: 'Hectare'\n , plural: 'Hectares'\n }\n , to_anchor: 10000\n }\n, km2: {\n name: {\n singular: 'Square Kilometer'\n , plural: 'Square Kilometers'\n }\n , to_anchor: 1000000\n }\n};\n\nimperial = {\n 'in2': {\n name: {\n singular: 'Square Inch'\n , plural: 'Square Inches'\n }\n , to_anchor: 1/144\n }\n, yd2: {\n name: {\n singular: 'Square Yard'\n , plural: 'Square Yards' \n }\n , to_anchor: 9\n }\n, ft2: {\n name: {\n singular: 'Square Foot'\n , plural: 'Square Feet'\n }\n , to_anchor: 1\n }\n, ac: {\n name: {\n singular: 'Acre'\n , plural: 'Acres'\n }\n , to_anchor: 43560\n }\n, mi2: {\n name: {\n singular: 'Square Mile'\n , plural: 'Square Miles'\n }\n , to_anchor: 27878400\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'm2'\n , ratio: 10.7639\n }\n , imperial: {\n unit: 'ft2'\n , ratio: 1/10.7639\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n mcg: {\n name: {\n singular: 'Microgram'\n , plural: 'Micrograms'\n }\n , to_anchor: 1/1000000\n }\n, mg: {\n name: {\n singular: 'Milligram'\n , plural: 'Milligrams'\n }\n , to_anchor: 1/1000\n }\n, g: {\n name: {\n singular: 'Gram'\n , plural: 'Grams'\n }\n , to_anchor: 1\n }\n, kg: {\n name: {\n singular: 'Kilogram'\n , plural: 'Kilograms'\n }\n , to_anchor: 1000\n}\n, mt: {\n name: {\n singular: 'Metric Tonne'\n , plural: 'Metric Tonnes'\n }\n , to_anchor: 1000000\n }\n};\n\nimperial = {\n oz: {\n name: {\n singular: 'Ounce'\n , plural: 'Ounces'\n }\n , to_anchor: 1/16\n }\n, lb: {\n name: {\n singular: 'Pound'\n , plural: 'Pounds'\n }\n , to_anchor: 1\n}, t: {\n name: {\n singular: 'Ton',\n plural: 'Tons',\n },\n to_anchor: 2000,\n },\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'g'\n , ratio: 1/453.592\n }\n , imperial: {\n unit: 'lb'\n , ratio: 453.592\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n mm3: {\n name: {\n singular: 'Cubic Millimeter'\n , plural: 'Cubic Millimeters'\n }\n , to_anchor: 1/1000000\n }\n, cm3: {\n name: {\n singular: 'Cubic Centimeter'\n , plural: 'Cubic Centimeters'\n }\n , to_anchor: 1/1000\n }\n, ml: {\n name: {\n singular: 'Millilitre'\n , plural: 'Millilitres'\n }\n , to_anchor: 1/1000\n }\n, cl: {\n name: {\n singular: 'Centilitre'\n , plural: 'Centilitres'\n }\n , to_anchor: 1/100\n }\n, dl: {\n name: {\n singular: 'Decilitre'\n , plural: 'Decilitres'\n }\n , to_anchor: 1/10\n }\n, l: {\n name: {\n singular: 'Litre'\n , plural: 'Litres'\n }\n , to_anchor: 1\n }\n, kl: {\n name: {\n singular: 'Kilolitre'\n , plural: 'Kilolitres'\n }\n , to_anchor: 1000\n }\n, m3: {\n name: {\n singular: 'Cubic meter'\n , plural: 'Cubic meters'\n }\n , to_anchor: 1000\n }\n, km3: {\n name: {\n singular: 'Cubic kilometer'\n , plural: 'Cubic kilometers'\n }\n , to_anchor: 1000000000000\n }\n\n// Swedish units\n, krm: {\n name: {\n singular: 'Matsked'\n , plural: 'Matskedar'\n }\n , to_anchor: 1/1000\n}\n, tsk: {\n name: {\n singular: 'Tesked'\n , plural: 'Teskedar'\n }\n , to_anchor: 5/1000\n }\n, msk: {\n name: {\n singular: 'Matsked'\n , plural: 'Matskedar'\n }\n , to_anchor: 15/1000\n }\n, kkp: {\n name: {\n singular: 'Kaffekopp'\n , plural: 'Kaffekoppar'\n }\n , to_anchor: 150/1000\n }\n, glas: {\n name: {\n singular: 'Glas'\n , plural: 'Glas'\n }\n , to_anchor: 200/1000\n }\n, kanna: {\n name: {\n singular: 'Kanna'\n , plural: 'Kannor'\n }\n , to_anchor: 2.617\n }\n};\n\nimperial = {\n tsp: {\n name: {\n singular: 'Teaspoon'\n , plural: 'Teaspoons'\n }\n , to_anchor: 1/6\n }\n, Tbs: {\n name: {\n singular: 'Tablespoon'\n , plural: 'Tablespoons'\n }\n , to_anchor: 1/2\n }\n, in3: {\n name: {\n singular: 'Cubic inch'\n , plural: 'Cubic inches'\n }\n , to_anchor: 0.55411\n }\n, 'fl-oz': {\n name: {\n singular: 'Fluid Ounce'\n , plural: 'Fluid Ounces'\n }\n , to_anchor: 1\n }\n, cup: {\n name: {\n singular: 'Cup'\n , plural: 'Cups'\n }\n , to_anchor: 8\n }\n, pnt: {\n name: {\n singular: 'Pint'\n , plural: 'Pints'\n }\n , to_anchor: 16\n }\n, qt: {\n name: {\n singular: 'Quart'\n , plural: 'Quarts'\n }\n , to_anchor: 32\n }\n, gal: {\n name: {\n singular: 'Gallon'\n , plural: 'Gallons'\n }\n , to_anchor: 128\n }\n, ft3: {\n name: {\n singular: 'Cubic foot'\n , plural: 'Cubic feet'\n }\n , to_anchor: 957.506\n }\n, yd3: {\n name: {\n singular: 'Cubic yard'\n , plural: 'Cubic yards'\n }\n , to_anchor: 25852.7\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'l'\n , ratio: 33.8140226\n }\n , imperial: {\n unit: 'fl-oz'\n , ratio: 1/33.8140226\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n ea: {\n name: {\n singular: 'Each'\n , plural: 'Each'\n }\n , to_anchor: 1\n },\n dz: {\n name: {\n singular: 'Dozen'\n , plural: 'Dozens'\n }\n , to_anchor: 12\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: {}\n, _anchors: {\n metric: {\n unit: 'ea'\n , ratio: 1\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n C: {\n name: {\n singular: 'degree Celsius'\n , plural: 'degrees Celsius'\n }\n , to_anchor: 1\n , anchor_shift: 0\n },\n K: {\n name: {\n singular: 'degree Kelvin'\n , plural: 'degrees Kelvin'\n }\n , to_anchor: 1\n , anchor_shift: 273.15\n }\n};\n\nimperial = {\n F: {\n name: {\n singular: 'degree Fahrenheit'\n , plural: 'degrees Fahrenheit'\n }\n , to_anchor: 1\n },\n R: {\n name: {\n singular: 'degree Rankine'\n , plural: 'degrees Rankine'\n }\n , to_anchor: 1\n , anchor_shift: 459.67\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'C'\n , transform: function (C) { return C / (5/9) + 32 }\n }\n , imperial: {\n unit: 'F'\n , transform: function (F) { return (F - 32) * (5/9) }\n }\n }\n};\n\n","var time;\nvar daysInYear = 365.25;\n\ntime = {\n ns: {\n name: {\n singular: 'Nanosecond'\n , plural: 'Nanoseconds'\n }\n , to_anchor: 1/1000000000\n }\n, mu: {\n name: {\n singular: 'Microsecond'\n , plural: 'Microseconds'\n }\n , to_anchor: 1/1000000\n }\n, ms: {\n name: {\n singular: 'Millisecond'\n , plural: 'Milliseconds'\n }\n , to_anchor: 1/1000\n }\n, s: {\n name: {\n singular: 'Second'\n , plural: 'Seconds'\n }\n , to_anchor: 1\n }\n, min: {\n name: {\n singular: 'Minute'\n , plural: 'Minutes'\n }\n , to_anchor: 60\n }\n, h: {\n name: {\n singular: 'Hour'\n , plural: 'Hours'\n }\n , to_anchor: 60 * 60 \n }\n, d: {\n name: {\n singular: 'Day'\n , plural: 'Days'\n }\n , to_anchor: 60 * 60 * 24\n }\n, week: {\n name: {\n singular: 'Week'\n , plural: 'Weeks'\n }\n , to_anchor: 60 * 60 * 24 * 7\n }\n, month: {\n name: {\n singular: 'Month'\n , plural: 'Months'\n }\n , to_anchor: 60 * 60 * 24 * daysInYear / 12\n }\n, year: {\n name: {\n singular: 'Year'\n , plural: 'Years'\n }\n , to_anchor: 60 * 60 * 24 * daysInYear\n }\n};\n\n\nmodule.exports = {\n metric: time \n, _anchors: {\n metric: {\n unit: 's'\n , ratio: 1\n }\n }\n};\n","var bits\n , bytes;\n\nbits = {\n b: {\n name: {\n singular: 'Bit'\n , plural: 'Bits'\n }\n , to_anchor: 1\n }\n, Kb: {\n name: {\n singular: 'Kilobit'\n , plural: 'Kilobits'\n }\n , to_anchor: 1024\n }\n, Mb: {\n name: {\n singular: 'Megabit'\n , plural: 'Megabits'\n }\n , to_anchor: 1048576\n }\n, Gb: {\n name: {\n singular: 'Gigabit'\n , plural: 'Gigabits'\n }\n , to_anchor: 1073741824\n }\n, Tb: {\n name: {\n singular: 'Terabit'\n , plural: 'Terabits'\n }\n , to_anchor: 1099511627776\n }\n};\n\nbytes = {\n B: {\n name: {\n singular: 'Byte'\n , plural: 'Bytes'\n }\n , to_anchor: 1\n }\n, KB: {\n name: {\n singular: 'Kilobyte'\n , plural: 'Kilobytes'\n }\n , to_anchor: 1024\n }\n, MB: {\n name: {\n singular: 'Megabyte'\n , plural: 'Megabytes'\n }\n , to_anchor: 1048576\n }\n, GB: {\n name: {\n singular: 'Gigabyte'\n , plural: 'Gigabytes'\n }\n , to_anchor: 1073741824\n }\n, TB: {\n name: {\n singular: 'Terabyte'\n , plural: 'Terabytes'\n }\n , to_anchor: 1099511627776\n }\n};\n\nmodule.exports = {\n bits: bits\n, bytes: bytes\n, _anchors: {\n bits: {\n unit: 'b'\n , ratio: 1/8\n }\n , bytes: {\n unit: 'B'\n , ratio: 8\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n ppm: {\n name: {\n singular: 'Part-per Million'\n , plural: 'Parts-per Million'\n }\n , to_anchor: 1\n }\n , ppb: {\n name: {\n singular: 'Part-per Billion'\n , plural: 'Parts-per Billion'\n }\n , to_anchor: .001\n }\n , ppt: {\n name: {\n singular: 'Part-per Trillion'\n , plural: 'Parts-per Trillion'\n }\n , to_anchor: .000001\n }\n , ppq: {\n name: {\n singular: 'Part-per Quadrillion'\n , plural: 'Parts-per Quadrillion'\n }\n , to_anchor: .000000001\n }\n};\n\nmodule.exports = {\n metric: metric\n , imperial: {}\n , _anchors: {\n metric: {\n unit: 'ppm'\n , ratio: .000001\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n 'm/s': {\n name: {\n singular: 'Metre per second'\n , plural: 'Metres per second'\n }\n , to_anchor: 3.6\n }\n, 'km/h': {\n name: {\n singular: 'Kilometre per hour'\n , plural: 'Kilometres per hour'\n }\n , to_anchor: 1\n }\n}\n\n imperial = {\n 'm/h': {\n name: {\n singular: 'Mile per hour'\n , plural: 'Miles per hour'\n }\n , to_anchor: 1\n }\n , knot: {\n name: {\n singular: 'Knot'\n , plural: 'Knots'\n }\n , to_anchor: 1.150779\n }\n , 'ft/s': {\n name: {\n singular: 'Foot per second'\n , plural: 'Feet per second'\n }\n , to_anchor: 0.681818\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'km/h'\n , ratio: 1/1.609344\n }\n , imperial: {\n unit: 'm/h'\n , ratio: 1.609344\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n 'min/km': {\n name: {\n singular: 'Minute per kilometre'\n , plural: 'Minutes per kilometre'\n }\n , to_anchor: 0.06\n }\n ,'s/m': {\n name: {\n singular: 'Second per metre'\n , plural: 'Seconds per metre'\n }\n , to_anchor: 1\n }\n}\n\nimperial = {\n 'min/mi': {\n name: {\n singular: 'Minute per mile'\n , plural: 'Minutes per mile'\n }\n , to_anchor: 0.0113636\n }\n , 's/ft': {\n name: {\n singular: 'Second per foot'\n , plural: 'Seconds per foot'\n }\n , to_anchor: 1\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 's/m'\n , ratio: 0.3048\n }\n , imperial: {\n unit: 's/ft'\n , ratio: 1/0.3048\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n Pa: {\n name: {\n singular: 'pascal'\n , plural: 'pascals'\n }\n , to_anchor: 1/1000\n }\n, kPa: {\n name: {\n singular: 'kilopascal'\n , plural: 'kilopascals'\n }\n , to_anchor: 1\n }\n, MPa: {\n name: {\n singular: 'megapascal'\n , plural: 'megapascals'\n }\n , to_anchor: 1000\n }\n, hPa: {\n name: {\n singular: 'hectopascal'\n , plural: 'hectopascals'\n }\n , to_anchor: 1/10\n }\n, bar: {\n name: {\n singular: 'bar'\n , plural: 'bar'\n }\n , to_anchor: 100\n }\n, torr: {\n name: {\n singular: 'torr'\n , plural: 'torr'\n }\n , to_anchor: 101325/760000\n }\n};\n\nimperial = {\n psi: {\n name: {\n singular: 'pound per square inch'\n , plural: 'pounds per square inch'\n }\n , to_anchor: 1/1000\n }\n, ksi: {\n name: {\n singular: 'kilopound per square inch'\n , plural: 'kilopound per square inch'\n }\n , to_anchor: 1\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'kPa'\n , ratio: 0.00014503768078\n }\n , imperial: {\n unit: 'psi'\n , ratio: 1/0.00014503768078\n }\n }\n};\n","var current;\n\ncurrent = {\n A: {\n name: {\n singular: 'Ampere'\n , plural: 'Amperes'\n }\n , to_anchor: 1\n }\n, mA: {\n name: {\n singular: 'Milliampere'\n , plural: 'Milliamperes'\n }\n , to_anchor: .001\n }\n, kA: {\n name: {\n singular: 'Kiloampere'\n , plural: 'Kiloamperes'\n }\n , to_anchor: 1000\n }\n};\n\nmodule.exports = {\n metric: current\n, _anchors: {\n metric: {\n unit: 'A'\n , ratio: 1\n }\n }\n};\n","var voltage;\n\nvoltage = {\n V: {\n name: {\n singular: 'Volt'\n , plural: 'Volts'\n }\n , to_anchor: 1\n }\n, mV: {\n name: {\n singular: 'Millivolt'\n , plural: 'Millivolts'\n }\n , to_anchor: .001\n }\n, kV: {\n name: {\n singular: 'Kilovolt'\n , plural: 'Kilovolts'\n }\n , to_anchor: 1000\n }\n};\n\nmodule.exports = {\n metric: voltage\n, _anchors: {\n metric: {\n unit: 'V'\n , ratio: 1\n }\n }\n};\n","var power;\n\npower = {\n W: {\n name: {\n singular: 'Watt'\n , plural: 'Watts'\n }\n , to_anchor: 1\n }\n, mW: {\n name: {\n singular: 'Milliwatt'\n , plural: 'Milliwatts'\n }\n , to_anchor: .001\n }\n, kW: {\n name: {\n singular: 'Kilowatt'\n , plural: 'Kilowatts'\n }\n , to_anchor: 1000\n }\n, MW: {\n name: {\n singular: 'Megawatt'\n , plural: 'Megawatts'\n }\n , to_anchor: 1000000\n }\n, GW: {\n name: {\n singular: 'Gigawatt'\n , plural: 'Gigawatts'\n }\n , to_anchor: 1000000000\n }\n};\n\nmodule.exports = {\n metric: power\n, _anchors: {\n metric: {\n unit: 'W'\n , ratio: 1\n }\n }\n};\n","var reactivePower;\n\nreactivePower = {\n VAR: {\n name: {\n singular: 'Volt-Ampere Reactive'\n , plural: 'Volt-Amperes Reactive'\n }\n , to_anchor: 1\n }\n, mVAR: {\n name: {\n singular: 'Millivolt-Ampere Reactive'\n , plural: 'Millivolt-Amperes Reactive'\n }\n , to_anchor: .001\n }\n, kVAR: {\n name: {\n singular: 'Kilovolt-Ampere Reactive'\n , plural: 'Kilovolt-Amperes Reactive'\n }\n , to_anchor: 1000\n }\n, MVAR: {\n name: {\n singular: 'Megavolt-Ampere Reactive'\n , plural: 'Megavolt-Amperes Reactive'\n }\n , to_anchor: 1000000\n }\n, GVAR: {\n name: {\n singular: 'Gigavolt-Ampere Reactive'\n , plural: 'Gigavolt-Amperes Reactive'\n }\n , to_anchor: 1000000000\n }\n};\n\nmodule.exports = {\n metric: reactivePower\n, _anchors: {\n metric: {\n unit: 'VAR'\n , ratio: 1\n }\n }\n};\n","var apparentPower;\n\napparentPower = {\n VA: {\n name: {\n singular: 'Volt-Ampere'\n , plural: 'Volt-Amperes'\n }\n , to_anchor: 1\n }\n, mVA: {\n name: {\n singular: 'Millivolt-Ampere'\n , plural: 'Millivolt-Amperes'\n }\n , to_anchor: .001\n }\n, kVA: {\n name: {\n singular: 'Kilovolt-Ampere'\n , plural: 'Kilovolt-Amperes'\n }\n , to_anchor: 1000\n }\n, MVA: {\n name: {\n singular: 'Megavolt-Ampere'\n , plural: 'Megavolt-Amperes'\n }\n , to_anchor: 1000000\n }\n, GVA: {\n name: {\n singular: 'Gigavolt-Ampere'\n , plural: 'Gigavolt-Amperes'\n }\n , to_anchor: 1000000000\n }\n};\n\nmodule.exports = {\n metric: apparentPower\n, _anchors: {\n metric: {\n unit: 'VA'\n , ratio: 1\n }\n }\n};\n","var energy;\n\nenergy = {\n Wh: {\n name: {\n singular: 'Watt-hour'\n , plural: 'Watt-hours'\n }\n , to_anchor: 3600\n }\n, mWh: {\n name: {\n singular: 'Milliwatt-hour'\n , plural: 'Milliwatt-hours'\n }\n , to_anchor: 3.6\n }\n, kWh: {\n name: {\n singular: 'Kilowatt-hour'\n , plural: 'Kilowatt-hours'\n }\n , to_anchor: 3600000\n }\n, MWh: {\n name: {\n singular: 'Megawatt-hour'\n , plural: 'Megawatt-hours'\n }\n , to_anchor: 3600000000\n }\n, GWh: {\n name: {\n singular: 'Gigawatt-hour'\n , plural: 'Gigawatt-hours'\n }\n , to_anchor: 3600000000000\n }\n, J: {\n name: {\n singular: 'Joule'\n , plural: 'Joules'\n }\n , to_anchor: 1\n }\n, kJ: {\n name: {\n singular: 'Kilojoule'\n , plural: 'Kilojoules'\n }\n , to_anchor: 1000\n }\n};\n\nmodule.exports = {\n metric: energy\n, _anchors: {\n metric: {\n unit: 'J'\n , ratio: 1\n }\n }\n};\n","var reactiveEnergy;\n\nreactiveEnergy = {\n VARh: {\n name: {\n singular: 'Volt-Ampere Reactive Hour'\n , plural: 'Volt-Amperes Reactive Hour'\n }\n , to_anchor: 1\n }\n, mVARh: {\n name: {\n singular: 'Millivolt-Ampere Reactive Hour'\n , plural: 'Millivolt-Amperes Reactive Hour'\n }\n , to_anchor: .001\n }\n, kVARh: {\n name: {\n singular: 'Kilovolt-Ampere Reactive Hour'\n , plural: 'Kilovolt-Amperes Reactive Hour'\n }\n , to_anchor: 1000\n }\n, MVARh: {\n name: {\n singular: 'Megavolt-Ampere Reactive Hour'\n , plural: 'Megavolt-Amperes Reactive Hour'\n }\n , to_anchor: 1000000\n }\n, GVARh: {\n name: {\n singular: 'Gigavolt-Ampere Reactive Hour'\n , plural: 'Gigavolt-Amperes Reactive Hour'\n }\n , to_anchor: 1000000000\n }\n};\n\nmodule.exports = {\n metric: reactiveEnergy\n, _anchors: {\n metric: {\n unit: 'VARh'\n , ratio: 1\n }\n }\n};\n","var metric\n , imperial;\n\nmetric = {\n 'mm3/s': {\n name: {\n singular: 'Cubic Millimeter per second'\n , plural: 'Cubic Millimeters per second'\n }\n , to_anchor: 1/1000000\n }\n, 'cm3/s': {\n name: {\n singular: 'Cubic Centimeter per second'\n , plural: 'Cubic Centimeters per second'\n }\n , to_anchor: 1/1000\n }\n, 'ml/s': {\n name: {\n singular: 'Millilitre per second'\n , plural: 'Millilitres per second'\n }\n , to_anchor: 1/1000\n }\n, 'cl/s': {\n name: {\n singular: 'Centilitre per second'\n , plural: 'Centilitres per second'\n }\n , to_anchor: 1/100\n }\n, 'dl/s': {\n name: {\n singular: 'Decilitre per second'\n , plural: 'Decilitres per second'\n }\n , to_anchor: 1/10\n }\n, 'l/s': {\n name: {\n singular: 'Litre per second'\n , plural: 'Litres per second'\n }\n , to_anchor: 1\n }\n, 'l/min': {\n name: {\n singular: 'Litre per minute'\n , plural: 'Litres per minute'\n }\n , to_anchor: 1/60\n }\n, 'l/h': {\n name: {\n singular: 'Litre per hour'\n , plural: 'Litres per hour'\n }\n , to_anchor: 1/3600\n }\n, 'kl/s': {\n name: {\n singular: 'Kilolitre per second'\n , plural: 'Kilolitres per second'\n }\n , to_anchor: 1000\n }\n, 'kl/min': {\n name: {\n singular: 'Kilolitre per minute'\n , plural: 'Kilolitres per minute'\n }\n , to_anchor: 50/3\n }\n, 'kl/h': {\n name: {\n singular: 'Kilolitre per hour'\n , plural: 'Kilolitres per hour'\n }\n , to_anchor: 5/18\n }\n, 'm3/s': {\n name: {\n singular: 'Cubic meter per second'\n , plural: 'Cubic meters per second'\n }\n , to_anchor: 1000\n }\n, 'm3/min': {\n name: {\n singular: 'Cubic meter per minute'\n , plural: 'Cubic meters per minute'\n }\n , to_anchor: 50/3\n }\n, 'm3/h': {\n name: {\n singular: 'Cubic meter per hour'\n , plural: 'Cubic meters per hour'\n }\n , to_anchor: 5/18\n }\n, 'km3/s': {\n name: {\n singular: 'Cubic kilometer per second'\n , plural: 'Cubic kilometers per second'\n }\n , to_anchor: 1000000000000\n }\n};\n\nimperial = {\n 'tsp/s': {\n name: {\n singular: 'Teaspoon per second'\n , plural: 'Teaspoons per second'\n }\n , to_anchor: 1/6\n }\n, 'Tbs/s': {\n name: {\n singular: 'Tablespoon per second'\n , plural: 'Tablespoons per second'\n }\n , to_anchor: 1/2\n }\n, 'in3/s': {\n name: {\n singular: 'Cubic inch per second'\n , plural: 'Cubic inches per second'\n }\n , to_anchor: 0.55411\n }\n, 'in3/min': {\n name: {\n singular: 'Cubic inch per minute'\n , plural: 'Cubic inches per minute'\n }\n , to_anchor: 0.55411/60\n }\n, 'in3/h': {\n name: {\n singular: 'Cubic inch per hour'\n , plural: 'Cubic inches per hour'\n }\n , to_anchor: 0.55411/3600\n }\n, 'fl-oz/s': {\n name: {\n singular: 'Fluid Ounce per second'\n , plural: 'Fluid Ounces per second'\n }\n , to_anchor: 1\n }\n, 'fl-oz/min': {\n name: {\n singular: 'Fluid Ounce per minute'\n , plural: 'Fluid Ounces per minute'\n }\n , to_anchor: 1/60\n }\n, 'fl-oz/h': {\n name: {\n singular: 'Fluid Ounce per hour'\n , plural: 'Fluid Ounces per hour'\n }\n , to_anchor: 1/3600\n }\n, 'cup/s': {\n name: {\n singular: 'Cup per second'\n , plural: 'Cups per second'\n }\n , to_anchor: 8\n }\n, 'pnt/s': {\n name: {\n singular: 'Pint per second'\n , plural: 'Pints per second'\n }\n , to_anchor: 16\n }\n, 'pnt/min': {\n name: {\n singular: 'Pint per minute'\n , plural: 'Pints per minute'\n }\n , to_anchor: 4/15\n }\n, 'pnt/h': {\n name: {\n singular: 'Pint per hour'\n , plural: 'Pints per hour'\n }\n , to_anchor: 1/225\n }\n, 'qt/s': {\n name: {\n singular: 'Quart per second'\n , plural: 'Quarts per second'\n }\n , to_anchor: 32\n }\n, 'gal/s': {\n name: {\n singular: 'Gallon per second'\n , plural: 'Gallons per second'\n }\n , to_anchor: 128\n }\n, 'gal/min': {\n name: {\n singular: 'Gallon per minute'\n , plural: 'Gallons per minute'\n }\n , to_anchor: 32/15\n }\n, 'gal/h': {\n name: {\n singular: 'Gallon per hour'\n , plural: 'Gallons per hour'\n }\n , to_anchor: 8/225\n }\n, 'ft3/s': {\n name: {\n singular: 'Cubic foot per second'\n , plural: 'Cubic feet per second'\n }\n , to_anchor: 957.506\n }\n, 'ft3/min': {\n name: {\n singular: 'Cubic foot per minute'\n , plural: 'Cubic feet per minute'\n }\n , to_anchor: 957.506/60\n }\n, 'ft3/h': {\n name: {\n singular: 'Cubic foot per hour'\n , plural: 'Cubic feet per hour'\n }\n , to_anchor: 957.506/3600\n }\n, 'yd3/s': {\n name: {\n singular: 'Cubic yard per second'\n , plural: 'Cubic yards per second'\n }\n , to_anchor: 25852.7\n }\n, 'yd3/min': {\n name: {\n singular: 'Cubic yard per minute'\n , plural: 'Cubic yards per minute'\n }\n , to_anchor: 25852.7/60\n }\n, 'yd3/h': {\n name: {\n singular: 'Cubic yard per hour'\n , plural: 'Cubic yards per hour'\n }\n , to_anchor: 25852.7/3600\n }\n};\n\nmodule.exports = {\n metric: metric\n, imperial: imperial\n, _anchors: {\n metric: {\n unit: 'l/s'\n , ratio: 33.8140227\n }\n , imperial: {\n unit: 'fl-oz/s'\n , ratio: 1/33.8140227\n }\n }\n};\n","var metric,\nimperial;\n\nmetric = {\n 'lx': {\n name: {\n singular: 'Lux',\n plural: 'Lux'\n },\n to_anchor: 1\n }\n};\n\nimperial = {\n 'ft-cd': {\n name: {\n singular: 'Foot-candle',\n plural: 'Foot-candles'\n },\n to_anchor: 1\n }\n};\n\nmodule.exports = {\n metric: metric,\n imperial: imperial,\n _anchors: {\n metric: {\n unit: 'lx',\n ratio: 1/10.76391\n },\n imperial: {\n unit: 'ft-cd', \n\t ratio: 10.76391\n }\n }\n};\n","var frequency;\n\nfrequency = {\n mHz: {\n name: {\n singular: 'millihertz'\n , plural: 'millihertz'\n }\n , to_anchor: 1/1000\n }\n, Hz: {\n name: {\n singular: 'hertz'\n , plural: 'hertz'\n }\n , to_anchor: 1\n }\n, kHz: {\n name: {\n singular: 'kilohertz'\n , plural: 'kilohertz'\n }\n , to_anchor: 1000\n }\n, MHz: {\n name: {\n singular: 'megahertz'\n , plural: 'megahertz'\n }\n , to_anchor: 1000 * 1000\n }\n, GHz: {\n name: {\n singular: 'gigahertz'\n , plural: 'gigahertz'\n }\n , to_anchor: 1000 * 1000 * 1000\n }\n, THz: {\n name: {\n singular: 'terahertz'\n , plural: 'terahertz'\n }\n , to_anchor: 1000 * 1000 * 1000 * 1000\n }\n, rpm: {\n name: {\n singular: 'rotation per minute'\n , plural: 'rotations per minute'\n }\n , to_anchor: 1/60\n }\n, \"deg/s\": {\n name: {\n singular: 'degree per second'\n , plural: 'degrees per second'\n }\n , to_anchor: 1/360\n }\n, \"rad/s\": {\n name: {\n singular: 'radian per second'\n , plural: 'radians per second'\n }\n , to_anchor: 1/(Math.PI * 2)\n }\n};\n\n\nmodule.exports = {\n metric: frequency\n, _anchors: {\n frequency: {\n unit: 'hz'\n , ratio: 1\n }\n }\n};\n","var angle;\n\nangle = {\n rad: {\n name: {\n singular: 'radian'\n , plural: 'radians'\n }\n , to_anchor: 180/Math.PI\n }\n, deg: {\n name: {\n singular: 'degree'\n , plural: 'degrees'\n }\n , to_anchor: 1\n }\n, grad: {\n name: {\n singular: 'gradian'\n , plural: 'gradians'\n }\n , to_anchor: 9/10\n }\n, arcmin: {\n name: {\n singular: 'arcminute'\n , plural: 'arcminutes'\n }\n , to_anchor: 1/60\n }\n, arcsec: {\n name: {\n singular: 'arcsecond'\n , plural: 'arcseconds'\n }\n , to_anchor: 1/3600\n }\n};\n\nmodule.exports = {\n metric: angle\n, _anchors: {\n metric: {\n unit: 'deg'\n , ratio: 1\n }\n }\n};\n","var convert\n , keys = require('lodash.keys')\n , each = require('lodash.foreach')\n , measures = {\n length: require('./definitions/length')\n , area: require('./definitions/area')\n , mass: require('./definitions/mass')\n , volume: require('./definitions/volume')\n , each: require('./definitions/each')\n , temperature: require('./definitions/temperature')\n , time: require('./definitions/time')\n , digital: require('./definitions/digital')\n , partsPer: require('./definitions/partsPer')\n , speed: require('./definitions/speed')\n , pace: require('./definitions/pace')\n , pressure: require('./definitions/pressure')\n , current: require('./definitions/current')\n , voltage: require('./definitions/voltage')\n , power: require('./definitions/power')\n , reactivePower: require('./definitions/reactivePower')\n , apparentPower: require('./definitions/apparentPower')\n , energy: require('./definitions/energy')\n , reactiveEnergy: require('./definitions/reactiveEnergy')\n , volumeFlowRate: require('./definitions/volumeFlowRate')\n , illuminance: require('./definitions/illuminance')\n , frequency: require('./definitions/frequency')\n , angle : require('./definitions/angle')\n }\n , Converter;\n\nConverter = function (numerator, denominator) {\n if(denominator)\n this.val = numerator / denominator;\n else\n this.val = numerator;\n};\n\n/**\n* Lets the converter know the source unit abbreviation\n*/\nConverter.prototype.from = function (from) {\n if(this.destination)\n throw new Error('.from must be called before .to');\n\n this.origin = this.getUnit(from);\n\n if(!this.origin) {\n this.throwUnsupportedUnitError(from);\n }\n\n return this;\n};\n\n/**\n* Converts the unit and returns the value\n*/\nConverter.prototype.to = function (to) {\n if(!this.origin)\n throw new Error('.to must be called after .from');\n\n this.destination = this.getUnit(to);\n\n var result\n , transform;\n\n if(!this.destination) {\n this.throwUnsupportedUnitError(to);\n }\n\n // Don't change the value if origin and destination are the same\n if (this.origin.abbr === this.destination.abbr) {\n return this.val;\n }\n\n // You can't go from liquid to mass, for example\n if(this.destination.measure != this.origin.measure) {\n throw new Error('Cannot convert incompatible measures of '\n + this.destination.measure + ' and ' + this.origin.measure);\n }\n\n /**\n * Convert from the source value to its anchor inside the system\n */\n result = this.val * this.origin.unit.to_anchor;\n\n /**\n * For some changes it's a simple shift (C to K)\n * So we'll add it when convering into the unit (later)\n * and subtract it when converting from the unit\n */\n if (this.origin.unit.anchor_shift) {\n result -= this.origin.unit.anchor_shift\n }\n\n /**\n * Convert from one system to another through the anchor ratio. Some conversions\n * aren't ratio based or require more than a simple shift. We can provide a custom\n * transform here to provide the direct result\n */\n if(this.origin.system != this.destination.system) {\n transform = measures[this.origin.measure]._anchors[this.origin.system].transform;\n if (typeof transform === 'function') {\n result = transform(result)\n }\n else {\n result *= measures[this.origin.measure]._anchors[this.origin.system].ratio;\n }\n }\n\n /**\n * This shift has to be done after the system conversion business\n */\n if (this.destination.unit.anchor_shift) {\n result += this.destination.unit.anchor_shift;\n }\n\n /**\n * Convert to another unit inside the destination system\n */\n return result / this.destination.unit.to_anchor;\n};\n\n/**\n* Converts the unit to the best available unit.\n*/\nConverter.prototype.toBest = function(options) {\n if(!this.origin)\n throw new Error('.toBest must be called after .from');\n\n var options = Object.assign({\n exclude: [],\n cutOffNumber: 1,\n }, options)\n\n var best;\n /**\n Looks through every possibility for the 'best' available unit.\n i.e. Where the value has the fewest numbers before the decimal point,\n but is still higher than 1.\n */\n each(this.possibilities(), function(possibility) {\n var unit = this.describe(possibility);\n var isIncluded = options.exclude.indexOf(possibility) === -1;\n\n if (isIncluded && unit.system === this.origin.system) {\n var result = this.to(possibility);\n if (!best || (result >= options.cutOffNumber && result < best.val)) {\n best = {\n val: result,\n unit: possibility,\n singular: unit.singular,\n plural: unit.plural\n };\n }\n }\n }.bind(this));\n\n return best;\n}\n\n/**\n* Finds the unit\n*/\nConverter.prototype.getUnit = function (abbr) {\n var found;\n\n each(measures, function (systems, measure) {\n each(systems, function (units, system) {\n if(system == '_anchors')\n return false;\n\n each(units, function (unit, testAbbr) {\n if(testAbbr == abbr) {\n found = {\n abbr: abbr\n , measure: measure\n , system: system\n , unit: unit\n };\n return false;\n }\n });\n\n if(found)\n return false;\n });\n\n if(found)\n return false;\n });\n\n return found;\n};\n\nvar describe = function(resp) {\n return {\n abbr: resp.abbr\n , measure: resp.measure\n , system: resp.system\n , singular: resp.unit.name.singular\n , plural: resp.unit.name.plural\n };\n}\n\n/**\n* An alias for getUnit\n*/\nConverter.prototype.describe = function (abbr) {\n var resp = Converter.prototype.getUnit(abbr);\n var desc = null;\n\n try {\n desc = describe(resp);\n } catch(err) {\n this.throwUnsupportedUnitError(abbr);\n }\n\n return desc;\n};\n\n/**\n* Detailed list of all supported units\n*/\nConverter.prototype.list = function (measure) {\n var list = [];\n\n each(measures, function (systems, testMeasure) {\n if(measure && measure !== testMeasure)\n return;\n\n each(systems, function (units, system) {\n if(system == '_anchors')\n return false;\n\n each(units, function (unit, abbr) {\n list = list.concat(describe({\n abbr: abbr,\n measure: testMeasure\n , system: system\n , unit: unit\n }));\n });\n });\n });\n\n return list;\n};\n\nConverter.prototype.throwUnsupportedUnitError = function (what) {\n var validUnits = [];\n\n each(measures, function (systems, measure) {\n each(systems, function (units, system) {\n if(system == '_anchors')\n return false;\n\n validUnits = validUnits.concat(keys(units));\n });\n });\n\n throw new Error('Unsupported unit ' + what + ', use one of: ' + validUnits.join(', '));\n}\n\n/**\n* Returns the abbreviated measures that the value can be\n* converted to.\n*/\nConverter.prototype.possibilities = function (measure) {\n var possibilities = [];\n if(!this.origin && !measure) {\n\t each(keys(measures), function (measure){\n\t\t each(measures[measure], function (units, system) {\n\t\t if(system == '_anchors')\n\t\t return false;\n\n\t\t possibilities = possibilities.concat(keys(units));\n\t\t });\n\t });\n } else {\n\t measure = measure || this.origin.measure;\n\t each(measures[measure], function (units, system) {\n\t if(system == '_anchors')\n\t return false;\n\n\t possibilities = possibilities.concat(keys(units));\n\t });\n }\n\n return possibilities;\n};\n\n/**\n* Returns the abbreviated measures that the value can be\n* converted to.\n*/\nConverter.prototype.measures = function () {\n return keys(measures);\n};\n\nconvert = function (value) {\n return new Converter(value);\n};\n\nmodule.exports = convert;\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014, Nucleic Development Team.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\nexport function createMap() {\n return new IndexedMap();\n}\nvar IndexedMap = /** @class */ (function () {\n function IndexedMap() {\n this.index = {};\n this.array = [];\n }\n /**\n * Returns the number of items in the array.\n */\n IndexedMap.prototype.size = function () {\n return this.array.length;\n };\n /**\n * Returns true if the array is empty.\n */\n IndexedMap.prototype.empty = function () {\n return this.array.length === 0;\n };\n /**\n * Returns the item at the given array index.\n *\n * @param index The integer index of the desired item.\n */\n IndexedMap.prototype.itemAt = function (index) {\n return this.array[index];\n };\n /**\n * Returns true if the key is in the array, false otherwise.\n *\n * @param key The key to locate in the array.\n */\n IndexedMap.prototype.contains = function (key) {\n return this.index[key.id()] !== undefined;\n };\n /**\n * Returns the pair associated with the given key, or undefined.\n *\n * @param key The key to locate in the array.\n */\n IndexedMap.prototype.find = function (key) {\n var i = this.index[key.id()];\n return i === undefined ? undefined : this.array[i];\n };\n /**\n * Returns the pair associated with the key if it exists.\n *\n * If the key does not exist, a new pair will be created and\n * inserted using the value created by the given factory.\n *\n * @param key The key to locate in the array.\n * @param factory The function which creates the default value.\n */\n IndexedMap.prototype.setDefault = function (key, factory) {\n var i = this.index[key.id()];\n if (i === undefined) {\n var pair = new Pair(key, factory());\n this.index[key.id()] = this.array.length;\n this.array.push(pair);\n return pair;\n }\n else {\n return this.array[i];\n }\n };\n /**\n * Insert the pair into the array and return the pair.\n *\n * This will overwrite any existing entry in the array.\n *\n * @param key The key portion of the pair.\n * @param value The value portion of the pair.\n */\n IndexedMap.prototype.insert = function (key, value) {\n var pair = new Pair(key, value);\n var i = this.index[key.id()];\n if (i === undefined) {\n this.index[key.id()] = this.array.length;\n this.array.push(pair);\n }\n else {\n this.array[i] = pair;\n }\n return pair;\n };\n /**\n * Removes and returns the pair for the given key, or undefined.\n *\n * @param key The key to remove from the map.\n */\n IndexedMap.prototype.erase = function (key) {\n var i = this.index[key.id()];\n if (i === undefined) {\n return undefined;\n }\n this.index[key.id()] = undefined;\n var pair = this.array[i];\n var last = this.array.pop();\n if (pair !== last) {\n this.array[i] = last;\n this.index[last.first.id()] = i;\n }\n return pair;\n };\n /**\n * Create a copy of this associative array.\n */\n IndexedMap.prototype.copy = function () {\n var copy = new IndexedMap();\n for (var i = 0; i < this.array.length; i++) {\n var pair = this.array[i].copy();\n copy.array[i] = pair;\n copy.index[pair.first.id()] = i;\n }\n return copy;\n };\n return IndexedMap;\n}());\n/**\n * A class which defines a generic pair object.\n * @private\n */\n// tslint:disable: max-classes-per-file\nvar Pair = /** @class */ (function () {\n /**\n * Construct a new Pair object.\n *\n * @param first The first item of the pair.\n * @param second The second item of the pair.\n */\n function Pair(first, second) {\n this.first = first;\n this.second = second;\n }\n /**\n * Create a copy of the pair.\n */\n Pair.prototype.copy = function () { return new Pair(this.first, this.second); };\n return Pair;\n}());\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014, Nucleic Development Team.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\nimport { Expression } from \"./expression.js\";\n/**\n * The primary user constraint variable.\n *\n * @class\n * @param {String} [name=\"\"] The name to associated with the variable.\n */\nvar Variable = /** @class */ (function () {\n function Variable(name) {\n if (name === void 0) { name = \"\"; }\n this._value = 0.0;\n this._context = null;\n this._id = VarId++;\n this._name = name;\n }\n /**\n * Returns the unique id number of the variable.\n * @private\n */\n Variable.prototype.id = function () {\n return this._id;\n };\n /**\n * Returns the name of the variable.\n *\n * @return {String} name of the variable\n */\n Variable.prototype.name = function () {\n return this._name;\n };\n /**\n * Set the name of the variable.\n *\n * @param {String} name Name of the variable\n */\n Variable.prototype.setName = function (name) {\n this._name = name;\n };\n /**\n * Returns the user context object of the variable.\n * @private\n */\n Variable.prototype.context = function () {\n return this._context;\n };\n /**\n * Set the user context object of the variable.\n * @private\n */\n Variable.prototype.setContext = function (context) {\n this._context = context;\n };\n /**\n * Returns the value of the variable.\n *\n * @return {Number} Calculated value\n */\n Variable.prototype.value = function () {\n return this._value;\n };\n /**\n * Set the value of the variable.\n * @private\n */\n Variable.prototype.setValue = function (value) {\n this._value = value;\n };\n /**\n * Creates a new Expression by adding a number, variable or expression\n * to the variable.\n *\n * @param {Number|Variable|Expression} value Value to add.\n * @return {Expression} expression\n */\n Variable.prototype.plus = function (value) {\n return new Expression(this, value);\n };\n /**\n * Creates a new Expression by substracting a number, variable or expression\n * from the variable.\n *\n * @param {Number|Variable|Expression} value Value to substract.\n * @return {Expression} expression\n */\n Variable.prototype.minus = function (value) {\n return new Expression(this, typeof value === \"number\" ? -value : [-1, value]);\n };\n /**\n * Creates a new Expression by multiplying with a fixed number.\n *\n * @param {Number} coefficient Coefficient to multiply with.\n * @return {Expression} expression\n */\n Variable.prototype.multiply = function (coefficient) {\n return new Expression([coefficient, this]);\n };\n /**\n * Creates a new Expression by dividing with a fixed number.\n *\n * @param {Number} coefficient Coefficient to divide by.\n * @return {Expression} expression\n */\n Variable.prototype.divide = function (coefficient) {\n return new Expression([1 / coefficient, this]);\n };\n /**\n * Returns the JSON representation of the variable.\n * @private\n */\n Variable.prototype.toJSON = function () {\n return {\n name: this._name,\n value: this._value,\n };\n };\n Variable.prototype.toString = function () {\n return this._context + \"[\" + this._name + \":\" + this._value + \"]\";\n };\n return Variable;\n}());\nexport { Variable };\n/**\n * The internal variable id counter.\n * @private\n */\nvar VarId = 0;\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014, Nucleic Development Team.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\nimport { createMap } from \"./maptype.js\";\nimport { Variable } from \"./variable.js\";\n/**\n * An expression of variable terms and a constant.\n *\n * The constructor accepts an arbitrary number of parameters,\n * each of which must be one of the following types:\n * - number\n * - Variable\n * - Expression\n * - 2-tuple of [number, Variable|Expression]\n *\n * The parameters are summed. The tuples are multiplied.\n *\n * @class\n * @param {...(number|Variable|Expression|Array)} args\n */\nvar Expression = /** @class */ (function () {\n function Expression() {\n var parsed = parseArgs(arguments);\n this._terms = parsed.terms;\n this._constant = parsed.constant;\n }\n /**\n * Returns the mapping of terms in the expression.\n *\n * This *must* be treated as const.\n * @private\n */\n Expression.prototype.terms = function () {\n return this._terms;\n };\n /**\n * Returns the constant of the expression.\n * @private\n */\n Expression.prototype.constant = function () {\n return this._constant;\n };\n /**\n * Returns the computed value of the expression.\n *\n * @private\n * @return {Number} computed value of the expression\n */\n Expression.prototype.value = function () {\n var result = this._constant;\n for (var i = 0, n = this._terms.size(); i < n; i++) {\n var pair = this._terms.itemAt(i);\n result += pair.first.value() * pair.second;\n }\n return result;\n };\n /**\n * Creates a new Expression by adding a number, variable or expression\n * to the expression.\n *\n * @param {Number|Variable|Expression} value Value to add.\n * @return {Expression} expression\n */\n Expression.prototype.plus = function (value) {\n return new Expression(this, value);\n };\n /**\n * Creates a new Expression by substracting a number, variable or expression\n * from the expression.\n *\n * @param {Number|Variable|Expression} value Value to substract.\n * @return {Expression} expression\n */\n Expression.prototype.minus = function (value) {\n return new Expression(this, typeof value === \"number\" ? -value : [-1, value]);\n };\n /**\n * Creates a new Expression by multiplying with a fixed number.\n *\n * @param {Number} coefficient Coefficient to multiply with.\n * @return {Expression} expression\n */\n Expression.prototype.multiply = function (coefficient) {\n return new Expression([coefficient, this]);\n };\n /**\n * Creates a new Expression by dividing with a fixed number.\n *\n * @param {Number} coefficient Coefficient to divide by.\n * @return {Expression} expression\n */\n Expression.prototype.divide = function (coefficient) {\n return new Expression([1 / coefficient, this]);\n };\n Expression.prototype.isConstant = function () {\n return this._terms.size() == 0;\n };\n Expression.prototype.toString = function () {\n var result = this._terms.array.map(function (pair) {\n return (pair.second + \"*\" + pair.first.toString());\n }).join(\" + \");\n if (!this.isConstant() && this._constant !== 0) {\n result += \" + \";\n }\n result += this._constant;\n return result;\n };\n return Expression;\n}());\nexport { Expression };\n/**\n * An internal argument parsing function.\n * @private\n */\nfunction parseArgs(args) {\n var constant = 0.0;\n var factory = function () { return 0.0; };\n var terms = createMap();\n for (var i = 0, n = args.length; i < n; ++i) {\n var item = args[i];\n if (typeof item === \"number\") {\n constant += item;\n }\n else if (item instanceof Variable) {\n terms.setDefault(item, factory).second += 1.0;\n }\n else if (item instanceof Expression) {\n constant += item.constant();\n var terms2 = item.terms();\n for (var j = 0, k = terms2.size(); j < k; j++) {\n var termPair = terms2.itemAt(j);\n terms.setDefault(termPair.first, factory).second += termPair.second;\n }\n }\n else if (item instanceof Array) {\n if (item.length !== 2) {\n throw new Error(\"array must have length 2\");\n }\n var value = item[0];\n var value2 = item[1];\n if (typeof value !== \"number\") {\n throw new Error(\"array item 0 must be a number\");\n }\n if (value2 instanceof Variable) {\n terms.setDefault(value2, factory).second += value;\n }\n else if (value2 instanceof Expression) {\n constant += (value2.constant() * value);\n var terms2 = value2.terms();\n for (var j = 0, k = terms2.size(); j < k; j++) {\n var termPair = terms2.itemAt(j);\n terms.setDefault(termPair.first, factory).second += (termPair.second * value);\n }\n }\n else {\n throw new Error(\"array item 1 must be a variable or expression\");\n }\n }\n else {\n throw new Error(\"invalid Expression argument: \" + item);\n }\n }\n return { terms: terms, constant: constant };\n}\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014, Nucleic Development Team.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * @class Strength\n */\nvar Strength = /** @class */ (function () {\n function Strength() {\n }\n /**\n * Create a new symbolic strength.\n *\n * @param a strong\n * @param b medium\n * @param c weak\n * @param [w] weight\n * @return strength\n */\n Strength.create = function (a, b, c, w) {\n if (w === void 0) { w = 1.0; }\n var result = 0.0;\n result += Math.max(0.0, Math.min(1000.0, a * w)) * 1000000.0;\n result += Math.max(0.0, Math.min(1000.0, b * w)) * 1000.0;\n result += Math.max(0.0, Math.min(1000.0, c * w));\n return result;\n };\n /**\n * Clip a symbolic strength to the allowed min and max.\n * @private\n */\n Strength.clip = function (value) {\n return Math.max(0.0, Math.min(Strength.required, value));\n };\n /**\n * The 'required' symbolic strength.\n */\n Strength.required = Strength.create(1000.0, 1000.0, 1000.0);\n /**\n * The 'strong' symbolic strength.\n */\n Strength.strong = Strength.create(1.0, 0.0, 0.0);\n /**\n * The 'medium' symbolic strength.\n */\n Strength.medium = Strength.create(0.0, 1.0, 0.0);\n /**\n * The 'weak' symbolic strength.\n */\n Strength.weak = Strength.create(0.0, 0.0, 1.0);\n return Strength;\n}());\nexport { Strength };\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014, Nucleic Development Team.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\nimport { Expression } from \"./expression.js\";\nimport { Strength } from \"./strength.js\";\n/**\n * An enum defining the linear constraint operators.\n *\n * |Value|Operator|Description|\n * |----|-----|-----|\n * |`Le`|<=|Less than equal|\n * |`Ge`|>=|Greater than equal|\n * |`Eq`|==|Equal|\n *\n * @enum {Number}\n */\nexport var Operator;\n(function (Operator) {\n Operator[Operator[\"Le\"] = 0] = \"Le\";\n Operator[Operator[\"Ge\"] = 1] = \"Ge\";\n Operator[Operator[\"Eq\"] = 2] = \"Eq\";\n})(Operator || (Operator = {}));\n/**\n * A linear constraint equation.\n *\n * A constraint equation is composed of an expression, an operator,\n * and a strength. The RHS of the equation is implicitly zero.\n *\n * @class\n * @param {Expression} expression The constraint expression (LHS).\n * @param {Operator} operator The equation operator.\n * @param {Expression} [rhs] Right hand side of the expression.\n * @param {Number} [strength=Strength.required] The strength of the constraint.\n */\nvar Constraint = /** @class */ (function () {\n function Constraint(expression, operator, rhs, strength) {\n if (strength === void 0) { strength = Strength.required; }\n this._id = CnId++;\n this._operator = operator;\n this._strength = Strength.clip(strength);\n if ((rhs === undefined) && (expression instanceof Expression)) {\n this._expression = expression;\n }\n else {\n this._expression = expression.minus(rhs);\n }\n }\n /**\n * Returns the unique id number of the constraint.\n * @private\n */\n Constraint.prototype.id = function () {\n return this._id;\n };\n /**\n * Returns the expression of the constraint.\n *\n * @return {Expression} expression\n */\n Constraint.prototype.expression = function () {\n return this._expression;\n };\n /**\n * Returns the relational operator of the constraint.\n *\n * @return {Operator} linear constraint operator\n */\n Constraint.prototype.op = function () {\n return this._operator;\n };\n /**\n * Returns the strength of the constraint.\n *\n * @return {Number} strength\n */\n Constraint.prototype.strength = function () {\n return this._strength;\n };\n Constraint.prototype.toString = function () {\n return this._expression.toString() + \" \" + [\"<=\", \">=\", \"=\"][this._operator] + \" 0 (\" + this._strength.toString() + \")\";\n };\n return Constraint;\n}());\nexport { Constraint };\n/**\n * The internal constraint id counter.\n * @private\n */\nvar CnId = 0;\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014, Nucleic Development Team.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\nimport { Constraint, Operator } from \"./constraint.js\";\nimport { Expression } from \"./expression.js\";\nimport { createMap } from \"./maptype.js\";\nimport { Strength } from \"./strength.js\";\n/**\n * The constraint solver class.\n *\n * @class\n */\nvar Solver = /** @class */ (function () {\n /**\n * Construct a new Solver.\n */\n function Solver() {\n this._cnMap = createCnMap();\n this._rowMap = createRowMap();\n this._varMap = createVarMap();\n this._editMap = createEditMap();\n this._infeasibleRows = [];\n this._objective = new Row();\n this._artificial = null;\n this._idTick = 0;\n }\n /**\n * Creates and add a constraint to the solver.\n *\n * @param {Expression|Variable} lhs Left hand side of the expression\n * @param {Operator} operator Operator\n * @param {Expression|Variable|Number} rhs Right hand side of the expression\n * @param {Number} [strength=Strength.required] Strength\n */\n Solver.prototype.createConstraint = function (lhs, operator, rhs, strength) {\n if (strength === void 0) { strength = Strength.required; }\n var cn = new Constraint(lhs, operator, rhs, strength);\n this.addConstraint(cn);\n return cn;\n };\n /**\n * Add a constraint to the solver.\n *\n * @param {Constraint} constraint Constraint to add to the solver\n */\n Solver.prototype.addConstraint = function (constraint) {\n var cnPair = this._cnMap.find(constraint);\n if (cnPair !== undefined) {\n throw new Error(\"duplicate constraint\");\n }\n // Creating a row causes symbols to be reserved for the variables\n // in the constraint. If this method exits with an exception,\n // then its possible those variables will linger in the var map.\n // Since its likely that those variables will be used in other\n // constraints and since exceptional conditions are uncommon,\n // i'm not too worried about aggressive cleanup of the var map.\n var data = this._createRow(constraint);\n var row = data.row;\n var tag = data.tag;\n var subject = this._chooseSubject(row, tag);\n // If chooseSubject couldnt find a valid entering symbol, one\n // last option is available if the entire row is composed of\n // dummy variables. If the constant of the row is zero, then\n // this represents redundant constraints and the new dummy\n // marker can enter the basis. If the constant is non-zero,\n // then it represents an unsatisfiable constraint.\n if (subject.type() === SymbolType.Invalid && row.allDummies()) {\n if (!nearZero(row.constant())) {\n throw new Error(\"unsatisfiable constraint\");\n }\n else {\n subject = tag.marker;\n }\n }\n // If an entering symbol still isn't found, then the row must\n // be added using an artificial variable. If that fails, then\n // the row represents an unsatisfiable constraint.\n if (subject.type() === SymbolType.Invalid) {\n if (!this._addWithArtificialVariable(row)) {\n throw new Error(\"unsatisfiable constraint\");\n }\n }\n else {\n row.solveFor(subject);\n this._substitute(subject, row);\n this._rowMap.insert(subject, row);\n }\n this._cnMap.insert(constraint, tag);\n // Optimizing after each constraint is added performs less\n // aggregate work due to a smaller average system size. It\n // also ensures the solver remains in a consistent state.\n this._optimize(this._objective);\n };\n /**\n * Remove a constraint from the solver.\n *\n * @param {Constraint} constraint Constraint to remove from the solver\n */\n Solver.prototype.removeConstraint = function (constraint) {\n var cnPair = this._cnMap.erase(constraint);\n if (cnPair === undefined) {\n throw new Error(\"unknown constraint\");\n }\n // Remove the error effects from the objective function\n // *before* pivoting, or substitutions into the objective\n // will lead to incorrect solver results.\n this._removeConstraintEffects(constraint, cnPair.second);\n // If the marker is basic, simply drop the row. Otherwise,\n // pivot the marker into the basis and then drop the row.\n var marker = cnPair.second.marker;\n var rowPair = this._rowMap.erase(marker);\n if (rowPair === undefined) {\n var leaving = this._getMarkerLeavingSymbol(marker);\n if (leaving.type() === SymbolType.Invalid) {\n throw new Error(\"failed to find leaving row\");\n }\n rowPair = this._rowMap.erase(leaving);\n rowPair.second.solveForEx(leaving, marker);\n this._substitute(marker, rowPair.second);\n }\n // Optimizing after each constraint is removed ensures that the\n // solver remains consistent. It makes the solver api easier to\n // use at a small tradeoff for speed.\n this._optimize(this._objective);\n };\n /**\n * Test whether the solver contains the constraint.\n *\n * @param {Constraint} constraint Constraint to test for\n * @return {Bool} true or false\n */\n Solver.prototype.hasConstraint = function (constraint) {\n return this._cnMap.contains(constraint);\n };\n /**\n * Add an edit variable to the solver.\n *\n * @param {Variable} variable Edit variable to add to the solver\n * @param {Number} strength Strength, should be less than `Strength.required`\n */\n Solver.prototype.addEditVariable = function (variable, strength) {\n var editPair = this._editMap.find(variable);\n if (editPair !== undefined) {\n throw new Error(\"duplicate edit variable\");\n }\n strength = Strength.clip(strength);\n if (strength === Strength.required) {\n throw new Error(\"bad required strength\");\n }\n var expr = new Expression(variable);\n var cn = new Constraint(expr, Operator.Eq, undefined, strength);\n this.addConstraint(cn);\n var tag = this._cnMap.find(cn).second;\n var info = { tag: tag, constraint: cn, constant: 0.0 };\n this._editMap.insert(variable, info);\n };\n /**\n * Remove an edit variable from the solver.\n *\n * @param {Variable} variable Edit variable to remove from the solver\n */\n Solver.prototype.removeEditVariable = function (variable) {\n var editPair = this._editMap.erase(variable);\n if (editPair === undefined) {\n throw new Error(\"unknown edit variable\");\n }\n this.removeConstraint(editPair.second.constraint);\n };\n /**\n * Test whether the solver contains the edit variable.\n *\n * @param {Variable} variable Edit variable to test for\n * @return {Bool} true or false\n */\n Solver.prototype.hasEditVariable = function (variable) {\n return this._editMap.contains(variable);\n };\n /**\n * Suggest the value of an edit variable.\n *\n * @param {Variable} variable Edit variable to suggest a value for\n * @param {Number} value Suggested value\n */\n Solver.prototype.suggestValue = function (variable, value) {\n var editPair = this._editMap.find(variable);\n if (editPair === undefined) {\n throw new Error(\"unknown edit variable\");\n }\n var rows = this._rowMap;\n var info = editPair.second;\n var delta = value - info.constant;\n info.constant = value;\n // Check first if the positive error variable is basic.\n var marker = info.tag.marker;\n var rowPair = rows.find(marker);\n if (rowPair !== undefined) {\n if (rowPair.second.add(-delta) < 0.0) {\n this._infeasibleRows.push(marker);\n }\n this._dualOptimize();\n return;\n }\n // Check next if the negative error variable is basic.\n var other = info.tag.other;\n rowPair = rows.find(other);\n if (rowPair !== undefined) {\n if (rowPair.second.add(delta) < 0.0) {\n this._infeasibleRows.push(other);\n }\n this._dualOptimize();\n return;\n }\n // Otherwise update each row where the error variables exist.\n for (var i = 0, n = rows.size(); i < n; ++i) {\n var rowPair_1 = rows.itemAt(i);\n var row = rowPair_1.second;\n var coeff = row.coefficientFor(marker);\n if (coeff !== 0.0 && row.add(delta * coeff) < 0.0 &&\n rowPair_1.first.type() !== SymbolType.External) {\n this._infeasibleRows.push(rowPair_1.first);\n }\n }\n this._dualOptimize();\n };\n /**\n * Update the values of the variables.\n */\n Solver.prototype.updateVariables = function () {\n var vars = this._varMap;\n var rows = this._rowMap;\n for (var i = 0, n = vars.size(); i < n; ++i) {\n var pair = vars.itemAt(i);\n var rowPair = rows.find(pair.second);\n if (rowPair !== undefined) {\n pair.first.setValue(rowPair.second.constant());\n }\n else {\n pair.first.setValue(0.0);\n }\n }\n };\n /**\n * Get the symbol for the given variable.\n *\n * If a symbol does not exist for the variable, one will be created.\n * @private\n */\n Solver.prototype._getVarSymbol = function (variable) {\n var _this = this;\n var factory = function () { return _this._makeSymbol(SymbolType.External); };\n return this._varMap.setDefault(variable, factory).second;\n };\n /**\n * Create a new Row object for the given constraint.\n *\n * The terms in the constraint will be converted to cells in the row.\n * Any term in the constraint with a coefficient of zero is ignored.\n * This method uses the `_getVarSymbol` method to get the symbol for\n * the variables added to the row. If the symbol for a given cell\n * variable is basic, the cell variable will be substituted with the\n * basic row.\n *\n * The necessary slack and error variables will be added to the row.\n * If the constant for the row is negative, the sign for the row\n * will be inverted so the constant becomes positive.\n *\n * Returns the created Row and the tag for tracking the constraint.\n * @private\n */\n Solver.prototype._createRow = function (constraint) {\n var expr = constraint.expression();\n var row = new Row(expr.constant());\n // Substitute the current basic variables into the row.\n var terms = expr.terms();\n for (var i = 0, n = terms.size(); i < n; ++i) {\n var termPair = terms.itemAt(i);\n if (!nearZero(termPair.second)) {\n var symbol = this._getVarSymbol(termPair.first);\n var basicPair = this._rowMap.find(symbol);\n if (basicPair !== undefined) {\n row.insertRow(basicPair.second, termPair.second);\n }\n else {\n row.insertSymbol(symbol, termPair.second);\n }\n }\n }\n // Add the necessary slack, error, and dummy variables.\n var objective = this._objective;\n var strength = constraint.strength();\n var tag = { marker: INVALID_SYMBOL, other: INVALID_SYMBOL };\n switch (constraint.op()) {\n case Operator.Le:\n case Operator.Ge:\n {\n var coeff = constraint.op() === Operator.Le ? 1.0 : -1.0;\n var slack = this._makeSymbol(SymbolType.Slack);\n tag.marker = slack;\n row.insertSymbol(slack, coeff);\n if (strength < Strength.required) {\n var error = this._makeSymbol(SymbolType.Error);\n tag.other = error;\n row.insertSymbol(error, -coeff);\n objective.insertSymbol(error, strength);\n }\n break;\n }\n case Operator.Eq:\n {\n if (strength < Strength.required) {\n var errplus = this._makeSymbol(SymbolType.Error);\n var errminus = this._makeSymbol(SymbolType.Error);\n tag.marker = errplus;\n tag.other = errminus;\n row.insertSymbol(errplus, -1.0); // v = eplus - eminus\n row.insertSymbol(errminus, 1.0); // v - eplus + eminus = 0\n objective.insertSymbol(errplus, strength);\n objective.insertSymbol(errminus, strength);\n }\n else {\n var dummy = this._makeSymbol(SymbolType.Dummy);\n tag.marker = dummy;\n row.insertSymbol(dummy);\n }\n break;\n }\n }\n // Ensure the row has a positive constant.\n if (row.constant() < 0.0) {\n row.reverseSign();\n }\n return { row: row, tag: tag };\n };\n /**\n * Choose the subject for solving for the row.\n *\n * This method will choose the best subject for using as the solve\n * target for the row. An invalid symbol will be returned if there\n * is no valid target.\n *\n * The symbols are chosen according to the following precedence:\n *\n * 1) The first symbol representing an external variable.\n * 2) A negative slack or error tag variable.\n *\n * If a subject cannot be found, an invalid symbol will be returned.\n *\n * @private\n */\n Solver.prototype._chooseSubject = function (row, tag) {\n var cells = row.cells();\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n if (pair.first.type() === SymbolType.External) {\n return pair.first;\n }\n }\n var type = tag.marker.type();\n if (type === SymbolType.Slack || type === SymbolType.Error) {\n if (row.coefficientFor(tag.marker) < 0.0) {\n return tag.marker;\n }\n }\n type = tag.other.type();\n if (type === SymbolType.Slack || type === SymbolType.Error) {\n if (row.coefficientFor(tag.other) < 0.0) {\n return tag.other;\n }\n }\n return INVALID_SYMBOL;\n };\n /**\n * Add the row to the tableau using an artificial variable.\n *\n * This will return false if the constraint cannot be satisfied.\n *\n * @private\n */\n Solver.prototype._addWithArtificialVariable = function (row) {\n // Create and add the artificial variable to the tableau.\n var art = this._makeSymbol(SymbolType.Slack);\n this._rowMap.insert(art, row.copy());\n this._artificial = row.copy();\n // Optimize the artificial objective. This is successful\n // only if the artificial objective is optimized to zero.\n this._optimize(this._artificial);\n var success = nearZero(this._artificial.constant());\n this._artificial = null;\n // If the artificial variable is basic, pivot the row so that\n // it becomes non-basic. If the row is constant, exit early.\n var pair = this._rowMap.erase(art);\n if (pair !== undefined) {\n var basicRow = pair.second;\n if (basicRow.isConstant()) {\n return success;\n }\n var entering = this._anyPivotableSymbol(basicRow);\n if (entering.type() === SymbolType.Invalid) {\n return false; // unsatisfiable (will this ever happen?)\n }\n basicRow.solveForEx(art, entering);\n this._substitute(entering, basicRow);\n this._rowMap.insert(entering, basicRow);\n }\n // Remove the artificial variable from the tableau.\n var rows = this._rowMap;\n for (var i = 0, n = rows.size(); i < n; ++i) {\n rows.itemAt(i).second.removeSymbol(art);\n }\n this._objective.removeSymbol(art);\n return success;\n };\n /**\n * Substitute the parametric symbol with the given row.\n *\n * This method will substitute all instances of the parametric symbol\n * in the tableau and the objective function with the given row.\n *\n * @private\n */\n Solver.prototype._substitute = function (symbol, row) {\n var rows = this._rowMap;\n for (var i = 0, n = rows.size(); i < n; ++i) {\n var pair = rows.itemAt(i);\n pair.second.substitute(symbol, row);\n if (pair.second.constant() < 0.0 &&\n pair.first.type() !== SymbolType.External) {\n this._infeasibleRows.push(pair.first);\n }\n }\n this._objective.substitute(symbol, row);\n if (this._artificial) {\n this._artificial.substitute(symbol, row);\n }\n };\n /**\n * Optimize the system for the given objective function.\n *\n * This method performs iterations of Phase 2 of the simplex method\n * until the objective function reaches a minimum.\n *\n * @private\n */\n Solver.prototype._optimize = function (objective) {\n while (true) {\n var entering = this._getEnteringSymbol(objective);\n if (entering.type() === SymbolType.Invalid) {\n return;\n }\n var leaving = this._getLeavingSymbol(entering);\n if (leaving.type() === SymbolType.Invalid) {\n throw new Error(\"the objective is unbounded\");\n }\n // pivot the entering symbol into the basis\n var row = this._rowMap.erase(leaving).second;\n row.solveForEx(leaving, entering);\n this._substitute(entering, row);\n this._rowMap.insert(entering, row);\n }\n };\n /**\n * Optimize the system using the dual of the simplex method.\n *\n * The current state of the system should be such that the objective\n * function is optimal, but not feasible. This method will perform\n * an iteration of the dual simplex method to make the solution both\n * optimal and feasible.\n *\n * @private\n */\n Solver.prototype._dualOptimize = function () {\n var rows = this._rowMap;\n var infeasible = this._infeasibleRows;\n while (infeasible.length !== 0) {\n var leaving = infeasible.pop();\n var pair = rows.find(leaving);\n if (pair !== undefined && pair.second.constant() < 0.0) {\n var entering = this._getDualEnteringSymbol(pair.second);\n if (entering.type() === SymbolType.Invalid) {\n throw new Error(\"dual optimize failed\");\n }\n // pivot the entering symbol into the basis\n var row = pair.second;\n rows.erase(leaving);\n row.solveForEx(leaving, entering);\n this._substitute(entering, row);\n rows.insert(entering, row);\n }\n }\n };\n /**\n * Compute the entering variable for a pivot operation.\n *\n * This method will return first symbol in the objective function which\n * is non-dummy and has a coefficient less than zero. If no symbol meets\n * the criteria, it means the objective function is at a minimum, and an\n * invalid symbol is returned.\n *\n * @private\n */\n Solver.prototype._getEnteringSymbol = function (objective) {\n var cells = objective.cells();\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n var symbol = pair.first;\n if (pair.second < 0.0 && symbol.type() !== SymbolType.Dummy) {\n return symbol;\n }\n }\n return INVALID_SYMBOL;\n };\n /**\n * Compute the entering symbol for the dual optimize operation.\n *\n * This method will return the symbol in the row which has a positive\n * coefficient and yields the minimum ratio for its respective symbol\n * in the objective function. The provided row *must* be infeasible.\n * If no symbol is found which meats the criteria, an invalid symbol\n * is returned.\n *\n * @private\n */\n Solver.prototype._getDualEnteringSymbol = function (row) {\n var ratio = Number.MAX_VALUE;\n var entering = INVALID_SYMBOL;\n var cells = row.cells();\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n var symbol = pair.first;\n var c = pair.second;\n if (c > 0.0 && symbol.type() !== SymbolType.Dummy) {\n var coeff = this._objective.coefficientFor(symbol);\n var r = coeff / c;\n if (r < ratio) {\n ratio = r;\n entering = symbol;\n }\n }\n }\n return entering;\n };\n /**\n * Compute the symbol for pivot exit row.\n *\n * This method will return the symbol for the exit row in the row\n * map. If no appropriate exit symbol is found, an invalid symbol\n * will be returned. This indicates that the objective function is\n * unbounded.\n *\n * @private\n */\n Solver.prototype._getLeavingSymbol = function (entering) {\n var ratio = Number.MAX_VALUE;\n var found = INVALID_SYMBOL;\n var rows = this._rowMap;\n for (var i = 0, n = rows.size(); i < n; ++i) {\n var pair = rows.itemAt(i);\n var symbol = pair.first;\n if (symbol.type() !== SymbolType.External) {\n var row = pair.second;\n var temp = row.coefficientFor(entering);\n if (temp < 0.0) {\n var temp_ratio = -row.constant() / temp;\n if (temp_ratio < ratio) {\n ratio = temp_ratio;\n found = symbol;\n }\n }\n }\n }\n return found;\n };\n /**\n * Compute the leaving symbol for a marker variable.\n *\n * This method will return a symbol corresponding to a basic row\n * which holds the given marker variable. The row will be chosen\n * according to the following precedence:\n *\n * 1) The row with a restricted basic varible and a negative coefficient\n * for the marker with the smallest ratio of -constant / coefficient.\n *\n * 2) The row with a restricted basic variable and the smallest ratio\n * of constant / coefficient.\n *\n * 3) The last unrestricted row which contains the marker.\n *\n * If the marker does not exist in any row, an invalid symbol will be\n * returned. This indicates an internal solver error since the marker\n * *should* exist somewhere in the tableau.\n *\n * @private\n */\n Solver.prototype._getMarkerLeavingSymbol = function (marker) {\n var dmax = Number.MAX_VALUE;\n var r1 = dmax;\n var r2 = dmax;\n var invalid = INVALID_SYMBOL;\n var first = invalid;\n var second = invalid;\n var third = invalid;\n var rows = this._rowMap;\n for (var i = 0, n = rows.size(); i < n; ++i) {\n var pair = rows.itemAt(i);\n var row = pair.second;\n var c = row.coefficientFor(marker);\n if (c === 0.0) {\n continue;\n }\n var symbol = pair.first;\n if (symbol.type() === SymbolType.External) {\n third = symbol;\n }\n else if (c < 0.0) {\n var r = -row.constant() / c;\n if (r < r1) {\n r1 = r;\n first = symbol;\n }\n }\n else {\n var r = row.constant() / c;\n if (r < r2) {\n r2 = r;\n second = symbol;\n }\n }\n }\n if (first !== invalid) {\n return first;\n }\n if (second !== invalid) {\n return second;\n }\n return third;\n };\n /**\n * Remove the effects of a constraint on the objective function.\n *\n * @private\n */\n Solver.prototype._removeConstraintEffects = function (cn, tag) {\n if (tag.marker.type() === SymbolType.Error) {\n this._removeMarkerEffects(tag.marker, cn.strength());\n }\n if (tag.other.type() === SymbolType.Error) {\n this._removeMarkerEffects(tag.other, cn.strength());\n }\n };\n /**\n * Remove the effects of an error marker on the objective function.\n *\n * @private\n */\n Solver.prototype._removeMarkerEffects = function (marker, strength) {\n var pair = this._rowMap.find(marker);\n if (pair !== undefined) {\n this._objective.insertRow(pair.second, -strength);\n }\n else {\n this._objective.insertSymbol(marker, -strength);\n }\n };\n /**\n * Get the first Slack or Error symbol in the row.\n *\n * If no such symbol is present, an invalid symbol will be returned.\n *\n * @private\n */\n Solver.prototype._anyPivotableSymbol = function (row) {\n var cells = row.cells();\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n var type = pair.first.type();\n if (type === SymbolType.Slack || type === SymbolType.Error) {\n return pair.first;\n }\n }\n return INVALID_SYMBOL;\n };\n /**\n * Returns a new Symbol of the given type.\n *\n * @private\n */\n Solver.prototype._makeSymbol = function (type) {\n return new Symbol(type, this._idTick++);\n };\n return Solver;\n}());\nexport { Solver };\n/**\n * Test whether a value is approximately zero.\n * @private\n */\nfunction nearZero(value) {\n var eps = 1.0e-8;\n return value < 0.0 ? -value < eps : value < eps;\n}\n/**\n * An internal function for creating a constraint map.\n * @private\n */\nfunction createCnMap() {\n return createMap();\n}\n/**\n * An internal function for creating a row map.\n * @private\n */\nfunction createRowMap() {\n return createMap();\n}\n/**\n * An internal function for creating a variable map.\n * @private\n */\nfunction createVarMap() {\n return createMap();\n}\n/**\n * An internal function for creating an edit map.\n * @private\n */\nfunction createEditMap() {\n return createMap();\n}\n/**\n * An enum defining the available symbol types.\n * @private\n */\nvar SymbolType;\n(function (SymbolType) {\n SymbolType[SymbolType[\"Invalid\"] = 0] = \"Invalid\";\n SymbolType[SymbolType[\"External\"] = 1] = \"External\";\n SymbolType[SymbolType[\"Slack\"] = 2] = \"Slack\";\n SymbolType[SymbolType[\"Error\"] = 3] = \"Error\";\n SymbolType[SymbolType[\"Dummy\"] = 4] = \"Dummy\";\n})(SymbolType || (SymbolType = {}));\n/**\n * An internal class representing a symbol in the solver.\n * @private\n */\nvar Symbol = /** @class */ (function () {\n /**\n * Construct a new Symbol\n *\n * @param [type] The type of the symbol.\n * @param [id] The unique id number of the symbol.\n */\n function Symbol(type, id) {\n this._id = id;\n this._type = type;\n }\n /**\n * Returns the unique id number of the symbol.\n */\n Symbol.prototype.id = function () {\n return this._id;\n };\n /**\n * Returns the type of the symbol.\n */\n Symbol.prototype.type = function () {\n return this._type;\n };\n return Symbol;\n}());\n/**\n * A static invalid symbol\n * @private\n */\nvar INVALID_SYMBOL = new Symbol(SymbolType.Invalid, -1);\n/**\n * An internal row class used by the solver.\n * @private\n */\nvar Row = /** @class */ (function () {\n /**\n * Construct a new Row.\n */\n function Row(constant) {\n if (constant === void 0) { constant = 0.0; }\n this._cellMap = createMap();\n this._constant = constant;\n }\n /**\n * Returns the mapping of symbols to coefficients.\n */\n Row.prototype.cells = function () {\n return this._cellMap;\n };\n /**\n * Returns the constant for the row.\n */\n Row.prototype.constant = function () {\n return this._constant;\n };\n /**\n * Returns true if the row is a constant value.\n */\n Row.prototype.isConstant = function () {\n return this._cellMap.empty();\n };\n /**\n * Returns true if the Row has all dummy symbols.\n */\n Row.prototype.allDummies = function () {\n var cells = this._cellMap;\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n if (pair.first.type() !== SymbolType.Dummy) {\n return false;\n }\n }\n return true;\n };\n /**\n * Create a copy of the row.\n */\n Row.prototype.copy = function () {\n var theCopy = new Row(this._constant);\n theCopy._cellMap = this._cellMap.copy();\n return theCopy;\n };\n /**\n * Add a constant value to the row constant.\n *\n * Returns the new value of the constant.\n */\n Row.prototype.add = function (value) {\n return this._constant += value;\n };\n /**\n * Insert the symbol into the row with the given coefficient.\n *\n * If the symbol already exists in the row, the coefficient\n * will be added to the existing coefficient. If the resulting\n * coefficient is zero, the symbol will be removed from the row.\n */\n Row.prototype.insertSymbol = function (symbol, coefficient) {\n if (coefficient === void 0) { coefficient = 1.0; }\n var pair = this._cellMap.setDefault(symbol, function () { return 0.0; });\n if (nearZero(pair.second += coefficient)) {\n this._cellMap.erase(symbol);\n }\n };\n /**\n * Insert a row into this row with a given coefficient.\n *\n * The constant and the cells of the other row will be\n * multiplied by the coefficient and added to this row. Any\n * cell with a resulting coefficient of zero will be removed\n * from the row.\n */\n Row.prototype.insertRow = function (other, coefficient) {\n if (coefficient === void 0) { coefficient = 1.0; }\n this._constant += other._constant * coefficient;\n var cells = other._cellMap;\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n this.insertSymbol(pair.first, pair.second * coefficient);\n }\n };\n /**\n * Remove a symbol from the row.\n */\n Row.prototype.removeSymbol = function (symbol) {\n this._cellMap.erase(symbol);\n };\n /**\n * Reverse the sign of the constant and cells in the row.\n */\n Row.prototype.reverseSign = function () {\n this._constant = -this._constant;\n var cells = this._cellMap;\n for (var i = 0, n = cells.size(); i < n; ++i) {\n var pair = cells.itemAt(i);\n pair.second = -pair.second;\n }\n };\n /**\n * Solve the row for the given symbol.\n *\n * This method assumes the row is of the form\n * a * x + b * y + c = 0 and (assuming solve for x) will modify\n * the row to represent the right hand side of\n * x = -b/a * y - c / a. The target symbol will be removed from\n * the row, and the constant and other cells will be multiplied\n * by the negative inverse of the target coefficient.\n *\n * The given symbol *must* exist in the row.\n */\n Row.prototype.solveFor = function (symbol) {\n var cells = this._cellMap;\n var pair = cells.erase(symbol);\n var coeff = -1.0 / pair.second;\n this._constant *= coeff;\n for (var i = 0, n = cells.size(); i < n; ++i) {\n cells.itemAt(i).second *= coeff;\n }\n };\n /**\n * Solve the row for the given symbols.\n *\n * This method assumes the row is of the form\n * x = b * y + c and will solve the row such that\n * y = x / b - c / b. The rhs symbol will be removed from the\n * row, the lhs added, and the result divided by the negative\n * inverse of the rhs coefficient.\n *\n * The lhs symbol *must not* exist in the row, and the rhs\n * symbol must* exist in the row.\n */\n Row.prototype.solveForEx = function (lhs, rhs) {\n this.insertSymbol(lhs, -1.0);\n this.solveFor(rhs);\n };\n /**\n * Returns the coefficient for the given symbol.\n */\n Row.prototype.coefficientFor = function (symbol) {\n var pair = this._cellMap.find(symbol);\n return pair !== undefined ? pair.second : 0.0;\n };\n /**\n * Substitute a symbol with the data from another row.\n *\n * Given a row of the form a * x + b and a substitution of the\n * form x = 3 * y + c the row will be updated to reflect the\n * expression 3 * a * y + a * c + b.\n *\n * If the symbol does not exist in the row, this is a no-op.\n */\n Row.prototype.substitute = function (symbol, row) {\n var pair = this._cellMap.erase(symbol);\n if (pair !== undefined) {\n this.insertRow(row, pair.second);\n }\n };\n return Row;\n}());\n","/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2018, Nucleic Development Team & H. Rutjes.\n|\n| Distributed under the terms of the Modified BSD License.\n|\n| The full license is in the file COPYING.txt, distributed with this software.\n|----------------------------------------------------------------------------*/\nexport * from \"./constraint.js\";\nexport * from \"./expression.js\";\nexport * from \"./solver.js\";\nexport * from \"./strength.js\";\nexport * from \"./variable.js\";\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","export * from \"./lib/project\"\nexport * from \"./lib/builder\"\nexport * from \"./lib/apply-selector\"\nexport * from \"./lib/types\"\n","import * as Type from \"lib/types\"\nimport { Dimension } from \"lib/types\"\nimport { ProjectBuilder } from \"../project-builder\"\n\nexport interface PortBuilder {\n builder_type: \"port_builder\"\n name: string\n schematic_position: { x: Dimension; y: Dimension }\n schematic_direction: \"up\" | \"down\" | \"left\" | \"right\"\n setName(name: string): PortBuilder\n setSchematicPosition(coords: { x: number; y: number }): PortBuilder\n setSchematicDirection(dir: \"up\" | \"down\" | \"left\" | \"right\"): PortBuilder\n build(): Type.AnyElement[]\n}\n\nexport class PortBuilderClass implements PortBuilder {\n builder_type = \"port_builder\" as const\n project_builder: ProjectBuilder\n name: string = \"\"\n\n schematic_position: Type.Point = { x: 0, y: 0 }\n schematic_direction: \"up\" | \"down\" | \"left\" | \"right\"\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n }\n\n setName(name) {\n this.name = name\n return this\n }\n\n setSchematicPosition(point) {\n this.schematic_position = point\n return this\n }\n\n setSchematicDirection(direction) {\n this.schematic_direction = direction\n return this\n }\n\n build() {\n throw new Error(`\"port_builder\" must be built via \"ports_builder\"`)\n return []\n }\n}\n\nexport const createPortBuilder = (\n project_builder: ProjectBuilder\n): PortBuilder => {\n return new PortBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport { Builder } from \"lib/types\"\nimport { Except, Simplify } from \"type-fest\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport { createPortBuilder, PortBuilder } from \"./port-builder\"\n\nexport type PortBuilderCallback = (cb: PortsBuilder) => unknown\nexport interface PortsBuilder {\n builder_type: \"ports_builder\"\n project_builder: ProjectBuilder\n appendChild: (child: Builder) => PortsBuilder\n\n /**\n * @deprecated this add function doesn't match the other \"add\" patterns, will\n * be refactored and the method signature will change/will be renamed\n */\n add: ((portName: string, schematicPosition: Type.Point) => PortsBuilder) &\n ((params: {\n name: string\n center: { x: number; y: number }\n facing_direction: \"up\" | \"down\" | \"left\" | \"right\"\n }) => PortsBuilder)\n setSourceComponent: (source_component_id: string) => PortsBuilder\n setSchematicComponent: (schematic_component_id: string) => PortsBuilder\n setPCBComponent: (pcb_component_id: string) => PortsBuilder\n build(bc: Type.BuildContext): Type.AnyElement[]\n}\n\nexport class PortsBuilderClass implements PortsBuilder {\n builder_type = \"ports_builder\" as const\n project_builder: ProjectBuilder\n source_component_id: string\n schematic_component_id: string\n pcb_component_id: string\n\n ports: PortBuilder[]\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n this.ports = []\n }\n\n appendChild(child) {\n if (child.builder_type === \"port_builder\") {\n this.ports.push(child)\n return this\n }\n throw new Error(`\"ports_builder\" can only append \"port_builder\"`)\n }\n\n add(...params) {\n if (params.length === 1) {\n this.ports.push(\n createPortBuilder(this.project_builder)\n .setSchematicPosition(params[0].center)\n .setName(params[0].name)\n .setSchematicDirection(params[0].facing_direction)\n )\n } else {\n const [name, schematic_position] = params\n this.ports.push(\n createPortBuilder(this.project_builder)\n .setSchematicPosition(schematic_position)\n .setName(name)\n )\n }\n return this\n }\n\n setSourceComponent(source_component_id) {\n this.source_component_id = source_component_id\n return this\n }\n setSchematicComponent(schematic_component_id) {\n this.schematic_component_id = schematic_component_id\n return this\n }\n setPCBComponent(pcb_component_id) {\n this.pcb_component_id = pcb_component_id\n return this\n }\n\n build(bc: Type.BuildContext) {\n const { project_builder } = this\n return this.ports.flatMap((port) => {\n const source_port_id = project_builder.getId(\"source_port\")\n const schematic_port_id = project_builder.getId(\"schematic_port\")\n const pcb_port_id = project_builder.getId(\"pcb_port\")\n return [\n {\n type: \"source_port\",\n name: port.name,\n source_port_id,\n source_component_id: this.source_component_id,\n } as Type.SourcePort,\n {\n type: \"schematic_port\",\n schematic_port_id,\n source_port_id,\n center: bc.convert(port.schematic_position),\n facing_direction: port.schematic_direction,\n } as Type.SchematicPort,\n {\n type: \"pcb_port\",\n pcb_port_id,\n source_port_id,\n } as Type.PCBPort,\n ] as Type.AnyElement[]\n }) as Type.AnyElement[]\n }\n}\n\nexport const createPortsBuilder = (\n project_builder: ProjectBuilder\n): PortsBuilder => {\n return new PortsBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport { ProjectBuilder } from \"lib/project\"\nimport {BuildContext} from \"lib/types/build-context\"\n\nexport interface PlatedHoleBuilder {\n builder_type: \"plated_hole_builder\"\n project_builder: ProjectBuilder\n setProps(props: Partial<Type.PCBPlatedHole>): PlatedHoleBuilder\n build(bc: BuildContext): Promise<Type.PCBPlatedHole[]>\n}\n\nexport class PlatedHoleBuilderClass implements PlatedHoleBuilder {\n project_builder: ProjectBuilder\n builder_type = \"plated_hole_builder\" as const\n\n outer_diameter: Type.Dimension\n hole_diameter: Type.Dimension\n x: Type.Dimension\n y: Type.Dimension\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n }\n\n setProps(props: Partial<{\n \n }>): PlatedHoleBuilder {\n for (const k in props) {\n this[k] = props[k]\n }\n return this\n }\n\n async build(bc): Promise<Type.PCBPlatedHole[]> {\n return [\n {\n type: \"pcb_plated_hole\",\n x: bc.convert(this.x),\n y: bc.convert(this.y),\n hole_diameter: bc.convert(this.hole_diameter),\n outer_diameter: bc.convert(this.outer_diameter),\n },\n ]\n }\n}\n\nexport const createPlatedHoleBuilder = (project_builder: ProjectBuilder) => {\n return new PlatedHoleBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport { ProjectBuilder } from \"lib/project\"\n\nexport interface HoleBuilder {\n builder_type: \"hole_builder\"\n project_builder: ProjectBuilder\n setProps(props: Partial<Type.PCBHole>): HoleBuilder\n build(): Promise<Type.PCBHole[]>\n}\n\nexport class HoleBuilderClass implements HoleBuilder {\n project_builder: ProjectBuilder\n builder_type = \"hole_builder\" as const\n\n hole_diameter: number\n x: number\n y: number\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n }\n\n setProps(props: Partial<Type.PCBHole>): HoleBuilder {\n for (const k in props) {\n this[k] = props[k]\n }\n return this\n }\n\n async build(): Promise<Type.PCBHole[]> {\n return [\n {\n type: \"pcb_hole\",\n x: this.x,\n y: this.y,\n hole_diameter: this.hole_diameter,\n },\n ]\n }\n}\n\nexport const createHoleBuilder = (project_builder: ProjectBuilder) => {\n return new HoleBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport { ProjectBuilder } from \"lib/project\"\n\nexport interface ViaBuilder {\n builder_type: \"via_builder\"\n project_builder: ProjectBuilder\n setProps(props: Partial<Type.PCBVia>): ViaBuilder\n build(bc: Type.BuildContext): Promise<Type.PCBVia[]>\n}\n\nexport class ViaBuilderClass implements ViaBuilder {\n project_builder: ProjectBuilder\n builder_type = \"via_builder\" as const\n\n outer_diameter: Type.Dimension\n hole_diameter: Type.Dimension\n x: Type.Dimension\n y: Type.Dimension\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n }\n\n setProps(props: Partial<Type.PCBVia>): ViaBuilder {\n for (const k in props) {\n this[k] = props[k]\n }\n return this\n }\n\n async build(bc): Promise<Type.PCBVia[]> {\n return [\n {\n type: \"pcb_via\",\n x: bc.convert(this.x),\n y: bc.convert(this.y),\n hole_diameter: bc.convert(this.hole_diameter),\n outer_diameter: bc.convert(this.outer_diameter),\n },\n ]\n }\n}\n\nexport const createViaBuilder = (project_builder: ProjectBuilder) => {\n return new ViaBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport { ProjectBuilder } from \"lib/project\"\n\nexport interface SMTPadBuilder {\n builder_type: \"smtpad_builder\"\n project_builder: ProjectBuilder\n setShape(shape: Type.PCBSMTPad[\"shape\"]): SMTPadBuilder\n setSize(width: number, height: number): SMTPadBuilder\n setRadius(radius: number): SMTPadBuilder\n setLayer(layer: Type.PCBSMTPad[\"layer\"] | string): SMTPadBuilder\n setPosition(x: number, y: number): SMTPadBuilder\n build(bc: Type.BuildContext): Promise<Type.PCBSMTPad[]>\n}\n\ntype RectProps = Extract<Type.PCBSMTPad, { shape: \"rect\" }>\ntype CircleProps = Extract<Type.PCBSMTPad, { shape: \"circle\" }>\n\nexport class SMTPadBuilderClass implements SMTPadBuilder {\n project_builder: ProjectBuilder\n builder_type = \"smtpad_builder\" as const\n\n width: RectProps[\"width\"]\n height: RectProps[\"height\"]\n radius: CircleProps[\"radius\"]\n x: number\n y: number\n\n layer: Type.LayerRef\n shape: Type.PCBSMTPad[\"shape\"]\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n }\n\n setShape(shape: Type.PCBSMTPad[\"shape\"]) {\n if ((this.width || this.height) && shape === \"circle\") {\n this.radius = this.width || this.height\n this.width = null\n this.height = null\n } else if (shape === \"rect\" && this.radius) {\n this.radius = this.width\n }\n this.shape = shape\n return this\n }\n\n setPosition(x: number, y: number) {\n this.x = x\n this.y = y\n return this\n }\n\n setSize(width_or_radius: number, height?: number) {\n if (this.shape === \"rect\" && height === undefined) {\n throw new Error(\"Must set height for rect\")\n }\n if (this.shape === \"circle\") {\n this.radius = width_or_radius\n } else if (this.shape === \"rect\") {\n this.width = width_or_radius\n this.height = height\n }\n return this\n }\n\n setRadius(radius: number) {\n this.radius = radius\n return this\n }\n\n setLayer(layer) {\n if (typeof layer === \"string\") {\n this.layer = { name: layer }\n } else {\n this.layer = layer\n }\n return this\n }\n\n async build(): Promise<Type.PCBSMTPad[]> {\n if (this.shape === \"rect\") {\n return [\n {\n type: \"pcb_smtpad\",\n shape: this.shape,\n x: this.x,\n y: this.y,\n width: this.width,\n height: this.height,\n layer: this.layer,\n },\n ]\n } else if (this.shape === \"circle\") {\n return [\n {\n type: \"pcb_smtpad\",\n shape: this.shape,\n x: this.x,\n y: this.y,\n radius: this.radius,\n layer: this.layer,\n },\n ]\n }\n }\n}\n\nexport const createSMTPadBuilder = (project_builder: ProjectBuilder) => {\n return new SMTPadBuilderClass(project_builder)\n}\n","import { BaseComponentBuilder, ProjectBuilder } from \"lib/project\"\nimport * as Type from \"lib/types\"\nimport { Builder } from \"lib/types/builders\"\nimport { SMTPadBuilder, createSMTPadBuilder } from \"./smt-pad-builder\"\n\nexport type FootprintBuilderCallback = (rb: FootprintBuilder) => unknown\n\nconst addables = {\n smtpad: createSMTPadBuilder,\n} as const\n\nexport interface FootprintBuilder {\n builder_type: \"footprint_builder\"\n project_builder: ProjectBuilder\n addables: typeof addables\n appendChild: (child: Builder) => FootprintBuilder\n addPad(cb: (smtpadbuilder: SMTPadBuilder) => unknown): FootprintBuilder\n add<T extends keyof typeof addables>(\n builder_type: T,\n callback: (builder: ReturnType<typeof addables[T]>) => unknown\n ): FootprintBuilder\n build(bc: Type.BuildContext): Promise<Type.AnyElement[]>\n}\n\nexport class FootprintBuilderClass implements FootprintBuilder {\n builder_type: \"footprint_builder\"\n project_builder: ProjectBuilder\n addables = addables\n\n children: SMTPadBuilder[] = []\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n }\n\n appendChild(child) {\n if (child.builder_type === \"smtpad_builder\") {\n this.children.push(child)\n return this\n } else if (child.builder_type === \"plated_hole_builder\") {\n this.children.push(child)\n return this\n }\n throw new Error(\n `Unsupported child for footprint builder: \"${child.builder_type}\"`\n )\n }\n\n add(new_builder_type, cb) {\n const new_builder = addables[new_builder_type](this.project_builder)\n cb(new_builder)\n this.children.push(new_builder)\n return this\n }\n\n addPad(cb) {\n const smtpadbuilder = createSMTPadBuilder(this.project_builder)\n cb(smtpadbuilder)\n this.children.push(smtpadbuilder)\n return this\n }\n\n async build(bc): Promise<Type.AnyElement[]> {\n const built_elements = []\n for (const child of this.children) {\n const built = await child.build(bc)\n built_elements.push(...built)\n }\n return built_elements\n }\n}\n\nexport const createFootprintBuilder = (\n project_builder: ProjectBuilder\n): FootprintBuilder => {\n return new FootprintBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport { Builder, SchematicDrawing } from \"lib/types\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport { SchematicBoxBuilder } from \"./schematic-box-builder\"\nimport { SchematicLineBuilder } from \"./schematic-line-builder\"\nimport { SchematicTextBuilder } from \"./schematic-text-builder\"\n\ntype ChildBuilder = SchematicBoxBuilder | SchematicLineBuilder\n// | SchematicTextBuilder\n\nexport interface SchematicSymbolBuilder {\n project_builder: ProjectBuilder\n builder_type: \"schematic_symbol_builder\"\n appendChild: (child: ChildBuilder) => SchematicSymbolBuilder\n build(bc: Type.BuildContext): SchematicDrawing[]\n}\n\nexport class SchematicSymbolBuilderClass implements SchematicSymbolBuilder {\n project_builder: ProjectBuilder\n builder_type: \"schematic_symbol_builder\" = \"schematic_symbol_builder\"\n children: ChildBuilder[]\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n this.children = []\n }\n\n appendChild(child: ChildBuilder) {\n if (\n ![\n \"schematic_box_builder\",\n \"schematic_line_builder\",\n \"schematic_text_builder\",\n ].includes(child.builder_type)\n ) {\n if ((child as any).builder_type === \"schematic_symbol_builder\") {\n throw new Error(`Schematic symbol builder nesting not yet supported!`)\n }\n throw new Error(\n `Unsupported child type for inside of schematic symbol builder: ${child.builder_type}`\n )\n }\n\n this.children.push(child as any)\n return this\n }\n\n build(bc: Type.BuildContext): SchematicDrawing[] {\n if (!bc.schematic_component_id)\n throw new Error(\n \"Can't render symbols without schematic_component_id from context\"\n )\n\n const components_wo_id = this.children.map((child) => child.build(bc))\n\n const components_w_id = components_wo_id.map((component) => ({\n ...component,\n schematic_component_id: bc.schematic_component_id,\n }))\n\n return components_w_id\n }\n}\n\nexport const createSchematicSymbolBuilder = (\n project_builder: ProjectBuilder\n): SchematicSymbolBuilder => {\n return new SchematicSymbolBuilderClass(project_builder) as any\n}\n","/**\n * A simple data builder is a builder that constructs a JSON object\n */\n\nimport { BuildContext } from \"lib/types\"\nimport { ProjectBuilder } from \"./project-builder\"\n\nexport interface SimpleDataBuilder<\n BuilderType extends string,\n Fields extends Object,\n UnitFields extends keyof Fields = never\n> {\n builder_type: BuilderType\n project_builder: ProjectBuilder\n\n props: Fields\n setProps(props: Partial<Fields>): SimpleDataBuilder<BuilderType, Fields>\n\n build(bc: BuildContext): Omit<Fields, UnitFields> & Record<UnitFields, number>\n}\n\nexport const createSimpleDataBuilderClass = <\n BuilderType extends string,\n Fields,\n UnitField extends keyof Fields = keyof Fields\n>(\n builder_type: BuilderType,\n default_fields: Partial<Fields>,\n unit_fields: UnitField[] = []\n): {\n new (project_builder: ProjectBuilder): SimpleDataBuilder<\n BuilderType,\n Fields,\n UnitField\n >\n} => {\n class SimpleDataBuilderClass\n implements SimpleDataBuilder<BuilderType, Fields>\n {\n builder_type: BuilderType = builder_type\n project_builder: ProjectBuilder\n\n props: Fields\n\n constructor(project_builder: ProjectBuilder) {\n this.project_builder = project_builder\n this.props = default_fields as any\n }\n\n setProps(props: Partial<Fields>) {\n this.props = { ...this.props, ...props }\n return this\n }\n\n build(bc: BuildContext) {\n const ret_obj: any = { ...this.props }\n for (const unit_field of unit_fields) {\n ret_obj[unit_field] = bc.convert(ret_obj[unit_field])\n }\n return ret_obj\n }\n }\n\n return SimpleDataBuilderClass as any\n}\n","import { Dimension } from \"lib/types\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport { createSimpleDataBuilderClass } from \"../simple-data-builder\"\n\nexport interface SchematicBoxBuilderFields {\n type: \"schematic_box\"\n width: Dimension\n height: Dimension\n align: \"center\"\n x: Dimension\n y: Dimension\n name: string\n drawing_type: \"box\"\n}\n\nexport interface SchematicBoxBuilder {\n builder_type: \"schematic_box_builder\"\n props: SchematicBoxBuilderFields\n setProps(props: Partial<SchematicBoxBuilderFields>): SchematicBoxBuilder\n build(): Omit<SchematicBoxBuilderFields, \"width\" | \"height\" | \"x\" | \"y\"> & {\n width: number\n height: number\n x: number\n y: number\n }\n}\n\nexport const SchematicBoxBuilderClass = createSimpleDataBuilderClass(\n \"schematic_box_builder\",\n {\n drawing_type: \"box\",\n type: \"schematic_box\",\n } as SchematicBoxBuilder[\"props\"],\n [\"x\", \"y\", \"width\", \"height\"]\n)\n\nexport const createSchematicBoxBuilder = (\n project_builder: ProjectBuilder\n): SchematicBoxBuilder => {\n return new SchematicBoxBuilderClass(project_builder) as any\n}\n\n// Boxes can be used for both pcbs and schematics, react-fiber should probably\n// determine which to use based on context...\nexport const createBoxBuilder = createSchematicBoxBuilder\n","import { BuildContext, Dimension } from \"lib/types\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport { createSimpleDataBuilderClass } from \"../simple-data-builder\"\n\nexport interface SchematicLineBuilderFields {\n type: \"schematic_line\"\n x1: Dimension\n y1: Dimension\n x2: Dimension\n y2: Dimension\n drawing_type: \"line\"\n}\n\nexport interface SchematicLineBuilder {\n builder_type: \"schematic_line_builder\"\n props: SchematicLineBuilderFields\n setProps(props: Partial<SchematicLineBuilderFields>): SchematicLineBuilder\n build(bc: BuildContext): Omit<\n SchematicLineBuilderFields,\n \"x1\" | \"y1\" | \"x2\" | \"y2\"\n > & {\n x1: number\n y1: number\n x2: number\n y2: number\n }\n}\n\nexport const SchematicLineBuilder = createSimpleDataBuilderClass(\n \"schematic_line_builder\",\n {\n drawing_type: \"line\",\n type: \"schematic_line\",\n } as SchematicLineBuilder[\"props\"],\n [\"x1\", \"y1\", \"x2\", \"y2\"]\n)\n\nexport const createSchematicLineBuilder = (\n project_builder: ProjectBuilder\n): SchematicLineBuilder => {\n return new SchematicLineBuilder(project_builder) as any\n}\n","import {Dimension} from \"lib/types\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport { createSimpleDataBuilderClass } from \"../simple-data-builder\"\n\nexport interface SchematicTextBuilderFields {\n align: \"top-left\"\n x: Dimension\n y: Dimension\n text: string\n drawing_type: \"text\"\n}\nexport interface SchematicTextBuilder {\n builder_type: \"schematic_text_builder\"\n props: SchematicTextBuilderFields\n setProps(props: Partial<SchematicTextBuilderFields>): SchematicTextBuilder\n build(): Omit<SchematicTextBuilderFields, 'x' | 'y'> & { x: number, y: number }\n}\n\nexport const SchematicTextBuilder = createSimpleDataBuilderClass(\n \"schematic_text_builder\",\n { align: \"top-left\", drawing_type: \"text\" } as SchematicTextBuilder[\"props\"]\n)\n\nexport const createSchematicTextBuilder = (\n project_builder: ProjectBuilder\n): SchematicTextBuilder => {\n return new SchematicTextBuilder(project_builder) as any\n}\n","import * as Type from \"lib/types\"\nimport { Except, Simplify } from \"type-fest\"\nimport { ProjectBuilder } from \"lib/builder/project-builder\"\nimport {\n PortsBuilder,\n createPortsBuilder,\n} from \"lib/builder/ports-builder/ports-builder\"\nimport { compose, rotate, transform, translate } from \"transformation-matrix\"\nimport { transformSchematicElements } from \"lib/builder/transform-elements\"\nimport getPortPosition from \"./get-port-position\"\nimport { AnyElement, Point, SchematicComponent } from \"lib/types\"\nimport { createFootprintBuilder, FootprintBuilder } from \"../footprint-builder\"\nimport {\n createSchematicSymbolBuilder,\n SchematicSymbolBuilder,\n} from \"../schematic-symbol-builder\"\n\nexport interface BaseComponentBuilder<T> {\n project_builder: ProjectBuilder\n ports: PortsBuilder\n footprint: FootprintBuilder\n schematic_symbol: SchematicSymbolBuilder\n setName: (name: string) => BaseComponentBuilder<T>\n setTag: (tag: string) => BaseComponentBuilder<T>\n setTags: (tags: string[]) => BaseComponentBuilder<T>\n appendChild(child: { builder_type: string }): BaseComponentBuilder<T>\n setSourceProperties(\n properties: Simplify<\n Except<\n Type.SourceComponent,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n >\n > & { name?: string }\n ): BaseComponentBuilder<T>\n setSchematicCenter(x: number, y: number): BaseComponentBuilder<T>\n setSchematicRotation(\n rotation: number | `${number}deg`\n ): BaseComponentBuilder<T>\n setSchematicProperties(\n properties: Partial<Type.SchematicComponent>\n ): BaseComponentBuilder<T>\n labelPort(position: number, name: string): BaseComponentBuilder<T>\n build(build_context: Type.BuildContext): Promise<Type.AnyElement[]>\n}\n\nexport type GenericComponentBuilder =\n BaseComponentBuilder<GenericComponentBuilder> & {\n builder_type: \"generic_component_builder\"\n setFType: (ftype: string) => GenericComponentBuilder\n }\nexport type GenericComponentBuilderCallback = (\n cb: GenericComponentBuilder\n) => unknown\n\nexport class ComponentBuilderClass implements GenericComponentBuilder {\n name: string = null\n builder_type = \"generic_component_builder\" as any\n tags: string[] = []\n source_properties: any = {}\n schematic_properties: any = {}\n schematic_rotation: number = 0\n schematic_position: Point = { x: 0, y: 0 }\n ports: PortsBuilder\n footprint: FootprintBuilder\n schematic_symbol: SchematicSymbolBuilder\n constructor(public project_builder: ProjectBuilder) {\n this.ports = createPortsBuilder(project_builder)\n this.footprint = createFootprintBuilder(project_builder)\n this.schematic_symbol = createSchematicSymbolBuilder(project_builder)\n }\n\n appendChild(child) {\n // Based on the child type, add to appropriate builder\n switch (child.builder_type) {\n case \"port_builder\": {\n this.ports.appendChild(child)\n return this\n }\n case \"smtpad_builder\": {\n this.footprint.appendChild(child)\n return this\n }\n case \"plated_hole_builder\": {\n this.footprint.appendChild(child)\n return this\n }\n case \"schematic_symbol_builder\": {\n // TODO merge\n this.schematic_symbol = child\n return this\n }\n }\n\n throw new Error(\n `Can't add child builder type: \"${child.builder_type}\" inside component builder`\n )\n }\n\n setTag(tag) {\n this.tags.push(tag)\n return this\n }\n\n setTags(tags) {\n this.tags.push(...tags)\n return this\n }\n\n setName(name) {\n this.name = name\n return this\n }\n\n setFType(ftype: string) {\n this.source_properties.ftype = ftype\n return this\n }\n\n setSourceProperties(props) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n setSchematicCenter(x, y) {\n this.schematic_position = { x, y }\n return this\n }\n\n setSchematicRotation(rotation) {\n if (typeof rotation === \"number\") {\n this.schematic_rotation = rotation\n } else {\n this.schematic_rotation =\n (parseFloat(rotation.split(\"deg\")[0]) / 180) * Math.PI\n }\n return this\n }\n\n setSchematicProperties(props) {\n this.schematic_properties = {\n ...this.schematic_properties,\n ...props,\n }\n return this\n }\n\n labelPort(position, name) {\n this.schematic_properties.port_labels ??= {}\n this.schematic_properties.port_labels[position] = name\n return this\n }\n\n async build(bc) {\n const pb = this.project_builder\n const elements = []\n\n const source_component_id = pb.getId(\"generic\")\n const schematic_component_id = pb.getId(`schematic_generic_component`)\n const pcb_component_id = pb.getId(`pcb_generic_component`)\n bc = bc.fork({ schematic_component_id })\n\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n }\n\n elements.push(source_component)\n\n // Build schematic component\n\n const schematic_component: SchematicComponent = {\n type: \"schematic_component\",\n schematic_component_id,\n source_component_id,\n center: this.schematic_position,\n rotation: this.schematic_rotation,\n size: { width: 1, height: 1 },\n }\n\n elements.push(schematic_component)\n\n elements.push(...(await this.ports.build(bc)))\n\n elements.push(...this.schematic_symbol.build(bc))\n\n // TODO schematic box of some kind\n const pcb_element = {\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n }\n const footprint_elements = await this.footprint.build(bc)\n\n for (const fe of footprint_elements) {\n ;(fe as any).pcb_component_id = pcb_component_id\n }\n\n const schematic_elements = await this.schematic_symbol.build(bc)\n\n elements.push(pcb_element, ...footprint_elements, ...schematic_elements)\n return elements\n }\n}\n\nexport const createComponentBuilder = (\n project_builder: ProjectBuilder\n): GenericComponentBuilder => {\n return new ComponentBuilderClass(project_builder)\n}\n","export const directionToVec = (direction: \"up\" | \"down\" | \"left\" | \"right\") => {\n if (direction === \"up\") return { x: 0, y: -1 }\n else if (direction === \"down\") return { x: 0, y: 1 }\n else if (direction === \"left\") return { x: -1, y: 0 }\n else if (direction === \"right\") return { x: 1, y: 0 }\n else throw new Error(\"Invalid direction\")\n}\n\nexport const vecToDirection = ({ x, y }: { x: number; y: number }) => {\n if (x > y) y = 0\n if (y > x) x = 0\n if (x > 0 && y === 0) return \"right\"\n else if (x < 0 && y === 0) return \"left\"\n else if (x === 0 && y > 0) return \"down\"\n else if (x === 0 && y < 0) return \"up\"\n else throw new Error(`Invalid vector for direction conversion (${x}, ${y})`)\n}\n\nexport const rotateClockwise = (\n direction: \"up\" | \"down\" | \"left\" | \"right\"\n) => {\n if (direction === \"up\") return \"right\"\n else if (direction === \"right\") return \"down\"\n else if (direction === \"down\") return \"left\"\n else if (direction === \"left\") return \"up\"\n}\n\nexport const rotateCounterClockwise = (\n direction: \"up\" | \"down\" | \"left\" | \"right\"\n) => {\n if (direction === \"up\") return \"left\"\n else if (direction === \"left\") return \"down\"\n else if (direction === \"down\") return \"right\"\n else if (direction === \"right\") return \"up\"\n}\n\nexport const rotateDirection = (\n direction: \"up\" | \"down\" | \"left\" | \"right\",\n num90DegreeClockwiseTurns: number\n) => {\n while (num90DegreeClockwiseTurns > 0) {\n direction = rotateClockwise(direction)\n num90DegreeClockwiseTurns--\n }\n while (num90DegreeClockwiseTurns < 0) {\n direction = rotateCounterClockwise(direction)\n num90DegreeClockwiseTurns++\n }\n return direction\n}\n","import * as Type from \"lib/types\"\nimport {\n directionToVec,\n rotateDirection,\n vecToDirection,\n} from \"lib/utils/direction-to-vec\"\nimport { Matrix, applyToPoint } from \"transformation-matrix\"\n\nexport const transformSchematicElement = (\n elm: Type.AnyElement,\n matrix: Matrix\n) => {\n if (elm.type === \"schematic_component\") {\n // elm.center\n // elm.rotation\n // elm.size\n } else if (elm.type === \"schematic_port\") {\n elm.center = applyToPoint(matrix, elm.center)\n\n if (elm.facing_direction) {\n elm.facing_direction = rotateDirection(\n elm.facing_direction,\n (Math.acos(matrix.a) / Math.PI) * 2\n )\n }\n } else if (elm.type === \"schematic_text\") {\n elm.position = applyToPoint(matrix, elm.position)\n } else if (elm.type === \"schematic_group\") {\n } else if (elm.type === \"schematic_trace\") {\n }\n return elm\n}\n\nexport const transformSchematicElements = (\n elms: Type.AnyElement[],\n matrix: Matrix\n) => {\n return elms.map((elm) => transformSchematicElement(elm, matrix))\n}\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder/ports-builder\"\nimport { Except } from \"type-fest\"\n\nexport type ResistorBuilderCallback = (rb: ResistorBuilder) => unknown\nexport interface ResistorBuilder extends BaseComponentBuilder<ResistorBuilder> {\n builder_type: \"resistor_builder\"\n setSourceProperties(\n properties: Except<\n Type.SimpleResistor,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n > & { name?: string }\n ): ResistorBuilder\n}\n\nexport class ResistorBuilderClass\n extends ComponentBuilderClass\n implements ResistorBuilder\n{\n builder_type = \"resistor_builder\" as const\n\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_resistor\",\n }\n }\n\n setSourceProperties(props: Type.SimpleResistor) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc: Type.BuildContext) {\n const elements: Type.AnyElement[] = []\n const { ftype } = this.source_properties\n const { project_builder } = this\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const port_arrangement = this.schematic_properties?.port_arrangement\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation,\n size: {\n width: 1,\n height: 12 / 40,\n },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n this.ports.add({\n name: \"left\",\n center: { x: -0.5, y: 0 },\n facing_direction: \"left\",\n })\n this.ports.add({\n name: \"right\",\n center: { x: 0.5, y: 0 },\n facing_direction: \"right\",\n })\n const [text_pos1, text_pos2] =\n schematic_component.rotation === Math.PI / 2 ||\n schematic_component.rotation === -Math.PI / 2\n ? [\n { x: -0.2, y: -0.3 },\n { x: 0, y: -0.3 },\n ]\n : [\n { x: -0.2, y: -0.5 },\n { x: -0.2, y: -0.3 },\n ]\n\n textElements.push({\n type: \"schematic_text\",\n text: source_component.name,\n schematic_text_id: project_builder.getId(\"schematic_text\"),\n schematic_component_id,\n anchor: \"left\",\n position: text_pos1,\n })\n textElements.push({\n type: \"schematic_text\",\n text: source_component.resistance,\n schematic_text_id: project_builder.getId(\"schematic_text\"),\n schematic_component_id,\n anchor: \"left\",\n position: text_pos2,\n })\n\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n elements.push(...(await this.footprint.build(bc)))\n\n return elements\n }\n}\n\nexport const createResistorBuilder = (\n project_builder: ProjectBuilder\n): ResistorBuilder => {\n return new ResistorBuilderClass(project_builder)\n}\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder/ports-builder\"\nimport { Except } from \"type-fest\"\nimport getPortPosition from \"./get-port-position\"\n\nexport type CapacitorBuilderCallback = (rb: CapacitorBuilder) => unknown\nexport interface CapacitorBuilder\n extends BaseComponentBuilder<CapacitorBuilder> {\n builder_type: \"capacitor_builder\"\n setSourceProperties(\n properties: Except<\n Type.SimpleCapacitor,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n > & { name?: string }\n ): CapacitorBuilder\n}\n\nexport class CapacitorBuilderClass\n extends ComponentBuilderClass\n implements CapacitorBuilder\n{\n builder_type = \"capacitor_builder\" as const\n\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_capacitor\",\n }\n }\n\n setSourceProperties(props: Type.SimpleCapacitor) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc: Type.BuildContext) {\n const elements: Type.AnyElement[] = []\n const { project_builder } = this\n const { ftype } = this.source_properties\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation ?? 0,\n size: { width: 3 / 4, height: 3 / 4 },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n this.ports.add({\n name: \"left\",\n center: { x: -0.5, y: 0 },\n facing_direction: \"left\",\n })\n this.ports.add({\n name: \"right\",\n center: { x: 0.5, y: 0 },\n facing_direction: \"right\",\n })\n textElements.push({\n type: \"schematic_text\",\n text: source_component.name,\n schematic_text_id: project_builder.getId(\"schematic_text\"),\n schematic_component_id,\n anchor: \"left\",\n position: { x: -0.5, y: -0.3 },\n })\n textElements.push({\n type: \"schematic_text\",\n text: source_component.capacitance,\n schematic_text_id: project_builder.getId(\"schematic_text\"),\n schematic_component_id,\n anchor: \"left\",\n position: { x: -0.3, y: -0.3 },\n })\n\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n return elements\n }\n}\n\nexport const createCapacitorBuilder = (\n project_builder: ProjectBuilder\n): CapacitorBuilder => {\n return new CapacitorBuilderClass(project_builder)\n}\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder/ports-builder\"\nimport getPortPosition from \"./get-port-position\"\n\nexport type InductorBuilderCallback = (rb: InductorBuilder) => unknown\nexport interface InductorBuilder extends BaseComponentBuilder<InductorBuilder> {\n builder_type: \"inductor_builder\"\n setSourceProperties(\n properties: Type.SimpleInductor & { name?: string }\n ): InductorBuilder\n}\n\nexport class InductorBuilderClass\n extends ComponentBuilderClass\n implements InductorBuilder\n{\n builder_type = \"inductor_builder\" as const\n\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_inductor\",\n }\n }\n\n setSourceProperties(props: Type.SimpleInductor) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc: Type.BuildContext) {\n const elements: Type.AnyElement[] = []\n const { project_builder } = this\n const { ftype } = this.source_properties\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const port_arrangement = this.schematic_properties?.port_arrangement\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation ?? 0,\n size: { width: 3 / 4, height: 3 / 4 },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n this.ports.add(\"left\", { x: -0.5, y: 0 })\n this.ports.add(\"right\", { x: 0.5, y: 0 })\n textElements.push({\n type: \"schematic_text\",\n text: source_component.name,\n schematic_text_id: project_builder.getId(\"schematic_text\"),\n schematic_component_id,\n anchor: \"left\",\n position: { x: -0.5, y: -0.3 },\n })\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n return elements\n }\n}\n\nexport const createInductorBuilder = (\n project_builder: ProjectBuilder\n): InductorBuilder => {\n return new InductorBuilderClass(project_builder)\n}\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder\"\nimport { Except } from \"type-fest\"\nimport getPortPosition from \"./get-port-position\"\n\nexport type BugBuilderCallback = (rb: BugBuilder) => unknown\nexport interface BugBuilder extends BaseComponentBuilder<BugBuilder> {\n builder_type: \"bug_builder\"\n setSourceProperties(\n properties: Except<\n Type.SimpleBug,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n > & { name?: string }\n ): BugBuilder\n}\n\nexport class BugBuilderClass\n extends ComponentBuilderClass\n implements BugBuilder\n{\n builder_type = \"bug_builder\" as const\n\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_bug\",\n }\n }\n\n setSourceProperties(props) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc) {\n const elements: Type.AnyElement[] = []\n const { project_builder } = this\n const { ftype } = this.source_properties\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const port_arrangement = this.schematic_properties?.port_arrangement\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation ?? 0,\n size: {\n width:\n Math.max(\n port_arrangement.top_size ?? 0,\n port_arrangement.bottom_size ?? 0,\n 1\n ) + 0.5,\n height: Math.max(\n (port_arrangement.left_size ?? 0) / 2,\n (port_arrangement.right_size ?? 0) / 2,\n 1\n ),\n },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n // add ports based on port arrangement and give appropriate labels\n const { port_labels } = this.schematic_properties\n for (\n let i = 0;\n i < port_arrangement.left_size + port_arrangement.right_size;\n i++\n ) {\n const is_left = i < port_arrangement.left_size\n const portPosition = getPortPosition(port_arrangement, i)\n this.ports.add({\n name: port_labels[i + 1],\n center: portPosition,\n facing_direction: is_left ? \"left\" : \"right\",\n })\n const schematic_text_id = this.project_builder.getId(\"schematic_text\")\n const portText: Type.SchematicText = {\n type: \"schematic_text\",\n schematic_text_id,\n schematic_component_id,\n text: port_labels[i + 1],\n anchor: is_left ? \"left\" : \"right\",\n position: {\n x: portPosition.x + (is_left ? 0.3 : -0.3),\n y: portPosition.y,\n },\n }\n textElements.push(portText)\n }\n\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n return elements\n }\n}\n\nexport const createBugBuilder = (\n project_builder: ProjectBuilder\n): BugBuilder => {\n return new BugBuilderClass(project_builder)\n}\n","export const getPortPosition = (\n port_arrangement: { left_size: number; right_size: number },\n position: number\n) => {\n if (position < port_arrangement.left_size) {\n return { x: -0.75, y: (position - 1) * 0.5 }\n }\n return { x: 0.75, y: (port_arrangement.left_size - position + 1) * 0.5 }\n}\n\nexport default getPortPosition\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder/ports-builder\"\nimport { Except } from \"type-fest\"\nimport getPortPosition from \"./get-port-position\"\n\nexport type DiodeBuilderCallback = (rb: DiodeBuilder) => unknown\nexport interface DiodeBuilder extends BaseComponentBuilder<DiodeBuilder> {\n builder_type: \"diode_builder\"\n setSourceProperties(\n properties: Except<\n Type.SimpleDiode,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n > & { name?: string }\n ): DiodeBuilder\n}\n\nexport class DiodeBuilderClass\n extends ComponentBuilderClass\n implements DiodeBuilder\n{\n builder_type = \"diode_builder\" as const\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_diode\",\n }\n }\n\n setSourceProperties(props: Type.SimpleDiode) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc: Type.BuildContext) {\n const elements: Type.AnyElement[] = []\n const { project_builder } = this\n const { ftype } = this.source_properties\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const port_arrangement = this.schematic_properties?.port_arrangement\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation ?? 0,\n size: { width: 0.63 * 1.2, height: 0.28 * 1.2 },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n this.ports.add(\"left\", { x: -0.5, y: 0 })\n this.ports.add(\"right\", { x: 0.5, y: 0 })\n\n const isFlipped = Math.abs(schematic_component.rotation) >= Math.PI\n textElements.push({\n type: \"schematic_text\",\n text: source_component.name,\n schematic_text_id: project_builder.getId(\"schematic_text\"),\n schematic_component_id,\n anchor: \"left\",\n position: {\n x: -0.5 * (isFlipped ? -1 : 1),\n y: -0.3 * (isFlipped ? -1 : 1),\n },\n })\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n return elements\n }\n}\n\nexport const createDiodeBuilder = (\n project_builder: ProjectBuilder\n): DiodeBuilder => {\n return new DiodeBuilderClass(project_builder)\n}\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder/ports-builder\"\nimport { Except } from \"type-fest\"\nimport getPortPosition from \"./get-port-position\"\n\nexport type PowerSourceBuilderCallback = (rb: PowerSourceBuilder) => unknown\nexport interface PowerSourceBuilder\n extends BaseComponentBuilder<PowerSourceBuilder> {\n builder_type: \"power_source_builder\"\n setSourceProperties(\n properties: Except<\n Type.SimplePowerSource,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n > & { name?: string }\n ): PowerSourceBuilder\n}\n\nexport class PowerSourceBuilderClass\n extends ComponentBuilderClass\n implements PowerSourceBuilder\n{\n builder_type = \"power_source_builder\" as const\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_power_source\",\n }\n }\n\n setSourceProperties(props: Type.SimplePowerSource) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc: Type.BuildContext) {\n const elements: Type.AnyElement[] = []\n const { project_builder } = this\n const { ftype } = this.source_properties\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const port_arrangement = this.schematic_properties?.port_arrangement\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation ?? 0,\n size: { width: (1 * 24) / 34, height: 1 },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n this.ports.add({\n name: \"positive\",\n center: { x: 0, y: -0.5 },\n facing_direction: \"up\",\n })\n this.ports.add({\n name: \"negative\",\n center: { x: 0, y: 0.5 },\n facing_direction: \"down\",\n })\n\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n\n return elements\n }\n}\n\nexport const createPowerSourceBuilder = (\n project_builder: ProjectBuilder\n): PowerSourceBuilder => {\n return new PowerSourceBuilderClass(project_builder)\n}\n","import { ProjectBuilder } from \"../project-builder\"\nimport { BaseComponentBuilder, ComponentBuilderClass } from \"./ComponentBuilder\"\nimport * as Type from \"lib/types\"\nimport { transformSchematicElements } from \"../transform-elements\"\nimport { compose, rotate, translate } from \"transformation-matrix\"\nimport { PortsBuilder } from \"../ports-builder/ports-builder\"\nimport { Except } from \"type-fest\"\n\nexport type GroundBuilderCallback = (rb: GroundBuilder) => unknown\nexport interface GroundBuilder extends BaseComponentBuilder<GroundBuilder> {\n builder_type: \"ground_builder\"\n setSourceProperties(\n properties: Except<\n Type.SimpleGround,\n \"type\" | \"source_component_id\" | \"ftype\" | \"name\"\n > & { name?: string }\n ): GroundBuilder\n}\n\nexport class GroundBuilderClass\n extends ComponentBuilderClass\n implements GroundBuilder\n{\n builder_type = \"ground_builder\" as const\n\n constructor(project_builder: ProjectBuilder) {\n super(project_builder)\n this.source_properties = {\n ...this.source_properties,\n ftype: \"simple_ground\",\n }\n }\n\n setSourceProperties(props: Type.SimpleGround) {\n this.source_properties = {\n ...this.source_properties,\n ...props,\n }\n return this\n }\n\n async build(bc: Type.BuildContext) {\n const elements: Type.AnyElement[] = []\n const { project_builder } = this\n const { ftype } = this.source_properties\n const source_component_id = project_builder.getId(ftype)\n const schematic_component_id = project_builder.getId(\n `schematic_component_${ftype}`\n )\n const pcb_component_id = project_builder.getId(`pcb_component_${ftype}`)\n const source_component = {\n type: \"source_component\",\n source_component_id,\n name: this.name,\n ...this.source_properties,\n }\n elements.push(source_component)\n\n const port_arrangement = this.schematic_properties?.port_arrangement\n const schematic_component: Type.SchematicComponent = {\n type: \"schematic_component\",\n source_component_id,\n schematic_component_id,\n rotation: this.schematic_rotation ?? 0,\n size: {\n width: 0.5,\n height: (0.5 * 15) / 18,\n },\n center: this.schematic_position || { x: 0, y: 0 },\n ...this.schematic_properties,\n }\n elements.push(schematic_component)\n\n this.ports.setSchematicComponent(schematic_component_id)\n this.ports.setSourceComponent(source_component_id)\n\n const textElements = []\n\n this.ports.add({\n name: \"gnd\",\n center: { x: 0, y: -0.2 },\n facing_direction: \"up\",\n })\n\n elements.push(\n ...transformSchematicElements(\n [...this.ports.build(bc), ...textElements],\n compose(\n translate(schematic_component.center.x, schematic_component.center.y),\n rotate(schematic_component.rotation)\n )\n )\n )\n\n elements.push({\n type: \"pcb_component\",\n source_component_id,\n pcb_component_id,\n })\n return elements\n }\n}\n\nexport const createGroundBuilder = (\n project_builder: ProjectBuilder\n): GroundBuilder => {\n return new GroundBuilderClass(project_builder)\n}\n","import * as Type from \"lib/types\"\nimport * as CB from \"./component-builder\"\nimport flatten from \"lodash/flatten\"\nimport { ProjectBuilder } from \"./project-builder\"\nimport {\n createTraceBuilder,\n convertToReadableTraceTree,\n TraceBuilder,\n TraceBuilderCallback,\n} from \"./trace-builder\"\nimport { createConstraintBuilder } from \"./constrained-layout-builder\"\n\nexport const group_builder_addables = {\n generic_component: CB.createComponentBuilder,\n component: CB.createComponentBuilder,\n resistor: CB.createResistorBuilder,\n capacitor: CB.createCapacitorBuilder,\n diode: CB.createDiodeBuilder,\n power_source: CB.createPowerSourceBuilder,\n inductor: CB.createInductorBuilder,\n ground: CB.createGroundBuilder,\n bug: CB.createBugBuilder,\n trace: createTraceBuilder,\n group: createGroupBuilder,\n}\n\nexport type GroupBuilderCallback = (gb: GroupBuilder) => unknown\nexport interface GroupBuilder {\n project_builder: ProjectBuilder\n builder_type: \"group_builder\"\n addables: typeof group_builder_addables\n reset: () => GroupBuilder\n setName: (name: string) => GroupBuilder\n appendChild(\n child: CB.ComponentBuilder | GroupBuilder | TraceBuilder\n ): GroupBuilder\n addGroup(\n groupBuilderCallback: GroupBuilderCallback | GroupBuilder\n ): GroupBuilder\n addComponent(\n componentBuilderCallback: CB.GenericComponentBuilderCallback\n ): GroupBuilder\n addResistor(resistorBuilderCallback: CB.ResistorBuilderCallback): GroupBuilder\n addCapacitor(\n capacitorBuilderCallback: CB.CapacitorBuilderCallback\n ): GroupBuilder\n addDiode(capacitorBuilderCallback: CB.DiodeBuilderCallback): GroupBuilder\n addBug(bugBuilderCallback: CB.BugBuilderCallback): GroupBuilder\n addPowerSource(\n powerSourceBuilderCallback: CB.PowerSourceBuilderCallback\n ): GroupBuilder\n addInductor(\n powerSourceBuilderCallback: CB.InductorBuilderCallback\n ): GroupBuilder\n addGround(groundBuilderCallback: CB.GroundBuilderCallback): GroupBuilder\n addTrace: (\n traceBuiderCallback: TraceBuilderCallback | string[]\n ) => GroupBuilder\n add<T extends keyof typeof group_builder_addables>(\n builder_type: T,\n callback: (builder: ReturnType<typeof group_builder_addables[T]>) => unknown\n ): GroupBuilder\n build(build_context: Type.BuildContext): Promise<Type.AnyElement[]>\n}\n\nexport class GroupBuilderClass implements GroupBuilder {\n builder_type: \"group_builder\" = \"group_builder\"\n groups: GroupBuilder[]\n components: CB.BaseComponentBuilder<any>[]\n traces: TraceBuilder[]\n project_builder: ProjectBuilder\n name: string\n addables = group_builder_addables\n\n constructor(project_builder?: ProjectBuilder) {\n this.project_builder = project_builder\n this.reset()\n }\n\n reset() {\n this.groups = []\n this.components = []\n this.traces = []\n return this\n }\n add(new_builder_type, callback) {\n if (!this.addables[new_builder_type]) {\n throw new Error(\n `No addable in group builder for builder_type: \"${new_builder_type}\"`\n )\n }\n const new_builder = this.addables[new_builder_type](this.project_builder)\n callback(new_builder as any) // not smart enough to infer generic\n this.appendChild(new_builder)\n return this\n }\n setName(name) {\n this.name = name\n return this\n }\n appendChild(child) {\n if (\n [\n \"schematic_symbol_builder\",\n \"schematic_box_builder\",\n \"schematic_line_builder\",\n \"schematic_text_builder\",\n ].includes(child.builder_type)\n ) {\n throw new Error(\n `Schematic primitives can't be added to a group builder (try adding to a component)`\n )\n }\n\n // TODO just make this children?\n if (child.builder_type === \"group_builder\") {\n this.groups.push(child as any)\n } else if (child.builder_type === \"trace_builder\") {\n this.traces.push(child as any)\n } else if (this.addables[child.builder_type.split(\"_builder\")[0]]) {\n this.components.push(child as any)\n } else {\n throw new Error(\n `Unknown builder type for appendChild: \"${child.builder_type}\"`\n )\n }\n return this\n }\n addGroup(gb) {\n return this.add(\"group\", gb)\n }\n addPowerSource(cb) {\n return this.add(\"power_source\", cb)\n }\n addComponent(cb) {\n return this.add(\"component\", cb)\n }\n addResistor(cb) {\n return this.add(\"resistor\", cb)\n }\n addCapacitor(cb) {\n return this.add(\"capacitor\", cb)\n }\n addBug(cb) {\n return this.add(\"bug\", cb)\n }\n addDiode(cb) {\n return this.add(\"diode\", cb)\n }\n addInductor(cb) {\n return this.add(\"diode\", cb)\n }\n addGround(cb) {\n return this.add(\"ground\", cb)\n }\n addTrace(tb) {\n if (typeof tb !== \"function\") {\n const portSelectors = tb as string[]\n tb = (rb) => {\n rb.addConnections(portSelectors)\n }\n }\n const builder = createTraceBuilder(this.project_builder)\n this.traces.push(builder)\n tb(builder)\n return this\n }\n async build(bc) {\n const elements = []\n elements.push(\n ...flatten(await Promise.all(this.groups.map((g) => g.build(bc))))\n )\n elements.push(\n ...flatten(await Promise.all(this.components.map((c) => c.build(bc))))\n )\n elements.push(\n ...flatten(await Promise.all(this.traces.map((c) => c.build(elements))))\n )\n return elements\n }\n}\n\n/**\n * This uses an old construction pattern that's been tested.\n */\nexport function createGroupBuilder(\n project_builder?: ProjectBuilder\n): GroupBuilder {\n const gb = new GroupBuilderClass(project_builder)\n return gb\n}\n","import * as Type from \"lib/types\"\nimport * as parsel from \"parsel-js\"\nimport { convertAbbrToFType } from \"./convert-abbr-to-ftype\"\n\n/**\n * Filter elements to match the selector, e.g. to access the left port of a\n * resistor you can do \".R1 > port.left\"\n */\nexport const applySelector = (\n elements: Type.AnyElement[],\n selectorRaw: string\n): Type.AnyElement[] => {\n const selectorAST = parsel.parse(selectorRaw)\n return applySelectorAST(elements, selectorAST)\n}\n\nexport const applySelectorAST = (\n elements: Type.AnyElement[],\n selectorAST: parsel.AST\n): Type.AnyElement[] => {\n switch (selectorAST.type) {\n case \"complex\": {\n switch (selectorAST.combinator) {\n case \">\": {\n const { left, right } = selectorAST\n if (left.type === \"class\" || left.type === \"type\") {\n // TODO should also check if content matches any element tags\n let matchElms\n if (left.type === \"class\") {\n matchElms = elements.filter(\n (elm) => \"name\" in elm && elm.name === left.name\n )\n } else if (left.type === \"type\") {\n const ftype = convertAbbrToFType(left.name)\n matchElms = elements.filter(\n (elm) => \"ftype\" in elm && elm.ftype === ftype\n )\n }\n\n const childrenOfMatchingElms = matchElms.flatMap((matchElm) =>\n elements.filter(\n (elm) =>\n elm[`${matchElm.type}_id`] ===\n matchElm[`${matchElm.type}_id`] && elm !== matchElm\n )\n )\n return applySelectorAST(childrenOfMatchingElms, right)\n } else {\n throw new Error(`unsupported selector type \"${left.type}\" `)\n }\n }\n default: {\n throw new Error(\n `Couldn't apply selector AST for complex combinator \"${selectorAST.combinator}\"`\n )\n }\n }\n return []\n }\n case \"compound\": {\n const conditionsToMatch = selectorAST.list.map((part) => {\n switch (part.type) {\n case \"class\": {\n return (elm) => \"name\" in elm && elm.name === part.name\n }\n case \"type\": {\n const name = convertAbbrToFType(part.name)\n return (elm) => elm.type === name\n }\n }\n })\n\n return elements.filter((elm) =>\n conditionsToMatch.every((condFn) => condFn(elm))\n )\n }\n case \"type\": {\n return elements.filter(\n (elm) =>\n elm.type === selectorAST.name ||\n (\"ftype\" in elm && elm.ftype === convertAbbrToFType(selectorAST.name))\n )\n }\n case \"class\": {\n return elements.filter(\n (elm) =>\n // TODO switch to tag sysmtem\n \"name\" in elm && elm.name === selectorAST.name\n )\n }\n default: {\n throw new Error(\n `Couldn't apply selector AST for type: \"${\n selectorAST.type\n }\" ${JSON.stringify(selectorAST, null, \" \")}`\n )\n }\n }\n}\n","export const convertAbbrToFType = (abbr: string): string => {\n switch (abbr) {\n case \"port\":\n return \"source_port\"\n case \"power\":\n return \"simple_power_source\"\n }\n return abbr\n}\n","import * as Type from \"lib/types\"\n\nexport const getParent = (\n child: Type.AnyElement,\n allElms: Type.AnyElement[]\n) => {\n return allElms.find(\n (candParent) =>\n candParent[`${candParent.type}_id`] === child[`${candParent.type}_id`] &&\n candParent !== child\n )\n}\n\nexport const getChildren = (\n parent: Type.AnyElement,\n allElms: Type.AnyElement[]\n) => {\n return allElms.filter(\n (elm) =>\n elm[`${parent.type}_id`] === parent[`${parent.type}_id`] && elm !== parent\n )\n}\n\nexport const getReadableName = (elm: any) => {\n return elm[`${elm.type}_id`] + ` (ftype:${elm.ftype} name:${elm.name})`\n}\n\nexport const convertToReadableTreeUsingRoot = (\n rootElm: Type.AnyElement,\n allElms: Type.AnyElement[]\n) => {\n const children = getChildren(rootElm, allElms)\n const tree = {}\n for (const child of children) {\n tree[getReadableName(child)] = convertToReadableTreeUsingRoot(\n child,\n allElms\n )\n }\n return tree\n}\n\nexport const convertToReadableTraceTree = (allElms: Type.AnyElement[]): any => {\n const componentsWithoutParent = []\n for (const elm of allElms) {\n if (!getParent(elm, allElms)) {\n componentsWithoutParent.push(elm)\n }\n }\n const tree = {}\n for (const elm of componentsWithoutParent) {\n tree[getReadableName(elm)] = convertToReadableTreeUsingRoot(elm, allElms)\n }\n return tree\n}\n","import * as Type from \"lib/types\"\n\n/**\n * Straight Route Solver\n * This basically just connects the terminals in the provided order, simple and\n * naive.\n */\nexport const straightRouteSolver: Type.RouteSolver = async ({\n terminals,\n obstacles,\n}) => {\n const edges = []\n for (let i = 0; i < terminals.length - 1; i++) {\n edges.push({\n from: terminals[i],\n to: terminals[i + 1],\n })\n }\n return edges\n}\n","import * as Type from \"lib/types\"\nimport { directionToVec, vecToDirection } from \"lib/utils/direction-to-vec\"\nimport findRectilinearRoute from \"rectilinear-router\"\nimport { sub, componentSum, mult, norm } from \"lib/utils/point-math\"\n\ntype Edge = {\n from: { x: number; y: number; ti?: number }\n to: { x: number; y: number; ti?: number }\n}\n\nfunction negUnacceptable(n: number) {\n if (n < 0) return -10000\n return n\n}\n\nfunction samePoint(p1: { x: number; y: number }, p2: { x: number; y: number }) {\n return p1.x === p2.x && p1.y === p2.y\n}\n\nfunction getNonCornerPoints(e1: Edge, e2: Edge) {\n const [p1, p2, p3, p4] = [e1.from, e1.to, e2.from, e2.to]\n if (samePoint(p1, p3)) return { p1: p2, p2: p4, corner: p1 }\n else if (samePoint(p1, p4)) return { p1: p2, p2: p3, corner: p1 }\n else if (samePoint(p2, p3)) return { p1, p2: p4, corner: p2 }\n else if (samePoint(p2, p4)) return { p1, p2: p3, corner: p2 }\n else throw new Error(\"Not a Corner\")\n}\n\nfunction flipEdges(e1: Edge, e2: Edge) {\n const { p1, p2 } = getNonCornerPoints(e1, e2)\n const [x1, y1, x2, y2] = [p1.x, p1.y, p2.x, p2.y]\n const ogCornerType: \"x2y1\" | \"x1y2\" = x1 === e1.to.x ? \"x1y2\" : \"x2y1\"\n e1.from = { x: x1, y: y1 }\n e2.to = { x: x2, y: y2 }\n if (ogCornerType === \"x2y1\") {\n e1.to.x = e2.from.x = x1\n e1.to.y = e2.from.y = y2\n } else if (ogCornerType === \"x1y2\") {\n e1.to.x = e2.from.x = x2\n e1.to.y = e2.from.y = y1\n }\n}\n\n/** Rectilinear Minimum Steiner Tree Solver */\nexport const rmstSolver: Type.RouteSolver = async ({\n terminals,\n obstacles,\n}) => {\n const route = await findRectilinearRoute({\n terminals: terminals.map(({ x, y }) => [x, y]),\n })\n\n const edges = route.map(\n ({ from, to, fromTerminalIndex, toTerminalIndex }) => ({\n from: { x: from[0], y: from[1], ti: fromTerminalIndex },\n to: { x: to[0], y: to[1], ti: toTerminalIndex },\n })\n )\n\n // Flip edges if they are entering the port incorrectly, or could enter the\n // port more ergonomically (via the facing_direction)\n // TODO also check obstacles\n for (let i = 0; i < edges.length - 1; i++) {\n try {\n const e1 = edges[i]\n const e2 = edges[i + 1]\n const { p1, p2, corner } = getNonCornerPoints(e1, e2)\n const p1Dir = terminals[p1.ti]?.facing_direction\n const p2Dir = terminals[p2.ti]?.facing_direction\n\n // Score measures alignment of the port and the edge it's connected to\n let score1 = 0,\n score2 = 0\n\n if (p1Dir) {\n const p1Vec = directionToVec(p1Dir)\n const p1ToCornerVec = norm(sub(corner, p1))\n score1 += negUnacceptable(componentSum(mult(p1Vec, p1ToCornerVec)))\n }\n\n if (p2Dir) {\n const p2Vec = directionToVec(p2Dir)\n const p2ToCornerVec = norm(sub(corner, p2))\n score1 += negUnacceptable(componentSum(mult(p2Vec, p2ToCornerVec)))\n }\n\n flipEdges(e1, e2)\n\n if (p1Dir) {\n const p1Vec = directionToVec(p1Dir)\n const p1ToCornerVec = norm(sub(corner, p1))\n score2 += negUnacceptable(componentSum(mult(p1Vec, p1ToCornerVec)))\n }\n\n if (p2Dir) {\n const p2Vec = directionToVec(p2Dir)\n const p2ToCornerVec = norm(sub(corner, p2))\n score2 += negUnacceptable(componentSum(mult(p2Vec, p2ToCornerVec)))\n }\n\n if (score2 < score1) {\n // restore original flip\n flipEdges(e1, e2)\n }\n } catch (e) {\n if (!e.toString().includes(\"Not a Corner\")) throw e\n }\n }\n\n return edges\n}\n","export type Point = { x: number; y: number }\n\nexport function sub(p1: Point, p2: Point) {\n return { x: p1.x - p2.x, y: p1.y - p2.y }\n}\n\nexport function mult(p1: Point, p2: Point) {\n return { x: p1.x * p2.x, y: p1.y * p2.y }\n}\n\nexport function mag(p1: Point, p2: Point) {\n const dx = p1.x - p2.x\n const dy = p1.y - p2.y\n return Math.sqrt(dx ** 2 + dy ** 2)\n}\n\nexport function componentSum(p1: Point) {\n return p1.x + p1.y\n}\n\nexport function norm(p1: Point) {\n return {\n x: Math.sign(p1.x),\n y: Math.sign(p1.y),\n }\n}\n","// TODO rename this to trace-builder\n\nimport * as Type from \"lib/types\"\nimport { Except, Simplify } from \"type-fest\"\nimport { ProjectBuilder, GroupBuilder } from \"..\"\nimport { ProjectClass, createProjectFromElements } from \"lib/project\"\nimport { applySelector } from \"lib/apply-selector\"\nexport { convertToReadableTraceTree } from \"./convert-to-readable-route-tree\"\nimport { straightRouteSolver } from \"./straight-route-solver\"\nimport { rmstSolver } from \"./rmst-solver\"\n\nexport type TraceBuilderCallback = (cb: TraceBuilder) => unknown\nexport interface TraceBuilder {\n builder_type: \"trace_builder\"\n project_builder: ProjectBuilder\n parent: GroupBuilder\n setRouteSolver: (routeSolver: Type.RouteSolver) => TraceBuilder\n addConnections: (portSelectors: Array<string>) => TraceBuilder\n build(elements: Type.AnyElement[]): Promise<Type.AnyElement[]>\n}\n\nexport const createTraceBuilder = (\n project_builder: ProjectBuilder\n): TraceBuilder => {\n const builder: TraceBuilder = {\n project_builder,\n builder_type: \"trace_builder\",\n } as any\n const internal: any = {\n portSelectors: [] as string[],\n routeSolver: rmstSolver,\n }\n\n builder.addConnections = (portSelectors) => {\n internal.portSelectors.push(...portSelectors)\n return builder\n }\n\n builder.setRouteSolver = (\n routeSolver: Type.RouteSolver | \"rmst\" | \"straight\"\n ) => {\n if (typeof routeSolver === \"string\") {\n internal.routeSolver =\n routeSolver === \"straight\" ? straightRouteSolver : rmstSolver\n }\n internal.routeSolver = routeSolver\n return builder\n }\n\n builder.build = async (parentElements: Type.AnyElement[] = []) => {\n const sourcePortsInRoute: Type.SourcePort[] = []\n for (const portSelector of internal.portSelectors) {\n const selectedElms = applySelector(parentElements, portSelector)\n if (selectedElms.length === 0) {\n throw new Error(`No elements found for selector: ${portSelector}`)\n }\n for (const selectedElm of selectedElms) {\n if (selectedElm.type !== \"source_port\")\n throw new Error(\n `non-source_port \"${JSON.stringify(\n selectedElm,\n null,\n \" \"\n )}\" selected by selector \"${portSelector}\" `\n )\n sourcePortsInRoute.push(selectedElm)\n }\n }\n\n const source_trace_id = builder.project_builder.getId(\"source_trace\")\n const source_trace: Type.SourceTrace = {\n type: \"source_trace\",\n source_trace_id,\n connected_source_port_ids: sourcePortsInRoute.map(\n (sp) => sp.source_port_id\n ),\n }\n\n // ----------------------------\n // SCHEMATIC ROUTING\n // ----------------------------\n\n const schematic_trace_id = builder.project_builder.getId(\"schematic_trace\")\n\n const schematicTerminals = sourcePortsInRoute.map((sp) => {\n const schematic_port = parentElements.find(\n (elm) =>\n elm.type === \"schematic_port\" &&\n elm.source_port_id === sp.source_port_id\n ) as Type.SchematicPort | null\n if (!schematic_port)\n throw new Error(\n `Missing schematic_port for source_port \"${sp.source_port_id}\"`\n )\n return {\n x: schematic_port.center.x,\n y: schematic_port.center.y,\n schematic_port_id: schematic_port.schematic_port_id,\n facing_direction: schematic_port.facing_direction,\n }\n })\n\n const edges = await internal.routeSolver({\n terminals: schematicTerminals,\n obstacles: [],\n })\n\n const schematic_trace: Type.SchematicTrace = {\n type: \"schematic_trace\",\n source_trace_id: source_trace_id,\n schematic_trace_id,\n edges,\n }\n\n // ----------------------------\n // PCB ROUTING\n // ----------------------------\n\n const pcb_trace_id = builder.project_builder.getId(\"schematic_trace\")\n\n const pcb_terminals = sourcePortsInRoute.map((sp) => {\n const pcb_port = parentElements.find(\n (elm) =>\n elm.type === \"pcb_port\" && elm.source_port_id === sp.source_port_id\n ) as Type.PCBPort | null\n if (!pcb_port)\n throw new Error(\n `source_port \"${sp.source_port_id}\" is missing a pcb_port`\n )\n return pcb_port\n })\n\n const pcb_route = []\n\n // TODO construct route from pcb_terminals\n\n const pcb_trace: Type.PCBTrace = {\n type: \"pcb_trace\",\n pcb_trace_id,\n source_trace_id: source_trace_id,\n route: pcb_route,\n }\n\n return [source_trace, schematic_trace, pcb_trace]\n }\n\n return builder\n}\n","import {\n PCBComponent,\n PCBPort,\n PCBTrace,\n PCBGroup,\n SchematicGroup,\n SchematicPort,\n SchematicTrace,\n SourceComponent,\n SourceGroup,\n SourcePort,\n SourceTrace,\n AnyElement,\n Project,\n SchematicConfig,\n PCBConfig,\n SourceConfig,\n SchematicComponent,\n} from \"lib/types/index\"\n\nexport const defaultSchematicConfig: SchematicConfig = {\n type: \"schematic_config\",\n}\n\nexport const defaultPCBConfig: PCBConfig = {\n type: \"pcb_config\",\n dimension_unit: \"mm\",\n}\n\nexport const defaultSourceConfig: SourceConfig = {\n type: \"source_config\",\n}\n","import {\n defaultPCBConfig,\n defaultSchematicConfig,\n defaultSourceConfig,\n} from \"./defaults\"\nimport * as Type from \"lib/types/index\"\n\nexport const createProjectFromElements = (\n objects: Type.AnyElement[]\n): Type.Project => {\n const project: Type.Project = {\n type: \"project\",\n schematic_config:\n (objects.find(\n (o) => o.type === \"schematic_config\"\n ) as Type.SchematicConfig) || defaultSchematicConfig,\n schematic_components: objects.filter(\n (o) => o.type === \"schematic_component\"\n ) as Type.SchematicComponent[],\n schematic_groups: objects.filter(\n (o) => o.type === \"schematic_group\"\n ) as Type.SchematicGroup[],\n schematic_traces: objects.filter(\n (o) => o.type === \"schematic_trace\"\n ) as Type.SchematicTrace[],\n schematic_ports: objects.filter(\n (o) => o.type === \"schematic_port\"\n ) as Type.SchematicPort[],\n schematic_texts: objects.filter(\n (o) => o.type === \"schematic_text\"\n ) as Type.SchematicText[],\n pcb_config:\n (objects.find((o) => o.type === \"pcb_config\") as Type.PCBConfig) ||\n defaultPCBConfig,\n pcb_groups: objects.filter(\n (o) => o.type === \"pcb_group\"\n ) as Type.PCBGroup[],\n pcb_components: objects.filter(\n (o) => o.type === \"pcb_component\"\n ) as Type.PCBComponent[],\n pcb_traces: objects.filter(\n (o) => o.type === \"pcb_trace\"\n ) as Type.PCBTrace[],\n pcb_ports: objects.filter((o) => o.type === \"pcb_port\") as Type.PCBPort[],\n source_config:\n (objects.find((o) => o.type === \"source_config\") as Type.SourceConfig) ||\n defaultSourceConfig,\n source_traces: objects.filter(\n (o) => o.type === \"source_trace\"\n ) as Type.SourceTrace[],\n source_groups: objects.filter(\n (o) => o.type === \"source_group\"\n ) as Type.SourceGroup[],\n source_components: objects.filter(\n (o) => o.type === \"source_component\"\n ) as Type.SourceComponent[],\n source_ports: objects.filter(\n (o) => o.type === \"source_port\"\n ) as Type.SourcePort[],\n }\n return project\n}\n","import * as Type from \"lib/types\"\nimport {\n createGroupBuilder,\n GroupBuilder,\n GroupBuilderCallback,\n group_builder_addables,\n} from \"./group-builder\"\nimport { GenericComponentBuilderCallback } from \"./component-builder\"\nimport { createProjectFromElements } from \"../project/create-project-from-elements\"\nimport { TraceBuilderCallback } from \"./trace-builder\"\nimport convertUnits from \"convert-units\"\n\nexport type ProjectBuilder = Omit<GroupBuilder, \"add\"> & {\n build_context: Type.BuildContext\n getId: (prefix: string) => string\n addGroup: (groupBuilderCallback: GroupBuilderCallback) => ProjectBuilder\n buildProject: () => Promise<Type.Project>\n build(): Promise<Type.AnyElement[]>\n add<T extends keyof typeof group_builder_addables>(\n builder_type: T,\n callback: (builder: ReturnType<typeof group_builder_addables[T]>) => unknown\n ): ProjectBuilder\n createBuildContext: () => Type.BuildContext\n}\n\nexport const createProjectBuilder = (): ProjectBuilder => {\n const builder: any = createGroupBuilder()\n builder.project_builder = builder\n const idCount = {}\n const resetIdCount = () => Object.keys(idCount).map((k) => (idCount[k] = 0))\n builder.getId = (prefix: string) => {\n idCount[prefix] = idCount[prefix] || 0\n return `${prefix}_${idCount[prefix]++}`\n }\n builder.build_group = builder.build\n builder.createBuildContext = (): Type.BuildContext => ({\n distance_unit: \"mm\",\n convert(v) {\n if (typeof v === \"number\") return v\n if (v.x !== undefined && v.y !== undefined) {\n return {\n x: this.convert(v.x),\n y: this.convert(v.y),\n }\n }\n const unit_reversed = v\n .split(\"\")\n .reverse()\n .join(\"\")\n .match(/[a-zA-Z]+/)?.[0]\n if (!unit_reversed) {\n throw new Error(`Could not determine unit: ${v}`)\n }\n const unit = unit_reversed.split(\"\").reverse().join(\"\")\n const value = v.slice(0, -unit.length)\n return convertUnits(parseFloat(value)).from(unit).to(this.distance_unit)\n },\n fork(mutation) {\n return { ...this, ...mutation, parent: this }\n },\n })\n\n builder.build = async () => {\n resetIdCount()\n const build_context = builder.createBuildContext()\n return await builder.build_group(build_context)\n }\n builder.buildProject = async () => {\n const group = await builder.build()\n return createProjectFromElements(group)\n }\n return builder\n}\n","/**\n * A constrained layout builder is used to apply constraints to any set of\n * of elements that implement either { x, y } or { x, y, w, h } (w/ align and\n * other aliases)\n */\nimport * as Type from \"lib/types\"\nimport * as kiwi from \"@lume/kiwi\"\nimport * as CB from \"../component-builder\"\n\nimport {\n createGroupBuilder,\n GroupBuilder,\n GroupBuilderCallback,\n GroupBuilderClass,\n group_builder_addables,\n} from \"../group-builder\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport {\n ConstraintBuilder,\n ConstraintBuilderFields,\n createConstraintBuilder,\n} from \"./constraint-builder\"\nimport { applySelector } from \"lib/apply-selector\"\nimport { AnyElement } from \"lib/types\"\n\nconst constraint_builder_addables = {\n ...group_builder_addables,\n constraint: createConstraintBuilder,\n}\n\nexport interface ConstrainedLayoutBuilder extends Omit<GroupBuilder, 'add' | 'appendChild'> {\n add<T extends keyof typeof constraint_builder_addables>(\n builder_type: T,\n callback: (\n builder: ReturnType<typeof constraint_builder_addables[T]>\n ) => unknown\n ): ConstrainedLayoutBuilder\n appendChild(\n child: Parameters<GroupBuilder[\"appendChild\"]>[0] | ConstraintBuilder\n ): ConstrainedLayoutBuilder\n addConstraint(props: ConstraintBuilderFields): ConstrainedLayoutBuilder\n}\n\ntype SpatialElement = { x: number; y: number; w: number; h: number }\n\nexport const toCenteredSpatialObj = (obj: any): SpatialElement => {\n const x = obj.x ?? obj.center?.x\n const y = obj.y ?? obj.center?.y\n const w = obj.w ?? obj.width ?? obj.size?.width ?? 0\n const h = obj.h ?? obj.height ?? obj.size?.height ?? 0\n const align = obj.align ?? \"center\"\n if (x === undefined || y === undefined) {\n throw new Error(\n `Cannot convert to spatial obj (no x,y): ${JSON.stringify(\n obj,\n null,\n \" \"\n )}`\n )\n }\n if (align !== \"center\") {\n throw new Error(\n `Cannot convert to spatial obj (align not center not implemented): ${JSON.stringify(\n obj,\n null,\n \" \"\n )}`\n )\n }\n\n return { x, y, w, h }\n}\n\nexport const getElementChildren = (\n matchElm: AnyElement,\n elements: AnyElement[]\n) => {\n // TODO get deep children\n return elements.filter(\n (elm) =>\n elm[`${matchElm.type}_id`] === matchElm[`${matchElm.type}_id`] &&\n elm !== matchElm\n )\n}\n\nexport const getSpatialBoundsFromSpatialElements = (\n elements: SpatialElement[]\n) => {\n if (elements.length === 0) return { x: 0, y: 0, w: 0, h: 0 }\n let { x: lx, y: ly, w, h } = elements[0]\n lx -= w / 2\n ly -= h / 2\n let hx = lx + w / 2\n let hy = ly + h / 2\n for (let i = 1; i < elements.length; i++) {\n const { x, y, w, h } = elements[i]\n lx = Math.min(lx, x - w / 2)\n ly = Math.min(ly, y - h / 2)\n hx = Math.max(hx, x + w / 2)\n hy = Math.max(hy, y + h / 2)\n }\n return {\n x: (lx + hx) / 2,\n y: (ly + hy) / 2,\n w: hx - lx,\n h: hy - ly,\n }\n}\n\n/**\n * Get element size with any children elements. e.g. for a pcb component,\n * compute it's size from it's children.\n */\nexport const getSpatialElementIncludingChildren = (\n elm: AnyElement,\n elements: AnyElement[]\n) => {\n if (elm.type === \"pcb_component\") {\n const children = getElementChildren(elm, elements).map((e) =>\n toCenteredSpatialObj(e)\n )\n return getSpatialBoundsFromSpatialElements(children)\n // component size is computed from children\n } else if (elm.type === \"schematic_component\") {\n return toCenteredSpatialObj(elm)\n }\n throw new Error(\n `Get spatial elements including children not implemented for: \"${elm.type}\"`\n )\n}\n\nexport const constrainable_element_types = [\n \"pcb_component\",\n \"schematic_component\",\n] as const\n\nexport const moveElementTo = (\n elements: Type.AnyElement[],\n ind: number,\n dx: number,\n dy: number\n) => {\n const elm = elements[ind]\n if (elm.type === \"schematic_component\") {\n elm.center.x += dx\n elm.center.y += dy\n } else if (elm.type === \"pcb_component\") {\n const children = getElementChildren(elements[ind], elements)\n // TODO do recursive method...\n for (const child of children) {\n if (\"x\" in child) {\n child.x += dx\n child.y += dy\n }\n }\n } else {\n throw new Error(\n `Not sure how to move element of type \"${elm.type}\" (in constrained layout builder)`\n )\n }\n}\n\nexport class ConstrainedLayoutBuilderClass\n extends GroupBuilderClass\n implements ConstrainedLayoutBuilder\n{\n constraints: ConstraintBuilder[] = []\n\n add(builder_type, callback) {\n if (builder_type === \"constraint_builder\") {\n const constraint = createConstraintBuilder(this.project_builder)\n callback(constraint)\n this.constraints.push(constraint)\n return this\n }\n super.add(builder_type, callback)\n return this\n }\n\n addConstraint(props) {\n const constraint = createConstraintBuilder(this.project_builder)\n constraint.setProps(props)\n this.constraints.push(constraint)\n return this\n }\n\n appendChild(child) {\n if (child.builder_type === \"constraint_builder\") {\n this.constraints.push(child)\n return this\n }\n super.appendChild(child)\n return this\n }\n\n async build(bc) {\n const elements = await super.build(bc)\n\n // TODO solve groups when all subpositions have been solved, constraints\n // should be applied to the entire solve group\n\n const solver = new kiwi.Solver()\n\n const spatial_elements = elements.map((elm) => {\n if (!constrainable_element_types.includes(elm.type)) return null\n const spatial_elm = getSpatialElementIncludingChildren(elm, elements)\n return spatial_elm\n })\n const vars = {}\n\n // TODO limit to components mentioned in constraints?\n for (let i = 0; i < spatial_elements.length; i++) {\n if (!spatial_elements[i]) continue\n vars[`elm${i}_x`] = new kiwi.Variable(`elm${i}_x`)\n solver.addEditVariable(vars[`elm${i}_x`], kiwi.Strength.weak)\n solver.suggestValue(vars[`elm${i}_x`], spatial_elements[i].x)\n vars[`elm${i}_y`] = new kiwi.Variable(`elm${i}_y`)\n solver.addEditVariable(vars[`elm${i}_y`], kiwi.Strength.weak)\n // vars[`elm${i}_w`] = new kiwi.Variable(`elm${i}_w`)\n // solver.suggestValue(vars[`elm${i}_w`], spatial_elements[i].w)\n // vars[`elm${i}_h`] = new kiwi.Variable(`elm${i}_h`)\n // solver.suggestValue(vars[`elm${i}_h`], spatial_elements[i].h)\n }\n\n const pb = this.project_builder\n function match(selector, target_type: \"schematic\" | \"pcb\") {\n const matchingElms = applySelector(elements, selector)\n if (matchingElms.length > 1)\n throw new Error(\n `Multiple elements match selector: \"${selector}\" (${JSON.stringify(\n matchingElms,\n null,\n \" \"\n )})`\n )\n if (matchingElms.length === 0)\n throw new Error(`No elements match selector: \"${selector}\"`)\n\n let elm = matchingElms[0]\n\n if (elm.type === \"source_component\") {\n const { source_component_id } = elm\n const associated_components = elements.filter(\n (e) => e.source_component_id === source_component_id\n )\n if (target_type === \"schematic\") {\n elm = associated_components.find(\n (c) => c.type === \"schematic_component\"\n )\n } else if (target_type === \"pcb\") {\n elm = associated_components.find((c) => c.type === \"pcb_component\")\n } else {\n throw new Error(\n `Unable to properly associate component for constraint solving \"${JSON.stringify(\n elm,\n null,\n \" \"\n )}\"`\n )\n }\n }\n\n const elmi = elements.indexOf(elm)\n\n return {\n X: vars[`elm${elmi}_x`],\n Y: vars[`elm${elmi}_y`],\n x: spatial_elements[elmi]?.x,\n y: spatial_elements[elmi]?.y,\n w: spatial_elements[elmi]?.w,\n h: spatial_elements[elmi]?.h,\n // TODO solve group stuff\n og_elm: matchingElms[0],\n index: elmi,\n }\n }\n\n for (const constraint of this.constraints) {\n const { props } = constraint\n const target_type = props.schematic ? \"schematic\" : \"pcb\"\n switch (props.type) {\n case \"xdist\": {\n const A = match(props.left, target_type)\n const B = match(props.right, target_type)\n const lhs = new kiwi.Expression(A.X, A.w / 2, props.dist)\n const rhs = new kiwi.Expression(B.X, -B.w / 2)\n solver.addConstraint(\n new kiwi.Constraint(\n lhs,\n kiwi.Operator.Eq,\n rhs,\n kiwi.Strength.strong\n )\n )\n\n // weak constraint to have these components meet in the middle\n solver.addConstraint(\n new kiwi.Constraint(\n new kiwi.Expression([0.5, A.X], [0.5, B.X]),\n kiwi.Operator.Eq,\n (A.x + B.x) / 2,\n kiwi.Strength.weak\n )\n )\n\n continue\n }\n case \"ydist\": {\n const A = match(props.bottom, target_type)\n const B = match(props.top, target_type)\n const lhs = new kiwi.Expression(A.Y, A.h / 2, props.dist)\n const rhs = new kiwi.Expression(B.Y, -B.h / 2)\n solver.addConstraint(\n new kiwi.Constraint(\n lhs,\n kiwi.Operator.Eq,\n rhs,\n kiwi.Strength.strong\n )\n )\n\n // weak constraint to have these components meet in the middle\n solver.addConstraint(\n new kiwi.Constraint(\n new kiwi.Expression([0.5, A.Y], [0.5, B.Y]),\n kiwi.Operator.Eq,\n (A.y + B.y) / 2,\n kiwi.Strength.weak\n )\n )\n continue\n }\n }\n }\n\n solver.updateVariables()\n\n for (let i = 0; i < spatial_elements.length; i++) {\n if (!spatial_elements[i]) continue\n const new_x = vars[`elm${i}_x`].value()\n const new_y = vars[`elm${i}_y`].value()\n const old_x = spatial_elements[i].x\n const old_y = spatial_elements[i].y\n const changed = new_x !== old_x || new_y !== old_y\n\n if (changed) {\n moveElementTo(elements, i, new_x - old_x, new_y - old_y)\n }\n }\n\n return elements\n }\n}\n\nexport const createConstrainedLayoutBuilder = (\n project_builder: ProjectBuilder\n): ConstrainedLayoutBuilder => {\n return new ConstrainedLayoutBuilderClass(project_builder)\n}\n","import {BuildContext, Dimension} from \"lib/types\"\nimport { RequireAtLeastOne } from \"type-fest\"\nimport { ProjectBuilder } from \"../project-builder\"\nimport { createSimpleDataBuilderClass } from \"../simple-data-builder\"\n\nexport type ConstraintContextFlag = RequireAtLeastOne<{\n schematic: boolean\n pcb: boolean\n}>\n\nexport type ConstraintBuilderFields =\n | ({\n type: \"xdist\"\n dist: Dimension\n left: string\n right: string\n } & ConstraintContextFlag)\n | ({\n type: \"ydist\"\n dist: Dimension\n top: string\n bottom: string\n } & ConstraintContextFlag)\n\nexport interface ConstraintBuilder {\n builder_type: \"constraint_builder\"\n props: ConstraintBuilderFields\n setProps(props: Partial<ConstraintBuilderFields>): ConstraintBuilder\n build(bc: BuildContext): Omit<ConstraintBuilderFields, \"dist\"> & { dist: number }\n}\n\nexport const ConstraintBuilderClass = createSimpleDataBuilderClass<\n \"constraint_builder\",\n ConstraintBuilderFields,\n \"dist\"\n>(\"constraint_builder\", {}, [\"dist\"])\n\nexport const createConstraintBuilder = (\n project_builder: ProjectBuilder\n): ConstraintBuilder => {\n return new ConstraintBuilderClass(project_builder) as any\n}\n","import * as Type from \"lib/types\"\n\nconst elementArrayKeys = [\n \"schematic_components\",\n \"schematic_groups\",\n \"schematic_traces\",\n \"schematic_ports\",\n \"pcb_groups\",\n \"pcb_components\",\n \"pcb_labels\",\n \"pcb_traces\",\n \"pcb_ports\",\n \"source_traces\",\n \"source_groups\",\n \"source_components\",\n \"source_ports\",\n]\n\n/** Representation of a project with more utilities */\nexport class ProjectClass {\n project: Type.Project\n constructor(project: Type.Project) {\n this.project = project\n }\n getElements(): Type.AnyElement[] {\n return elementArrayKeys.flatMap((k) => this.project[k])\n }\n get(id: string): Type.AnyElement | null {\n return this.getElements().find((e) => e[`${e.type}_id`] === id)\n }\n getRelated<T extends Type.ElementType>(\n type: T,\n id: string\n ): Array<Type.ElementOfType<T>> {\n const mainElm = this.get(id)\n const joiningId = mainElm.type + \"_id\"\n return this.getElements().filter(\n (e) => e.type === type && e[joiningId] === id\n ) as any\n }\n getSourceComponent(id: string): Type.SourceComponent | null {\n return this.project.source_components.find(\n (c) => c.source_component_id === id\n )\n }\n getSourcePort(id: string): Type.SourcePort | null {\n return this.project.source_ports.find((c) => c.source_port_id === id)\n }\n getSourceTrace(id: string): Type.SourceTrace | null {\n return this.project.source_traces.find((c) => c.source_trace_id === id)\n }\n}\n\nexport default ProjectClass\n","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}\nfunction N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g;function Q(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction R(a,b,e,d,c){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=\"\"===d?\".\"+Q(h,0):d,I(c)?(e=\"\",null!=a&&(e=a.replace(P,\"$&/\")+\"/\"),R(c,b,e,\"\",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?\"\":(\"\"+c.key).replace(P,\"$&/\")+\"/\")+a)),b.push(c)),1;h=0;d=\"\"===d?\".\":d+\":\";if(I(a))for(var g=0;g<a.length;g++){k=\na[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if(\"object\"===k)throw b=String(a),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b)+\"). If you meant to render a collection of children, use an array instead.\");return h}\nfunction S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,\"\",\"\",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}\nvar U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error(\"React.Children.only expected to receive a single React element child.\");return a}};exports.Component=E;exports.Fragment=p;\nexports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;\nexports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+a+\".\");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);\nfor(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};\nexports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error(\"act(...) is not supported in production builds of React.\");};\nexports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};\nexports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};\nexports.useTransition=function(){return U.current.useTransition()};exports.version=\"18.2.0\";\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.2.0';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","import { createProjectBuilder } from \"@tscircuit/builder\"\nimport { useMaybePromise } from \"lib/hooks\"\nimport { Schematic } from \"../Schematic\"\n\nconst pb = createProjectBuilder()\nconst $elements = pb\n .addGroup((gb) =>\n gb\n .addResistor((rb) =>\n rb\n .setSourceProperties({\n resistance: \"10 ohm\",\n name: \"R1\",\n })\n .setSchematicCenter(2, 1)\n )\n .addCapacitor((cb) =>\n cb\n .setSourceProperties({\n name: \"C1\",\n capacitance: \"10 uF\",\n })\n .setSchematicCenter(4, 2)\n .setSchematicRotation(\"90deg\")\n )\n .addResistor((cb) =>\n cb\n .setSourceProperties({\n resistance: \"10 ohm\",\n name: \"R2\",\n })\n .setSchematicCenter(6, 1)\n .setSchematicRotation(\"90deg\")\n )\n .addTrace([\".R1 > port.right\", \".C1 > port.left\", \".R2 > port.left\"])\n .addPowerSource((cb) =>\n cb\n .setSourceProperties({\n voltage: \"5V\",\n name: \"main_power\",\n })\n .setSchematicCenter(1, 2)\n )\n .addTrace([\"power > port.positive\", \".R1 > port.left\"])\n .addTrace([\n \"power > port.negative\",\n \".C1 > port.right\",\n \".R2 > port.right\",\n ])\n .addBug((cb) =>\n cb\n .setSourceProperties({ name: \"B1\" })\n .setSchematicProperties({\n port_arrangement: {\n left_size: 3,\n right_size: 3,\n },\n })\n .labelPort(1, \"PWR\")\n .labelPort(2, \"NC\")\n .labelPort(3, \"RG\")\n .labelPort(4, \"D0\")\n .labelPort(5, \"D1\")\n .labelPort(6, \"GND\")\n .setSchematicCenter(8, 3)\n )\n .addTrace([\".B1 > port.PWR\", \".R2 > port.left\"])\n .addGround((cb) =>\n cb\n .setSourceProperties({\n name: \"GND\",\n })\n .setSchematicCenter(11, 3)\n )\n .addTrace([\".B1 > port.GND\", \".gnd\"])\n .addDiode((db) =>\n db\n .setSourceProperties({ name: \"D1\" })\n .setSchematicCenter(6, 3.5)\n .setSchematicRotation(\"180deg\")\n )\n .addTrace([\".D1 > .left\", \".B1 > .RG\"])\n .addTrace([\".D1 > .right\", \".C1 > .right\"])\n )\n .build(pb.createBuildContext())\n\nexport default () => {\n const elements = useMaybePromise($elements)\n if (!elements) return null\n return (\n <>\n <Schematic elements={elements} />\n <pre style={{ marginTop: 600 }}>\n {JSON.stringify(elements, null, \" \")}\n </pre>\n </>\n )\n}\n","import { useEffect, useState } from \"react\"\n\nexport const useMaybePromise = <T>(promise: Promise<T> | T): T | null => {\n const [state, setState] = useState<T | null>(null)\n useEffect(() => {\n if (promise instanceof Promise) {\n promise.then(setState)\n } else {\n setState(promise)\n }\n }, [promise])\n return state\n}\nexport default useMaybePromise\n","import { useEffect, useState } from \"react\"\nimport { ProjectComponent } from \"schematic-components\"\nimport {\n createProjectBuilder,\n createProjectFromElements,\n} from \"@tscircuit/builder\"\nimport { createRoot } from \"@tscircuit/react-fiber\"\n\nexport const Schematic = ({\n children,\n elements: initialElements = [],\n}: {\n children?: any\n elements?: any\n}) => {\n const [elements, setElements] = useState<any>(initialElements)\n const [project, setProject] = useState<any>(null)\n\n useEffect(() => {\n if (initialElements.length > 0) {\n setProject(createProjectFromElements(initialElements))\n return\n }\n const projectBuilder = createProjectBuilder()\n createRoot()\n .render(children, projectBuilder as any)\n .then(async (elements) => {\n setElements(elements)\n setProject(createProjectFromElements(elements))\n })\n .catch((e) => {\n console.error(\"ERROR RENDERING CIRCUIT\")\n throw e\n })\n }, [children])\n\n if (elements.length === 0) return null\n\n return <ProjectComponent project={project} />\n}\n","export const MovableGrid = () => {\n return <div>{`asd`}</div>\n}\nexport default MovableGrid\n","import createStore from \"zustand\"\nimport { Matrix, compose, scale } from \"transformation-matrix\"\n\ninterface RenderContextState {\n camera_transform: Matrix\n}\n\nexport const useRenderContext = createStore<RenderContextState>()(\n (set, get) => ({\n camera_transform: compose(scale(100, 100, 0, 0)),\n })\n)\n\nexport const useCameraTransform = () =>\n useRenderContext((s) => s.camera_transform)\n","import svgPathBounds from \"svg-path-bounds\"\n\nexport function getSVGPathBounds(ds: string[] | string) {\n if (typeof ds === \"string\") ds = [ds]\n let minX = Infinity,\n maxX = -Infinity,\n minY = Infinity,\n maxY = -Infinity\n\n for (const d of ds) {\n const [left, top, right, bottom] = svgPathBounds(d)\n\n minX = Math.min(left, minX)\n maxX = Math.max(right, maxX)\n minY = Math.min(top, minY)\n maxY = Math.max(bottom, maxY)\n }\n\n return { minX, maxX, minY, maxY, width: maxX - minX, height: maxY - minY }\n}\n\nexport default getSVGPathBounds\n","import { useCameraTransform } from \"lib/render-context\"\nimport getSVGPathBounds from \"lib/utils/get-svg-path-bounds\"\n\nimport { applyToPoint } from \"transformation-matrix\"\n\ninterface Props {\n rotation: number\n center: { x: number; y: number }\n size: { width: number; height: number }\n paths: Array<{\n strokeWidth: number\n stroke: string\n d: string\n }>\n}\n\nexport const SVGPathComponent = ({ size, center, rotation, paths }: Props) => {\n const ct = useCameraTransform()\n const pathBounds = getSVGPathBounds(paths.map((p) => p.d))\n // Margin in SVG Space\n const badRatio =\n Math.abs(pathBounds.width / pathBounds.height - size.width / size.height) >\n 0.01\n if (badRatio) {\n console.warn(\n `Ratio doesn't match for component. ${pathBounds.width}:${pathBounds.height} is not close to ${size.width}:${size.height}`\n )\n }\n pathBounds.height = Math.max(pathBounds.height, 1)\n pathBounds.width = Math.max(pathBounds.width, 1)\n const absoluteCenter = applyToPoint(ct, center)\n const absoluteSize = {\n width: Math.max(1, size.width * ct.a),\n height: Math.max(1, size.height * ct.d),\n }\n\n return (\n <svg\n style={{\n position: \"absolute\",\n transform: rotation === 0 ? \"\" : `rotate(${rotation}rad)`,\n left: absoluteCenter.x - absoluteSize.width / 2,\n top: absoluteCenter.y - absoluteSize.height / 2,\n // backgroundColor: badRatio ? \"rgba(255, 0, 0, 0.5)\" : \"transparent\",\n }}\n overflow=\"visible\"\n width={absoluteSize.width}\n height={absoluteSize.height}\n viewBox={`${pathBounds.minX} ${pathBounds.minY} ${pathBounds.width} ${pathBounds.height}`}\n >\n {paths.map((p, i) => (\n <path\n key={i}\n fill=\"none\"\n strokeWidth={2 * (p.strokeWidth || 1)}\n stroke={p.stroke || \"red\"}\n d={p.d}\n />\n ))}\n </svg>\n )\n}\n\nexport default SVGPathComponent\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\n\ninterface Props {\n component: {\n source: Type.SimpleResistor\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SimpleResistor = ({ component: { source, schematic } }: Props) => {\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n {\n stroke: \"red\",\n strokeWidth: 1,\n d: \"M 0 15 l 10 0 l 0 -6 l 20 0 l 0 12 l -20 0 l 0 -6 m 20 0 l 10 0\",\n },\n ]}\n />\n )\n}\n\nexport default SimpleResistor\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\n\ninterface Props {\n component: {\n source: Type.SimpleCapacitor\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SimpleCapacitor = ({\n component: { source, schematic },\n}: Props) => {\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n { stroke: \"red\", strokeWidth: 1, d: \"M 0 15 l 12 0\" },\n { stroke: \"red\", strokeWidth: 2, d: \"M 12 0 l 0 30\" },\n { stroke: \"red\", strokeWidth: 2, d: \"M 18 0 l 0 30\" },\n { stroke: \"red\", strokeWidth: 1, d: \"M 18 15 l 12 0\" },\n ]}\n />\n )\n}\n\nexport default SimpleCapacitor\n","import { useMaybePromise } from \"lib/hooks\"\nimport { ProjectClass } from \"@tscircuit/builder\"\nimport * as Types from \"lib/types\"\nimport * as Components from \"./\"\n\ninterface Props {\n project: Types.Project | Promise<Types.Project>\n}\n\nexport const ProjectComponent = ({ project: $project }: Props) => {\n const project = useMaybePromise($project)\n\n if (!project) return <span>loading</span>\n\n const projectClass = new ProjectClass(project as any)\n\n return (\n <>\n {project.schematic_components.map((schematic_component) => (\n <Components.SchematicComponent\n key={schematic_component.schematic_component_id}\n component={{\n source: projectClass.getSourceComponent(\n schematic_component.source_component_id\n ),\n schematic: schematic_component,\n }}\n />\n ))}\n {project.schematic_ports.map((schematic_port) => (\n <Components.SchematicPort\n key={schematic_port.schematic_port_id}\n port={{\n source: projectClass.getSourcePort(\n schematic_port.schematic_port_id\n ),\n schematic: schematic_port,\n }}\n />\n ))}\n {project.schematic_traces.map((schematic_trace) => (\n <Components.SchematicTrace\n key={schematic_trace.schematic_trace_id}\n trace={{\n source: projectClass.getSourceTrace(\n schematic_trace.source_trace_id\n ),\n schematic: schematic_trace,\n }}\n />\n ))}\n {project.schematic_texts.map((schematic_text) => (\n <Components.SchematicText\n key={schematic_text.schematic_text_id}\n schematic_text={schematic_text}\n />\n ))}\n </>\n )\n}\n\nexport default ProjectComponent\n","import { ProjectClass } from \"tscircuit\"\nimport * as Type from \"lib/types\"\nimport * as Component from \"./\"\n\ninterface Props {\n component: {\n source: Type.SourceComponent\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SchematicComponent = ({ component }: Props) => {\n const { source, schematic } = component\n switch (source.ftype) {\n case \"simple_resistor\": {\n return <Component.SimpleResistor component={{ source, schematic }} />\n }\n case \"simple_capacitor\": {\n return <Component.SimpleCapacitor component={{ source, schematic }} />\n }\n case \"simple_power_source\": {\n return <Component.SimplePowerSource component={{ source, schematic }} />\n }\n case \"simple_ground\": {\n return <Component.SimpleGround component={{ source, schematic }} />\n }\n case \"simple_inductor\": {\n return <Component.SimpleInductor component={{ source, schematic }} />\n }\n case \"simple_bug\": {\n return <Component.SchematicBug component={{ source, schematic }} />\n }\n case \"simple_diode\": {\n return <Component.SimpleDiode component={{ source, schematic }} />\n }\n default: {\n return <div>unknown ftype: {component.source.ftype}</div>\n }\n }\n}\n\nexport default SchematicComponent\n","export const directionToVec = (direction: \"up\" | \"down\" | \"left\" | \"right\") => {\n if (direction === \"up\") return { x: 0, y: -1 }\n else if (direction === \"down\") return { x: 0, y: 1 }\n else if (direction === \"left\") return { x: -1, y: 0 }\n else if (direction === \"right\") return { x: 1, y: 0 }\n else throw new Error(\"Invalid direction\")\n}\n\nexport const vecToDirection = ({ x, y }: { x: number; y: number }) => {\n if (x > y) y = 0\n if (y > x) x = 0\n if (x > 0 && y === 0) return \"right\"\n else if (x < 0 && y === 0) return \"left\"\n else if (x === 0 && y > 0) return \"down\"\n else if (x === 0 && y < 0) return \"up\"\n else throw new Error(`Invalid vector for direction conversion (${x}, ${y})`)\n}\n\nexport const rotateClockwise = (\n direction: \"up\" | \"down\" | \"left\" | \"right\"\n) => {\n if (direction === \"up\") return \"right\"\n else if (direction === \"right\") return \"down\"\n else if (direction === \"down\") return \"left\"\n else if (direction === \"left\") return \"up\"\n}\n\nexport const rotateCounterClockwise = (\n direction: \"up\" | \"down\" | \"left\" | \"right\"\n) => {\n if (direction === \"up\") return \"left\"\n else if (direction === \"left\") return \"down\"\n else if (direction === \"down\") return \"right\"\n else if (direction === \"right\") return \"up\"\n}\n\nexport const rotateDirection = (\n direction: \"up\" | \"down\" | \"left\" | \"right\",\n num90DegreeClockwiseTurns: number\n) => {\n while (num90DegreeClockwiseTurns > 0) {\n direction = rotateClockwise(direction)\n num90DegreeClockwiseTurns--\n }\n while (num90DegreeClockwiseTurns < 0) {\n direction = rotateCounterClockwise(direction)\n num90DegreeClockwiseTurns++\n }\n return direction\n}\n","import { ProjectClass } from \"tscircuit\"\nimport * as Type from \"lib/types\"\nimport { directionToVec } from \"lib/utils/direction-to-vec\"\nimport * as Component from \"./\"\n\ninterface Props {\n port: {\n source: Type.SourcePort\n schematic: Type.SchematicPort\n }\n}\n\nexport const SchematicPort = ({ port: { source, schematic } }: Props) => {\n return (\n <Component.SVGPathComponent\n rotation={0}\n center={schematic.center}\n size={{ width: 0.2, height: 0.2 }}\n paths={[\n {\n stroke: \"blue\",\n strokeWidth: 1,\n d: \"M 0 0 l 10 0 l 0 10 l -10 0 z\",\n },\n schematic.facing_direction\n ? {\n stroke: \"blue\",\n strokeWidth: 0.5,\n d: `M 5 5 l ${directionToVec(schematic.facing_direction).x * 7} ${\n directionToVec(schematic.facing_direction).y * 7\n }`,\n }\n : null,\n ].filter(Boolean)}\n />\n )\n}\n\nexport default SchematicPort\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\nimport Path from \"svg-path-generator\"\nimport getSVGPathBounds from \"lib/utils/get-svg-path-bounds\"\nimport { useCameraTransform } from \"lib/render-context\"\nimport { applyToPoint } from \"transformation-matrix\"\nimport useMeasure from \"react-use-measure\"\n\ninterface Props {\n schematic_text: Type.SchematicText\n}\n\nexport const SchematicText = ({ schematic_text }: Props) => {\n const ct = useCameraTransform()\n const { text, position, anchor } = schematic_text\n const tPos = applyToPoint(ct, position)\n const [boundsRef, bounds] = useMeasure()\n let offset = [0, 0]\n if (anchor === \"center\") {\n offset = [-bounds.width / 2, -bounds.height / 2]\n } else if (anchor === \"left\") {\n offset = [0, -bounds.height / 2]\n } else if (anchor === \"right\") {\n offset = [-bounds.width, -bounds.height / 2]\n }\n return (\n <div\n ref={boundsRef}\n style={{\n fontFamily: \"'IBM Plex Mono', monospace\",\n position: \"absolute\",\n left: tPos.x + offset[0],\n top: tPos.y + offset[1],\n }}\n >\n {text}\n </div>\n )\n}\n\nexport default SchematicText\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\nimport Path from \"svg-path-generator\"\nimport getSVGPathBounds from \"lib/utils/get-svg-path-bounds\"\nimport RenderError from \"./RenderError\"\n\ninterface Props {\n trace: {\n source: Type.SourceTrace\n schematic: Type.SchematicTrace\n }\n}\n\nexport const SchematicTrace = ({ trace: { source, schematic } }: Props) => {\n const edges = schematic.edges\n if (edges.length === 0) {\n return <RenderError text=\"Route with 0 edges\" />\n }\n const path = Path()\n for (let i = 0; i < edges.length; i++) {\n path.moveTo(edges[i].from.x, edges[i].from.y)\n path.lineTo(edges[i].to.x, edges[i].to.y)\n }\n const d = path.toString()\n const pathBounds = getSVGPathBounds(d)\n pathBounds.height = Math.max(pathBounds.height, 1)\n pathBounds.width = Math.max(pathBounds.width, 1)\n const center = {\n x: pathBounds.minX + pathBounds.width / 2,\n y: pathBounds.minY + pathBounds.height / 2,\n }\n return (\n <SVGPathComponent\n rotation={0}\n center={center}\n size={pathBounds}\n paths={[\n {\n stroke: \"green\",\n strokeWidth: 0.02,\n d,\n },\n ]}\n />\n )\n}\n\nexport default SchematicTrace\n","interface Props {\n text: string\n}\n\nexport default ({ text }: Props) => {\n return (\n <div\n style={{\n position: \"fixed\",\n backgroundColor: \"red\",\n color: \"white\",\n fontSize: 14,\n fontFamily: \"sans-serif\",\n padding: 5,\n right: 0,\n top: 0,\n opacity: 0.75,\n }}\n >\n {text}\n </div>\n )\n}\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\nimport range from \"lodash/range\"\n\ninterface Props {\n component: {\n source: Type.SimpleBug\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SchematicBug = ({ component: { source, schematic } }: Props) => {\n const ports_arrangement = schematic.port_arrangement!\n const port_labels = schematic.port_labels!\n const bugw = 30 // bug width\n const rh = 15 // row height\n const pd = 7.5 // port distance, the line for each port\n const bugh =\n Math.max(ports_arrangement.left_size, ports_arrangement.right_size) * rh\n // TODO throw if schematic.size doesn't match computed ports_arrangement size\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n {\n stroke: \"red\",\n strokeWidth: 1,\n d: `M 0 0 L ${bugw} 0 L ${bugw} ${bugh} L 0 ${bugh}Z`,\n },\n ...range(\n 0,\n ports_arrangement.left_size + ports_arrangement.right_size\n ).map((i) => {\n const ls = ports_arrangement.left_size\n const left = i < ls\n const rowi = i % ls\n const p1 = [left ? 0 : bugw, rh / 2 + rowi * rh]\n const rd = [left ? -pd : pd, 0]\n return {\n stroke: \"red\",\n strokeWidth: 1,\n d: `M ${p1.join(\" \")} l ${rd.join(\" \")}`,\n }\n }),\n ]}\n />\n )\n}\n\nexport default SchematicBug\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\n\ninterface Props {\n component: {\n source: Type.SimplePowerSource\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SimplePowerSource = ({\n component: { source, schematic },\n}: Props) => {\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n {\n stroke: \"red\",\n strokeWidth: 1,\n d: \"M 0 -17 L 0 -3 M -8 3 L 8 3 M 0 17 L 0 3 M -12 -3 L 12 -3\",\n },\n ]}\n />\n )\n}\n\nexport default SimplePowerSource\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\n\ninterface Props {\n component: {\n source: Type.SimpleGround\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SimpleGround = ({ component: { source, schematic } }: Props) => {\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n {\n stroke: \"red\",\n strokeWidth: 0.7,\n d: \"M -3 3 L 3 3 M -6 0 L 6 0 M -9 -3 L 9 -3 M 0 -3 L 0 -12\",\n },\n ]}\n />\n )\n}\n\nexport default SimpleGround\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\n\ninterface Props {\n component: {\n source: Type.SimpleInductor\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SimpleInductor = ({ component: { source, schematic } }: Props) => {\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n {\n stroke: \"red\",\n strokeWidth: 1,\n // https://commons.wikimedia.org/wiki/File:Electrical_symbols_library.svg\n d: \"m 371,710.41665 h -14 c -0.0421,-16.39898 -14.02104,-16.39898 -14,0 -0.021,-16.399 -14.04182,-16.34072 -14,0 -2.6e-4,-16.45722 -14.04236,-16.45722 -14,0 2.8e-4,-16.3407 -13.97896,-16.39898 -14,0 -0.0421,-16.39898 -13.91338,-16.39898 -13.91338,0 H 273\",\n },\n ]}\n />\n )\n}\n\nexport default SimpleInductor\n","import * as Type from \"lib/types\"\nimport SVGPathComponent from \"./SVGPathComponent\"\n\ninterface Props {\n component: {\n source: Type.SimpleDiode\n schematic: Type.SchematicComponent\n }\n}\n\nexport const SimpleDiode = ({ component: { source, schematic } }: Props) => {\n return (\n <SVGPathComponent\n rotation={schematic.rotation}\n center={schematic.center}\n size={schematic.size}\n paths={[\n { stroke: \"red\", strokeWidth: 2, d: \"M 0,0 H 21\" },\n { stroke: \"red\", strokeWidth: 2, d: \"M 49,0 H 59\" },\n { stroke: \"red\", strokeWidth: 2, d: \"M 49,0 L 21 14 V -14 Z\" },\n { stroke: \"red\", strokeWidth: 2, d: \"M 49,-14 V 14\" },\n // For LEDs\n // {\n // stroke: \"red\",\n // strokeWidth: 2,\n // d: \"M 35 -32 l 7 5.25 l 1.75 -9.625 z m 3.5 2.625 l -5.25 7\",\n // },\n // {\n // stroke: \"red\",\n // strokeWidth: 2,\n // d: \"M 52 -26 l 7 5.25 l 1.75 -9.625 z m 3.5 2.625 l -5.25 7\",\n // },\n ]}\n />\n )\n}\n\nexport default SimpleDiode\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,uDAAAA,SAAA;AAUA,QAAI,cAAc;AAAA,MAChB,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,aAAa;AAAA,IACf;AAEA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACnBjB,IAAAC,kBAAA;AAAA,mDAAAC,SAAA;AAQA,QAAI,cAAc;AAsBlB,aAAS,SAAS,OAAO;AAKvB,aAAO,CAAC,EAAE,SAAS,YAAY,OAAO;AAAA,IACxC;AAEA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACtCjB,IAAAC,kBAAA;AAAA,oDAAAC,SAAA;AAUA,QAAI,cAAc,OAAO;AAGzB,QAAI,WAAW,YAAY;AAG3B,QAAI,WAAW;AAAA,MAAO,MACpB,OAAO,QAAQ,EACZ,QAAQ,uBAAuB,MAAM,EACrC,QAAQ,yBAAyB,KAAK,IAAI;AAAA,IAC/C;AAEA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACtBjB,IAAAC,kBAAA;AAAA,oDAAAC,SAAA;AAQA,QAAI,cAAc;AAGlB,QAAI,cAAc,OAAO;AAGzB,QAAI,iBAAiB,YAAY;AAWjC,QAAI,WAAW,SAAS,QAAQ;AAC9B,UAAI,OAAO,WAAW,QAAQ,SAAS,CAAC;AACxC,UAAI,CAAC;AAAU,eAAO;AACtB,UAAI,CA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G,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,IAAI,EACjB,UAAU,GAAG,KAAK,EAClB,mBAAmB,GAAG,CAAC;AAAA,EAC5B,EACC,SAAS,CAAC,kBAAkB,iBAAiB,CAAC,EAC9C;AAAA,IAAU,CAAC,OACV,GACG,oBAAoB;AAAA,MACnB,MAAM;AAAA,IACR,CAAC,EACA,mBAAmB,IAAI,CAAC;AAAA,EAC7B,EACC,SAAS,CAAC,kBAAkB,MAAM,CAAC,EACnC;AAAA,IAAS,CAAC,OACT,GACG,oBAAoB,EAAE,MAAM,KAAK,CAAC,EAClC,mBAAmB,GAAG,GAAG,EACzB,qBAAqB,QAAQ;AAAA,EAClC,EACC,SAAS,CAAC,eAAe,WAAW,CAAC,EACrC,SAAS,CAAC,gBAAgB,cAAc,CAAC;AAC9C,EACC,MAAM,GAAG,mBAAmB,CAAC;AAEhC,IAAO,sBAAQ,MAAM;AACnB,QAAM,WAAW,gBAAgB,SAAS;AAC1C,MAAI,CAAC;AAAU,WAAO;AACtB,SACE;AAAA,IACE;AAAA,oDAAC;AAAA,QAAU;AAAA,OAAoB;AAAA,MAC/B,8CAAC;AAAA,QAAI,OAAO,EAAE,WAAW,IAAI;AAAA,QAC1B,eAAK,UAAU,UAAU,MAAM,IAAI;AAAA,OACtC;AAAA;AAAA,GACF;AAEJ;","names":["module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","Object","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","require_lodash","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","module","measure","IndexedMap","Pair","Variable","Expression","Strength","Operator","Constraint","Symbol","Solver","SymbolType","Row","__commonJS","exports","module","require_freeGlobal","require_root","require_Symbol","Symbol","require_getRawTag","require_objectToString","require_baseGetTag","require_isObjectLike","flatten","__export","ProjectClass","createProjectBuilder","createProjectFromElements","__toCommonJS","pb","directionToVec","import_transformation_matrix","import_transformation_matrix2","import_transformation_matrix3","import_transformation_matrix4","__toESM","findRectilinearRoute","convertUnits","w","h","a","b","module","ReactDebugCurrentFrame","self","moduleObject","error","useState","useEffect","Component","returnValue","module","ReactDebugCurrentFrame","self","jsx","jsxs","module","module","module","module","module","module","Symbol","module","Symbol","module","module","Symbol","module","module","module","module","module","module","module","module","module","module","module","module","module","module","range","import_builder","import_react","createStore","svgPathBounds","import_transformation_matrix","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_transformation_matrix","import_jsx_runtime","useMeasure","import_jsx_runtime","import_jsx_runtime","Path","import_jsx_runtime","range","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_builder","import_jsx_runtime","elements","import_jsx_runtime"]}