@innovastudio/contentbox 1.5.65 → 1.5.67

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.65",
4
+ "version": "1.5.67",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -50,7 +50,7 @@
50
50
  "ws": "^8.13.0"
51
51
  },
52
52
  "dependencies": {
53
- "@innovastudio/contentbuilder": "^1.4.82",
53
+ "@innovastudio/contentbuilder": "^1.4.85",
54
54
  "js-beautify": "^1.14.0"
55
55
  }
56
56
  }
@@ -5840,7 +5840,7 @@ var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof w
5840
5840
 
5841
5841
  var js$2 = {exports: {}};
5842
5842
 
5843
- var src$2 = {};
5843
+ var src$1 = {};
5844
5844
 
5845
5845
  var javascript$1 = {exports: {}};
5846
5846
 
@@ -11024,9 +11024,9 @@ function style_html$2(html_source, options, js, css) {
11024
11024
  }
11025
11025
  style_html$2.defaultOptions = html_beautify$1.defaultOptions;
11026
11026
 
11027
- src$2.js = js_beautify$2;
11028
- src$2.css = css_beautify$2;
11029
- src$2.html = style_html$2;
11027
+ src$1.js = js_beautify$2;
11028
+ src$1.css = css_beautify$2;
11029
+ src$1.html = style_html$2;
11030
11030
 
11031
11031
  /*jshint node:true */
11032
11032
 
@@ -11069,7 +11069,7 @@ function get_beautify(js_beautify, css_beautify, html_beautify) {
11069
11069
 
11070
11070
  {
11071
11071
  (function(mod) {
11072
- var beautifier = src$2;
11072
+ var beautifier = src$1;
11073
11073
  beautifier.js_beautify = beautifier.js;
11074
11074
  beautifier.css_beautify = beautifier.css;
11075
11075
  beautifier.html_beautify = beautifier.html;
@@ -23685,7 +23685,7 @@ class Dom {
23685
23685
 
23686
23686
  var js$1 = {exports: {}};
23687
23687
 
23688
- var src$1 = {};
23688
+ var src = {};
23689
23689
 
23690
23690
  var javascript = {exports: {}};
23691
23691
 
@@ -28824,9 +28824,9 @@ function style_html(html_source, options, js, css) {
28824
28824
  }
28825
28825
  style_html.defaultOptions = html_beautify.defaultOptions;
28826
28826
 
28827
- src$1.js = js_beautify;
28828
- src$1.css = css_beautify;
28829
- src$1.html = style_html;
28827
+ src.js = js_beautify;
28828
+ src.css = css_beautify;
28829
+ src.html = style_html;
28830
28830
 
28831
28831
  /*jshint node:true */
28832
28832
 
@@ -28869,7 +28869,7 @@ function get_beautify(js_beautify, css_beautify, html_beautify) {
28869
28869
 
28870
28870
  {
28871
28871
  (function(mod) {
28872
- var beautifier = src$1;
28872
+ var beautifier = src;
28873
28873
  beautifier.js_beautify = beautifier.js;
28874
28874
  beautifier.css_beautify = beautifier.css;
28875
28875
  beautifier.html_beautify = beautifier.html;
@@ -92533,7 +92533,7 @@ class Lib$1 {
92533
92533
  }
92534
92534
 
92535
92535
  // import RecordRTC from 'recordrtc';
92536
-
92536
+ // import Recorder from 'opus-recorder'; // Using Recorder
92537
92537
  const dom$l = new Dom();
92538
92538
  class Dictation {
92539
92539
  constructor(opts = {}, builder) {
@@ -92967,11 +92967,17 @@ class Dictation {
92967
92967
  // track.stop();
92968
92968
  // });
92969
92969
 
92970
- // Using mediaRecorder
92971
- if (this.mediaRecorder && this.mediaRecorder.state !== 'inactive') {
92972
- this.mediaRecorder.stop();
92973
- this.localStream.getTracks().forEach(track => track.stop()); // Stop the tracks to release the resources
92974
- }
92970
+ if (this.builder.useMediaRecorder) {
92971
+ // Using mediaRecorder
92972
+ if (this.mediaRecorder && this.mediaRecorder.state !== 'inactive') {
92973
+ this.mediaRecorder.stop();
92974
+ this.localStream.getTracks().forEach(track => track.stop()); // Stop the tracks to release the resources
92975
+ }
92976
+ } /* else {
92977
+ // Using Recorder
92978
+ if(this.recorder) this.recorder.stop();
92979
+ if(this.localStream) this.localStream.getTracks().forEach(track => track.stop()); // Stop the tracks to release the resources
92980
+ } */
92975
92981
 
92976
92982
  if (this.websocket && this.websocket.readyState === WebSocket.OPEN) {
92977
92983
  this.websocket.close();
@@ -93020,30 +93026,47 @@ class Dictation {
93020
93026
  return;
93021
93027
  }
93022
93028
  const sampleRate = 16000;
93029
+ if (this.builder.useMediaRecorder) {
93030
+ // Using mediaRecorder
93031
+ navigator.mediaDevices.getUserMedia({
93032
+ audio: {
93033
+ sampleSize: 16,
93034
+ channelCount: 1,
93035
+ sampleRate: sampleRate
93036
+ }
93037
+ }).then(stream => {
93038
+ this.localStream = stream;
93039
+ this.mediaRecorder = new MediaRecorder(stream);
93040
+ this.mediaRecorder.addEventListener('dataavailable', event => {
93041
+ if (this.aborted) return;
93042
+
93043
+ // console.log(event.data);
93044
+ // if (event.data.size > 0) {
93045
+ // }
93046
+ this.websocket.send(event.data);
93047
+ });
93023
93048
 
93024
- // Using mediaRecorder
93025
- navigator.mediaDevices.getUserMedia({
93026
- audio: {
93027
- sampleSize: 16,
93028
- channelCount: 1,
93029
- sampleRate: sampleRate
93030
- }
93031
- }).then(stream => {
93032
- this.localStream = stream;
93033
- this.mediaRecorder = new MediaRecorder(stream);
93034
- this.mediaRecorder.addEventListener('dataavailable', event => {
93035
- if (this.aborted) return;
93036
-
93037
- // console.log(event.data);
93038
- // if (event.data.size > 0) {
93039
- // }
93040
- this.websocket.send(event.data);
93049
+ // this.mediaRecorder.start(1000);
93050
+ }).catch(error => {
93051
+ console.log(error);
93041
93052
  });
93042
-
93043
- // this.mediaRecorder.start(1000);
93044
- }).catch(error => {
93045
- console.log(error);
93046
- });
93053
+ } /* else {
93054
+ // Using Recorder
93055
+ this.recorder = new Recorder({
93056
+ encoderPath: this.builder.encoderPath||
93057
+ 'https://cdnjs.cloudflare.com/ajax/libs/opus-recorder/8.0.5/encoderWorker.min.js',
93058
+ leaveStreamOpen: true,
93059
+ numberOfChannels: 1,
93060
+ // OPUS options
93061
+ encoderSampleRate: sampleRate,
93062
+ streamPages: true,
93063
+ maxBuffersPerPage: 1,
93064
+ });
93065
+ this.recorder.ondataavailable = (e) => {
93066
+ if(this.aborted) return;
93067
+ this.websocket.send(e.buffer);
93068
+ };
93069
+ } */
93047
93070
 
93048
93071
  /*
93049
93072
  // Using RecordRTC
@@ -93072,25 +93095,37 @@ class Dictation {
93072
93095
  }, 2000);
93073
93096
  }
93074
93097
  let finalTranscripts = '';
93098
+ let speechTimeout;
93075
93099
  this.websocket.onmessage = event => {
93076
93100
  const message = JSON.parse(event.data);
93077
93101
  if (message.event === 'can-open-mic') {
93078
93102
  //this.recorder.startRecording(); // Using RecordRTC
93079
93103
 
93080
- this.mediaRecorder.start(1000); // Using mediaRecorder
93104
+ if (this.builder.useMediaRecorder) {
93105
+ this.mediaRecorder.start(1000); // Using mediaRecorder
93106
+ } /* else {
93107
+ this.recorder.start(); // Using Recorder
93108
+ } */
93081
93109
 
93082
93110
  // console.log('Start Dictation');
93083
93111
  this.aborted = false;
93084
93112
  }
93085
93113
  if (message.event === 'transcript-result') {
93086
- const transcripts = message.data;
93087
93114
  if (this.builder.isInProgress || this.aborted) {
93088
93115
  return;
93089
93116
  }
93090
- finalTranscripts += ' ' + transcripts;
93117
+ const transcript = message.data.channel.alternatives[0].transcript;
93118
+ if (transcript && message.data.is_final) {
93119
+ finalTranscripts += ' ' + transcript;
93120
+ }
93091
93121
  inpCommand.value = finalTranscripts;
93092
- clearTimeout(this.speechTimeout);
93093
- this.speechTimeout = setTimeout(() => {
93122
+ clearTimeout(speechTimeout);
93123
+
93124
+ // console.log('Writing..');
93125
+
93126
+ speechTimeout = setTimeout(() => {
93127
+ // console.log('Clear');
93128
+
93094
93129
  this.builder.commandText = '';
93095
93130
  finalTranscripts = '';
93096
93131
  if (this.builder.autoSendCommand) {
@@ -93191,72 +93226,51 @@ class Dictation {
93191
93226
  }
93192
93227
  }
93193
93228
 
93194
- var src = {
93195
- compareTwoStrings:compareTwoStrings,
93196
- findBestMatch:findBestMatch
93229
+ var stringSimilarity = {};
93230
+
93231
+ (function (exports) {
93232
+ Object.defineProperty(exports, "__esModule", { value: true });
93233
+ exports.stringSimilarity = void 0;
93234
+ /* global exports, Map */
93235
+ /**
93236
+ * Calculate similarity between two strings
93237
+ * @param {string} str1 First string to match
93238
+ * @param {string} str2 Second string to match
93239
+ * @param {number} [substringLength=2] Optional. Length of substring to be used in calculating similarity. Default 2.
93240
+ * @param {boolean} [caseSensitive=false] Optional. Whether you want to consider case in string matching. Default false;
93241
+ * @returns Number between 0 and 1, with 0 being a low match score.
93242
+ */
93243
+ var stringSimilarity = function (str1, str2, substringLength, caseSensitive) {
93244
+ if (substringLength === void 0) { substringLength = 2; }
93245
+ if (caseSensitive === void 0) { caseSensitive = false; }
93246
+ if (!caseSensitive) {
93247
+ str1 = str1.toLowerCase();
93248
+ str2 = str2.toLowerCase();
93249
+ }
93250
+ if (str1.length < substringLength || str2.length < substringLength)
93251
+ return 0;
93252
+ var map = new Map();
93253
+ for (var i = 0; i < str1.length - (substringLength - 1); i++) {
93254
+ var substr1 = str1.substr(i, substringLength);
93255
+ map.set(substr1, map.has(substr1) ? map.get(substr1) + 1 : 1);
93256
+ }
93257
+ var match = 0;
93258
+ for (var j = 0; j < str2.length - (substringLength - 1); j++) {
93259
+ var substr2 = str2.substr(j, substringLength);
93260
+ var count = map.has(substr2) ? map.get(substr2) : 0;
93261
+ if (count > 0) {
93262
+ map.set(substr2, count - 1);
93263
+ match++;
93264
+ }
93265
+ }
93266
+ return (match * 2) / (str1.length + str2.length - ((substringLength - 1) * 2));
93197
93267
  };
93268
+ exports.stringSimilarity = stringSimilarity;
93269
+ exports.default = exports.stringSimilarity;
93198
93270
 
93199
- function compareTwoStrings(first, second) {
93200
- first = first.replace(/\s+/g, '');
93201
- second = second.replace(/\s+/g, '');
93202
-
93203
- if (first === second) return 1; // identical or empty
93204
- if (first.length < 2 || second.length < 2) return 0; // if either is a 0-letter or 1-letter string
93205
-
93206
- let firstBigrams = new Map();
93207
- for (let i = 0; i < first.length - 1; i++) {
93208
- const bigram = first.substring(i, i + 2);
93209
- const count = firstBigrams.has(bigram)
93210
- ? firstBigrams.get(bigram) + 1
93211
- : 1;
93212
-
93213
- firstBigrams.set(bigram, count);
93214
- }
93215
- let intersectionSize = 0;
93216
- for (let i = 0; i < second.length - 1; i++) {
93217
- const bigram = second.substring(i, i + 2);
93218
- const count = firstBigrams.has(bigram)
93219
- ? firstBigrams.get(bigram)
93220
- : 0;
93221
-
93222
- if (count > 0) {
93223
- firstBigrams.set(bigram, count - 1);
93224
- intersectionSize++;
93225
- }
93226
- }
93227
-
93228
- return (2.0 * intersectionSize) / (first.length + second.length - 2);
93229
- }
93230
-
93231
- function findBestMatch(mainString, targetStrings) {
93232
- if (!areArgsValid(mainString, targetStrings)) throw new Error('Bad arguments: First argument should be a string, second should be an array of strings');
93233
-
93234
- const ratings = [];
93235
- let bestMatchIndex = 0;
93236
-
93237
- for (let i = 0; i < targetStrings.length; i++) {
93238
- const currentTargetString = targetStrings[i];
93239
- const currentRating = compareTwoStrings(mainString, currentTargetString);
93240
- ratings.push({target: currentTargetString, rating: currentRating});
93241
- if (currentRating > ratings[bestMatchIndex].rating) {
93242
- bestMatchIndex = i;
93243
- }
93244
- }
93245
-
93246
-
93247
- const bestMatch = ratings[bestMatchIndex];
93248
-
93249
- return { ratings: ratings, bestMatch: bestMatch, bestMatchIndex: bestMatchIndex };
93250
- }
93251
-
93252
- function areArgsValid(mainString, targetStrings) {
93253
- if (typeof mainString !== 'string') return false;
93254
- if (!Array.isArray(targetStrings)) return false;
93255
- if (!targetStrings.length) return false;
93256
- if (targetStrings.find( function (s) { return typeof s !== 'string'})) return false;
93257
- return true;
93258
- }
93271
+ }(stringSimilarity));
93259
93272
 
93273
+ // import stringSimilarity from 'string-similarity';
93260
93274
  class Similarity {
93261
93275
  constructor(builder) {
93262
93276
  this.builder = builder;
@@ -93286,7 +93300,7 @@ class Similarity {
93286
93300
  const normalizedCommand = command.toLowerCase();
93287
93301
  let maxSimilarity = 0;
93288
93302
  for (const cmd of list) {
93289
- const similarity = src.compareTwoStrings(normalizedCommand, cmd);
93303
+ const similarity = stringSimilarity.stringSimilarity(normalizedCommand, cmd);
93290
93304
  if (similarity > maxSimilarity) {
93291
93305
  // console.log(list)
93292
93306
  // console.log(similarity)
@@ -93911,15 +93925,18 @@ class ContentBuilder {
93911
93925
  enableDragResize: true,
93912
93926
  simpleTextSettings: false,
93913
93927
  enableColumnsPerLine: true,
93914
- /* Prompt/Command Stuff */
93928
+ /* Prompt/Command Stuff for AI Assistant */
93915
93929
  isContentBox: false,
93916
93930
  sendCommandUrl: 'http://localhost:8081/answer',
93917
93931
  // speechTranscribeUrl: 'http://192.168.1.7:8081',
93918
93932
  onlineDemo: false,
93919
- autoSendDelay: 3000,
93933
+ autoSendDelay: 4000,
93920
93934
  commandPlaceholderText: '',
93921
93935
  enableShortCommands: true,
93922
93936
  speechRecognitionLang: 'en-US',
93937
+ useMediaRecorder: true,
93938
+ // do not change
93939
+ encoderPath: '',
93923
93940
  headlineList: ['We create simple and effective designs.', 'Ultimate Experiences With Story, Emotion, And Purpose.', 'Build Anything Beautifully', 'With Less Stuff and More Compassion', 'We\'re [CompanyName]. Full stack development with a spark of creativity.', 'Transforming your digital experience with [CompanyName]. Achieve your online goals with our customized solutions.', 'Revolutionizing web development with [CompanyName]. Unleash your digital potential with our high-performance solutions.', 'Creative and Inspiring'],
93924
93941
  shortCommandList: {
93925
93942
  undo: ['undo'],
@@ -108593,6 +108610,10 @@ class Lib {
108593
108610
  description: 'If requested to add a list with numbering.'
108594
108611
  },
108595
108612
  //-----
108613
+ change_color_individual_text: {
108614
+ type: 'boolean',
108615
+ description: 'User requests to change the color of a headline, paragraph of specific element/text.'
108616
+ },
108596
108617
  change_content_dark: {
108597
108618
  type: 'boolean',
108598
108619
  description: 'If requested to change text/content color to dark/black.'
@@ -109673,7 +109694,7 @@ class Command {
109673
109694
  return;
109674
109695
  }
109675
109696
 
109676
- if (args.change_content_light) {
109697
+ if (args.change_content_light && !args.change_color_individual_text) {
109677
109698
  this.builder.editor.saveForUndo();
109678
109699
  this.builder.editor.lib.updateContentColor(activeBox, 'light');
109679
109700
  this.builder.settings.onChange();
@@ -109681,7 +109702,7 @@ class Command {
109681
109702
  return false;
109682
109703
  }
109683
109704
 
109684
- if (args.change_content_dark) {
109705
+ if (args.change_content_dark && !args.change_color_individual_text) {
109685
109706
  this.builder.editor.saveForUndo();
109686
109707
  this.builder.editor.lib.updateContentColor(activeBox, 'dark');
109687
109708
  this.builder.settings.onChange();
@@ -111253,99 +111274,132 @@ ${currentHtml}`;
111253
111274
 
111254
111275
  this.builder.settings.onChange();
111255
111276
  return false;
111256
- } else if (intent === 'move_content_left') {
111277
+ }
111278
+ /*else if(intent==='move_content_left') {
111279
+
111257
111280
  this.builder.editor.saveForUndo();
111258
- this.builder.editor.lib.moveContent(activeBox, 'left');
111259
- this.builder.settings.onChange();
111281
+ this.builder.editor.lib.moveContent(activeBox, 'left');
111282
+ this.builder.settings.onChange();
111260
111283
  return false;
111261
- } else if (intent === 'move_content_center') {
111284
+
111285
+ } else if(intent==='move_content_center') {
111286
+
111262
111287
  this.builder.editor.saveForUndo();
111263
- this.builder.editor.lib.moveContent(activeBox, 'center'); // this.builder.editor.lib.moveContent(activeBox, 'middle');
111264
-
111265
- this.builder.settings.onChange();
111288
+ this.builder.editor.lib.moveContent(activeBox, 'center');
111289
+ // this.builder.editor.lib.moveContent(activeBox, 'middle');
111290
+ this.builder.settings.onChange();
111266
111291
  return false;
111267
- } else if (intent === 'move_content_right') {
111292
+
111293
+ } else if(intent==='move_content_right') {
111294
+
111268
111295
  this.builder.editor.saveForUndo();
111269
- this.builder.editor.lib.moveContent(activeBox, 'right');
111270
- this.builder.settings.onChange();
111296
+ this.builder.editor.lib.moveContent(activeBox, 'right');
111297
+ this.builder.settings.onChange();
111271
111298
  return false;
111272
- } else if (intent === 'move_content_top') {
111299
+
111300
+ } else if(intent==='move_content_top') {
111301
+
111273
111302
  this.builder.editor.saveForUndo();
111274
- this.builder.editor.lib.moveContent(activeBox, 'top');
111275
- this.builder.settings.onChange();
111303
+ this.builder.editor.lib.moveContent(activeBox, 'top');
111304
+ this.builder.settings.onChange();
111276
111305
  return false;
111277
- } else if (intent === 'move_content_middle') {
111306
+
111307
+ } else if(intent==='move_content_middle') {
111308
+
111278
111309
  this.builder.editor.saveForUndo();
111279
- this.builder.editor.lib.moveContent(activeBox, 'middle');
111280
- this.builder.settings.onChange();
111310
+ this.builder.editor.lib.moveContent(activeBox, 'middle');
111311
+ this.builder.settings.onChange();
111281
111312
  return false;
111282
- } else if (intent === 'move_content_bottom') {
111313
+
111314
+ } else if(intent==='move_content_bottom') {
111315
+
111283
111316
  this.builder.editor.saveForUndo();
111284
- this.builder.editor.lib.moveContent(activeBox, 'bottom');
111285
- this.builder.settings.onChange();
111317
+ this.builder.editor.lib.moveContent(activeBox, 'bottom');
111318
+ this.builder.settings.onChange();
111286
111319
  return false;
111287
- } else if (intent === 'make_content_center') {
111288
- // This
111320
+
111321
+ } else if(intent==='make_content_center') { // This
111322
+
111289
111323
  this.builder.editor.saveForUndo();
111290
- this.builder.editor.lib.moveContent(activeBox, 'center');
111324
+ this.builder.editor.lib.moveContent(activeBox, 'center');
111291
111325
  this.builder.editor.lib.moveContent(activeBox, 'middle');
111292
- this.builder.settings.onChange();
111326
+ this.builder.settings.onChange();
111293
111327
  return false;
111294
- } else if (intent === 'align_content_top_left') {
111328
+
111329
+ } else if(intent==='align_content_top_left') {
111330
+
111295
111331
  this.builder.editor.saveForUndo();
111296
- this.builder.editor.lib.moveContent(activeBox, 'top');
111332
+ this.builder.editor.lib.moveContent(activeBox, 'top');
111297
111333
  this.builder.editor.lib.moveContent(activeBox, 'left');
111298
- this.builder.settings.onChange();
111334
+ this.builder.settings.onChange();
111299
111335
  return false;
111300
- } else if (intent === 'align_content_top_center') {
111336
+
111337
+ } else if(intent==='align_content_top_center') {
111338
+
111301
111339
  this.builder.editor.saveForUndo();
111302
- this.builder.editor.lib.moveContent(activeBox, 'top');
111340
+ this.builder.editor.lib.moveContent(activeBox, 'top');
111303
111341
  this.builder.editor.lib.moveContent(activeBox, 'center');
111304
- this.builder.settings.onChange();
111342
+ this.builder.settings.onChange();
111305
111343
  return false;
111306
- } else if (intent === 'align_content_top_right') {
111344
+
111345
+ } else if(intent==='align_content_top_right') {
111346
+
111307
111347
  this.builder.editor.saveForUndo();
111308
- this.builder.editor.lib.moveContent(activeBox, 'top');
111348
+ this.builder.editor.lib.moveContent(activeBox, 'top');
111309
111349
  this.builder.editor.lib.moveContent(activeBox, 'right');
111310
- this.builder.settings.onChange();
111350
+ this.builder.settings.onChange();
111311
111351
  return false;
111312
- } else if (intent === 'align_content_middle_left') {
111352
+
111353
+ } else if(intent==='align_content_middle_left') {
111354
+
111313
111355
  this.builder.editor.saveForUndo();
111314
- this.builder.editor.lib.moveContent(activeBox, 'middle');
111356
+ this.builder.editor.lib.moveContent(activeBox, 'middle');
111315
111357
  this.builder.editor.lib.moveContent(activeBox, 'left');
111316
- this.builder.settings.onChange();
111358
+ this.builder.settings.onChange();
111317
111359
  return false;
111318
- } else if (intent === 'align_content_middle_center') {
111360
+
111361
+ } else if(intent==='align_content_middle_center') {
111362
+
111319
111363
  this.builder.editor.saveForUndo();
111320
- this.builder.editor.lib.moveContent(activeBox, 'middle');
111364
+ this.builder.editor.lib.moveContent(activeBox, 'middle');
111321
111365
  this.builder.editor.lib.moveContent(activeBox, 'center');
111322
- this.builder.settings.onChange();
111366
+ this.builder.settings.onChange();
111323
111367
  return false;
111324
- } else if (intent === 'align_content_middle_right') {
111368
+
111369
+ } else if(intent==='align_content_middle_right') {
111370
+
111325
111371
  this.builder.editor.saveForUndo();
111326
- this.builder.editor.lib.moveContent(activeBox, 'middle');
111372
+ this.builder.editor.lib.moveContent(activeBox, 'middle');
111327
111373
  this.builder.editor.lib.moveContent(activeBox, 'right');
111328
- this.builder.settings.onChange();
111374
+ this.builder.settings.onChange();
111329
111375
  return false;
111330
- } else if (intent === 'align_content_bottom_left') {
111376
+
111377
+ } else if(intent==='align_content_bottom_left') {
111378
+
111331
111379
  this.builder.editor.saveForUndo();
111332
- this.builder.editor.lib.moveContent(activeBox, 'bottom');
111380
+ this.builder.editor.lib.moveContent(activeBox, 'bottom');
111333
111381
  this.builder.editor.lib.moveContent(activeBox, 'left');
111334
- this.builder.settings.onChange();
111382
+ this.builder.settings.onChange();
111335
111383
  return false;
111336
- } else if (intent === 'align_content_bottom_center') {
111384
+
111385
+ } else if(intent==='align_content_bottom_center') {
111386
+
111337
111387
  this.builder.editor.saveForUndo();
111338
- this.builder.editor.lib.moveContent(activeBox, 'bottom');
111388
+ this.builder.editor.lib.moveContent(activeBox, 'bottom');
111339
111389
  this.builder.editor.lib.moveContent(activeBox, 'center');
111340
- this.builder.settings.onChange();
111390
+ this.builder.settings.onChange();
111341
111391
  return false;
111342
- } else if (intent === 'align_content_bottom_right') {
111392
+
111393
+ } else if(intent==='align_content_bottom_right') {
111394
+
111343
111395
  this.builder.editor.saveForUndo();
111344
- this.builder.editor.lib.moveContent(activeBox, 'bottom');
111396
+ this.builder.editor.lib.moveContent(activeBox, 'bottom');
111345
111397
  this.builder.editor.lib.moveContent(activeBox, 'right');
111346
- this.builder.settings.onChange();
111398
+ this.builder.settings.onChange();
111347
111399
  return false;
111348
- } else if (intent === 'increase_space') {
111400
+
111401
+ } */
111402
+ else if (intent === 'increase_space') {
111349
111403
  let elm = this.builder.editor.activeElement;
111350
111404
 
111351
111405
  if (elm) {
@@ -115052,13 +115106,16 @@ class ContentBox {
115052
115106
  // http://localhost:8081/answer
115053
115107
  speechTranscribeUrl: '',
115054
115108
  // http://localhost:8081
115055
- autoSendDelay: 3000,
115109
+ autoSendDelay: 4000,
115056
115110
  onlineDemo: false,
115057
115111
  startAIAssistant: false,
115058
115112
  temperature: 0.6,
115059
115113
  //0.4,
115060
115114
  topP: 0.9,
115061
115115
  //0.6,
115116
+ useMediaRecorder: true,
115117
+ // do not change
115118
+ encoderPath: '',
115062
115119
  commandPlaceholderText: 'Create a section containing a short article with ideas for outdoor activities.',
115063
115120
  disclaimerAI: `The feature you're about to use utilizes AI in some of its processes.
115064
115121
  It's important to understand that AI systems have limitations.
@@ -115561,6 +115618,8 @@ Provide an engaging headline.`, 'Create a new section showcasing a photo gallery
115561
115618
  commandInfo: this.settings.commandInfo,
115562
115619
  commandPlaceholderText: this.settings.commandPlaceholderText,
115563
115620
  similarityThreshold: this.settings.similarityThreshold,
115621
+ useMediaRecorder: this.settings.useMediaRecorder,
115622
+ encoderPath: this.settings.encoderPath,
115564
115623
  container: '.is-container',
115565
115624
  page: '.is-wrapper',
115566
115625
  deleteConfirm: this.settings.deleteConfirm,