@khanacademy/perseus 19.1.7 → 19.1.8

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.
package/dist/es/index.js CHANGED
@@ -4215,22 +4215,13 @@ function _classPrivateFieldKey(name) {
4215
4215
  return "__private_" + id$1++ + "_" + name;
4216
4216
  }
4217
4217
 
4218
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4219
-
4220
- function getDefaultExportFromCjs (x) {
4221
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
4222
- }
4223
-
4224
- var raphael = {exports: {}};
4225
-
4226
4218
  /*!
4227
4219
  * Raphael 1.5.2 - JavaScript Vector Library
4228
4220
  *
4229
4221
  * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
4230
4222
  * Licensed under the MIT (http://raphaeljs.com/license.html) license.
4231
4223
  */
4232
-
4233
- (function () {
4224
+ var Raphael$1 = (function () {
4234
4225
  var setAttr;
4235
4226
  if ("".trim) {
4236
4227
  setAttr = function (node, att, value) {
@@ -8407,7 +8398,7 @@ var raphael = {exports: {}};
8407
8398
  };
8408
8399
  R.el = elproto;
8409
8400
  R.st = Set[proto];
8410
- raphael.exports = R;
8401
+ return R;
8411
8402
  })();
8412
8403
 
8413
8404
  /**
@@ -8864,7 +8855,7 @@ class Graphie$1 {
8864
8855
  };
8865
8856
  this.el = el;
8866
8857
  $(el).css("position", "relative");
8867
- this.raphael = raphael.exports(el);
8858
+ this.raphael = Raphael$1(el);
8868
8859
 
8869
8860
  // For a sometimes-reproducible IE8 bug; doesn't affect SVG browsers at all
8870
8861
  $(el).children("div").css("position", "absolute");
@@ -9221,7 +9212,7 @@ class Graphie$1 {
9221
9212
  // wrapper.setAttribute("data-graphie-type", "ellipse");
9222
9213
 
9223
9214
  // Create Raphael canvas
9224
- const localRaphael = raphael.exports(wrapper, width, height);
9215
+ const localRaphael = Raphael$1(wrapper, width, height);
9225
9216
  const visibleShape = localRaphael.ellipse(width / 2, height / 2, scaledRadii[0], scaledRadii[1]);
9226
9217
  return {
9227
9218
  wrapper: wrapper,
@@ -9288,7 +9279,7 @@ class Graphie$1 {
9288
9279
  });
9289
9280
 
9290
9281
  // Create Raphael canvas
9291
- const localRaphael = raphael.exports(wrapper, width, height);
9282
+ const localRaphael = Raphael$1(wrapper, width, height);
9292
9283
 
9293
9284
  // Calculate path
9294
9285
  const visibleShape = localRaphael.path(createPath(points));
@@ -9351,7 +9342,7 @@ class Graphie$1 {
9351
9342
  });
9352
9343
 
9353
9344
  // Create Raphael canvas
9354
- const localRaphael = raphael.exports(wrapper, width, height);
9345
+ const localRaphael = Raphael$1(wrapper, width, height);
9355
9346
 
9356
9347
  // Calculate path
9357
9348
  const path = "M" + start[0] + " " + start[1] + " " + "L" + end[0] + " " + end[1];
@@ -9435,7 +9426,7 @@ class Graphie$1 {
9435
9426
  postprocessDrawingResult(result) {
9436
9427
  // Bad heuristic for recognizing Raphael elements and sets
9437
9428
  const type = result.constructor.prototype;
9438
- if (type === raphael.exports.el || type === raphael.exports.st) {
9429
+ if (type === Raphael$1.el || type === Raphael$1.st) {
9439
9430
  result.attr(this.currentStyle);
9440
9431
  if (this.currentStyle.arrows) {
9441
9432
  result = this.addArrowheads(result);
@@ -9450,7 +9441,7 @@ class Graphie$1 {
9450
9441
  }
9451
9442
  addArrowheads(path) {
9452
9443
  const type = path.constructor.prototype;
9453
- if (type === raphael.exports.el) {
9444
+ if (type === Raphael$1.el) {
9454
9445
  if (path.type === "path" && typeof path.arrowheadsDrawn === "undefined") {
9455
9446
  const w = path.attr("stroke-width");
9456
9447
  const s = 0.6 + 0.4 * w;
@@ -9478,7 +9469,7 @@ class Graphie$1 {
9478
9469
  set.push(head);
9479
9470
  return set;
9480
9471
  }
9481
- } else if (type === raphael.exports.st) {
9472
+ } else if (type === Raphael$1.st) {
9482
9473
  for (let i = 0, l = path.items.length; i < l; i++) {
9483
9474
  this.addArrowheads(path.items[i]);
9484
9475
  }
@@ -10652,7 +10643,7 @@ _.extend(GraphUtils.Graphie.prototype, {
10652
10643
  setDrawingAreaAvailable: function () {}
10653
10644
  }, options);
10654
10645
  const mouselayerZIndex = 2;
10655
- graph.mouselayer = raphael.exports(graph.raphael.canvas.parentNode, graph.xpixels, graph.ypixels);
10646
+ graph.mouselayer = Raphael$1(graph.raphael.canvas.parentNode, graph.xpixels, graph.ypixels);
10656
10647
  $(graph.mouselayer.canvas).css("z-index", mouselayerZIndex);
10657
10648
  if (options.onClick || options.onMouseDown || options.onMouseMove || options.onMouseOver || options.onMouseOut) {
10658
10649
  const canvasClickTarget = graph.mouselayer.rect(0, 0, graph.xpixels, graph.ypixels).attr({
@@ -40445,366 +40436,222 @@ var Table$1 = {
40445
40436
  isLintable: true
40446
40437
  };
40447
40438
 
40448
- var hubble = {exports: {}};
40449
-
40450
- (function (module, exports) {
40451
- (function webpackUniversalModuleDefinition(root, factory) {
40452
- module.exports = factory();
40453
- })(commonjsGlobal, function () {
40454
- return (/******/function (modules) {
40455
- // webpackBootstrap
40456
- /******/ // The module cache
40457
- /******/
40458
- var installedModules = {};
40459
- /******/
40460
- /******/ // The require function
40461
- /******/
40462
- function __webpack_require__(moduleId) {
40463
- /******/
40464
- /******/ // Check if module is in cache
40465
- /******/if (installedModules[moduleId]) {
40466
- /******/return installedModules[moduleId].exports;
40467
- /******/
40468
- }
40469
- /******/ // Create a new module (and put it into the cache)
40470
- /******/
40471
- var module = installedModules[moduleId] = {
40472
- /******/i: moduleId,
40473
- /******/l: false,
40474
- /******/exports: {}
40475
- /******/
40476
- };
40477
- /******/
40478
- /******/ // Execute the module function
40479
- /******/
40480
- modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
40481
- /******/
40482
- /******/ // Flag the module as loaded
40483
- /******/
40484
- module.l = true;
40485
- /******/
40486
- /******/ // Return the exports of the module
40487
- /******/
40488
- return module.exports;
40489
- /******/
40490
- }
40491
- /******/
40492
- /******/
40493
- /******/ // expose the modules object (__webpack_modules__)
40494
- /******/
40495
- __webpack_require__.m = modules;
40496
- /******/
40497
- /******/ // expose the module cache
40498
- /******/
40499
- __webpack_require__.c = installedModules;
40500
- /******/
40501
- /******/ // define getter function for harmony exports
40502
- /******/
40503
- __webpack_require__.d = function (exports, name, getter) {
40504
- /******/if (!__webpack_require__.o(exports, name)) {
40505
- /******/Object.defineProperty(exports, name, {
40506
- /******/configurable: false,
40507
- /******/enumerable: true,
40508
- /******/get: getter
40509
- /******/
40510
- });
40511
- /******/
40512
- }
40513
- /******/
40514
- };
40515
- /******/
40516
- /******/ // getDefaultExport function for compatibility with non-harmony modules
40517
- /******/
40518
- __webpack_require__.n = function (module) {
40519
- /******/var getter = module && module.__esModule ? /******/function getDefault() {
40520
- return module['default'];
40521
- } : /******/function getModuleExports() {
40522
- return module;
40523
- };
40524
- /******/
40525
- __webpack_require__.d(getter, 'a', getter);
40526
- /******/
40527
- return getter;
40528
- /******/
40529
- };
40530
- /******/
40531
- /******/ // Object.prototype.hasOwnProperty.call
40532
- /******/
40533
- __webpack_require__.o = function (object, property) {
40534
- return Object.prototype.hasOwnProperty.call(object, property);
40535
- };
40536
- /******/
40537
- /******/ // __webpack_public_path__
40538
- /******/
40539
- __webpack_require__.p = "";
40540
- /******/
40541
- /******/ // Load entry module and return exports
40542
- /******/
40543
- return __webpack_require__(__webpack_require__.s = 1);
40544
- /******/
40545
- }
40546
- /************************************************************************/
40547
- /******/([/* 0 */
40548
- /***/function (module, exports) {
40549
- var isObject = function isObject(obj) {
40550
- return obj === Object(obj);
40551
- };
40552
- var merge = function merge() {
40553
- var obj = {};
40554
- for (var i = 0; i < arguments.length; i++) {
40555
- var source = arguments[i];
40556
- if (source) {
40557
- for (var prop in source) {
40558
- obj[prop] = source[prop];
40559
- }
40560
- }
40561
- }
40562
- return obj;
40563
- };
40564
- var clone = function clone(obj) {
40565
- if (!isObject(obj)) {
40566
- return obj;
40567
- }
40568
- return Array.isArray(obj) ? obj.slice() : merge(obj);
40569
- };
40570
- module.exports = {
40571
- isObject: isObject,
40572
- merge: merge,
40573
- clone: clone
40574
- };
40575
-
40576
- /***/
40577
- }, /* 1 */
40578
- /***/function (module, exports, __webpack_require__) {
40579
- /* TODO batch *all* mutations
40580
- * idea: freeze / thaw implementations for all types
40581
- * lens constructor thaws, freeze delegates to type's freeze
40582
- */
40583
-
40584
- var util = __webpack_require__(0);
40585
- var clone = util.clone;
40586
- var isObject = util.isObject;
40587
- var merge = util.merge;
40588
- var arr = __webpack_require__(2);
40589
- var obj = __webpack_require__(3);
40590
- var str = __webpack_require__(4);
40591
-
40592
- // equivalents, without requiring it
40593
- // find the implementation to use for a given object
40594
- var dispatch = function dispatch(x) {
40595
- if (Array.isArray(x)) {
40596
- return arr;
40597
- } else if (isObject(x)) {
40598
- return obj;
40599
- } else if (typeof x === "string") {
40600
- return str;
40601
- }
40602
- };
40603
-
40604
- // This is underscore with a different name
40605
- var lens = function lens(obj) {
40606
- if (obj instanceof lens) {
40607
- return obj;
40608
- }
40609
- if (!(this instanceof lens)) {
40610
- return new lens(obj);
40611
- }
40612
- var ops = dispatch(obj);
40613
- this._wrapped = ops.thaw ? ops.thaw(obj) : obj;
40614
- };
40615
- lens.prototype.freeze = function () {
40616
- var obj = this._wrapped;
40617
- var ops = dispatch(obj);
40618
- return ops.freeze ? ops.freeze(obj) : obj;
40619
- };
40620
- lens.prototype.zoom = function (lensArr) {
40621
- if (this._zoomStack === undefined) {
40622
- this._zoomStack = [];
40623
- }
40624
- this._zoomStack.push({
40625
- zoom: lensArr,
40626
- wrapped: this._wrapped
40627
- });
40628
- this._wrapped = lens(this._wrapped).get(lensArr);
40629
- return this;
40630
- };
40631
- lens.prototype.deZoom = function () {
40632
- var frame = this._zoomStack.pop();
40633
- this._wrapped = lens(frame.wrapped).set(frame.zoom, this._wrapped).freeze();
40634
- return this;
40635
- };
40636
- lens.prototype.get = function (lensArr) {
40637
- var obj = this._wrapped;
40638
- for (var i = 0; i < lensArr.length; i++) {
40639
- obj = dispatch(obj).get(obj, lensArr[i]);
40640
- }
40641
- return obj;
40642
- };
40643
- lens.prototype.mod = function (lensArr, f) {
40644
- var obj = this._wrapped;
40645
- var newObj = clone(obj);
40646
- var ops = dispatch(obj);
40647
- if (lensArr.length === 0) {
40648
- this._wrapped = f(this._wrapped);
40649
- } else if (lensArr.length === 1) {
40650
- this._wrapped = ops.mod(newObj, lensArr[0], f);
40651
- } else {
40652
- var monocle = lensArr[0];
40653
- var shortLens = lensArr.slice(1);
40654
-
40655
- // newObj = ops.mod(obj[monocle], shortLens, f);
40656
-
40657
- newObj[monocle] = lens(obj[monocle]).mod(shortLens, f).freeze();
40658
- this._wrapped = newObj;
40659
- }
40660
- return this;
40661
- };
40662
-
40663
- // TODO - move to individual files
40664
- lens.prototype.merge = function (lensArr, props) {
40665
- this._wrapped = lens(this._wrapped).mod(lensArr, function (oldProps) {
40666
- return merge(oldProps, props);
40667
- }).freeze();
40668
- return this;
40669
- };
40670
-
40671
- // Lens must have length >= 1 or there would be nothing to return
40672
- lens.prototype.del = function (lensArr) {
40673
- var obj = this._wrapped;
40674
- var ops = dispatch(obj);
40675
- if (lensArr.length === 1) {
40676
- this._wrapped = ops.del(obj, lensArr[0]);
40677
- } else {
40678
- var monocle = lensArr[0];
40679
- var shortLens = lensArr.slice(1);
40680
- var newObj = clone(obj);
40681
- newObj[monocle] = lens(obj[monocle]).del(shortLens).freeze();
40682
- this._wrapped = newObj;
40683
- }
40684
- return this;
40685
- };
40686
- lens.prototype.set = function (lensArr, set) {
40687
- return this.mod(lensArr, function () {
40688
- return set;
40689
- });
40690
- };
40691
- module.exports = lens;
40692
-
40693
- /***/
40694
- }, /* 2 */
40695
- /***/function (module, exports) {
40696
- var get = function get(arr, monocle) {
40697
- return arr[monocle];
40698
- };
40699
- var set = function set(arr, monocle, val) {
40700
- var newArr = arr.splice();
40701
- newArr[monocle] = val;
40702
- return newArr;
40703
- };
40704
- var mod = function mod(arr, monocle, f) {
40705
- var newArr = arr.slice();
40706
- newArr[monocle] = f(arr[monocle]);
40707
- return newArr;
40708
- };
40709
- var del = function del(arr, monocle) {
40710
- var newArr = arr.slice();
40711
- newArr.splice(monocle, 1);
40712
- return newArr;
40713
- };
40714
-
40715
- /*
40716
- // Lens must point to a member of an array. We'll insert into that array.
40717
- lens.prototype.insertAt = function(lensArr, toInsert) {
40718
- var obj = this._wrapped;
40719
-
40720
- var arrLens = lensArr.slice(0, -1);
40721
- var arr = lens(obj).get(arrLens).slice(); // slice to copy
40722
-
40723
- var arrIdx = lensArr[lensArr.length-1];
40724
- arr.splice(arrIdx, 0, toInsert);
40725
- return lens(obj).set(arrLens, arr);
40726
- };
40727
-
40728
- lens.prototype.insertBefore = lens.prototype.insertAt;
40729
- lens.prototype.insertAfter = function(lensArr, toInsert) {
40730
- var newLens = lensArr.slice();
40731
- newLens[newLens.length-1] += 1;
40732
- return lens(this._wrapped).insertAt(newLens, toInsert);
40733
- };
40734
- */
40735
-
40736
- module.exports = {
40737
- get: get,
40738
- set: set,
40739
- mod: mod,
40740
- del: del
40741
- };
40742
-
40743
- /***/
40744
- }, /* 3 */
40745
- /***/function (module, exports, __webpack_require__) {
40746
- var clone = __webpack_require__(0).clone;
40747
- var get = function get(obj, monocle) {
40748
- return obj[monocle];
40749
- };
40750
- var set = function set(obj, monocle, val) {
40751
- var newObj = clone(obj);
40752
- newObj[monocle] = val;
40753
- return newObj;
40754
- };
40755
- var mod = function mod(obj, monocle, f) {
40756
- var newObj = clone(obj);
40757
- newObj[monocle] = f(obj[monocle]);
40758
- return newObj;
40759
- };
40760
- var del = function del(obj, monocle) {
40761
- var newObj = clone(obj);
40762
- delete newObj[monocle];
40763
- return newObj;
40764
- };
40765
- module.exports = {
40766
- get: get,
40767
- set: set,
40768
- mod: mod,
40769
- del: del
40770
- };
40771
-
40772
- /***/
40773
- }, /* 4 */
40774
- /***/function (module, exports) {
40775
- var get = function get(arr, monocle) {
40776
- return arr[monocle];
40777
- };
40778
- var set = function set(arr, monocle, val) {
40779
- var newArr = arr.splice();
40780
- newArr[monocle] = val;
40781
- return newArr;
40782
- };
40783
- var mod = function mod(arr, monocle, f) {
40784
- var newArr = arr.splice();
40785
- newArr[monocle] = f(arr[monocle]);
40786
- return newArr;
40787
- };
40788
- var del = function del(arr, monocle) {
40789
- var newArr = arr.slice();
40790
- newArr.splice(monocle);
40791
- return newArr;
40792
- };
40793
- module.exports = {
40794
- get: get,
40795
- set: set,
40796
- mod: mod,
40797
- del: del
40798
- };
40799
-
40800
- /***/
40801
- }
40802
- /******/])
40803
- );
40804
- });
40805
- } (hubble));
40806
-
40807
- var lens = /*@__PURE__*/getDefaultExportFromCjs(hubble.exports);
40439
+ var isObject = function isObject(obj) {
40440
+ return obj === Object(obj);
40441
+ };
40442
+ var merge = function merge() {
40443
+ var obj = {};
40444
+ for (var i = 0; i < arguments.length; i++) {
40445
+ var source = arguments[i];
40446
+ if (source) {
40447
+ for (var prop in source) {
40448
+ obj[prop] = source[prop];
40449
+ }
40450
+ }
40451
+ }
40452
+ return obj;
40453
+ };
40454
+ var clone = function clone(obj) {
40455
+ if (!isObject(obj)) {
40456
+ return obj;
40457
+ }
40458
+ return Array.isArray(obj) ? obj.slice() : merge(obj);
40459
+ };
40460
+
40461
+ /* TODO batch *all* mutations
40462
+ * idea: freeze / thaw implementations for all types
40463
+ * lens constructor thaws, freeze delegates to type's freeze
40464
+ */
40465
+
40466
+ // equivalents, without requiring it
40467
+ // find the implementation to use for a given object
40468
+ var dispatch = function dispatch(x) {
40469
+ if (Array.isArray(x)) {
40470
+ return arr;
40471
+ } else if (isObject(x)) {
40472
+ return obj;
40473
+ } else if (typeof x === "string") {
40474
+ return str;
40475
+ }
40476
+ };
40477
+
40478
+ // This is underscore with a different name
40479
+ var lens = function lens(obj) {
40480
+ if (obj instanceof lens) {
40481
+ return obj;
40482
+ }
40483
+ if (!(this instanceof lens)) {
40484
+ return new lens(obj);
40485
+ }
40486
+ var ops = dispatch(obj);
40487
+ this._wrapped = ops.thaw ? ops.thaw(obj) : obj;
40488
+ };
40489
+ lens.prototype.freeze = function () {
40490
+ var obj = this._wrapped;
40491
+ var ops = dispatch(obj);
40492
+ return ops.freeze ? ops.freeze(obj) : obj;
40493
+ };
40494
+ lens.prototype.zoom = function (lensArr) {
40495
+ if (this._zoomStack === undefined) {
40496
+ this._zoomStack = [];
40497
+ }
40498
+ this._zoomStack.push({
40499
+ zoom: lensArr,
40500
+ wrapped: this._wrapped
40501
+ });
40502
+ this._wrapped = lens(this._wrapped).get(lensArr);
40503
+ return this;
40504
+ };
40505
+ lens.prototype.deZoom = function () {
40506
+ var frame = this._zoomStack.pop();
40507
+ this._wrapped = lens(frame.wrapped).set(frame.zoom, this._wrapped).freeze();
40508
+ return this;
40509
+ };
40510
+ lens.prototype.get = function (lensArr) {
40511
+ var obj = this._wrapped;
40512
+ for (var i = 0; i < lensArr.length; i++) {
40513
+ obj = dispatch(obj).get(obj, lensArr[i]);
40514
+ }
40515
+ return obj;
40516
+ };
40517
+ lens.prototype.mod = function (lensArr, f) {
40518
+ var obj = this._wrapped;
40519
+ var newObj = clone(obj);
40520
+ var ops = dispatch(obj);
40521
+ if (lensArr.length === 0) {
40522
+ this._wrapped = f(this._wrapped);
40523
+ } else if (lensArr.length === 1) {
40524
+ this._wrapped = ops.mod(newObj, lensArr[0], f);
40525
+ } else {
40526
+ var monocle = lensArr[0];
40527
+ var shortLens = lensArr.slice(1);
40528
+
40529
+ // newObj = ops.mod(obj[monocle], shortLens, f);
40530
+
40531
+ newObj[monocle] = lens(obj[monocle]).mod(shortLens, f).freeze();
40532
+ this._wrapped = newObj;
40533
+ }
40534
+ return this;
40535
+ };
40536
+
40537
+ // TODO - move to individual files
40538
+ lens.prototype.merge = function (lensArr, props) {
40539
+ this._wrapped = lens(this._wrapped).mod(lensArr, function (oldProps) {
40540
+ return merge(oldProps, props);
40541
+ }).freeze();
40542
+ return this;
40543
+ };
40544
+
40545
+ // Lens must have length >= 1 or there would be nothing to return
40546
+ lens.prototype.del = function (lensArr) {
40547
+ var obj = this._wrapped;
40548
+ var ops = dispatch(obj);
40549
+ if (lensArr.length === 1) {
40550
+ this._wrapped = ops.del(obj, lensArr[0]);
40551
+ } else {
40552
+ var monocle = lensArr[0];
40553
+ var shortLens = lensArr.slice(1);
40554
+ var newObj = clone(obj);
40555
+ newObj[monocle] = lens(obj[monocle]).del(shortLens).freeze();
40556
+ this._wrapped = newObj;
40557
+ }
40558
+ return this;
40559
+ };
40560
+ lens.prototype.set = function (lensArr, set) {
40561
+ return this.mod(lensArr, function () {
40562
+ return set;
40563
+ });
40564
+ };
40565
+
40566
+ // ARRAY FUNCTIONS
40567
+
40568
+ const arr = {
40569
+ get: function (arr, monocle) {
40570
+ return arr[monocle];
40571
+ },
40572
+ set: function (arr, monocle, val) {
40573
+ var newArr = arr.splice();
40574
+ newArr[monocle] = val;
40575
+ return newArr;
40576
+ },
40577
+ mod: function (arr, monocle, f) {
40578
+ var newArr = arr.slice();
40579
+ newArr[monocle] = f(arr[monocle]);
40580
+ return newArr;
40581
+ },
40582
+ del: function (arr, monocle) {
40583
+ var newArr = arr.slice();
40584
+ newArr.splice(monocle, 1);
40585
+ return newArr;
40586
+ }
40587
+ };
40588
+
40589
+ /*
40590
+ // Lens must point to a member of an array. We'll insert into that array.
40591
+ lens.prototype.insertAt = function(lensArr, toInsert) {
40592
+ var obj = this._wrapped;
40593
+
40594
+ var arrLens = lensArr.slice(0, -1);
40595
+ var arr = lens(obj).get(arrLens).slice(); // slice to copy
40596
+
40597
+ var arrIdx = lensArr[lensArr.length-1];
40598
+ arr.splice(arrIdx, 0, toInsert);
40599
+ return lens(obj).set(arrLens, arr);
40600
+ };
40601
+
40602
+ lens.prototype.insertBefore = lens.prototype.insertAt;
40603
+ lens.prototype.insertAfter = function(lensArr, toInsert) {
40604
+ var newLens = lensArr.slice();
40605
+ newLens[newLens.length-1] += 1;
40606
+ return lens(this._wrapped).insertAt(newLens, toInsert);
40607
+ };
40608
+ */
40609
+
40610
+ // OBJECT FUNCTIONS
40611
+
40612
+ const obj = {
40613
+ get: function (obj, monocle) {
40614
+ return obj[monocle];
40615
+ },
40616
+ set: function (obj, monocle, val) {
40617
+ var newObj = clone(obj);
40618
+ newObj[monocle] = val;
40619
+ return newObj;
40620
+ },
40621
+ mod: function (obj, monocle, f) {
40622
+ var newObj = clone(obj);
40623
+ newObj[monocle] = f(obj[monocle]);
40624
+ return newObj;
40625
+ },
40626
+ del: function (obj, monocle) {
40627
+ var newObj = clone(obj);
40628
+ delete newObj[monocle];
40629
+ return newObj;
40630
+ }
40631
+ };
40632
+
40633
+ // STRING FUNCTIONS
40634
+
40635
+ const str = {
40636
+ get: function (arr, monocle) {
40637
+ return arr[monocle];
40638
+ },
40639
+ set: function (arr, monocle, val) {
40640
+ var newArr = arr.splice();
40641
+ newArr[monocle] = val;
40642
+ return newArr;
40643
+ },
40644
+ mod: function (arr, monocle, f) {
40645
+ var newArr = arr.splice();
40646
+ newArr[monocle] = f(arr[monocle]);
40647
+ return newArr;
40648
+ },
40649
+ del: function (arr, monocle) {
40650
+ var newArr = arr.slice();
40651
+ newArr.splice(monocle);
40652
+ return newArr;
40653
+ }
40654
+ };
40808
40655
 
40809
40656
  /* eslint-disable eqeqeq, @typescript-eslint/no-unused-vars */
40810
40657
  /*
@@ -41707,7 +41554,7 @@ const init = function init(options) {
41707
41554
 
41708
41555
  // This file is processed by a Rollup plugin (replace) to inject the production
41709
41556
  const libName = "@khanacademy/perseus";
41710
- const libVersion = "19.1.7";
41557
+ const libVersion = "19.1.8";
41711
41558
  addLibraryVersionToPerseusDebug(libName, libVersion);
41712
41559
 
41713
41560
  const apiVersion = {