useblocks 1.3.8 → 1.3.10

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 (64) hide show
  1. package/iframe/.vite/manifest.json +4 -4
  2. package/iframe/css/sandbox.css +6 -0
  3. package/iframe/{iframe-eblock.a0b8903e.html → iframe-eblock.5455e870.html} +2 -2
  4. package/iframe/{iframe.a0b8903e.html → iframe.5455e870.html} +2 -2
  5. package/iframe/js/{elMarkupHelper.C1NUEUOF.js → elMarkupHelper.Cv72GdwF.js} +90 -90
  6. package/iframe/js/{iframe-eblock.body.a0b8903e.js → iframe-eblock.body.5455e870.js} +1 -1
  7. package/iframe/js/iframe-eblock.js +2 -2
  8. package/iframe/js/{iframe.body.a0b8903e.js → iframe.body.5455e870.js} +1 -1
  9. package/iframe/js/iframe.js +2 -2
  10. package/package.json +1 -1
  11. package/runtime/react/index.js +1 -1
  12. package/static/core/{c015f53f.js → 19270609.js} +1 -1
  13. package/static/core/233f23fd.js +1 -0
  14. package/static/core/{31aad6a0.js → 2cf7ee08.js} +1 -1
  15. package/static/core/{d5cd129a.js → 32f12150.js} +1 -1
  16. package/static/core/{ffabcd69.js → 38606c7d.js} +1 -1
  17. package/static/core/{cad7dc27.js → 395f9635.js} +1 -1
  18. package/static/core/{d4aa63e7.js → 4030ef2c.js} +1 -1
  19. package/static/core/{9f12c233.js → 4274a244.js} +1 -1
  20. package/static/core/{a2fb7ae9.js → 43305d10.js} +1 -1
  21. package/static/core/{f06286dd.js → 48def854.js} +1 -1
  22. package/static/core/{64a5118e.js → 4de0fff7.js} +1 -1
  23. package/static/core/{91a91433.js → 4fec552e.js} +1 -1
  24. package/static/core/{b79eddad.js → 5a290fb6.js} +1 -1
  25. package/static/core/{e6079a68.js → 630febfd.js} +1 -1
  26. package/static/core/{3fc88c79.js → 6539262f.js} +1 -1
  27. package/static/core/{1b6e3017.js → 710be2de.js} +1 -1
  28. package/static/core/{e85778fc.js → 7774d8cb.js} +1 -1
  29. package/static/core/{4a69114d.js → 791b9022.js} +1 -1
  30. package/static/core/{d7ccd97b.js → 7a43af5d.js} +1 -1
  31. package/static/core/{addbb53c.js → 7d2c1fd4.js} +1 -1
  32. package/static/core/{e4ebcc13.js → 7da32d21.js} +1 -1
  33. package/static/core/{d5774798.js → 84c5ed0d.js} +1 -1
  34. package/static/core/{ec23adac.js → 8606910e.js} +1 -1
  35. package/static/core/{4f9f6515.js → 91017e83.js} +1 -1
  36. package/static/core/{5bf0cc25.js → 97db045b.js} +1 -1
  37. package/static/core/{851da4d1.js → 9ccecd4a.js} +1 -1
  38. package/static/core/{7a1ca179.js → 9f336cc6.js} +1 -1
  39. package/static/core/{3d73b614.js → a802b68f.js} +1 -1
  40. package/static/core/{4e869a27.js → acf08b55.js} +1 -1
  41. package/static/core/{74b30e13.js → bf6643b0.js} +1 -1
  42. package/static/core/{88ed7988.js → c24c3d6b.js} +1 -1
  43. package/static/core/{3e55fbd4.js → c41fa010.js} +1 -1
  44. package/static/core/{75b3d05d.js → c8cfd469.js} +2 -2
  45. package/static/core/{3339abc3.js → cbfe265e.js} +1 -1
  46. package/static/core/d8d10299.js +19 -0
  47. package/static/core/{2d458997.js → dd82fe37.js} +1 -1
  48. package/static/core/{f370243f.js → e0f9c94e.js} +1 -1
  49. package/static/core/{a7e83e25.js → e532cd8d.js} +1 -1
  50. package/static/core/{80f29ed0.js → e7f50492.js} +1 -1
  51. package/static/core/{55a6e3bc.js → eeba774d.js} +3 -3
  52. package/static/core/{c0f26c01.js → ef13a2d7.js} +1 -1
  53. package/static/core/{6584ba9a.js → f033fd82.js} +1 -1
  54. package/static/core/{58b98b23.js → f615b5d9.js} +2 -2
  55. package/static/core/{bd188fca.js → fe47306c.js} +1 -1
  56. package/static/umd-runtime/runtime.C1l7PfWP.js +1 -0
  57. package/{useblocks-core.a0b8903e.js → useblocks-core.5455e870.js} +43 -42
  58. package/useblocks-esm.js +12 -12
  59. package/{useblocks-po.a0b8903e.js → useblocks-po.5455e870.js} +1 -1
  60. package/useblocks.js +12 -12
  61. package/vendor/useblocks-ui-kit/package.json +1 -1
  62. package/static/core/2ca6f0ad.js +0 -19
  63. package/static/core/d67c9b4e.js +0 -2
  64. package/static/umd-runtime/runtime.B77pxBrU.js +0 -1
@@ -1 +1 @@
1
- __useblocks__.define("static/core/5bf0cc25.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js"],function(n,m,P){const x=n("./2ff39ddf.js"),u=n("./a71d1c3a.js");var d={items_per_page:"/ стр.",jump_to:"Перейти",jump_to_confirm:"подтвердить",page:"Страница",prev_page:"Назад",next_page:"Вперед",prev_5:"Предыдущие 5",next_5:"Следующие 5",prev_3:"Предыдущие 3",next_3:"Следующие 3",page_size:"размер страницы"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(r,v).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?i(Object(t),!0).forEach(function(a){b(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function b(r,e,t){return e=f(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function f(r){var e=y(r,"string");return o(e)=="symbol"?e:String(e)}function y(r,e){if(o(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e||"default");if(o(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var g=c(c({},u.commonLocale),{},{locale:"ru_RU",today:"Сегодня",now:"Сейчас",backToToday:"Текущая дата",ok:"ОК",clear:"Очистить",week:"Неделя",month:"Месяц",year:"Год",timeSelect:"Выбрать время",dateSelect:"Выбрать дату",monthSelect:"Выбрать месяц",yearSelect:"Выбрать год",decadeSelect:"Выбрать десятилетие",previousMonth:"Предыдущий месяц (PageUp)",nextMonth:"Следующий месяц (PageDown)",previousYear:"Предыдущий год (Control + left)",nextYear:"Следующий год (Control + right)",previousDecade:"Предыдущее десятилетие",nextDecade:"Следущее десятилетие",previousCentury:"Предыдущий век",nextCentury:"Следующий век"}),s={placeholder:"Выберите время",rangePlaceholder:["Время начала","Время окончания"]},p={lang:{placeholder:"Выберите дату",yearPlaceholder:"Выберите год",quarterPlaceholder:"Выберите квартал",monthPlaceholder:"Выберите месяц",weekPlaceholder:"Выберите неделю",rangePlaceholder:["Начальная дата","Конечная дата"],rangeYearPlaceholder:["Начальный год","Год окончания"],rangeMonthPlaceholder:["Начальный месяц","Конечный месяц"],rangeWeekPlaceholder:["Начальная неделя","Конечная неделя"],shortWeekDays:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],shortMonths:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],...g},timePickerLocale:{...s}},h=p,l="${label} не является типом ${type}",$={locale:"ru",Pagination:d,DatePicker:p,TimePicker:s,Calendar:h,global:{placeholder:"Пожалуйста выберите",close:"Закрыть",show:"Показать",hide:"Скрыть"},Table:{filterTitle:"Фильтр",filterConfirm:"OK",filterReset:"Сбросить",filterEmptyText:"Без фильтров",filterCheckAll:"Выбрать все элементы",filterSearchPlaceholder:"Поиск в фильтрах",emptyText:"Нет данных",selectAll:"Выбрать всё",selectInvert:"Инвертировать выбор",selectNone:"Очистить все данные",selectionAll:"Выбрать все данные",sortTitle:"Сортировка",expand:"Развернуть строку",collapse:"Свернуть строку",triggerDesc:"Нажмите для сортировки по убыванию",triggerAsc:"Нажмите для сортировки по возрастанию",cancelSort:"Нажмите, чтобы отменить сортировку"},Tour:{Next:"Далее",Previous:"Назад",Finish:"Завершить"},Modal:{okText:"OK",cancelText:"Отмена",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Отмена"},Transfer:{titles:["",""],searchPlaceholder:"Поиск",itemUnit:"элем.",itemsUnit:"элем.",remove:"Удалить",selectAll:"Выбрать все данные",deselectAll:"Очистить все данные",selectCurrent:"Выбрать текущую страницу",selectInvert:"Инвертировать выбор",removeAll:"Удалить все данные",removeCurrent:"Удалить текущую страницу"},Upload:{uploading:"Загрузка...",removeFile:"Удалить файл",uploadError:"При загрузке произошла ошибка",previewFile:"Предпросмотр файла",downloadFile:"Загрузить файл"},Empty:{description:"Нет данных"},Icon:{icon:"иконка"},Text:{edit:"Редактировать",copy:"Копировать",copied:"Скопировано",expand:"Раскрыть",collapse:"Свернуть"},Form:{optional:"(необязательно)",defaultValidateMessages:{default:"Ошибка проверки поля ${label}",required:"Пожалуйста, введите ${label}",enum:"${label} должен быть одним из [${enum}]",whitespace:"${label} не может быть пустым",date:{format:"${label} не правильный формат даты",parse:"${label} не может быть преобразовано в дату",invalid:"${label} не является корректной датой"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} должна быть ${len} символов",min:"${label} должна быть больше или равна ${min} символов",max:"${label} должна быть меньше или равна ${max} символов",range:"Длина ${label} должна быть между ${min}-${max} символами"},number:{len:"${label} должна быть равна ${len}",min:"${label} должна быть больше или равна ${min}",max:"${label} должна быть меньше или равна ${max}",range:"${label} должна быть между ${min}-${max}"},array:{len:"Количество элементов ${label} должно быть равно ${len}",min:"Количество элементов ${label} должно быть больше или равно ${min}",max:"Количество элементов ${label} должно быть меньше или равно ${max}",range:"Количество элементов ${label} должно быть между ${min} и ${max}"},pattern:{mismatch:"${label} не соответствует шаблону ${pattern}"}}},QRCode:{expired:"QR-код устарел",refresh:"Обновить"},ColorPicker:{presetEmpty:"Пустой",transparent:"Прозрачный",singleColor:"Один цвет",gradientColor:"Градиент"}};m.default=$});
1
+ __useblocks__.define("static/core/97db045b.js",["require","exports","module","static/core/2ff39ddf.js","static/core/b8eb1c3a.js"],function(n,m,P){const x=n("./2ff39ddf.js"),u=n("./b8eb1c3a.js");var d={items_per_page:"/ стр.",jump_to:"Перейти",jump_to_confirm:"подтвердить",page:"Страница",prev_page:"Назад",next_page:"Вперед",prev_5:"Предыдущие 5",next_5:"Следующие 5",prev_3:"Предыдущие 3",next_3:"Следующие 3",page_size:"размер страницы"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(r,v).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?i(Object(t),!0).forEach(function(a){b(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function b(r,e,t){return e=f(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function f(r){var e=y(r,"string");return o(e)=="symbol"?e:String(e)}function y(r,e){if(o(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e||"default");if(o(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var g=c(c({},u.commonLocale),{},{locale:"ru_RU",today:"Сегодня",now:"Сейчас",backToToday:"Текущая дата",ok:"ОК",clear:"Очистить",week:"Неделя",month:"Месяц",year:"Год",timeSelect:"Выбрать время",dateSelect:"Выбрать дату",monthSelect:"Выбрать месяц",yearSelect:"Выбрать год",decadeSelect:"Выбрать десятилетие",previousMonth:"Предыдущий месяц (PageUp)",nextMonth:"Следующий месяц (PageDown)",previousYear:"Предыдущий год (Control + left)",nextYear:"Следующий год (Control + right)",previousDecade:"Предыдущее десятилетие",nextDecade:"Следущее десятилетие",previousCentury:"Предыдущий век",nextCentury:"Следующий век"}),s={placeholder:"Выберите время",rangePlaceholder:["Время начала","Время окончания"]},p={lang:{placeholder:"Выберите дату",yearPlaceholder:"Выберите год",quarterPlaceholder:"Выберите квартал",monthPlaceholder:"Выберите месяц",weekPlaceholder:"Выберите неделю",rangePlaceholder:["Начальная дата","Конечная дата"],rangeYearPlaceholder:["Начальный год","Год окончания"],rangeMonthPlaceholder:["Начальный месяц","Конечный месяц"],rangeWeekPlaceholder:["Начальная неделя","Конечная неделя"],shortWeekDays:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],shortMonths:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],...g},timePickerLocale:{...s}},h=p,l="${label} не является типом ${type}",$={locale:"ru",Pagination:d,DatePicker:p,TimePicker:s,Calendar:h,global:{placeholder:"Пожалуйста выберите",close:"Закрыть",show:"Показать",hide:"Скрыть"},Table:{filterTitle:"Фильтр",filterConfirm:"OK",filterReset:"Сбросить",filterEmptyText:"Без фильтров",filterCheckAll:"Выбрать все элементы",filterSearchPlaceholder:"Поиск в фильтрах",emptyText:"Нет данных",selectAll:"Выбрать всё",selectInvert:"Инвертировать выбор",selectNone:"Очистить все данные",selectionAll:"Выбрать все данные",sortTitle:"Сортировка",expand:"Развернуть строку",collapse:"Свернуть строку",triggerDesc:"Нажмите для сортировки по убыванию",triggerAsc:"Нажмите для сортировки по возрастанию",cancelSort:"Нажмите, чтобы отменить сортировку"},Tour:{Next:"Далее",Previous:"Назад",Finish:"Завершить"},Modal:{okText:"OK",cancelText:"Отмена",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Отмена"},Transfer:{titles:["",""],searchPlaceholder:"Поиск",itemUnit:"элем.",itemsUnit:"элем.",remove:"Удалить",selectAll:"Выбрать все данные",deselectAll:"Очистить все данные",selectCurrent:"Выбрать текущую страницу",selectInvert:"Инвертировать выбор",removeAll:"Удалить все данные",removeCurrent:"Удалить текущую страницу"},Upload:{uploading:"Загрузка...",removeFile:"Удалить файл",uploadError:"При загрузке произошла ошибка",previewFile:"Предпросмотр файла",downloadFile:"Загрузить файл"},Empty:{description:"Нет данных"},Icon:{icon:"иконка"},Text:{edit:"Редактировать",copy:"Копировать",copied:"Скопировано",expand:"Раскрыть",collapse:"Свернуть"},Form:{optional:"(необязательно)",defaultValidateMessages:{default:"Ошибка проверки поля ${label}",required:"Пожалуйста, введите ${label}",enum:"${label} должен быть одним из [${enum}]",whitespace:"${label} не может быть пустым",date:{format:"${label} не правильный формат даты",parse:"${label} не может быть преобразовано в дату",invalid:"${label} не является корректной датой"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} должна быть ${len} символов",min:"${label} должна быть больше или равна ${min} символов",max:"${label} должна быть меньше или равна ${max} символов",range:"Длина ${label} должна быть между ${min}-${max} символами"},number:{len:"${label} должна быть равна ${len}",min:"${label} должна быть больше или равна ${min}",max:"${label} должна быть меньше или равна ${max}",range:"${label} должна быть между ${min}-${max}"},array:{len:"Количество элементов ${label} должно быть равно ${len}",min:"Количество элементов ${label} должно быть больше или равно ${min}",max:"Количество элементов ${label} должно быть меньше или равно ${max}",range:"Количество элементов ${label} должно быть между ${min} и ${max}"},pattern:{mismatch:"${label} не соответствует шаблону ${pattern}"}}},QRCode:{expired:"QR-код устарел",refresh:"Обновить"},ColorPicker:{presetEmpty:"Пустой",transparent:"Прозрачный",singleColor:"Один цвет",gradientColor:"Градиент"}};m.default=$});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/851da4d1.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js"],function(i,u,S){const x=i("./2ff39ddf.js"),d=i("./a71d1c3a.js");var m={items_per_page:"/ página",jump_to:"Ir a",jump_to_confirm:"confirmar",page:"Página",prev_page:"Página anterior",next_page:"Página siguiente",prev_5:"5 páginas previas",next_5:"5 páginas siguientes",prev_3:"3 páginas previas",next_3:"3 páginas siguientes",page_size:"tamaño de página"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function l(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function($){return Object.getOwnPropertyDescriptor(r,$).enumerable})),a.push.apply(a,n)}return a}function c(r){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?l(Object(a),!0).forEach(function(n){b(r,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(a,n))})}return r}function b(r,e,a){return e=g(e),e in r?Object.defineProperty(r,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[e]=a,r}function g(r){var e=f(r,"string");return o(e)=="symbol"?e:String(e)}function f(r,e){if(o(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var n=a.call(r,e||"default");if(o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var v=c(c({},d.commonLocale),{},{locale:"es_ES",today:"Hoy",now:"Ahora",backToToday:"Volver a hoy",ok:"Aceptar",clear:"Limpiar",week:"Semana",month:"Mes",year:"Año",timeSelect:"Seleccionar hora",dateSelect:"Seleccionar fecha",monthSelect:"Elegir un mes",yearSelect:"Elegir un año",decadeSelect:"Elegir una década",previousMonth:"Mes anterior (PageUp)",nextMonth:"Mes siguiente (PageDown)",previousYear:"Año anterior (Control + left)",nextYear:"Año siguiente (Control + right)",previousDecade:"Década anterior",nextDecade:"Década siguiente",previousCentury:"Siglo anterior",nextCentury:"Siglo siguiente"}),s={placeholder:"Seleccionar hora",rangePlaceholder:["Hora de inicio","Hora de fin"]},p={lang:{placeholder:"Seleccionar fecha",rangePlaceholder:["Fecha inicial","Fecha final"],shortWeekDays:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],shortMonths:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],...v},timePickerLocale:{...s}},y=p,t="${label} no es un ${type} válido",h={locale:"es",Pagination:m,DatePicker:p,TimePicker:s,Calendar:y,global:{placeholder:"Seleccione",close:"Cerrar",show:"Mostrar",hide:"Ocultar"},Table:{filterTitle:"Filtrar menú",filterConfirm:"Aceptar",filterReset:"Reiniciar",filterEmptyText:"Sin filtros",filterCheckAll:"Seleccionar todo",filterSearchPlaceholder:"Buscar en filtros",emptyText:"Sin datos",selectAll:"Seleccionar todo",selectInvert:"Invertir selección",selectNone:"Vacíe todo",selectionAll:"Seleccionar todos los datos",sortTitle:"Ordenar",expand:"Expandir fila",collapse:"Colapsar fila",triggerDesc:"Click para ordenar en orden descendente",triggerAsc:"Click para ordenar en orden ascendente",cancelSort:"Click para cancelar ordenamiento"},Tour:{Next:"Siguiente",Previous:"Anterior",Finish:"Finalizar"},Modal:{okText:"Aceptar",cancelText:"Cancelar",justOkText:"Aceptar"},Popconfirm:{okText:"Aceptar",cancelText:"Cancelar"},Transfer:{titles:["",""],searchPlaceholder:"Buscar aquí",itemUnit:"elemento",itemsUnit:"elementos",remove:"Eliminar",selectCurrent:"Seleccionar página actual",removeCurrent:"Eliminar página actual",selectAll:"Seleccionar todos los datos",removeAll:"Eliminar todos los datos",selectInvert:"Invertir página actual"},Upload:{uploading:"Subiendo...",removeFile:"Eliminar archivo",uploadError:"Error al subir el archivo",previewFile:"Vista previa",downloadFile:"Descargar archivo"},Empty:{description:"No hay datos"},Icon:{icon:"ícono"},Text:{edit:"Editar",copy:"Copiar",copied:"Copiado",expand:"Expandir"},Form:{optional:"(opcional)",defaultValidateMessages:{default:"Error de validación del campo ${label}",required:"Por favor, rellena ${label}",enum:"${label} debe ser uno de [${enum}]",whitespace:"${label} no puede ser un carácter en blanco",date:{format:"El formato de fecha de ${label} es inválido",parse:"${label} no se puede convertir a una fecha",invalid:"${label} es una fecha inválida"},types:{string:t,method:t,array:t,object:t,number:t,date:t,boolean:t,integer:t,float:t,regexp:t,email:t,url:t,hex:t},string:{len:"${label} debe tener ${len} caracteres",min:"${label} debe tener al menos ${min} caracteres",max:"${label} debe tener hasta ${max} caracteres",range:"${label} debe tener entre ${min}-${max} caracteres"},number:{len:"${label} debe ser igual a ${len}",min:"${label} valor mínimo es ${min}",max:"${label} valor máximo es ${max}",range:"${label} debe ser entre ${min}-${max}"},array:{len:"Debe ser ${len} ${label}",min:"Al menos ${min} ${label}",max:"Como máximo ${max} ${label}",range:"El valor de ${label} debe estar entre ${min}-${max}"},pattern:{mismatch:"${label} no coincide con el patrón ${pattern}"}}}};u.default=h});
1
+ __useblocks__.define("static/core/9ccecd4a.js",["require","exports","module","static/core/2ff39ddf.js","static/core/b8eb1c3a.js"],function(i,u,S){const x=i("./2ff39ddf.js"),d=i("./b8eb1c3a.js");var m={items_per_page:"/ página",jump_to:"Ir a",jump_to_confirm:"confirmar",page:"Página",prev_page:"Página anterior",next_page:"Página siguiente",prev_5:"5 páginas previas",next_5:"5 páginas siguientes",prev_3:"3 páginas previas",next_3:"3 páginas siguientes",page_size:"tamaño de página"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function l(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function($){return Object.getOwnPropertyDescriptor(r,$).enumerable})),a.push.apply(a,n)}return a}function c(r){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?l(Object(a),!0).forEach(function(n){b(r,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(a,n))})}return r}function b(r,e,a){return e=g(e),e in r?Object.defineProperty(r,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[e]=a,r}function g(r){var e=f(r,"string");return o(e)=="symbol"?e:String(e)}function f(r,e){if(o(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var n=a.call(r,e||"default");if(o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var v=c(c({},d.commonLocale),{},{locale:"es_ES",today:"Hoy",now:"Ahora",backToToday:"Volver a hoy",ok:"Aceptar",clear:"Limpiar",week:"Semana",month:"Mes",year:"Año",timeSelect:"Seleccionar hora",dateSelect:"Seleccionar fecha",monthSelect:"Elegir un mes",yearSelect:"Elegir un año",decadeSelect:"Elegir una década",previousMonth:"Mes anterior (PageUp)",nextMonth:"Mes siguiente (PageDown)",previousYear:"Año anterior (Control + left)",nextYear:"Año siguiente (Control + right)",previousDecade:"Década anterior",nextDecade:"Década siguiente",previousCentury:"Siglo anterior",nextCentury:"Siglo siguiente"}),s={placeholder:"Seleccionar hora",rangePlaceholder:["Hora de inicio","Hora de fin"]},p={lang:{placeholder:"Seleccionar fecha",rangePlaceholder:["Fecha inicial","Fecha final"],shortWeekDays:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],shortMonths:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],...v},timePickerLocale:{...s}},y=p,t="${label} no es un ${type} válido",h={locale:"es",Pagination:m,DatePicker:p,TimePicker:s,Calendar:y,global:{placeholder:"Seleccione",close:"Cerrar",show:"Mostrar",hide:"Ocultar"},Table:{filterTitle:"Filtrar menú",filterConfirm:"Aceptar",filterReset:"Reiniciar",filterEmptyText:"Sin filtros",filterCheckAll:"Seleccionar todo",filterSearchPlaceholder:"Buscar en filtros",emptyText:"Sin datos",selectAll:"Seleccionar todo",selectInvert:"Invertir selección",selectNone:"Vacíe todo",selectionAll:"Seleccionar todos los datos",sortTitle:"Ordenar",expand:"Expandir fila",collapse:"Colapsar fila",triggerDesc:"Click para ordenar en orden descendente",triggerAsc:"Click para ordenar en orden ascendente",cancelSort:"Click para cancelar ordenamiento"},Tour:{Next:"Siguiente",Previous:"Anterior",Finish:"Finalizar"},Modal:{okText:"Aceptar",cancelText:"Cancelar",justOkText:"Aceptar"},Popconfirm:{okText:"Aceptar",cancelText:"Cancelar"},Transfer:{titles:["",""],searchPlaceholder:"Buscar aquí",itemUnit:"elemento",itemsUnit:"elementos",remove:"Eliminar",selectCurrent:"Seleccionar página actual",removeCurrent:"Eliminar página actual",selectAll:"Seleccionar todos los datos",removeAll:"Eliminar todos los datos",selectInvert:"Invertir página actual"},Upload:{uploading:"Subiendo...",removeFile:"Eliminar archivo",uploadError:"Error al subir el archivo",previewFile:"Vista previa",downloadFile:"Descargar archivo"},Empty:{description:"No hay datos"},Icon:{icon:"ícono"},Text:{edit:"Editar",copy:"Copiar",copied:"Copiado",expand:"Expandir"},Form:{optional:"(opcional)",defaultValidateMessages:{default:"Error de validación del campo ${label}",required:"Por favor, rellena ${label}",enum:"${label} debe ser uno de [${enum}]",whitespace:"${label} no puede ser un carácter en blanco",date:{format:"El formato de fecha de ${label} es inválido",parse:"${label} no se puede convertir a una fecha",invalid:"${label} es una fecha inválida"},types:{string:t,method:t,array:t,object:t,number:t,date:t,boolean:t,integer:t,float:t,regexp:t,email:t,url:t,hex:t},string:{len:"${label} debe tener ${len} caracteres",min:"${label} debe tener al menos ${min} caracteres",max:"${label} debe tener hasta ${max} caracteres",range:"${label} debe tener entre ${min}-${max} caracteres"},number:{len:"${label} debe ser igual a ${len}",min:"${label} valor mínimo es ${min}",max:"${label} valor máximo es ${max}",range:"${label} debe ser entre ${min}-${max}"},array:{len:"Debe ser ${len} ${label}",min:"Al menos ${min} ${label}",max:"Como máximo ${max} ${label}",range:"El valor de ${label} debe estar entre ${min}-${max}"},pattern:{mismatch:"${label} no coincide con el patrón ${pattern}"}}}};u.default=h});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/7a1ca179.js",["require","exports","module","static/core/cf7d1dd7.js","static/core/a71d1c3a.js"],function(m,_,x){const u=m("./cf7d1dd7.js"),c=m("./a71d1c3a.js");var h=["link_check","image_check","spam_check"],d={optimisation:0,link_check:0,image_check:0,spam_check:0},g={link_check:"link_check_counter",image_check:"image_check_counter",spam_check:"spam_check_counter"},p={link_check:"link_check_limit",image_check:"image_check_limit",spam_check:"spam_check_limit"},S=(e,t)=>{const i=Object.values(g),n=Object.values(p);return i.some(s=>e?.[s]!==void 0)||n.some(s=>t?.[s]!==void 0)||i.some(s=>t?.[s]!==void 0)||n.some(s=>e?.[s]!==void 0)},l=(e,t,i=0)=>{const n=e?.[t];return typeof n=="number"&&!Number.isNaN(n)?n:i},k=(e,t)=>({counter:e,limit:t,disabled:t>0&&e>=t});function f({isPlugin:e,config:t,card:i}){const n=e?t.counters:i?.counters,s=e?t.limits:i?.limits??{optimization_limit:0},r=!!(t.limits&&t.counters)&&e;return{counters:n,limits:s,limitsInPlugin:r,perTypeAvailable:r&&S(n,s)}}function b(e,t){const{limits:i,limitsInPlugin:n,perTypeAvailable:s}=f(e),r=l(i,"optimization_limit",0),a={};return h.forEach(o=>{a[o]=s?k(t[o],l(i,p[o],0)):k(t.optimisation,r)}),{limitsInPlugin:n,perTypeAvailable:s,aggregateLimit:r,aggregateCounter:t.optimisation,disableFields:!s&&t.optimisation>=r&&r>0,typeLimits:a}}function I(e,t){return e.perTypeAvailable?e.typeLimits[t].disabled:e.disableFields}function O(e){const{counters:t,limitsInPlugin:i,perTypeAvailable:n}=f(e);if(!i){const r=e.card?.counters?.optimization_counter;return e.isPlugin||!r?void 0:{optimisation:r}}const s={optimisation:l(t,"optimization_counter",0)};return n&&h.forEach(r=>{s[r]=l(t,g[r],0)}),s}var y=e=>(e.statusCode!==null?e.statusCode<300&&(e.page?.secure??!0):e.type!=="invalid")?c.VALID:(e.statusCode&&e.statusCode<400||e.statusCode===200&&(e.page?.secure??!0))&&e.type!=="invalid"?c.WARNINGS:c.ERRORS,T=e=>e.statusCode!==null&&e.statusCode<300?c.VALID:e.statusCode<400&&e.statusCode>=300||e.statusCode===200&&!e.valid?c.WARNINGS:c.ERRORS,v=e=>({valid:e.filter(t=>t.status===c.VALID).length,warnings:e.filter(t=>t.status===c.WARNINGS).length,errors:e.filter(t=>t.status===c.ERRORS).length}),L=u.createIdentifier$1("optimise.checks"),N={},P={link_check:!1,image_check:!1,spam_check:!1},A={link_check:"optimizeLinksEnabled",image_check:"optimizeImagesEnabled",spam_check:"optimizeSpamAssassinEnabled"},R={link_check:"LinkCheckCount",image_check:"ImageCheckCount",spam_check:"SpamCheckCount"},j={link_check:c.optimiseApi.endpoints.editLinks,image_check:c.optimiseApi.endpoints.editImages,spam_check:c.optimiseApi.endpoints.editSpam};function C(e){return new DOMParser().parseFromString(e,"text/html")}var D={link_check:e=>{const t={},i={};return C(e).querySelectorAll("a[href]").forEach((n,s)=>{t[`link_${s}`]=n.getAttribute("href"),i[`link_${s}`]=n.textContent||""}),{data:t,texts:i}},image_check:e=>{const t={};return C(e).querySelectorAll("img").forEach((i,n)=>{t[`image_${n}`]=i.src}),{data:t,texts:{}}},spam_check:e=>({data:{html:e},texts:{}})},M={link_check:e=>!!e?.result,image_check:e=>!!e?.result,spam_check:e=>!!e?.success&&!!e.result},E=(e,t)=>Number(e)-Number(t),w={link_check:(e,t)=>{const i=[...e.result].sort((n,s)=>E(n.linkId,s.linkId)).map(n=>({...n,text:t[n.linkId],status:y(n)}));return{links:i,summary:v(i)}},image_check:e=>{const t=Object.values(e.result);t.sort((s,r)=>E(s.imageId,r.imageId));const i=t.map(s=>({...s,status:T(s)})),n=t.reduce((s,r)=>s+Math.round(r.image.bytes/1024),0);return{images:i,summary:v(i),totalKb:n}},spam_check:e=>{const t=e.result,i=!!t.report&&Object.values(t.report);return i&&i.sort((n,s)=>n.score-s.score),{...t,report:i}}};function K(e){const t=e;return t?.status===401&&t?.data?.code==="usage_limit_exceeded"}function U(e){e.dispatch(c.limitsApi.util.invalidateTags(["LimitsStats","LimitsWarnings"]))}var z=class{_container;_counters=d;_seedKey;_seedProject;_running=P;_cached;_listeners=new Set;constructor(e){this._container=e}snapshot(){const e=this._input();this._reseed(e);const t=this._cached;if(t&&t.input.config===e.config&&t.input.card===e.card&&t.counters===this._counters&&t.running===this._running)return t.snapshot;const i={limits:b(e,this._counters),running:this._running};return this._cached={input:e,counters:this._counters,running:this._running,snapshot:i},i}watch(e){const t=()=>e();this._listeners.add(t);const i=this._container.getInstance(u.CONFIG_SOURCE_ID)?.watch(t),n=c.provideCurrentProject(this._container).watch(t);return{dispose:()=>{this._listeners.delete(t),i?.dispose(),n.dispose()}}}async preflight(e,t={}){const i=this._gate(e,t);if("ok"in i)return i;const{store:n,limits:s}=i;{const{counter:r,limit:a}=s.typeLimits[e];return s.limitsInPlugin&&a>0?{ok:!0,remaining:Math.max(a-r,0)}:{ok:!0}}}async run(e,t={}){const i=this._gate(e,t);if("ok"in i)return i;const{store:n,readContent:s,entityId:r,limits:a}=i;this._countUsage(e,a);const{data:o,texts:G}=D[e](s());t.beforeRequest?.();const Y=await this._request(n,e,{entity_id:r,data:o});return this._outcome(n,e,Y,G)}_gate(e,t){const i=this._container.getInstance(u.STORE_ID);if(!i)return{ok:!1,reason:"noStore"};const n=c.getOpenEmailDocuments(this._container)?.current(),s=t.readContent??(n?()=>n.getContent():void 0);if(!s)return{ok:!1,reason:"noDocument"};if(!t.ignoreEnabledFlag&&!this._input().config[A[e]])return{ok:!1,reason:"disabled"};const r=n?.get(),a=t.entityId??r?.serverId??r?.docId;if(!a)return{ok:!1,reason:"notSaved"};const{limits:o}=this.snapshot();return I(o,e)?{ok:!1,reason:"typeLimit",type:e}:{store:i,readContent:s,entityId:a,limits:o}}_outcome(e,t,{data:i,error:n},s){if(n)return K(n)?(U(e),{ok:!1,reason:"usageLimit",type:t}):{ok:!1,reason:"failed",error:n};if(!M[t](i))return{ok:!1,reason:"failed",data:i};let r;try{r=w[t](i,s)}catch(o){return{ok:!1,reason:"failed",error:o}}this._projectId();const a=i.limit_warning&&i.limit_remaining!=null?i.limit_remaining:void 0;return{ok:!0,value:r,limitRemaining:a}}async _request(e,t,i){this._setRunning(t,!0);try{return await e.dispatch(j[t].initiate(i,{track:!1}))}catch(n){return{error:n}}finally{this._setRunning(t,!1)}}_countUsage(e,t){if(!t.limitsInPlugin)return;const i=t.perTypeAvailable?e:"optimisation",n=this._counters[i]+1;this._counters={...this._counters,[i]:n},this._notify();const s=t.perTypeAvailable?R[e]:"OptimizationCount";c.getEmitter(this._container,u.events.ON_LIMIT_ID).fire({name:s,count:n})}_setRunning(e,t){this._running={...this._running,[e]:t},this._notify()}_notify(){this._listeners.forEach(e=>e())}_input(){return{isPlugin:!0,config:this._container.getInstance(u.CONFIG_SOURCE_ID)?.get()??N,card:void 0}}_reseed(e){const t=e.card?.id;t!==this._seedProject&&(this._seedProject=t,this._seedKey=void 0,this._counters=d);const i=O(e),n=e.isPlugin?e.config.counters:i&&JSON.stringify(i);!i||n===this._seedKey||(this._seedKey=n,this._counters={...this._counters,...i})}_projectId(){const e=c.getCurrentProject(this._container).card?.id;return e!=null&&e!==""?String(e):void 0}};function F(e){return e.getOrCreateInstance(L,()=>new z(e))}Object.defineProperty(_,"OPTIMISE_LIMIT_TYPES",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_,"getOptimiseChecks",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_,"isOptimiseTypeDisabled",{enumerable:!0,get:function(){return I}})});
1
+ __useblocks__.define("static/core/9f336cc6.js",["require","exports","module","static/core/cf7d1dd7.js","static/core/b8eb1c3a.js"],function(m,_,x){const u=m("./cf7d1dd7.js"),c=m("./b8eb1c3a.js");var h=["link_check","image_check","spam_check"],d={optimisation:0,link_check:0,image_check:0,spam_check:0},g={link_check:"link_check_counter",image_check:"image_check_counter",spam_check:"spam_check_counter"},p={link_check:"link_check_limit",image_check:"image_check_limit",spam_check:"spam_check_limit"},S=(e,t)=>{const i=Object.values(g),n=Object.values(p);return i.some(s=>e?.[s]!==void 0)||n.some(s=>t?.[s]!==void 0)||i.some(s=>t?.[s]!==void 0)||n.some(s=>e?.[s]!==void 0)},l=(e,t,i=0)=>{const n=e?.[t];return typeof n=="number"&&!Number.isNaN(n)?n:i},k=(e,t)=>({counter:e,limit:t,disabled:t>0&&e>=t});function f({isPlugin:e,config:t,card:i}){const n=e?t.counters:i?.counters,s=e?t.limits:i?.limits??{optimization_limit:0},r=!!(t.limits&&t.counters)&&e;return{counters:n,limits:s,limitsInPlugin:r,perTypeAvailable:r&&S(n,s)}}function b(e,t){const{limits:i,limitsInPlugin:n,perTypeAvailable:s}=f(e),r=l(i,"optimization_limit",0),a={};return h.forEach(o=>{a[o]=s?k(t[o],l(i,p[o],0)):k(t.optimisation,r)}),{limitsInPlugin:n,perTypeAvailable:s,aggregateLimit:r,aggregateCounter:t.optimisation,disableFields:!s&&t.optimisation>=r&&r>0,typeLimits:a}}function I(e,t){return e.perTypeAvailable?e.typeLimits[t].disabled:e.disableFields}function O(e){const{counters:t,limitsInPlugin:i,perTypeAvailable:n}=f(e);if(!i){const r=e.card?.counters?.optimization_counter;return e.isPlugin||!r?void 0:{optimisation:r}}const s={optimisation:l(t,"optimization_counter",0)};return n&&h.forEach(r=>{s[r]=l(t,g[r],0)}),s}var y=e=>(e.statusCode!==null?e.statusCode<300&&(e.page?.secure??!0):e.type!=="invalid")?c.VALID:(e.statusCode&&e.statusCode<400||e.statusCode===200&&(e.page?.secure??!0))&&e.type!=="invalid"?c.WARNINGS:c.ERRORS,T=e=>e.statusCode!==null&&e.statusCode<300?c.VALID:e.statusCode<400&&e.statusCode>=300||e.statusCode===200&&!e.valid?c.WARNINGS:c.ERRORS,v=e=>({valid:e.filter(t=>t.status===c.VALID).length,warnings:e.filter(t=>t.status===c.WARNINGS).length,errors:e.filter(t=>t.status===c.ERRORS).length}),L=u.createIdentifier$1("optimise.checks"),N={},P={link_check:!1,image_check:!1,spam_check:!1},A={link_check:"optimizeLinksEnabled",image_check:"optimizeImagesEnabled",spam_check:"optimizeSpamAssassinEnabled"},R={link_check:"LinkCheckCount",image_check:"ImageCheckCount",spam_check:"SpamCheckCount"},j={link_check:c.optimiseApi.endpoints.editLinks,image_check:c.optimiseApi.endpoints.editImages,spam_check:c.optimiseApi.endpoints.editSpam};function C(e){return new DOMParser().parseFromString(e,"text/html")}var D={link_check:e=>{const t={},i={};return C(e).querySelectorAll("a[href]").forEach((n,s)=>{t[`link_${s}`]=n.getAttribute("href"),i[`link_${s}`]=n.textContent||""}),{data:t,texts:i}},image_check:e=>{const t={};return C(e).querySelectorAll("img").forEach((i,n)=>{t[`image_${n}`]=i.src}),{data:t,texts:{}}},spam_check:e=>({data:{html:e},texts:{}})},M={link_check:e=>!!e?.result,image_check:e=>!!e?.result,spam_check:e=>!!e?.success&&!!e.result},E=(e,t)=>Number(e)-Number(t),w={link_check:(e,t)=>{const i=[...e.result].sort((n,s)=>E(n.linkId,s.linkId)).map(n=>({...n,text:t[n.linkId],status:y(n)}));return{links:i,summary:v(i)}},image_check:e=>{const t=Object.values(e.result);t.sort((s,r)=>E(s.imageId,r.imageId));const i=t.map(s=>({...s,status:T(s)})),n=t.reduce((s,r)=>s+Math.round(r.image.bytes/1024),0);return{images:i,summary:v(i),totalKb:n}},spam_check:e=>{const t=e.result,i=!!t.report&&Object.values(t.report);return i&&i.sort((n,s)=>n.score-s.score),{...t,report:i}}};function K(e){const t=e;return t?.status===401&&t?.data?.code==="usage_limit_exceeded"}function U(e){e.dispatch(c.limitsApi.util.invalidateTags(["LimitsStats","LimitsWarnings"]))}var z=class{_container;_counters=d;_seedKey;_seedProject;_running=P;_cached;_listeners=new Set;constructor(e){this._container=e}snapshot(){const e=this._input();this._reseed(e);const t=this._cached;if(t&&t.input.config===e.config&&t.input.card===e.card&&t.counters===this._counters&&t.running===this._running)return t.snapshot;const i={limits:b(e,this._counters),running:this._running};return this._cached={input:e,counters:this._counters,running:this._running,snapshot:i},i}watch(e){const t=()=>e();this._listeners.add(t);const i=this._container.getInstance(u.CONFIG_SOURCE_ID)?.watch(t),n=c.provideCurrentProject(this._container).watch(t);return{dispose:()=>{this._listeners.delete(t),i?.dispose(),n.dispose()}}}async preflight(e,t={}){const i=this._gate(e,t);if("ok"in i)return i;const{store:n,limits:s}=i;{const{counter:r,limit:a}=s.typeLimits[e];return s.limitsInPlugin&&a>0?{ok:!0,remaining:Math.max(a-r,0)}:{ok:!0}}}async run(e,t={}){const i=this._gate(e,t);if("ok"in i)return i;const{store:n,readContent:s,entityId:r,limits:a}=i;this._countUsage(e,a);const{data:o,texts:G}=D[e](s());t.beforeRequest?.();const Y=await this._request(n,e,{entity_id:r,data:o});return this._outcome(n,e,Y,G)}_gate(e,t){const i=this._container.getInstance(u.STORE_ID);if(!i)return{ok:!1,reason:"noStore"};const n=c.getOpenEmailDocuments(this._container)?.current(),s=t.readContent??(n?()=>n.getContent():void 0);if(!s)return{ok:!1,reason:"noDocument"};if(!t.ignoreEnabledFlag&&!this._input().config[A[e]])return{ok:!1,reason:"disabled"};const r=n?.get(),a=t.entityId??r?.serverId??r?.docId;if(!a)return{ok:!1,reason:"notSaved"};const{limits:o}=this.snapshot();return I(o,e)?{ok:!1,reason:"typeLimit",type:e}:{store:i,readContent:s,entityId:a,limits:o}}_outcome(e,t,{data:i,error:n},s){if(n)return K(n)?(U(e),{ok:!1,reason:"usageLimit",type:t}):{ok:!1,reason:"failed",error:n};if(!M[t](i))return{ok:!1,reason:"failed",data:i};let r;try{r=w[t](i,s)}catch(o){return{ok:!1,reason:"failed",error:o}}this._projectId();const a=i.limit_warning&&i.limit_remaining!=null?i.limit_remaining:void 0;return{ok:!0,value:r,limitRemaining:a}}async _request(e,t,i){this._setRunning(t,!0);try{return await e.dispatch(j[t].initiate(i,{track:!1}))}catch(n){return{error:n}}finally{this._setRunning(t,!1)}}_countUsage(e,t){if(!t.limitsInPlugin)return;const i=t.perTypeAvailable?e:"optimisation",n=this._counters[i]+1;this._counters={...this._counters,[i]:n},this._notify();const s=t.perTypeAvailable?R[e]:"OptimizationCount";c.getEmitter(this._container,u.events.ON_LIMIT_ID).fire({name:s,count:n})}_setRunning(e,t){this._running={...this._running,[e]:t},this._notify()}_notify(){this._listeners.forEach(e=>e())}_input(){return{isPlugin:!0,config:this._container.getInstance(u.CONFIG_SOURCE_ID)?.get()??N,card:void 0}}_reseed(e){const t=e.card?.id;t!==this._seedProject&&(this._seedProject=t,this._seedKey=void 0,this._counters=d);const i=O(e),n=e.isPlugin?e.config.counters:i&&JSON.stringify(i);!i||n===this._seedKey||(this._seedKey=n,this._counters={...this._counters,...i})}_projectId(){const e=c.getCurrentProject(this._container).card?.id;return e!=null&&e!==""?String(e):void 0}};function F(e){return e.getOrCreateInstance(L,()=>new z(e))}Object.defineProperty(_,"OPTIMISE_LIMIT_TYPES",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_,"getOptimiseChecks",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_,"isOptimiseTypeDisabled",{enumerable:!0,get:function(){return I}})});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/3d73b614.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js","static/core/a7e83e25.js","dayjs"],function(l,_,b){const A=l("./2ff39ddf.js"),t=l("./a71d1c3a.js"),i=l("./a7e83e25.js");let r=l("dayjs");r=A.__toESM(r);var d=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],E=[i.GMAIL_ANNOTATION_TYPES.PRODUCT_CAROUSEL,i.GMAIL_ANNOTATION_TYPES.SINGLE_IMAGE_PREVIEW],c=n=>n;function f(n){const e=t.openDocument(n)?.get().attributes.utm_parameters;return Object.fromEntries(d.map(a=>[a,e?.[a]??""]))}function T(n,e){return n.map((a,o)=>({id:e?.cards?.[o]?.id??"",image:a.image??"",url:a.url??"",headline:a.headline??"",price:a.price??"",priceCurrency:a.priceCurrency??"",discountPercent:a.discountPercent??""}))}function O(n){return{"document.getUtm":()=>t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks")??f(n),"document.setUtm":({params:e})=>{const a=t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=Object.keys(e).filter(u=>!d.includes(u));if(o.length)return t.err("invalidArgs",`Unknown UTM marks: ${o.join(", ")}. Allowed: ${d.join(", ")}.`);const s={...f(n),...e};return t.writeEmailAttributes(t.openDocument(n),{utm_parameters:s}),t.ok(s)},"document.setAnnotations":e=>{const a=t.emailOnlyRefusal(n,"Gmail annotations");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=t.openDocument(n),s=["availabilityStarts","availabilityEnds"].find(y=>e[y]!==void 0&&!(0,r.default)(e[y]).isValid());if(s)return t.err("invalidArgs",`"${s}" must be an ISO 8601 date, for example 2026-12-31T00:00:00Z.`);if(!o)return t.noDocument();const u=T(e.cards??[],i.parseGmailAnnotations(o.getContent())),m=i.buildAnnotationsData({annotationType:e.annotationType,annotationLogo:e.logo,description:e.description,discountCode:e.discountCode,availabilityStarts:e.availabilityStarts?(0,r.default)(e.availabilityStarts):null,availabilityEnds:e.availabilityEnds?(0,r.default)(e.availabilityEnds):null,offerPageUrl:e.offerPageUrl,merchantHomepageUrl:e.merchantHomepageUrl,cards:u}),p=[...i.getAnnotationsApplyBlockers(m,c),...E.includes(e.annotationType)?i.getDiscountPercentBlockers(u,c):[]];return p.length||!i.canApplyGmailAnnotations(m)?t.err("invalidArgs",`The annotations cannot be applied: ${p.join("; ")||"required fields are empty"}.`):t.ok({changed:i.applyAnnotationsEditToDocument(o,m)})},"document.removeAnnotations":()=>{const e=t.emailOnlyRefusal(n,"Gmail annotations"),a=t.openDocument(n);return e||(t.isReadOnly(n)?t.readOnlyError():t.ok({changed:a?i.removeAnnotationsFromDocument(a):!1}))}}}_.agentFinishHandlers=O});
1
+ __useblocks__.define("static/core/a802b68f.js",["require","exports","module","static/core/2ff39ddf.js","static/core/b8eb1c3a.js","static/core/e532cd8d.js","dayjs"],function(l,_,b){const A=l("./2ff39ddf.js"),t=l("./b8eb1c3a.js"),i=l("./e532cd8d.js");let r=l("dayjs");r=A.__toESM(r);var d=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"],E=[i.GMAIL_ANNOTATION_TYPES.PRODUCT_CAROUSEL,i.GMAIL_ANNOTATION_TYPES.SINGLE_IMAGE_PREVIEW],c=n=>n;function f(n){const e=t.openDocument(n)?.get().attributes.utm_parameters;return Object.fromEntries(d.map(a=>[a,e?.[a]??""]))}function T(n,e){return n.map((a,o)=>({id:e?.cards?.[o]?.id??"",image:a.image??"",url:a.url??"",headline:a.headline??"",price:a.price??"",priceCurrency:a.priceCurrency??"",discountPercent:a.discountPercent??""}))}function O(n){return{"document.getUtm":()=>t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks")??f(n),"document.setUtm":({params:e})=>{const a=t.emailOnlyRefusal(n,"UTM marks")??t.featureRefusal(n,"utm_editor","UTM marks");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=Object.keys(e).filter(u=>!d.includes(u));if(o.length)return t.err("invalidArgs",`Unknown UTM marks: ${o.join(", ")}. Allowed: ${d.join(", ")}.`);const s={...f(n),...e};return t.writeEmailAttributes(t.openDocument(n),{utm_parameters:s}),t.ok(s)},"document.setAnnotations":e=>{const a=t.emailOnlyRefusal(n,"Gmail annotations");if(a)return a;if(t.isReadOnly(n))return t.readOnlyError();const o=t.openDocument(n),s=["availabilityStarts","availabilityEnds"].find(y=>e[y]!==void 0&&!(0,r.default)(e[y]).isValid());if(s)return t.err("invalidArgs",`"${s}" must be an ISO 8601 date, for example 2026-12-31T00:00:00Z.`);if(!o)return t.noDocument();const u=T(e.cards??[],i.parseGmailAnnotations(o.getContent())),m=i.buildAnnotationsData({annotationType:e.annotationType,annotationLogo:e.logo,description:e.description,discountCode:e.discountCode,availabilityStarts:e.availabilityStarts?(0,r.default)(e.availabilityStarts):null,availabilityEnds:e.availabilityEnds?(0,r.default)(e.availabilityEnds):null,offerPageUrl:e.offerPageUrl,merchantHomepageUrl:e.merchantHomepageUrl,cards:u}),p=[...i.getAnnotationsApplyBlockers(m,c),...E.includes(e.annotationType)?i.getDiscountPercentBlockers(u,c):[]];return p.length||!i.canApplyGmailAnnotations(m)?t.err("invalidArgs",`The annotations cannot be applied: ${p.join("; ")||"required fields are empty"}.`):t.ok({changed:i.applyAnnotationsEditToDocument(o,m)})},"document.removeAnnotations":()=>{const e=t.emailOnlyRefusal(n,"Gmail annotations"),a=t.openDocument(n);return e||(t.isReadOnly(n)?t.readOnlyError():t.ok({changed:a?i.removeAnnotationsFromDocument(a):!1}))}}}_.agentFinishHandlers=O});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/4e869a27.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/a71d1c3a.js","static/core/d4aa63e7.js"],function(c,f,P){const j=c("./2ff39ddf.js"),n=c("./cf7d1dd7.js"),t=c("./a71d1c3a.js"),p=c("./d4aa63e7.js");var I=["image/jpeg","image/png","image/jpg","image/webp","image/gif","image/svg+xml"],d=(e,i)=>({code:e,message:i}),E=e=>typeof e!="string";function _(e,i){const a=t.decodeFileNameFromUrl(i)??"image",o=p.normalizeImageFormatForDisplay(e.type);return new File([e],!o||a.includes(".")?a:`${a}.${o}`,{type:e.type||"application/octet-stream"})}async function v(e,i,a){const o=p.getImageBlobResolver(e),g=t.getEmitter(e,n.events.FILE_PROXY_EVENT_ID),r=t.getEmitter(e,n.events.PROXY_URL_EVENT_ID),u=p.canonicalImageUrlKey(i);return _(await o.resolve(u,void 0,(l,m)=>p.fetchEditorImageBlobByUrl(l,{appConfig:t.getAppConfig(e),isStandalone:t.isStandaloneRuntime(e),fireFileProxy:s=>g.fire({url:s,project:a}),fireProxyUrl:s=>r.fire({url:s,project:a})},m)),u)}async function F(e,i){const a=t.getCurrentProjectId(e),o=a===void 0?"":String(a);let g;try{g=await v(e,i,o)}catch(r){return d("downloadFailed",r instanceof Error&&r.message?r.message:"The image could not be downloaded from the URL.")}if(!I.includes(g.type))return d("unsupportedType","Only JPG, PNG, WEBP, GIF and SVG images can be uploaded.");try{const r=t.getAppConfig(e),u=await t.prepareImageForEditorUpload(g,r),l=await t.fireUploadImageEvent(t.getEmitter(e,n.events.UPLOAD_EVENT_ID),{file:u,project:o});if(l.url)return l.url;const m=t.isStandaloneRuntime(e),s=t.getCurrentUser(e).profile?.id,{dataProvider:y,usesBuiltInStorage:U}=t.buildResolvedFileManagerProviders({storageProvider:e.getInstance(n.STORAGE_PROVIDER_ID),projectId:o,restApi:n.getApi(e,t.EM_FILES_MODULES),restApiV2:t.createRestClientV2(e),i18n:t.defaultI18nContext,pathPostfix:s!==void 0&&String(s)!=="0"?String(s):"",appConfig:r,isStandalone:m,onIndexingStateChange:()=>{}});return t.shouldFallbackToBuiltInUpload(l,{isStandalone:m,targetIsOurBackend:U})?(await t.uploadFileViaDataProvider(u,y))?.url??d("uploadFailed","The image could not be uploaded."):d("uploadRejected",t.toUploadImageError(l).message)}catch(r){return d("uploadFailed",r instanceof Error&&r.message?r.message:"The image could not be uploaded.")}}f.isUploadFailure=E,f.saveImageFromUrl=F});
1
+ __useblocks__.define("static/core/acf08b55.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/b8eb1c3a.js","static/core/4030ef2c.js"],function(c,f,P){const j=c("./2ff39ddf.js"),n=c("./cf7d1dd7.js"),t=c("./b8eb1c3a.js"),p=c("./4030ef2c.js");var I=["image/jpeg","image/png","image/jpg","image/webp","image/gif","image/svg+xml"],d=(e,i)=>({code:e,message:i}),E=e=>typeof e!="string";function _(e,i){const a=t.decodeFileNameFromUrl(i)??"image",o=p.normalizeImageFormatForDisplay(e.type);return new File([e],!o||a.includes(".")?a:`${a}.${o}`,{type:e.type||"application/octet-stream"})}async function v(e,i,a){const o=p.getImageBlobResolver(e),g=t.getEmitter(e,n.events.FILE_PROXY_EVENT_ID),r=t.getEmitter(e,n.events.PROXY_URL_EVENT_ID),u=p.canonicalImageUrlKey(i);return _(await o.resolve(u,void 0,(l,m)=>p.fetchEditorImageBlobByUrl(l,{appConfig:t.getAppConfig(e),isStandalone:t.isStandaloneRuntime(e),fireFileProxy:s=>g.fire({url:s,project:a}),fireProxyUrl:s=>r.fire({url:s,project:a})},m)),u)}async function F(e,i){const a=t.getCurrentProjectId(e),o=a===void 0?"":String(a);let g;try{g=await v(e,i,o)}catch(r){return d("downloadFailed",r instanceof Error&&r.message?r.message:"The image could not be downloaded from the URL.")}if(!I.includes(g.type))return d("unsupportedType","Only JPG, PNG, WEBP, GIF and SVG images can be uploaded.");try{const r=t.getAppConfig(e),u=await t.prepareImageForEditorUpload(g,r),l=await t.fireUploadImageEvent(t.getEmitter(e,n.events.UPLOAD_EVENT_ID),{file:u,project:o});if(l.url)return l.url;const m=t.isStandaloneRuntime(e),s=t.getCurrentUser(e).profile?.id,{dataProvider:y,usesBuiltInStorage:U}=t.buildResolvedFileManagerProviders({storageProvider:e.getInstance(n.STORAGE_PROVIDER_ID),projectId:o,restApi:n.getApi(e,t.EM_FILES_MODULES),restApiV2:t.createRestClientV2(e),i18n:t.defaultI18nContext,pathPostfix:s!==void 0&&String(s)!=="0"?String(s):"",appConfig:r,isStandalone:m,onIndexingStateChange:()=>{}});return t.shouldFallbackToBuiltInUpload(l,{isStandalone:m,targetIsOurBackend:U})?(await t.uploadFileViaDataProvider(u,y))?.url??d("uploadFailed","The image could not be uploaded."):d("uploadRejected",t.toUploadImageError(l).message)}catch(r){return d("uploadFailed",r instanceof Error&&r.message?r.message:"The image could not be uploaded.")}}f.isUploadFailure=E,f.saveImageFromUrl=F});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/74b30e13.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js","static/core/3fc88c79.js"],function(o,l,m){const u=o("./2ff39ddf.js"),e=o("./a71d1c3a.js"),s=o("./3fc88c79.js");var a=["text","header","image","button","spacer","divider","list-ul","list-ol","video"],h=["1","2","3","4","1:2","2:1"],c=["productCarousel","singleImagePreview","dealAnnotation","dealCard"],t=e.Arg.element(),r="Pass a reference from element.getTree.",n=e.Arg.optional(e.Arg.string()),i="During your answer or a batch it is refused with `undoConflict`: the edits are not closed yet, and undo becomes available after the answer, so tell the user about it.",d={"document.getHtml":{description:'Returns the HTML of the open document. `output: "editor"` (default) is the markup the editor keeps, with its service attributes; `output: "email"` is the compiled email as recipients get it, closed by the plan when it has no HTML export.',args:e.Arg.object({output:e.Arg.optional(e.Arg.enum("editor","email"))})},"document.getText":{description:"Returns the plain-text version of the email as recipients get it, without markup. Closed by the plan when it has no HTML export."},"document.setHeaders":{description:"Sets the subject, the preheader (preview text after the subject) and the title of the email; omitted fields stay. The title follows the subject while they are equal. The plan can close the subject and the preheader, not the title. On the open canvas `history.undo` brings the subject and the preheader back together with the markup, but do not count on it: these fields come back for sure only when the user takes back the whole answer.",args:e.Arg.object({subject:e.Arg.optional(e.Arg.string()),preheader:e.Arg.optional(e.Arg.string()),title:e.Arg.optional(e.Arg.string())})},"document.getSettings":{description:"Returns the layout settings of the whole email: background, width, responsiveness."},"document.setSettings":{description:'Changes layout settings of the whole email; pass only the fields to change, in the form `document.getSettings` returns (for example `{ "backgroundColor": "#ffffff", "width": { "value": 600, "dim": "px" } }`). Other fields are refused: common styles go to `document.setContentStyles`. A background address that is executable or holds "<" or "-->" is refused with `invalidArgs`. Needs the open canvas and an email, not a block; `history.undo` reverts it as one step. `canvasPending: true` in the answer means the settings are written, but the canvas has not confirmed them yet.',args:e.Arg.object({settings:e.Arg.object({})})},"document.getContentStyles":{description:"Returns the common styles of the email content: text, headings, links, buttons, block, cards."},"document.setContentStyles":{description:'Changes the common styles of the email content; pass only the groups and fields to change, in the form `document.getContentStyles` returns (for example `{ "text": { "fontSize": 16 } }`). Another group, a group that is not an object or a font name with one of < > " { } ; \\ or a stray single quote is refused with `invalidArgs`; fields and Google fonts closed by the plan with `lockedByPlan`. `history.undo` does not revert it: it comes back only when the user takes back the whole answer.',args:e.Arg.object({styles:e.Arg.object({})})},"document.replaceHtml":{description:"Replaces the whole document with new HTML in one undo step. Prefer element commands for local changes: this one rewrites everything. Start from `document.getHtml` and keep its service attributes. `html` with no text, pictures or other visible elements is refused with `invalidArgs`. Closed when the plan has no code editing: use element commands then.",args:e.Arg.object({html:e.Arg.string()})},"history.undo":{description:`Undoes the last step of document edits. Fields of the email outside the undo history are not its job: common styles and UTM marks stay, and the subject and the preheader come back only on the open canvas, with the markup; all of them come back when the user takes back the whole answer. ${i}`},"history.redo":{description:`Redoes the last undone step of document edits. ${i}`},"history.listRevisions":{description:"Lists saved revisions of the open document, newest first, one page at a time: id, date, author, subject, title and `isAutosave`, without the content. Rows with `isAutosave: true` are automatic snapshots. Pass an id to `history.restoreRevision` to go back to that version. Closed by the plan when it has no revision history.",args:e.Arg.object({page:e.Arg.optional(e.Arg.number())})},"check.code":{description:"Checks the HTML of the open document and lists the problems: unclosed tags, wrong nesting, bad attributes."},"check.codeSize":{description:"Returns the code size of the email, as the editor's code size badge shows it; Gmail clips emails over 90 KB."},"block.list":{description:"Lists blocks that can be inserted into the email with block.insert. `source` picks where they come from: `project` (default) are the blocks saved in this project, in the look of the user: look there first. `gallery` are the shared ready-made blocks of the editor: use them when the project has nothing that fits. "+s.BLOCK_LIST_HINT,args:e.Arg.object(s.BLOCK_LIST_ARGS)},"check.links":{description:"Checks every link of the open email as it is now over the network and lists them with a status (valid, warnings, errors) and the HTTP code. A new email must be saved first. Paid: each call uses the plan limit."},"check.images":{description:"Checks every image of the open email as it is now over the network and lists them with a status, the HTTP code, size in kilobytes and dimensions. A new email must be saved first. Paid: each call uses the plan limit."},"check.spam":{description:"Scores the open email as it is now with SpamAssassin and lists the rules that matched, lowest weight first; a higher score means more likely spam. A new email must be saved first. Paid: each call uses the plan limit. An editor without a server has no spam check: the answer is `unavailable`."},"element.getTree":{description:"Returns the elements of the open document as a tree: each node has a reference, a kind (row, column, cell, text, image, button, link, spacer, ...) and the start of its text. Use the references in other element commands. References die when the element is deleted, the host rewrites it (undo, code editor) or the document changes; read the tree again then. `truncated: true` means part of the tree is cut: read it with `root` and a larger `depth`.",args:e.Arg.object({root:e.Arg.optional(t),depth:e.Arg.optional(e.Arg.number())})},"element.find":{description:"Finds elements in the whole document (or inside `inside`) without selecting them. All given conditions must match: `kind` (image, button, link, text, row, ...), `textContains`, and `where` on image src and alt or link href: an empty string matches a missing or empty value, other strings match by case-insensitive substring. Returns references with kind, text start and src/alt/href, at most `limit` (50 by default, up to 200), and `total`. To change many found elements in one call, pass element.setProps calls to agent.batch.",args:e.Arg.object({kind:e.Arg.optional(e.Arg.string()),textContains:e.Arg.optional(e.Arg.string()),where:e.Arg.optional(e.Arg.object({alt:e.Arg.optional(e.Arg.string()),src:e.Arg.optional(e.Arg.string()),href:e.Arg.optional(e.Arg.string())})),inside:e.Arg.optional(t),limit:e.Arg.optional(e.Arg.number())})},"text.replace":{description:'Replaces every occurrence of a phrase in the visible text of the document (or inside `inside`) in one undo step; links, image addresses, variables and code are not touched, and neither are the subject, preheader and image alt. Finds whole words by default, in any alphabet: "cat" does not touch "concat", even when part of it is bold; pass `wholeWord: false` to match inside words. Case-insensitive unless `matchCase`. A phrase split by formatting (part of it bold) is not found. Returns `replaced`, the number of replacements, and up to 5 `examples` of `{ before, after }` with some text around.',args:e.Arg.object({find:e.Arg.string(),replace:e.Arg.string(),matchCase:e.Arg.optional(e.Arg.boolean()),wholeWord:e.Arg.optional(e.Arg.boolean()),inside:e.Arg.optional(t)})},"element.get":{description:`Selects the element like a user click and returns what the inspector shows: kind, caption and settings. element.setProps takes the same setting names. ${r}`,args:e.Arg.object({element:t})},"element.select":{description:`Selects the element like a user click: the inspector opens its settings. ${r}`,args:e.Arg.object({element:t})},"ui.highlight":{description:"Outlines the element on the canvas for a while (1.5 s by default, up to 10 s) to show the user what you mean. Neither selects nor changes anything.",args:e.Arg.object({element:t,durationMs:e.Arg.optional(e.Arg.number())})},"element.setProps":{description:'Changes inspector settings of the element in one undo step: link, image source and alt, sizes, paddings, colors, fonts, visibility. Pass only the fields you change, named as element.get returns them; do not send back an address already in the email that holds a template directive: "<" in it is refused. Returns a fresh reference: the element may be rebuilt. `unchanged: true` in the answer means the document did not change: check the setting names with element.get; the value may also be the same already. A field or a new Google font closed by the plan is refused with `lockedByPlan`. An address that is executable or holds "<" or "-->", a font that is not a string or an array of strings and a font name with one of < > " { } ; \\ or a stray single quote are refused with `invalidArgs`.',args:e.Arg.object({element:t,props:e.Arg.object({})})},"element.setText":{description:"Replaces the whole text of a text, header, button or link element in one undo step, keeping its look (font, color, bold header). Plain text only: markup characters stay text, a line break becomes a new line. A cell with one text element inside takes its text too. Refused for text with a list, a picture or a variable: use text.replace. The preheader is refused with `readOnly`: it goes through document.setHeaders.",args:e.Arg.object({element:t,text:e.Arg.string()})},"row.insert":{description:'Inserts an empty row of the palette with columns before or after a row, or at the end of the document without `at`, in one undo step: "1" one column, "2" two equal, "1:2" narrow and wide, "2:1" wide and narrow, "3", "4". Returns the row and its column references; fill the columns with element.insert and place "inside". Prefer a saved block of the project (block.list, block.insert) when one fits.',args:e.Arg.object({columns:e.Arg.enum(...h),at:e.Arg.optional(e.Arg.object({element:t,place:e.Arg.enum("before","after")}))})},"document.getMarkupRules":{description:'Returns the markup rules of email rows (em="block" rows, layout tables, columns, em="atom" atoms, buttons, mobile classes). Read them once before writing rows for row.insertHtml.'},"row.insertHtml":{description:'Inserts rows you wrote in the editor markup (document.getMarkupRules): an optional <link em-class="em-font-..."> of a font on https: and <style em="styles">, then one or more <tr em="block">. Without `at` the rows go after the last row, in the given order, in one undo step. Rows are checked first: `invalidMarkup` lists the broken rules, nothing is inserted; fix and send again. Scripts, other style sheets, event handlers and executable addresses, also inside conditional comments and CSS, are cut. An <em-replace> variable is refused with `lockedByPlan` when the plan has no variables; one with "<" or ">" in `text` is a broken rule: add it with element.insertVariable. A .preheader node is refused with `lockedByPlan` when the plan closes the preheader. Returns the references of the new rows. If the open email changes meanwhile, the answer is `unavailable`. If a row after the first fails, the answer is `partialInsert`: its message names the rows that went in and the reason, the rows stay in the document as one undo step. Prefer a saved block of the project (block.list) when one fits.',args:e.Arg.object({html:e.Arg.string(),at:e.Arg.optional(e.Arg.object({element:t,place:e.Arg.enum("before","after")}))})},"element.insert":{description:`Inserts a new element of the palette (${a.join(", ")}) before or after an element, or at the end inside a row or a column, in one undo step. Returns the reference of the new element; change it with element.setProps.`,args:e.Arg.object({kind:e.Arg.enum(...a),at:e.Arg.object({element:t,place:e.Arg.enum("before","after","inside")})})},"block.insert":{description:"Inserts a block (an id from block.list, with the same `source`: `project` by default, `gallery` for a shared block) before or after a row, in one undo step; without `at` the block goes where a click on the block panel puts it. A gallery block keeps its own colors and fonts: it is not recolored to the common styles of the email. A block with a .preheader node is refused with `lockedByPlan` when the plan closes the preheader. `unavailable` means the open email changed meanwhile. Returns the reference of the new row.",args:e.Arg.object({block:e.Arg.string(),source:s.BLOCK_SOURCE_ARG,at:e.Arg.optional(e.Arg.object({element:t,place:e.Arg.enum("before","after")}))})},"element.delete":{description:`Deletes the element or the row in one undo step. Refused with \`readOnly\` when the element or something inside it is locked by the integrator, and for the preheader or a row with it: it goes through document.setHeaders. ${r}`,args:e.Arg.object({element:t})},"element.clone":{description:"Duplicates the element or the row right after it in one undo step and returns the reference of the copy.",args:e.Arg.object({element:t})},"element.move":{description:"Moves the row one place up or down in one undo step; `cannotMove` when it is already first or last.",args:e.Arg.object({element:t,direction:e.Arg.enum("up","down")})},"agent.batch":{description:'Runs up to 100 tool calls in order in one request, with all their edits in one undo step, for example element.setProps for each element found by element.find, each with its own props. Each call is checked as if called alone. Before the first call the user is asked once about all calls that need consent: if the user declines, no call runs and the answer is `declined`; a yes covers the whole batch. A call refused by a check before that window comes back in `failed` with `completed: 0`, nothing run. After that the batch stops at the first failed call: the answer is still a success, `failed` names the call and the calls before it stay done, so check `failed`. Returns the result of each finished call. To use a result in a later call of the same batch, pass `{ "$result": "0.element" }` as the value: the number of the call, then an own field of its result. A call that needs consent cannot take such a reference, because the window has to show the data: the batch is refused with `invalidArgs` in `failed`, nothing run; run the earlier calls first and write the value out in a separate batch. Tools of ui.* wait for the user and are not allowed in a batch, except ui.highlight.',args:e.Arg.object({calls:e.Arg.array(e.Arg.object({tool:e.Arg.string(),args:e.Arg.optional(e.Arg.object({}))}))})},"image.search":{description:"Searches free stock photos by keywords (the Stock tab of the image window) and returns up to 10 of them with an id, a description, the author and the size. There are no URLs: pass the chosen id to `image.pick`. An editor without a server has no stock photos: the answer is `unavailable`.",args:e.Arg.object({keywords:e.Arg.string(),orientation:e.Arg.optional(e.Arg.enum("landscape","portrait","squarish")),page:e.Arg.optional(e.Arg.number())})},"image.pick":{description:"Takes a photo found by `image.search` and returns its `url` for an image element. Reports the use to the photo service, as the image window does. Closed by the plan like `image.search`.",args:e.Arg.object({id:e.Arg.string()})},"file.upload":{description:"Downloads an image (JPG, PNG, WEBP, GIF or SVG) from a URL and stores it in the project storage the way the image window does; returns the stored image `url`. Use it for images that are not yet in the project storage.",args:e.Arg.object({url:e.Arg.string()})},"gallery.listTemplates":{description:"Lists the email templates of the gallery, one page at a time (page 1 by default; an empty list means no more pages). Use an id with document.applyTemplate. Not available in the plugin.",args:e.Arg.object({page:e.Arg.optional(e.Arg.number())})},"document.applyTemplate":{description:"Replaces the whole content of the open email with a gallery template (an id from gallery.listTemplates) in one undo step. Only the markup is taken: subject, preheader and common styles of the email stay. Not available in the plugin or for a block.",args:e.Arg.object({template:e.Arg.string()})},"project.getStyles":{description:"Returns the brand styles of the project: palette colors, fonts and social links. Use them for colors and fonts of new content. Not available in the plugin."},"document.getUtm":{description:"Returns the UTM marks added to all links when the email is exported; empty ones are empty strings."},"document.setUtm":{description:"Sets UTM marks that are added to all links when the email is exported; omitted marks stay, an empty string clears a mark. Returns all five marks after the change. `history.undo` does not revert them: they come back only when the user takes back the whole answer.",args:e.Arg.object({params:e.Arg.object({utm_source:n,utm_medium:n,utm_campaign:n,utm_term:n,utm_content:n})})},"document.setAnnotations":{description:"Writes Gmail annotations (promotions tab markup) into the email, replacing the existing ones. `annotationType` is `productCarousel` or `singleImagePreview` (needs `cards` with an image and an https link; a discount is given in percent in `discountPercent` and needs a numeric `price`), `dealAnnotation` (needs one of `description`, `discountCode`, dates) or `dealCard` (needs `description` and `offerPageUrl` or `merchantHomepageUrl`). Dates are ISO 8601 strings. Returns `changed: false` when the email already has exactly this markup.",args:e.Arg.object({annotationType:e.Arg.enum(...c),logo:n,description:n,discountCode:n,availabilityStarts:n,availabilityEnds:n,offerPageUrl:n,merchantHomepageUrl:n,cards:e.Arg.optional(e.Arg.array(e.Arg.object({image:n,url:n,headline:n,price:n,priceCurrency:n,discountPercent:n})))})},"document.removeAnnotations":{description:"Cuts the Gmail annotations markup out of the email in one undo step. Returns `changed: false` when there was none."},"history.restoreRevision":{description:'Goes back to an earlier saved version: replaces the email with a revision (markup, subject, preheader, styles). `history.undo` brings back the markup, and on the open canvas the subject and the preheader with it; styles stay from the revision. All of them come back for sure only when the user takes back the whole answer. Use it for "restore the previous version"; to take back the last edit of this session use `history.undo` instead. Take `revision` from `history.listRevisions`: the first row is normally the saved state of the email, so going back one version means the first row below it without `isAutosave`. Returns the restored `revision` with its `date` and `subject` when known and `unsaved: true`: the document stays unsaved until it is saved. Closed by the plan when it has no revision history.',args:e.Arg.object({revision:e.Arg.string()})},"variable.list":{description:"Lists the merge variables of this editor: `name` is the menu path shown to the user, `value` is the ready text with the delimiters of the sending service. Pass a `value` to element.insertVariable."},"element.insertVariable":{description:"Appends a merge variable (a `value` from variable.list) to the end of a text, header, button or link element in one undo step. It goes after the existing content: write the text first with element.setText, then add the variable; a space before it is part of that text. Refused for an element with a list or a table. Returns a reference to the element.",args:e.Arg.object({element:t,variable:e.Arg.string()})},"element.applyTypograf":{description:"Cleans typography of the text in one undo step: non-breaking spaces after short words and numbers, proper dashes and quotes. Without `element` it runs over the whole email; with the reference of a text element it runs over the whole cell of that text, like the button of the editor, so other text in the same cell changes too. Selects the element like a user click. Buttons, links and images are refused with that reference. Text locked by the integrator and the preheader stay as they are.",args:e.Arg.object({element:e.Arg.optional(t)})},"column.add":{description:'Adds an empty column at the end of a row (up to 8 columns) in one undo step; the other columns get narrower. Pass a row reference (kind "row") or any of its columns (kind "column" or "floatingBlock"). Returns the row reference and `columns`, the references of all its columns in order; fill the new one with element.insert and place "inside".',args:e.Arg.object({element:t})},"column.remove":{description:'Removes a column of a row together with its content in one undo step; the other columns get wider. Pass the column reference (kind "column" or "floatingBlock"). A row keeps at least one column. Refused with `readOnly` when the column or something inside it is locked by the integrator. Returns the row reference and `columns`.',args:e.Arg.object({element:t})},"column.swap":{description:'Swaps two columns of the same row in one undo step: content and width move together. Pass both column references (kind "column" or "floatingBlock"). Returns the row reference and `columns` in the new order.',args:e.Arg.object({element:t,with:t})},"accordion.addSection":{description:'Adds a section at the end of an accordion (kind "accordion", AMP emails) in one undo step, as a copy of its first section with the given plain `title` and `text` (markup characters stay text, a line break becomes a new line). Returns a fresh reference to the accordion, which is rebuilt, and `sections`, their count.',args:e.Arg.object({element:t,title:e.Arg.string(),text:e.Arg.optional(e.Arg.string())})},"accordion.removeSection":{description:"Removes a section of an accordion by its number (counted from 0) with its content in one undo step. An accordion keeps at least one section. Refused with `readOnly` when something inside the section is locked by the integrator. Returns a fresh reference to the accordion and `sections`, their count.",args:e.Arg.object({element:t,index:e.Arg.number()})},"export.download":{description:"Downloads the email in a format of the Export menu, as a click on it: the browser saves the file for the user. html — the code, zip — code with images, text — plain text, markdown, outlook — an .oft/.eml for Outlook, pdf, png — a picture. For an AMP email `variant` picks the AMP or the HTML version of code and text. The editor may first ask the user about a large code size. Returns when the export has started.",args:e.Arg.object({format:e.Arg.enum(...e.EXPORT_FORMATS),variant:e.Arg.optional(e.Arg.enum("html","amp"))})},"document.import":{description:"Replaces the whole open email with an imported one, as the Import menu item does with a chosen file: an .html, .htm, .eml or .zip by `url`, or `html` you pass with something to show: text, a picture or another visible element. Any other file and empty `html` are refused with `invalidArgs`: an extension in the address decides, whatever type the server answers with, and the type counts only for an address without one. A file without an email inside is refused with `importFailed`. Images of the file are uploaded to the project. One undo step.",args:e.Arg.object({url:e.Arg.optional(e.Arg.string()),html:e.Arg.optional(e.Arg.string())})},"send.testEmail":{description:"Sends the open email as it is now to up to 10 addresses, as the Send a test email window does. Without `subject` it goes with the subject of the email. Asks the user first and spends the test-send limit. An editor without a server has no test emails: the answer is `unavailable`.",args:e.Arg.object({recipients:e.Arg.array(e.Arg.string()),subject:e.Arg.optional(e.Arg.string())})}};l.AGENT_COMMAND_DETAILS=d});
1
+ __useblocks__.define("static/core/bf6643b0.js",["require","exports","module","static/core/2ff39ddf.js","static/core/b8eb1c3a.js","static/core/6539262f.js"],function(o,l,m){const u=o("./2ff39ddf.js"),e=o("./b8eb1c3a.js"),s=o("./6539262f.js");var a=["text","header","image","button","spacer","divider","list-ul","list-ol","video"],h=["1","2","3","4","1:2","2:1"],c=["productCarousel","singleImagePreview","dealAnnotation","dealCard"],t=e.Arg.element(),r="Pass a reference from element.getTree.",n=e.Arg.optional(e.Arg.string()),i="During your answer or a batch it is refused with `undoConflict`: the edits are not closed yet, and undo becomes available after the answer, so tell the user about it.",d={"document.getHtml":{description:'Returns the HTML of the open document. `output: "editor"` (default) is the markup the editor keeps, with its service attributes; `output: "email"` is the compiled email as recipients get it, closed by the plan when it has no HTML export.',args:e.Arg.object({output:e.Arg.optional(e.Arg.enum("editor","email"))})},"document.getText":{description:"Returns the plain-text version of the email as recipients get it, without markup. Closed by the plan when it has no HTML export."},"document.setHeaders":{description:"Sets the subject, the preheader (preview text after the subject) and the title of the email; omitted fields stay. The title follows the subject while they are equal. The plan can close the subject and the preheader, not the title. On the open canvas `history.undo` brings the subject and the preheader back together with the markup, but do not count on it: these fields come back for sure only when the user takes back the whole answer.",args:e.Arg.object({subject:e.Arg.optional(e.Arg.string()),preheader:e.Arg.optional(e.Arg.string()),title:e.Arg.optional(e.Arg.string())})},"document.getSettings":{description:"Returns the layout settings of the whole email: background, width, responsiveness."},"document.setSettings":{description:'Changes layout settings of the whole email; pass only the fields to change, in the form `document.getSettings` returns (for example `{ "backgroundColor": "#ffffff", "width": { "value": 600, "dim": "px" } }`). Other fields are refused: common styles go to `document.setContentStyles`. A background address that is executable or holds "<" or "-->" is refused with `invalidArgs`. Needs the open canvas and an email, not a block; `history.undo` reverts it as one step. `canvasPending: true` in the answer means the settings are written, but the canvas has not confirmed them yet.',args:e.Arg.object({settings:e.Arg.object({})})},"document.getContentStyles":{description:"Returns the common styles of the email content: text, headings, links, buttons, block, cards."},"document.setContentStyles":{description:'Changes the common styles of the email content; pass only the groups and fields to change, in the form `document.getContentStyles` returns (for example `{ "text": { "fontSize": 16 } }`). Another group, a group that is not an object or a font name with one of < > " { } ; \\ or a stray single quote is refused with `invalidArgs`; fields and Google fonts closed by the plan with `lockedByPlan`. `history.undo` does not revert it: it comes back only when the user takes back the whole answer.',args:e.Arg.object({styles:e.Arg.object({})})},"document.replaceHtml":{description:"Replaces the whole document with new HTML in one undo step. Prefer element commands for local changes: this one rewrites everything. Start from `document.getHtml` and keep its service attributes. `html` with no text, pictures or other visible elements is refused with `invalidArgs`. Closed when the plan has no code editing: use element commands then.",args:e.Arg.object({html:e.Arg.string()})},"history.undo":{description:`Undoes the last step of document edits. Fields of the email outside the undo history are not its job: common styles and UTM marks stay, and the subject and the preheader come back only on the open canvas, with the markup; all of them come back when the user takes back the whole answer. ${i}`},"history.redo":{description:`Redoes the last undone step of document edits. ${i}`},"history.listRevisions":{description:"Lists saved revisions of the open document, newest first, one page at a time: id, date, author, subject, title and `isAutosave`, without the content. Rows with `isAutosave: true` are automatic snapshots. Pass an id to `history.restoreRevision` to go back to that version. Closed by the plan when it has no revision history.",args:e.Arg.object({page:e.Arg.optional(e.Arg.number())})},"check.code":{description:"Checks the HTML of the open document and lists the problems: unclosed tags, wrong nesting, bad attributes."},"check.codeSize":{description:"Returns the code size of the email, as the editor's code size badge shows it; Gmail clips emails over 90 KB."},"block.list":{description:"Lists blocks that can be inserted into the email with block.insert. `source` picks where they come from: `project` (default) are the blocks saved in this project, in the look of the user: look there first. `gallery` are the shared ready-made blocks of the editor: use them when the project has nothing that fits. "+s.BLOCK_LIST_HINT,args:e.Arg.object(s.BLOCK_LIST_ARGS)},"check.links":{description:"Checks every link of the open email as it is now over the network and lists them with a status (valid, warnings, errors) and the HTTP code. A new email must be saved first. Paid: each call uses the plan limit."},"check.images":{description:"Checks every image of the open email as it is now over the network and lists them with a status, the HTTP code, size in kilobytes and dimensions. A new email must be saved first. Paid: each call uses the plan limit."},"check.spam":{description:"Scores the open email as it is now with SpamAssassin and lists the rules that matched, lowest weight first; a higher score means more likely spam. A new email must be saved first. Paid: each call uses the plan limit. An editor without a server has no spam check: the answer is `unavailable`."},"element.getTree":{description:"Returns the elements of the open document as a tree: each node has a reference, a kind (row, column, cell, text, image, button, link, spacer, ...) and the start of its text. Use the references in other element commands. References die when the element is deleted, the host rewrites it (undo, code editor) or the document changes; read the tree again then. `truncated: true` means part of the tree is cut: read it with `root` and a larger `depth`.",args:e.Arg.object({root:e.Arg.optional(t),depth:e.Arg.optional(e.Arg.number())})},"element.find":{description:"Finds elements in the whole document (or inside `inside`) without selecting them. All given conditions must match: `kind` (image, button, link, text, row, ...), `textContains`, and `where` on image src and alt or link href: an empty string matches a missing or empty value, other strings match by case-insensitive substring. Returns references with kind, text start and src/alt/href, at most `limit` (50 by default, up to 200), and `total`. To change many found elements in one call, pass element.setProps calls to agent.batch.",args:e.Arg.object({kind:e.Arg.optional(e.Arg.string()),textContains:e.Arg.optional(e.Arg.string()),where:e.Arg.optional(e.Arg.object({alt:e.Arg.optional(e.Arg.string()),src:e.Arg.optional(e.Arg.string()),href:e.Arg.optional(e.Arg.string())})),inside:e.Arg.optional(t),limit:e.Arg.optional(e.Arg.number())})},"text.replace":{description:'Replaces every occurrence of a phrase in the visible text of the document (or inside `inside`) in one undo step; links, image addresses, variables and code are not touched, and neither are the subject, preheader and image alt. Finds whole words by default, in any alphabet: "cat" does not touch "concat", even when part of it is bold; pass `wholeWord: false` to match inside words. Case-insensitive unless `matchCase`. A phrase split by formatting (part of it bold) is not found. Returns `replaced`, the number of replacements, and up to 5 `examples` of `{ before, after }` with some text around.',args:e.Arg.object({find:e.Arg.string(),replace:e.Arg.string(),matchCase:e.Arg.optional(e.Arg.boolean()),wholeWord:e.Arg.optional(e.Arg.boolean()),inside:e.Arg.optional(t)})},"element.get":{description:`Selects the element like a user click and returns what the inspector shows: kind, caption and settings. element.setProps takes the same setting names. ${r}`,args:e.Arg.object({element:t})},"element.select":{description:`Selects the element like a user click: the inspector opens its settings. ${r}`,args:e.Arg.object({element:t})},"ui.highlight":{description:"Outlines the element on the canvas for a while (1.5 s by default, up to 10 s) to show the user what you mean. Neither selects nor changes anything.",args:e.Arg.object({element:t,durationMs:e.Arg.optional(e.Arg.number())})},"element.setProps":{description:'Changes inspector settings of the element in one undo step: link, image source and alt, sizes, paddings, colors, fonts, visibility. Pass only the fields you change, named as element.get returns them; do not send back an address already in the email that holds a template directive: "<" in it is refused. Returns a fresh reference: the element may be rebuilt. `unchanged: true` in the answer means the document did not change: check the setting names with element.get; the value may also be the same already. A field or a new Google font closed by the plan is refused with `lockedByPlan`. An address that is executable or holds "<" or "-->", a font that is not a string or an array of strings and a font name with one of < > " { } ; \\ or a stray single quote are refused with `invalidArgs`.',args:e.Arg.object({element:t,props:e.Arg.object({})})},"element.setText":{description:"Replaces the whole text of a text, header, button or link element in one undo step, keeping its look (font, color, bold header). Plain text only: markup characters stay text, a line break becomes a new line. A cell with one text element inside takes its text too. Refused for text with a list, a picture or a variable: use text.replace. The preheader is refused with `readOnly`: it goes through document.setHeaders.",args:e.Arg.object({element:t,text:e.Arg.string()})},"row.insert":{description:'Inserts an empty row of the palette with columns before or after a row, or at the end of the document without `at`, in one undo step: "1" one column, "2" two equal, "1:2" narrow and wide, "2:1" wide and narrow, "3", "4". Returns the row and its column references; fill the columns with element.insert and place "inside". Prefer a saved block of the project (block.list, block.insert) when one fits.',args:e.Arg.object({columns:e.Arg.enum(...h),at:e.Arg.optional(e.Arg.object({element:t,place:e.Arg.enum("before","after")}))})},"document.getMarkupRules":{description:'Returns the markup rules of email rows (em="block" rows, layout tables, columns, em="atom" atoms, buttons, mobile classes). Read them once before writing rows for row.insertHtml.'},"row.insertHtml":{description:'Inserts rows you wrote in the editor markup (document.getMarkupRules): an optional <link em-class="em-font-..."> of a font on https: and <style em="styles">, then one or more <tr em="block">. Without `at` the rows go after the last row, in the given order, in one undo step. Rows are checked first: `invalidMarkup` lists the broken rules, nothing is inserted; fix and send again. Scripts, other style sheets, event handlers and executable addresses, also inside conditional comments and CSS, are cut. An <em-replace> variable is refused with `lockedByPlan` when the plan has no variables; one with "<" or ">" in `text` is a broken rule: add it with element.insertVariable. A .preheader node is refused with `lockedByPlan` when the plan closes the preheader. Returns the references of the new rows. If the open email changes meanwhile, the answer is `unavailable`. If a row after the first fails, the answer is `partialInsert`: its message names the rows that went in and the reason, the rows stay in the document as one undo step. Prefer a saved block of the project (block.list) when one fits.',args:e.Arg.object({html:e.Arg.string(),at:e.Arg.optional(e.Arg.object({element:t,place:e.Arg.enum("before","after")}))})},"element.insert":{description:`Inserts a new element of the palette (${a.join(", ")}) before or after an element, or at the end inside a row or a column, in one undo step. Returns the reference of the new element; change it with element.setProps.`,args:e.Arg.object({kind:e.Arg.enum(...a),at:e.Arg.object({element:t,place:e.Arg.enum("before","after","inside")})})},"block.insert":{description:"Inserts a block (an id from block.list, with the same `source`: `project` by default, `gallery` for a shared block) before or after a row, in one undo step; without `at` the block goes where a click on the block panel puts it. A gallery block keeps its own colors and fonts: it is not recolored to the common styles of the email. A block with a .preheader node is refused with `lockedByPlan` when the plan closes the preheader. `unavailable` means the open email changed meanwhile. Returns the reference of the new row.",args:e.Arg.object({block:e.Arg.string(),source:s.BLOCK_SOURCE_ARG,at:e.Arg.optional(e.Arg.object({element:t,place:e.Arg.enum("before","after")}))})},"element.delete":{description:`Deletes the element or the row in one undo step. Refused with \`readOnly\` when the element or something inside it is locked by the integrator, and for the preheader or a row with it: it goes through document.setHeaders. ${r}`,args:e.Arg.object({element:t})},"element.clone":{description:"Duplicates the element or the row right after it in one undo step and returns the reference of the copy.",args:e.Arg.object({element:t})},"element.move":{description:"Moves the row one place up or down in one undo step; `cannotMove` when it is already first or last.",args:e.Arg.object({element:t,direction:e.Arg.enum("up","down")})},"agent.batch":{description:'Runs up to 100 tool calls in order in one request, with all their edits in one undo step, for example element.setProps for each element found by element.find, each with its own props. Each call is checked as if called alone. Before the first call the user is asked once about all calls that need consent: if the user declines, no call runs and the answer is `declined`; a yes covers the whole batch. A call refused by a check before that window comes back in `failed` with `completed: 0`, nothing run. After that the batch stops at the first failed call: the answer is still a success, `failed` names the call and the calls before it stay done, so check `failed`. Returns the result of each finished call. To use a result in a later call of the same batch, pass `{ "$result": "0.element" }` as the value: the number of the call, then an own field of its result. A call that needs consent cannot take such a reference, because the window has to show the data: the batch is refused with `invalidArgs` in `failed`, nothing run; run the earlier calls first and write the value out in a separate batch. Tools of ui.* wait for the user and are not allowed in a batch, except ui.highlight.',args:e.Arg.object({calls:e.Arg.array(e.Arg.object({tool:e.Arg.string(),args:e.Arg.optional(e.Arg.object({}))}))})},"image.search":{description:"Searches free stock photos by keywords (the Stock tab of the image window) and returns up to 10 of them with an id, a description, the author and the size. There are no URLs: pass the chosen id to `image.pick`. An editor without a server has no stock photos: the answer is `unavailable`.",args:e.Arg.object({keywords:e.Arg.string(),orientation:e.Arg.optional(e.Arg.enum("landscape","portrait","squarish")),page:e.Arg.optional(e.Arg.number())})},"image.pick":{description:"Takes a photo found by `image.search` and returns its `url` for an image element. Reports the use to the photo service, as the image window does. Closed by the plan like `image.search`.",args:e.Arg.object({id:e.Arg.string()})},"file.upload":{description:"Downloads an image (JPG, PNG, WEBP, GIF or SVG) from a URL and stores it in the project storage the way the image window does; returns the stored image `url`. Use it for images that are not yet in the project storage.",args:e.Arg.object({url:e.Arg.string()})},"gallery.listTemplates":{description:"Lists the email templates of the gallery, one page at a time (page 1 by default; an empty list means no more pages). Use an id with document.applyTemplate. Not available in the plugin.",args:e.Arg.object({page:e.Arg.optional(e.Arg.number())})},"document.applyTemplate":{description:"Replaces the whole content of the open email with a gallery template (an id from gallery.listTemplates) in one undo step. Only the markup is taken: subject, preheader and common styles of the email stay. Not available in the plugin or for a block.",args:e.Arg.object({template:e.Arg.string()})},"project.getStyles":{description:"Returns the brand styles of the project: palette colors, fonts and social links. Use them for colors and fonts of new content. Not available in the plugin."},"document.getUtm":{description:"Returns the UTM marks added to all links when the email is exported; empty ones are empty strings."},"document.setUtm":{description:"Sets UTM marks that are added to all links when the email is exported; omitted marks stay, an empty string clears a mark. Returns all five marks after the change. `history.undo` does not revert them: they come back only when the user takes back the whole answer.",args:e.Arg.object({params:e.Arg.object({utm_source:n,utm_medium:n,utm_campaign:n,utm_term:n,utm_content:n})})},"document.setAnnotations":{description:"Writes Gmail annotations (promotions tab markup) into the email, replacing the existing ones. `annotationType` is `productCarousel` or `singleImagePreview` (needs `cards` with an image and an https link; a discount is given in percent in `discountPercent` and needs a numeric `price`), `dealAnnotation` (needs one of `description`, `discountCode`, dates) or `dealCard` (needs `description` and `offerPageUrl` or `merchantHomepageUrl`). Dates are ISO 8601 strings. Returns `changed: false` when the email already has exactly this markup.",args:e.Arg.object({annotationType:e.Arg.enum(...c),logo:n,description:n,discountCode:n,availabilityStarts:n,availabilityEnds:n,offerPageUrl:n,merchantHomepageUrl:n,cards:e.Arg.optional(e.Arg.array(e.Arg.object({image:n,url:n,headline:n,price:n,priceCurrency:n,discountPercent:n})))})},"document.removeAnnotations":{description:"Cuts the Gmail annotations markup out of the email in one undo step. Returns `changed: false` when there was none."},"history.restoreRevision":{description:'Goes back to an earlier saved version: replaces the email with a revision (markup, subject, preheader, styles). `history.undo` brings back the markup, and on the open canvas the subject and the preheader with it; styles stay from the revision. All of them come back for sure only when the user takes back the whole answer. Use it for "restore the previous version"; to take back the last edit of this session use `history.undo` instead. Take `revision` from `history.listRevisions`: the first row is normally the saved state of the email, so going back one version means the first row below it without `isAutosave`. Returns the restored `revision` with its `date` and `subject` when known and `unsaved: true`: the document stays unsaved until it is saved. Closed by the plan when it has no revision history.',args:e.Arg.object({revision:e.Arg.string()})},"variable.list":{description:"Lists the merge variables of this editor: `name` is the menu path shown to the user, `value` is the ready text with the delimiters of the sending service. Pass a `value` to element.insertVariable."},"element.insertVariable":{description:"Appends a merge variable (a `value` from variable.list) to the end of a text, header, button or link element in one undo step. It goes after the existing content: write the text first with element.setText, then add the variable; a space before it is part of that text. Refused for an element with a list or a table. Returns a reference to the element.",args:e.Arg.object({element:t,variable:e.Arg.string()})},"element.applyTypograf":{description:"Cleans typography of the text in one undo step: non-breaking spaces after short words and numbers, proper dashes and quotes. Without `element` it runs over the whole email; with the reference of a text element it runs over the whole cell of that text, like the button of the editor, so other text in the same cell changes too. Selects the element like a user click. Buttons, links and images are refused with that reference. Text locked by the integrator and the preheader stay as they are.",args:e.Arg.object({element:e.Arg.optional(t)})},"column.add":{description:'Adds an empty column at the end of a row (up to 8 columns) in one undo step; the other columns get narrower. Pass a row reference (kind "row") or any of its columns (kind "column" or "floatingBlock"). Returns the row reference and `columns`, the references of all its columns in order; fill the new one with element.insert and place "inside".',args:e.Arg.object({element:t})},"column.remove":{description:'Removes a column of a row together with its content in one undo step; the other columns get wider. Pass the column reference (kind "column" or "floatingBlock"). A row keeps at least one column. Refused with `readOnly` when the column or something inside it is locked by the integrator. Returns the row reference and `columns`.',args:e.Arg.object({element:t})},"column.swap":{description:'Swaps two columns of the same row in one undo step: content and width move together. Pass both column references (kind "column" or "floatingBlock"). Returns the row reference and `columns` in the new order.',args:e.Arg.object({element:t,with:t})},"accordion.addSection":{description:'Adds a section at the end of an accordion (kind "accordion", AMP emails) in one undo step, as a copy of its first section with the given plain `title` and `text` (markup characters stay text, a line break becomes a new line). Returns a fresh reference to the accordion, which is rebuilt, and `sections`, their count.',args:e.Arg.object({element:t,title:e.Arg.string(),text:e.Arg.optional(e.Arg.string())})},"accordion.removeSection":{description:"Removes a section of an accordion by its number (counted from 0) with its content in one undo step. An accordion keeps at least one section. Refused with `readOnly` when something inside the section is locked by the integrator. Returns a fresh reference to the accordion and `sections`, their count.",args:e.Arg.object({element:t,index:e.Arg.number()})},"export.download":{description:"Downloads the email in a format of the Export menu, as a click on it: the browser saves the file for the user. html — the code, zip — code with images, text — plain text, markdown, outlook — an .oft/.eml for Outlook, pdf, png — a picture. For an AMP email `variant` picks the AMP or the HTML version of code and text. The editor may first ask the user about a large code size. Returns when the export has started.",args:e.Arg.object({format:e.Arg.enum(...e.EXPORT_FORMATS),variant:e.Arg.optional(e.Arg.enum("html","amp"))})},"document.import":{description:"Replaces the whole open email with an imported one, as the Import menu item does with a chosen file: an .html, .htm, .eml or .zip by `url`, or `html` you pass with something to show: text, a picture or another visible element. Any other file and empty `html` are refused with `invalidArgs`: an extension in the address decides, whatever type the server answers with, and the type counts only for an address without one. A file without an email inside is refused with `importFailed`. Images of the file are uploaded to the project. One undo step.",args:e.Arg.object({url:e.Arg.optional(e.Arg.string()),html:e.Arg.optional(e.Arg.string())})},"send.testEmail":{description:"Sends the open email as it is now to up to 10 addresses, as the Send a test email window does. Without `subject` it goes with the subject of the email. Asks the user first and spends the test-send limit. An editor without a server has no test emails: the answer is `unavailable`.",args:e.Arg.object({recipients:e.Arg.array(e.Arg.string()),subject:e.Arg.optional(e.Arg.string())})}};l.AGENT_COMMAND_DETAILS=d});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/88ed7988.js",["require","exports","module","static/core/2ff39ddf.js","static/core/c015f53f.js"],function(e,t,r){const l=e("./2ff39ddf.js");var o={wordwrap:200,tables:!0,selectors:[...e("./c015f53f.js").DEFAULT_OPTIONS.selectors||[],{selector:"table",format:"dataTable"},{selector:"ul",format:"list"},{selector:"ol",format:"list"},{selector:"pre",format:"block"},{selector:"blockquote",format:"blockquote"}],baseElements:{selectors:["body","table"]},preserveNewlines:!1,longWordSplit:{forceWrapOnLimit:!1}};t.EmailTextPlainConvertOptions=o});
1
+ __useblocks__.define("static/core/c24c3d6b.js",["require","exports","module","static/core/2ff39ddf.js","static/core/19270609.js"],function(e,t,r){const l=e("./2ff39ddf.js");var o={wordwrap:200,tables:!0,selectors:[...e("./19270609.js").DEFAULT_OPTIONS.selectors||[],{selector:"table",format:"dataTable"},{selector:"ul",format:"list"},{selector:"ol",format:"list"},{selector:"pre",format:"block"},{selector:"blockquote",format:"blockquote"}],baseElements:{selectors:["body","table"]},preserveNewlines:!1,longWordSplit:{forceWrapOnLimit:!1}};t.EmailTextPlainConvertOptions=o});