@tripetto/block-text
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Text Block 6.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var t={287:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var r=o(954),a=o(939),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="equal",e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t=this.slot;if(t instanceof r.Slots.Numeric){var e=this.parse(t,this.value);switch(this.mode){case"between":return"".concat(e," ≤ @").concat(t.id," ≤ ").concat(this.parse(t,this.to));case"not-between":return"@".concat(t.id," < ").concat(e," ").concat((0,r.pgettext)("block:text","or")," @").concat(t.id," > ").concat(this.parse(t,this.to));case"defined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","calculated"));case"undefined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","not calculated"));case"not-equal":return"@".concat(t.id," ≠ ").concat(e);case"above":case"below":case"equal":return"@".concat(t.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(e)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t,e;return(null===(t=this.slot)||void 0===t?void 0:t.label)||(null===(e=this.node)||void 0===e?void 0:e.label)},enumerable:!1,configurable:!0}),e.prototype.parse=function(t,e){var o;return(0,r.isNumberFinite)(e)?t.toString(e,(function(t,e){return r.L10n.locale.number(t,e,!1)})):(0,r.isString)(e)&&e&&(null===(o=(0,r.lookupVariable)(this,e))||void 0===o?void 0:o.label)?"@".concat(e):"\\_\\_"},e.prototype.defineEditor=function(){var t=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:text","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:text","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:text","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:text","Score is between"),value:"between"},{label:(0,r.pgettext)("block:text","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:text","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:text","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(t){switch(o.visible("defined"!==t.value&&"undefined"!==t.value),i.visible("between"===t.value||"not-between"===t.value),t.value){case"equal":o.title=(0,r.pgettext)("block:text","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:text","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:text","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:text","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:text","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:text","If score is not between")}}))]});var e=function(e,o,i){var n,l=t[e],a=t.slot,c=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:text","Use fixed number")).precision((null==a?void 0:a.precision)||0).digits((null==a?void 0:a.digits)||0).decimalSign((null==a?void 0:a.decimal)||"").thousands(!!(null==a?void 0:a.separator),(null==a?void 0:a.separator)||"").prefix((null==a?void 0:a.prefix)||"").prefixPlural((null==a?void 0:a.prefixPlural)||void 0).suffix((null==a?void 0:a.suffix)||"").suffixPlural((null==a?void 0:a.suffixPlural)||void 0).autoFocus("value"===e).escape(t.editor.close).enter((function(){return("between"!==t.mode&&"not-between"!==t.mode||"to"===e)&&t.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value)})),s=(0,r.populateVariables)(t,(function(t){return t instanceof r.Slots.Number||t instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(n=t.slot)||void 0===n?void 0:n.id),d=new r.Forms.Dropdown(s,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value||"")}));return t.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Number"),value:"number"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===s.length}],(0,r.isString)(l)?"variable":"number").on((function(t){c.visible("number"===t.value),d.visible("variable"===t.value),c.isObservable&&c.focus()})),c,d]}).visible(i)},o=e("value",(0,r.pgettext)("block:text","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=e("to",(0,r.pgettext)("block:text","And"),"between"===this.mode||"not-between"===this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"value",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"to",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"".concat("@tripetto/block-text",":score"),version:"6.0.0",icon:a.default,get label(){return(0,r.pgettext)("block:text","Verify score")}})],e)}(r.ConditionBlock);e.ScoreCondition=c},789:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var r=o(954),a=o(110),c=o(537),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="exact",e}return n(e,t),Object.defineProperty(e.prototype,"block",{get:function(){var t;return(null===(t=this.node)||void 0===t?void 0:t.block)instanceof a.Text&&this.node.block||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t,e,o=this;if(this.slot instanceof r.Slots.Text){var i=((0,r.isVariable)(this.match)?(null===(t=(0,r.lookupVariable)(this,this.match))||void 0===t?void 0:t.label)&&"@".concat(this.match):this.match&&((e=(0,r.makeMarkdownSafe)(this.match))&&("contains"===o.mode||"not-contains"===o.mode||"starts"===o.mode||"ends"===o.mode)&&"_".concat(e,"_")||e))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return"@".concat(this.slot.id," ").concat("not-exact"===this.mode?"≠":"="," ").concat(i);case"contains":case"not-contains":case"starts":case"ends":return"@".concat(this.slot.id," ").concat("not-contains"===this.mode?(0,r.pgettext)("block:text","does not contain"):"starts"===this.mode?(0,r.pgettext)("block:text","starts with"):"ends"===this.mode?(0,r.pgettext)("block:text","ends with"):(0,r.pgettext)("block:text","contains")," ").concat(i);case"defined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","not empty"));case"undefined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","empty"))}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t;return null===(t=this.node)||void 0===t?void 0:t.label},enumerable:!1,configurable:!0}),e.prototype.defineEditor=function(){var t,e,o=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text matches"),value:"exact"},{label:(0,r.pgettext)("block:text","Text does not match"),value:"not-exact"},{label:(0,r.pgettext)("block:text","Text contains"),value:"contains"},{label:(0,r.pgettext)("block:text","Text does not contain"),value:"not-contains"},{label:(0,r.pgettext)("block:text","Text starts with"),value:"starts"},{label:(0,r.pgettext)("block:text","Text ends with"),value:"ends"},{label:(0,r.pgettext)("block:text","Text is not empty"),value:"defined"},{label:(0,r.pgettext)("block:text","Text is empty"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","exact")).on((function(t){switch(c.visible("defined"!==t.value&&"undefined"!==t.value),t.value){case"exact":c.title=(0,r.pgettext)("block:text","If text matches");break;case"not-exact":c.title=(0,r.pgettext)("block:text","If text does not match");break;case"contains":c.title=(0,r.pgettext)("block:text","If text contains");break;case"not-contains":c.title=(0,r.pgettext)("block:text","If text does not contain");break;case"starts":c.title=(0,r.pgettext)("block:text","If text starts with");break;case"ends":c.title=(0,r.pgettext)("block:text","If text ends with")}l.isInteractable&&l.focus()}))]});var i=this.match&&(0,r.isVariable)(this.match)||!1,n=(0,r.populateVariables)(this,void 0,i?this.match:void 0,!1,null===(t=this.slot)||void 0===t?void 0:t.id),l=new r.Forms.Text("singleline",i?"":this.match).label((0,r.pgettext)("block:text","Use fixed text")).action("@",(0,r.insertVariable)(this,"exclude")).suggestions(null===(e=this.block)||void 0===e?void 0:e.suggestions.all).autoFocus().enter(this.editor.close).escape(this.editor.close).on((function(t){t.isFormVisible&&t.isVisible&&(o.match=t.value)})),a=new r.Forms.Dropdown(n,i?this.match:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(t){t.isFormVisible&&t.isObservable&&(o.match=t.value||void 0)})),c=this.editor.form({title:(0,r.pgettext)("block:text","If text matches"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text"),value:"text"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===n.length}],i?"variable":"text").on((function(t){l.visible("text"===t.value),a.visible("variable"===t.value),l.isInteractable&&l.focus()})),l,a,new r.Forms.Checkbox((0,r.pgettext)("block:text","Ignore case"),r.Forms.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"match",void 0),l([r.definition],e.prototype,"ignoreCase",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"@tripetto/block-text",version:"6.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:text","Text match")}})],e)}(r.ConditionBlock);e.TextCondition=s},110:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var r=o(954),a=o(789),c=o(476),s=o(287),d=o(701),u=o(939),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.suggestions=r.Collection.of(c.TextSuggestion,e),e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.useSuggestions?(0,r.npgettext)("block:text","Text (%1 suggestion)","Text (%1 suggestions)",this.suggestions.count):this.type.label},enumerable:!1,configurable:!0}),e.prototype.defineSlot=function(){this.textSlot=this.slots.static({type:r.Slots.Text,reference:"value",label:(0,r.pgettext)("block:text","Text"),exchange:["required","alias","exportable","maxLength","transformation"]})},e.prototype.defineEditor=function(){var t=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings();var e=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"minLength",void 0)).min(1).max(this.textSlot.maxLength).visible((0,r.isNumber)(this.minLength)).indent(32).width(75).on((function(){o.min(t.minLength||1)})),o=new r.Forms.Numeric(r.Forms.Numeric.bind(this.textSlot,"maxLength",void 0)).min(this.minLength||1).visible((0,r.isNumber)(this.textSlot.maxLength)).indent(32).width(75).on((function(){e.max(t.textSlot.maxLength)}));this.editor.option({name:(0,r.pgettext)("block:text","Limits"),form:{title:(0,r.pgettext)("block:text","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:text","Minimum"),(0,r.isNumber)(this.minLength)).on((function(t){e.visible(t.isChecked)})),e,new r.Forms.Checkbox((0,r.pgettext)("block:text","Maximum"),(0,r.isNumber)(this.textSlot.maxLength)).on((function(t){o.visible(t.isChecked)})),o]},activated:(0,r.isNumber)(this.textSlot.maxLength)||(0,r.isNumber)(this.minLength)}),this.editor.option({name:(0,r.pgettext)("block:text","Autocomplete"),form:{title:(0,r.pgettext)("block:text","Autocomplete"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Name"),value:"name",description:(0,r.pgettext)("block:text","Person's full name.")},{label:(0,r.pgettext)("block:text","Organization"),value:"organization",description:(0,r.pgettext)("block:text","Company or organization name.")},{label:(0,r.pgettext)("block:text","Job/organization title"),value:"organization-title",description:(0,r.pgettext)("block:text","Job title, or the title a person has within an organization.")},{label:(0,r.pgettext)("block:text","Street address"),value:"street-address",description:(0,r.pgettext)("block:text","Location of the address within a city or town.")},{label:(0,r.pgettext)("block:text","Postal code"),value:"postal-code",description:(0,r.pgettext)("block:text","Postal code (in the United States, this is the ZIP code).")},{label:(0,r.pgettext)("block:text","City (address level 2)"),value:"address-level2",description:(0,r.pgettext)("block:text","City, town, village, or other locality in which the address is located.")},{label:(0,r.pgettext)("block:text","Province or state (address level 1)"),value:"address-level1",description:(0,r.pgettext)("block:text","Typically the province in which the address is located. In the United States, this would be the state. In Switzerland, the canton. In the United Kingdom, the post town.")},{label:(0,r.pgettext)("block:text","Country"),value:"country-name",description:(0,r.pgettext)("block:text","Name of the country.")},{label:(0,r.pgettext)("block:text","Telephone number"),value:"tel",description:(0,r.pgettext)("block:text","Full telephone number, including the country code.")},{label:(0,r.pgettext)("block:text","Gender identity"),value:"sex",description:(0,r.pgettext)("block:text","Gender identity as freeform text.")},{label:(0,r.pgettext)("block:text","Username"),value:"username",description:(0,r.pgettext)("block:text","Username or account name for the active domain.")}],r.Forms.Radiobutton.bind(this,"autoComplete",void 0)).label((0,r.pgettext)("block:text","Use the following autocomplete attribute for autocompletion:"))]},activated:(0,r.isString)(this.autoComplete)});var i=this.editor.option({name:(0,r.pgettext)("block:text","Suggestions"),collection:{collection:this.suggestions,title:(0,r.pgettext)("block:text","Suggestions"),placeholder:(0,r.pgettext)("block:text","Unnamed suggestion"),autoOpen:!0,editable:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showScores:!0,sorting:"manual",emptyMessage:(0,r.pgettext)("block:text","Click the + button to add an suggestion...")},activated:!0===this.useSuggestions}).onToggle((function(){t.useSuggestions=!!i.isActivated||void 0}));this.editor.transformations(this.textSlot),this.editor.groups.options(),this.editor.option({name:(0,r.pgettext)("block:text","Prefill"),form:{title:(0,r.pgettext)("block:text","Prefill"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"prefill",void 0)).label((0,r.pgettext)("block:text","Prefill with the following text:"))]},activated:(0,r.isString)(this.prefill)}),this.editor.required(this.textSlot),this.editor.visibility(),this.editor.scores({target:this,collection:i,description:(0,r.pgettext)("block:text","Generates a score based on the selected suggestion. Open the settings panel for each suggestion to set the score.")}),this.editor.alias(this.textSlot),this.editor.exportable(this.textSlot)},e.prototype.defineCondition=function(){var t=this;(0,r.each)([{mode:"exact",label:(0,r.pgettext)("block:text","Text matches")},{mode:"not-exact",label:(0,r.pgettext)("block:text","Text does not match")},{mode:"contains",label:(0,r.pgettext)("block:text","Text contains")},{mode:"not-contains",label:(0,r.pgettext)("block:text","Text does not contain")},{mode:"starts",label:(0,r.pgettext)("block:text","Text starts with")},{mode:"ends",label:(0,r.pgettext)("block:text","Text ends with")},{mode:"defined",label:(0,r.pgettext)("block:text","Text is not empty")},{mode:"undefined",label:(0,r.pgettext)("block:text","Text is empty")}],(function(e){t.conditions.template({condition:a.TextCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:t.textSlot,mode:e.mode}})}));var e=this.slots.select("score","feature");if(e&&e.label){var o=this.conditions.group(e.label,u.default,!1,!0);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:text","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:text","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:text","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:text","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:text","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:text","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:text","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:text","Score is not calculated")}],(function(t){o.template({condition:s.ScoreCondition,label:t.label,autoOpen:"defined"!==t.mode&&"undefined"!==t.mode,props:{slot:e,mode:t.mode,value:0,to:"between"===t.mode||"not-between"===t.mode?0:void 0}})}))}},l([r.definition],e.prototype,"autoComplete",void 0),l([r.definition,(0,r.affects)("#label")],e.prototype,"useSuggestions",void 0),l([(0,r.definition)("items"),(0,r.affects)("#label"),(0,r.supplies)("#slot","value",!1,"useSuggestions")],e.prototype,"suggestions",void 0),l([(0,r.definition)("string","optional")],e.prototype,"prefill",void 0),l([(0,r.definition)("number","optional")],e.prototype,"minLength",void 0),l([r.slots],e.prototype,"defineSlot",null),l([r.editor],e.prototype,"defineEditor",null),l([r.conditions],e.prototype,"defineCondition",null),e=l([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-text",version:"6.0.0",icon:d.default,get label(){return(0,r.pgettext)("block:text","Text (single line)")}})],e)}(r.NodeBlock);e.Text=p},476:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextSuggestion=void 0;var r=o(954),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="",e}return n(e,t),e.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:text","Suggestion"),form:{title:(0,r.pgettext)("block:text","Suggestion"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0});var t=this.ref.slots.select("score","feature");this.editor.group((0,r.pgettext)("block:text","Options")),this.editor.option({name:(0,r.pgettext)("block:text","Score"),form:{title:(0,r.pgettext)("block:text","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==t?void 0:t.precision)||0).digits((null==t?void 0:t.digits)||0).decimalSign((null==t?void 0:t.decimal)||"").thousands(!!(null==t?void 0:t.separator),(null==t?void 0:t.separator)||"").prefix((null==t?void 0:t.prefix)||"").prefixPlural((null==t?void 0:t.prefixPlural)||void 0).suffix((null==t?void 0:t.suffix)||"").suffixPlural((null==t?void 0:t.suffixPlural)||void 0)]},activated:!0,locked:!!t,disabled:!t})},l([(0,r.definition)("string"),r.name],e.prototype,"name",void 0),l([(0,r.definition)("number","optional"),r.score],e.prototype,"score",void 0),l([r.editor],e.prototype,"defineEditor",null),e}(r.Collection.Item);e.TextSuggestion=a},537:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},939:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},701:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNTAwIDMzMDBoMjAwVjIzMDBINTAwdi0yMDBoNjAwdjIwMEg5MDB2MTAwMGgyMDB2MjAwSDUwMHYtMjAwem01MjAwLTE2MDB2MjIwMEgxMDBWMTcwMGg1NjAwem0tMjAwIDIwMEgzMDB2MTgwMGg1MjAwVjE5MDB6Ii8+PC9zdmc+"},954:function(t){t.exports=require("@tripetto/builder")}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var l=e[i]={exports:{}};return t[i].call(l.exports,l,l.exports,o),l.exports}o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i=o(110);module.exports=i}(); | ||
/*! Tripetto Text Block 6.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var t={287:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var r=o(954),a=o(939);e.ScoreCondition=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="equal",e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t=this.slot;if(t instanceof r.Slots.Numeric){var e=this.parse(t,this.value);switch(this.mode){case"between":return"".concat(e," ≤ @").concat(t.id," ≤ ").concat(this.parse(t,this.to));case"not-between":return"@".concat(t.id," < ").concat(e," ").concat((0,r.pgettext)("block:text","or")," @").concat(t.id," > ").concat(this.parse(t,this.to));case"defined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","calculated"));case"undefined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","not calculated"));case"not-equal":return"@".concat(t.id," ≠ ").concat(e);case"above":case"below":case"equal":return"@".concat(t.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(e)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t,e;return(null===(t=this.slot)||void 0===t?void 0:t.label)||(null===(e=this.node)||void 0===e?void 0:e.label)},enumerable:!1,configurable:!0}),e.prototype.parse=function(t,e){var o;return(0,r.isNumberFinite)(e)?t.toString(e,(function(t,e){return r.L10n.locale.number(t,e,!1)})):(0,r.isString)(e)&&e&&(null===(o=(0,r.lookupVariable)(this,e))||void 0===o?void 0:o.label)?"@".concat(e):"\\_\\_"},e.prototype.defineEditor=function(){var t=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:text","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:text","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:text","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:text","Score is between"),value:"between"},{label:(0,r.pgettext)("block:text","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:text","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:text","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(t){switch(o.visible("defined"!==t.value&&"undefined"!==t.value),i.visible("between"===t.value||"not-between"===t.value),t.value){case"equal":o.title=(0,r.pgettext)("block:text","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:text","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:text","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:text","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:text","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:text","If score is not between")}}))]});var e=function(e,o,i){var n,l=t[e],a=t.slot,c=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:text","Use fixed number")).precision((null==a?void 0:a.precision)||0).digits((null==a?void 0:a.digits)||0).decimalSign((null==a?void 0:a.decimal)||"").thousands(!!(null==a?void 0:a.separator),(null==a?void 0:a.separator)||"").prefix((null==a?void 0:a.prefix)||"").prefixPlural((null==a?void 0:a.prefixPlural)||void 0).suffix((null==a?void 0:a.suffix)||"").suffixPlural((null==a?void 0:a.suffixPlural)||void 0).autoFocus("value"===e).escape(t.editor.close).enter((function(){return("between"!==t.mode&&"not-between"!==t.mode||"to"===e)&&t.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value)})),s=(0,r.populateVariables)(t,(function(t){return t instanceof r.Slots.Number||t instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(n=t.slot)||void 0===n?void 0:n.id),d=new r.Forms.Dropdown(s,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value||"")}));return t.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Number"),value:"number"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===s.length}],(0,r.isString)(l)?"variable":"number").on((function(t){c.visible("number"===t.value),d.visible("variable"===t.value),c.isObservable&&c.focus()})),c,d]}).visible(i)},o=e("value",(0,r.pgettext)("block:text","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=e("to",(0,r.pgettext)("block:text","And"),"between"===this.mode||"not-between"===this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"value",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"to",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"".concat("@tripetto/block-text",":score"),version:"6.0.1",icon:a.default,get label(){return(0,r.pgettext)("block:text","Verify score")}})],e)}(r.ConditionBlock)},789:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var r=o(954),a=o(110),c=o(537);e.TextCondition=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="exact",e}return n(e,t),Object.defineProperty(e.prototype,"block",{get:function(){var t;return(null===(t=this.node)||void 0===t?void 0:t.block)instanceof a.Text&&this.node.block||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t,e,o=this;if(this.slot instanceof r.Slots.Text){var i=((0,r.isVariable)(this.match)?(null===(t=(0,r.lookupVariable)(this,this.match))||void 0===t?void 0:t.label)&&"@".concat(this.match):this.match&&((e=(0,r.makeMarkdownSafe)(this.match))&&("contains"===o.mode||"not-contains"===o.mode||"starts"===o.mode||"ends"===o.mode)&&"_".concat(e,"_")||e))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return"@".concat(this.slot.id," ").concat("not-exact"===this.mode?"≠":"="," ").concat(i);case"contains":case"not-contains":case"starts":case"ends":return"@".concat(this.slot.id," ").concat("not-contains"===this.mode?(0,r.pgettext)("block:text","does not contain"):"starts"===this.mode?(0,r.pgettext)("block:text","starts with"):"ends"===this.mode?(0,r.pgettext)("block:text","ends with"):(0,r.pgettext)("block:text","contains")," ").concat(i);case"defined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","not empty"));case"undefined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","empty"))}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t;return null===(t=this.node)||void 0===t?void 0:t.label},enumerable:!1,configurable:!0}),e.prototype.defineEditor=function(){var t,e,o=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text matches"),value:"exact"},{label:(0,r.pgettext)("block:text","Text does not match"),value:"not-exact"},{label:(0,r.pgettext)("block:text","Text contains"),value:"contains"},{label:(0,r.pgettext)("block:text","Text does not contain"),value:"not-contains"},{label:(0,r.pgettext)("block:text","Text starts with"),value:"starts"},{label:(0,r.pgettext)("block:text","Text ends with"),value:"ends"},{label:(0,r.pgettext)("block:text","Text is not empty"),value:"defined"},{label:(0,r.pgettext)("block:text","Text is empty"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","exact")).on((function(t){switch(c.visible("defined"!==t.value&&"undefined"!==t.value),t.value){case"exact":c.title=(0,r.pgettext)("block:text","If text matches");break;case"not-exact":c.title=(0,r.pgettext)("block:text","If text does not match");break;case"contains":c.title=(0,r.pgettext)("block:text","If text contains");break;case"not-contains":c.title=(0,r.pgettext)("block:text","If text does not contain");break;case"starts":c.title=(0,r.pgettext)("block:text","If text starts with");break;case"ends":c.title=(0,r.pgettext)("block:text","If text ends with")}l.isInteractable&&l.focus()}))]});var i=this.match&&(0,r.isVariable)(this.match)||!1,n=(0,r.populateVariables)(this,void 0,i?this.match:void 0,!1,null===(t=this.slot)||void 0===t?void 0:t.id),l=new r.Forms.Text("singleline",i?"":this.match).label((0,r.pgettext)("block:text","Use fixed text")).action("@",(0,r.insertVariable)(this,"exclude")).suggestions(null===(e=this.block)||void 0===e?void 0:e.suggestions.all).autoFocus().enter(this.editor.close).escape(this.editor.close).on((function(t){t.isFormVisible&&t.isVisible&&(o.match=t.value)})),a=new r.Forms.Dropdown(n,i?this.match:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(t){t.isFormVisible&&t.isObservable&&(o.match=t.value||void 0)})),c=this.editor.form({title:(0,r.pgettext)("block:text","If text matches"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text"),value:"text"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===n.length}],i?"variable":"text").on((function(t){l.visible("text"===t.value),a.visible("variable"===t.value),l.isInteractable&&l.focus()})),l,a,new r.Forms.Checkbox((0,r.pgettext)("block:text","Ignore case"),r.Forms.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"match",void 0),l([r.definition],e.prototype,"ignoreCase",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"@tripetto/block-text",version:"6.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:text","Text match")}})],e)}(r.ConditionBlock)},110:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var r=o(954),a=o(789),c=o(476),s=o(287),d=o(701),u=o(939);e.Text=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.suggestions=r.Collection.of(c.TextSuggestion,e),e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.useSuggestions?(0,r.npgettext)("block:text","Text (%1 suggestion)","Text (%1 suggestions)",this.suggestions.count):this.type.label},enumerable:!1,configurable:!0}),e.prototype.defineSlot=function(){this.textSlot=this.slots.static({type:r.Slots.Text,reference:"value",label:(0,r.pgettext)("block:text","Text"),exchange:["required","alias","exportable","maxLength","transformation"]})},e.prototype.defineEditor=function(){var t=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings();var e=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"minLength",void 0)).min(1).max(this.textSlot.maxLength).visible((0,r.isNumber)(this.minLength)).indent(32).width(75).on((function(){o.min(t.minLength||1)})),o=new r.Forms.Numeric(r.Forms.Numeric.bind(this.textSlot,"maxLength",void 0)).min(this.minLength||1).visible((0,r.isNumber)(this.textSlot.maxLength)).indent(32).width(75).on((function(){e.max(t.textSlot.maxLength)}));this.editor.option({name:(0,r.pgettext)("block:text","Limits"),form:{title:(0,r.pgettext)("block:text","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:text","Minimum"),(0,r.isNumber)(this.minLength)).on((function(t){e.visible(t.isChecked)})),e,new r.Forms.Checkbox((0,r.pgettext)("block:text","Maximum"),(0,r.isNumber)(this.textSlot.maxLength)).on((function(t){o.visible(t.isChecked)})),o]},activated:(0,r.isNumber)(this.textSlot.maxLength)||(0,r.isNumber)(this.minLength)}),this.editor.option({name:(0,r.pgettext)("block:text","Autocomplete"),form:{title:(0,r.pgettext)("block:text","Autocomplete"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Name"),value:"name",description:(0,r.pgettext)("block:text","Person's full name.")},{label:(0,r.pgettext)("block:text","Organization"),value:"organization",description:(0,r.pgettext)("block:text","Company or organization name.")},{label:(0,r.pgettext)("block:text","Job/organization title"),value:"organization-title",description:(0,r.pgettext)("block:text","Job title, or the title a person has within an organization.")},{label:(0,r.pgettext)("block:text","Street address"),value:"street-address",description:(0,r.pgettext)("block:text","Location of the address within a city or town.")},{label:(0,r.pgettext)("block:text","Postal code"),value:"postal-code",description:(0,r.pgettext)("block:text","Postal code (in the United States, this is the ZIP code).")},{label:(0,r.pgettext)("block:text","City (address level 2)"),value:"address-level2",description:(0,r.pgettext)("block:text","City, town, village, or other locality in which the address is located.")},{label:(0,r.pgettext)("block:text","Province or state (address level 1)"),value:"address-level1",description:(0,r.pgettext)("block:text","Typically the province in which the address is located. In the United States, this would be the state. In Switzerland, the canton. In the United Kingdom, the post town.")},{label:(0,r.pgettext)("block:text","Country"),value:"country-name",description:(0,r.pgettext)("block:text","Name of the country.")},{label:(0,r.pgettext)("block:text","Telephone number"),value:"tel",description:(0,r.pgettext)("block:text","Full telephone number, including the country code.")},{label:(0,r.pgettext)("block:text","Gender identity"),value:"sex",description:(0,r.pgettext)("block:text","Gender identity as freeform text.")},{label:(0,r.pgettext)("block:text","Username"),value:"username",description:(0,r.pgettext)("block:text","Username or account name for the active domain.")}],r.Forms.Radiobutton.bind(this,"autoComplete",void 0)).label((0,r.pgettext)("block:text","Use the following autocomplete attribute for autocompletion:"))]},activated:(0,r.isString)(this.autoComplete)});var i=this.editor.option({name:(0,r.pgettext)("block:text","Suggestions"),collection:{collection:this.suggestions,title:(0,r.pgettext)("block:text","Suggestions"),placeholder:(0,r.pgettext)("block:text","Unnamed suggestion"),autoOpen:!0,editable:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showScores:!0,sorting:"manual",emptyMessage:(0,r.pgettext)("block:text","Click the + button to add an suggestion...")},activated:!0===this.useSuggestions}).onToggle((function(){t.useSuggestions=!!i.isActivated||void 0}));this.editor.transformations(this.textSlot),this.editor.groups.options(),this.editor.option({name:(0,r.pgettext)("block:text","Prefill"),form:{title:(0,r.pgettext)("block:text","Prefill"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"prefill",void 0)).label((0,r.pgettext)("block:text","Prefill with the following text:"))]},activated:(0,r.isString)(this.prefill)}),this.editor.required(this.textSlot),this.editor.visibility(),this.editor.scores({target:this,collection:i,description:(0,r.pgettext)("block:text","Generates a score based on the selected suggestion. Open the settings panel for each suggestion to set the score.")}),this.editor.alias(this.textSlot),this.editor.exportable(this.textSlot)},e.prototype.defineCondition=function(){var t=this;(0,r.each)([{mode:"exact",label:(0,r.pgettext)("block:text","Text matches")},{mode:"not-exact",label:(0,r.pgettext)("block:text","Text does not match")},{mode:"contains",label:(0,r.pgettext)("block:text","Text contains")},{mode:"not-contains",label:(0,r.pgettext)("block:text","Text does not contain")},{mode:"starts",label:(0,r.pgettext)("block:text","Text starts with")},{mode:"ends",label:(0,r.pgettext)("block:text","Text ends with")},{mode:"defined",label:(0,r.pgettext)("block:text","Text is not empty")},{mode:"undefined",label:(0,r.pgettext)("block:text","Text is empty")}],(function(e){t.conditions.template({condition:a.TextCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:t.textSlot,mode:e.mode}})}));var e=this.slots.select("score","feature");if(e&&e.label){var o=this.conditions.group(e.label,u.default,!1,!0);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:text","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:text","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:text","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:text","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:text","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:text","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:text","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:text","Score is not calculated")}],(function(t){o.template({condition:s.ScoreCondition,label:t.label,autoOpen:"defined"!==t.mode&&"undefined"!==t.mode,props:{slot:e,mode:t.mode,value:0,to:"between"===t.mode||"not-between"===t.mode?0:void 0}})}))}},l([r.definition],e.prototype,"autoComplete",void 0),l([r.definition,(0,r.affects)("#label")],e.prototype,"useSuggestions",void 0),l([(0,r.definition)("items"),(0,r.affects)("#label"),(0,r.supplies)("#slot","value",!1,"useSuggestions")],e.prototype,"suggestions",void 0),l([(0,r.definition)("string","optional")],e.prototype,"prefill",void 0),l([(0,r.definition)("number","optional")],e.prototype,"minLength",void 0),l([r.slots],e.prototype,"defineSlot",null),l([r.editor],e.prototype,"defineEditor",null),l([r.conditions],e.prototype,"defineCondition",null),e=l([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-text",version:"6.0.1",icon:d.default,get label(){return(0,r.pgettext)("block:text","Text (single line)")}})],e)}(r.NodeBlock)},476:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextSuggestion=void 0;var r=o(954);e.TextSuggestion=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="",e}return n(e,t),e.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:text","Suggestion"),form:{title:(0,r.pgettext)("block:text","Suggestion"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0});var t=this.ref.slots.select("score","feature");this.editor.group((0,r.pgettext)("block:text","Options")),this.editor.option({name:(0,r.pgettext)("block:text","Score"),form:{title:(0,r.pgettext)("block:text","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==t?void 0:t.precision)||0).digits((null==t?void 0:t.digits)||0).decimalSign((null==t?void 0:t.decimal)||"").thousands(!!(null==t?void 0:t.separator),(null==t?void 0:t.separator)||"").prefix((null==t?void 0:t.prefix)||"").prefixPlural((null==t?void 0:t.prefixPlural)||void 0).suffix((null==t?void 0:t.suffix)||"").suffixPlural((null==t?void 0:t.suffixPlural)||void 0)]},activated:!0,locked:!!t,disabled:!t})},l([(0,r.definition)("string"),r.name],e.prototype,"name",void 0),l([(0,r.definition)("number","optional"),r.score],e.prototype,"score",void 0),l([r.editor],e.prototype,"defineEditor",null),e}(r.Collection.Item)},537:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},939:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},701:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNTAwIDMzMDBoMjAwVjIzMDBINTAwdi0yMDBoNjAwdjIwMEg5MDB2MTAwMGgyMDB2MjAwSDUwMHYtMjAwem01MjAwLTE2MDB2MjIwMEgxMDBWMTcwMGg1NjAwem0tMjAwIDIwMEgzMDB2MTgwMGg1MjAwVjE5MDB6Ii8+PC9zdmc+"},954:function(t){t.exports=require("@tripetto/builder")}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var l=e[i]={exports:{}};return t[i].call(l.exports,l,l.exports,o),l.exports}o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i=o(110);module.exports=i}(); |
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Text Block 6.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("Tripetto")):"function"==typeof define&&define.amd?define("TripettoBlockTextBuilder",["Tripetto"],e):"object"==typeof exports?exports.TripettoBlockTextBuilder=e(require("Tripetto")):t.TripettoBlockTextBuilder=e(t.Tripetto)}(self,(function(t){return function(){"use strict";var e={287:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var r=o(210),a=o(939),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="equal",e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t=this.slot;if(t instanceof r.Slots.Numeric){var e=this.parse(t,this.value);switch(this.mode){case"between":return"".concat(e," ≤ @").concat(t.id," ≤ ").concat(this.parse(t,this.to));case"not-between":return"@".concat(t.id," < ").concat(e," ").concat((0,r.pgettext)("block:text","or")," @").concat(t.id," > ").concat(this.parse(t,this.to));case"defined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","calculated"));case"undefined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","not calculated"));case"not-equal":return"@".concat(t.id," ≠ ").concat(e);case"above":case"below":case"equal":return"@".concat(t.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(e)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t,e;return(null===(t=this.slot)||void 0===t?void 0:t.label)||(null===(e=this.node)||void 0===e?void 0:e.label)},enumerable:!1,configurable:!0}),e.prototype.parse=function(t,e){var o;return(0,r.isNumberFinite)(e)?t.toString(e,(function(t,e){return r.L10n.locale.number(t,e,!1)})):(0,r.isString)(e)&&e&&(null===(o=(0,r.lookupVariable)(this,e))||void 0===o?void 0:o.label)?"@".concat(e):"\\_\\_"},e.prototype.defineEditor=function(){var t=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:text","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:text","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:text","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:text","Score is between"),value:"between"},{label:(0,r.pgettext)("block:text","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:text","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:text","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(t){switch(o.visible("defined"!==t.value&&"undefined"!==t.value),i.visible("between"===t.value||"not-between"===t.value),t.value){case"equal":o.title=(0,r.pgettext)("block:text","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:text","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:text","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:text","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:text","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:text","If score is not between")}}))]});var e=function(e,o,i){var n,l=t[e],a=t.slot,c=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:text","Use fixed number")).precision((null==a?void 0:a.precision)||0).digits((null==a?void 0:a.digits)||0).decimalSign((null==a?void 0:a.decimal)||"").thousands(!!(null==a?void 0:a.separator),(null==a?void 0:a.separator)||"").prefix((null==a?void 0:a.prefix)||"").prefixPlural((null==a?void 0:a.prefixPlural)||void 0).suffix((null==a?void 0:a.suffix)||"").suffixPlural((null==a?void 0:a.suffixPlural)||void 0).autoFocus("value"===e).escape(t.editor.close).enter((function(){return("between"!==t.mode&&"not-between"!==t.mode||"to"===e)&&t.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value)})),s=(0,r.populateVariables)(t,(function(t){return t instanceof r.Slots.Number||t instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(n=t.slot)||void 0===n?void 0:n.id),d=new r.Forms.Dropdown(s,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value||"")}));return t.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Number"),value:"number"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===s.length}],(0,r.isString)(l)?"variable":"number").on((function(t){c.visible("number"===t.value),d.visible("variable"===t.value),c.isObservable&&c.focus()})),c,d]}).visible(i)},o=e("value",(0,r.pgettext)("block:text","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=e("to",(0,r.pgettext)("block:text","And"),"between"===this.mode||"not-between"===this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"value",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"to",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"".concat("@tripetto/block-text",":score"),version:"6.0.0",icon:a.default,get label(){return(0,r.pgettext)("block:text","Verify score")}})],e)}(r.ConditionBlock);e.ScoreCondition=c},789:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var r=o(210),a=o(110),c=o(537),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="exact",e}return n(e,t),Object.defineProperty(e.prototype,"block",{get:function(){var t;return(null===(t=this.node)||void 0===t?void 0:t.block)instanceof a.Text&&this.node.block||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t,e,o=this;if(this.slot instanceof r.Slots.Text){var i=((0,r.isVariable)(this.match)?(null===(t=(0,r.lookupVariable)(this,this.match))||void 0===t?void 0:t.label)&&"@".concat(this.match):this.match&&((e=(0,r.makeMarkdownSafe)(this.match))&&("contains"===o.mode||"not-contains"===o.mode||"starts"===o.mode||"ends"===o.mode)&&"_".concat(e,"_")||e))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return"@".concat(this.slot.id," ").concat("not-exact"===this.mode?"≠":"="," ").concat(i);case"contains":case"not-contains":case"starts":case"ends":return"@".concat(this.slot.id," ").concat("not-contains"===this.mode?(0,r.pgettext)("block:text","does not contain"):"starts"===this.mode?(0,r.pgettext)("block:text","starts with"):"ends"===this.mode?(0,r.pgettext)("block:text","ends with"):(0,r.pgettext)("block:text","contains")," ").concat(i);case"defined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","not empty"));case"undefined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","empty"))}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t;return null===(t=this.node)||void 0===t?void 0:t.label},enumerable:!1,configurable:!0}),e.prototype.defineEditor=function(){var t,e,o=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text matches"),value:"exact"},{label:(0,r.pgettext)("block:text","Text does not match"),value:"not-exact"},{label:(0,r.pgettext)("block:text","Text contains"),value:"contains"},{label:(0,r.pgettext)("block:text","Text does not contain"),value:"not-contains"},{label:(0,r.pgettext)("block:text","Text starts with"),value:"starts"},{label:(0,r.pgettext)("block:text","Text ends with"),value:"ends"},{label:(0,r.pgettext)("block:text","Text is not empty"),value:"defined"},{label:(0,r.pgettext)("block:text","Text is empty"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","exact")).on((function(t){switch(c.visible("defined"!==t.value&&"undefined"!==t.value),t.value){case"exact":c.title=(0,r.pgettext)("block:text","If text matches");break;case"not-exact":c.title=(0,r.pgettext)("block:text","If text does not match");break;case"contains":c.title=(0,r.pgettext)("block:text","If text contains");break;case"not-contains":c.title=(0,r.pgettext)("block:text","If text does not contain");break;case"starts":c.title=(0,r.pgettext)("block:text","If text starts with");break;case"ends":c.title=(0,r.pgettext)("block:text","If text ends with")}l.isInteractable&&l.focus()}))]});var i=this.match&&(0,r.isVariable)(this.match)||!1,n=(0,r.populateVariables)(this,void 0,i?this.match:void 0,!1,null===(t=this.slot)||void 0===t?void 0:t.id),l=new r.Forms.Text("singleline",i?"":this.match).label((0,r.pgettext)("block:text","Use fixed text")).action("@",(0,r.insertVariable)(this,"exclude")).suggestions(null===(e=this.block)||void 0===e?void 0:e.suggestions.all).autoFocus().enter(this.editor.close).escape(this.editor.close).on((function(t){t.isFormVisible&&t.isVisible&&(o.match=t.value)})),a=new r.Forms.Dropdown(n,i?this.match:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(t){t.isFormVisible&&t.isObservable&&(o.match=t.value||void 0)})),c=this.editor.form({title:(0,r.pgettext)("block:text","If text matches"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text"),value:"text"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===n.length}],i?"variable":"text").on((function(t){l.visible("text"===t.value),a.visible("variable"===t.value),l.isInteractable&&l.focus()})),l,a,new r.Forms.Checkbox((0,r.pgettext)("block:text","Ignore case"),r.Forms.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"match",void 0),l([r.definition],e.prototype,"ignoreCase",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"@tripetto/block-text",version:"6.0.0",icon:c.default,get label(){return(0,r.pgettext)("block:text","Text match")}})],e)}(r.ConditionBlock);e.TextCondition=s},110:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var r=o(210),a=o(789),c=o(476),s=o(287),d=o(701),u=o(939),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.suggestions=r.Collection.of(c.TextSuggestion,e),e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.useSuggestions?(0,r.npgettext)("block:text","Text (%1 suggestion)","Text (%1 suggestions)",this.suggestions.count):this.type.label},enumerable:!1,configurable:!0}),e.prototype.defineSlot=function(){this.textSlot=this.slots.static({type:r.Slots.Text,reference:"value",label:(0,r.pgettext)("block:text","Text"),exchange:["required","alias","exportable","maxLength","transformation"]})},e.prototype.defineEditor=function(){var t=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings();var e=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"minLength",void 0)).min(1).max(this.textSlot.maxLength).visible((0,r.isNumber)(this.minLength)).indent(32).width(75).on((function(){o.min(t.minLength||1)})),o=new r.Forms.Numeric(r.Forms.Numeric.bind(this.textSlot,"maxLength",void 0)).min(this.minLength||1).visible((0,r.isNumber)(this.textSlot.maxLength)).indent(32).width(75).on((function(){e.max(t.textSlot.maxLength)}));this.editor.option({name:(0,r.pgettext)("block:text","Limits"),form:{title:(0,r.pgettext)("block:text","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:text","Minimum"),(0,r.isNumber)(this.minLength)).on((function(t){e.visible(t.isChecked)})),e,new r.Forms.Checkbox((0,r.pgettext)("block:text","Maximum"),(0,r.isNumber)(this.textSlot.maxLength)).on((function(t){o.visible(t.isChecked)})),o]},activated:(0,r.isNumber)(this.textSlot.maxLength)||(0,r.isNumber)(this.minLength)}),this.editor.option({name:(0,r.pgettext)("block:text","Autocomplete"),form:{title:(0,r.pgettext)("block:text","Autocomplete"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Name"),value:"name",description:(0,r.pgettext)("block:text","Person's full name.")},{label:(0,r.pgettext)("block:text","Organization"),value:"organization",description:(0,r.pgettext)("block:text","Company or organization name.")},{label:(0,r.pgettext)("block:text","Job/organization title"),value:"organization-title",description:(0,r.pgettext)("block:text","Job title, or the title a person has within an organization.")},{label:(0,r.pgettext)("block:text","Street address"),value:"street-address",description:(0,r.pgettext)("block:text","Location of the address within a city or town.")},{label:(0,r.pgettext)("block:text","Postal code"),value:"postal-code",description:(0,r.pgettext)("block:text","Postal code (in the United States, this is the ZIP code).")},{label:(0,r.pgettext)("block:text","City (address level 2)"),value:"address-level2",description:(0,r.pgettext)("block:text","City, town, village, or other locality in which the address is located.")},{label:(0,r.pgettext)("block:text","Province or state (address level 1)"),value:"address-level1",description:(0,r.pgettext)("block:text","Typically the province in which the address is located. In the United States, this would be the state. In Switzerland, the canton. In the United Kingdom, the post town.")},{label:(0,r.pgettext)("block:text","Country"),value:"country-name",description:(0,r.pgettext)("block:text","Name of the country.")},{label:(0,r.pgettext)("block:text","Telephone number"),value:"tel",description:(0,r.pgettext)("block:text","Full telephone number, including the country code.")},{label:(0,r.pgettext)("block:text","Gender identity"),value:"sex",description:(0,r.pgettext)("block:text","Gender identity as freeform text.")},{label:(0,r.pgettext)("block:text","Username"),value:"username",description:(0,r.pgettext)("block:text","Username or account name for the active domain.")}],r.Forms.Radiobutton.bind(this,"autoComplete",void 0)).label((0,r.pgettext)("block:text","Use the following autocomplete attribute for autocompletion:"))]},activated:(0,r.isString)(this.autoComplete)});var i=this.editor.option({name:(0,r.pgettext)("block:text","Suggestions"),collection:{collection:this.suggestions,title:(0,r.pgettext)("block:text","Suggestions"),placeholder:(0,r.pgettext)("block:text","Unnamed suggestion"),autoOpen:!0,editable:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showScores:!0,sorting:"manual",emptyMessage:(0,r.pgettext)("block:text","Click the + button to add an suggestion...")},activated:!0===this.useSuggestions}).onToggle((function(){t.useSuggestions=!!i.isActivated||void 0}));this.editor.transformations(this.textSlot),this.editor.groups.options(),this.editor.option({name:(0,r.pgettext)("block:text","Prefill"),form:{title:(0,r.pgettext)("block:text","Prefill"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"prefill",void 0)).label((0,r.pgettext)("block:text","Prefill with the following text:"))]},activated:(0,r.isString)(this.prefill)}),this.editor.required(this.textSlot),this.editor.visibility(),this.editor.scores({target:this,collection:i,description:(0,r.pgettext)("block:text","Generates a score based on the selected suggestion. Open the settings panel for each suggestion to set the score.")}),this.editor.alias(this.textSlot),this.editor.exportable(this.textSlot)},e.prototype.defineCondition=function(){var t=this;(0,r.each)([{mode:"exact",label:(0,r.pgettext)("block:text","Text matches")},{mode:"not-exact",label:(0,r.pgettext)("block:text","Text does not match")},{mode:"contains",label:(0,r.pgettext)("block:text","Text contains")},{mode:"not-contains",label:(0,r.pgettext)("block:text","Text does not contain")},{mode:"starts",label:(0,r.pgettext)("block:text","Text starts with")},{mode:"ends",label:(0,r.pgettext)("block:text","Text ends with")},{mode:"defined",label:(0,r.pgettext)("block:text","Text is not empty")},{mode:"undefined",label:(0,r.pgettext)("block:text","Text is empty")}],(function(e){t.conditions.template({condition:a.TextCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:t.textSlot,mode:e.mode}})}));var e=this.slots.select("score","feature");if(e&&e.label){var o=this.conditions.group(e.label,u.default,!1,!0);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:text","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:text","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:text","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:text","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:text","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:text","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:text","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:text","Score is not calculated")}],(function(t){o.template({condition:s.ScoreCondition,label:t.label,autoOpen:"defined"!==t.mode&&"undefined"!==t.mode,props:{slot:e,mode:t.mode,value:0,to:"between"===t.mode||"not-between"===t.mode?0:void 0}})}))}},l([r.definition],e.prototype,"autoComplete",void 0),l([r.definition,(0,r.affects)("#label")],e.prototype,"useSuggestions",void 0),l([(0,r.definition)("items"),(0,r.affects)("#label"),(0,r.supplies)("#slot","value",!1,"useSuggestions")],e.prototype,"suggestions",void 0),l([(0,r.definition)("string","optional")],e.prototype,"prefill",void 0),l([(0,r.definition)("number","optional")],e.prototype,"minLength",void 0),l([r.slots],e.prototype,"defineSlot",null),l([r.editor],e.prototype,"defineEditor",null),l([r.conditions],e.prototype,"defineCondition",null),e=l([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-text",version:"6.0.0",icon:d.default,get label(){return(0,r.pgettext)("block:text","Text (single line)")}})],e)}(r.NodeBlock);e.Text=p},476:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextSuggestion=void 0;var r=o(210),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="",e}return n(e,t),e.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:text","Suggestion"),form:{title:(0,r.pgettext)("block:text","Suggestion"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0});var t=this.ref.slots.select("score","feature");this.editor.group((0,r.pgettext)("block:text","Options")),this.editor.option({name:(0,r.pgettext)("block:text","Score"),form:{title:(0,r.pgettext)("block:text","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==t?void 0:t.precision)||0).digits((null==t?void 0:t.digits)||0).decimalSign((null==t?void 0:t.decimal)||"").thousands(!!(null==t?void 0:t.separator),(null==t?void 0:t.separator)||"").prefix((null==t?void 0:t.prefix)||"").prefixPlural((null==t?void 0:t.prefixPlural)||void 0).suffix((null==t?void 0:t.suffix)||"").suffixPlural((null==t?void 0:t.suffixPlural)||void 0)]},activated:!0,locked:!!t,disabled:!t})},l([(0,r.definition)("string"),r.name],e.prototype,"name",void 0),l([(0,r.definition)("number","optional"),r.score],e.prototype,"score",void 0),l([r.editor],e.prototype,"defineEditor",null),e}(r.Collection.Item);e.TextSuggestion=a},537:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},939:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},701:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNTAwIDMzMDBoMjAwVjIzMDBINTAwdi0yMDBoNjAwdjIwMEg5MDB2MTAwMGgyMDB2MjAwSDUwMHYtMjAwem01MjAwLTE2MDB2MjIwMEgxMDBWMTcwMGg1NjAwem0tMjAwIDIwMEgzMDB2MTgwMGg1MjAwVjE5MDB6Ii8+PC9zdmc+"},210:function(e){e.exports=t}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var l=o[t]={exports:{}};return e[t].call(l.exports,l,l.exports,i),l.exports}return i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(110)}()})); | ||
/*! Tripetto Text Block 6.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("Tripetto")):"function"==typeof define&&define.amd?define("TripettoBlockTextBuilder",["Tripetto"],e):"object"==typeof exports?exports.TripettoBlockTextBuilder=e(require("Tripetto")):t.TripettoBlockTextBuilder=e(t.Tripetto)}(self,(function(t){return function(){"use strict";var e={287:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var r=o(210),a=o(939);e.ScoreCondition=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="equal",e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t=this.slot;if(t instanceof r.Slots.Numeric){var e=this.parse(t,this.value);switch(this.mode){case"between":return"".concat(e," ≤ @").concat(t.id," ≤ ").concat(this.parse(t,this.to));case"not-between":return"@".concat(t.id," < ").concat(e," ").concat((0,r.pgettext)("block:text","or")," @").concat(t.id," > ").concat(this.parse(t,this.to));case"defined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","calculated"));case"undefined":return"@".concat(t.id," ").concat((0,r.pgettext)("block:text","not calculated"));case"not-equal":return"@".concat(t.id," ≠ ").concat(e);case"above":case"below":case"equal":return"@".concat(t.id," ").concat("above"===this.mode?">":"below"===this.mode?"<":"="," ").concat(e)}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t,e;return(null===(t=this.slot)||void 0===t?void 0:t.label)||(null===(e=this.node)||void 0===e?void 0:e.label)},enumerable:!1,configurable:!0}),e.prototype.parse=function(t,e){var o;return(0,r.isNumberFinite)(e)?t.toString(e,(function(t,e){return r.L10n.locale.number(t,e,!1)})):(0,r.isString)(e)&&e&&(null===(o=(0,r.lookupVariable)(this,e))||void 0===o?void 0:o.label)?"@".concat(e):"\\_\\_"},e.prototype.defineEditor=function(){var t=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Score is equal to"),value:"equal"},{label:(0,r.pgettext)("block:text","Score is not equal to"),value:"not-equal"},{label:(0,r.pgettext)("block:text","Score is lower than"),value:"below"},{label:(0,r.pgettext)("block:text","Score is higher than"),value:"above"},{label:(0,r.pgettext)("block:text","Score is between"),value:"between"},{label:(0,r.pgettext)("block:text","Score is not between"),value:"not-between"},{label:(0,r.pgettext)("block:text","Score is calculated"),value:"defined"},{label:(0,r.pgettext)("block:text","Score is not calculated"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","equal")).on((function(t){switch(o.visible("defined"!==t.value&&"undefined"!==t.value),i.visible("between"===t.value||"not-between"===t.value),t.value){case"equal":o.title=(0,r.pgettext)("block:text","If score equals");break;case"not-equal":o.title=(0,r.pgettext)("block:text","If score not equals");break;case"below":o.title=(0,r.pgettext)("block:text","If score is lower than");break;case"above":o.title=(0,r.pgettext)("block:text","If score is higher than");break;case"between":o.title=(0,r.pgettext)("block:text","If score is between");break;case"not-between":o.title=(0,r.pgettext)("block:text","If score is not between")}}))]});var e=function(e,o,i){var n,l=t[e],a=t.slot,c=new r.Forms.Numeric((0,r.isNumberFinite)(l)?l:0).label((0,r.pgettext)("block:text","Use fixed number")).precision((null==a?void 0:a.precision)||0).digits((null==a?void 0:a.digits)||0).decimalSign((null==a?void 0:a.decimal)||"").thousands(!!(null==a?void 0:a.separator),(null==a?void 0:a.separator)||"").prefix((null==a?void 0:a.prefix)||"").prefixPlural((null==a?void 0:a.prefixPlural)||void 0).suffix((null==a?void 0:a.suffix)||"").suffixPlural((null==a?void 0:a.suffixPlural)||void 0).autoFocus("value"===e).escape(t.editor.close).enter((function(){return("between"!==t.mode&&"not-between"!==t.mode||"to"===e)&&t.editor.close()})).on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value)})),s=(0,r.populateVariables)(t,(function(t){return t instanceof r.Slots.Number||t instanceof r.Slots.Numeric}),(0,r.isString)(l)?l:void 0,!0,null===(n=t.slot)||void 0===n?void 0:n.id),d=new r.Forms.Dropdown(s,(0,r.isString)(l)?l:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(o){o.isFormVisible&&o.isObservable&&(t[e]=o.value||"")}));return t.editor.form({title:o,controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Number"),value:"number"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===s.length}],(0,r.isString)(l)?"variable":"number").on((function(t){c.visible("number"===t.value),d.visible("variable"===t.value),c.isObservable&&c.focus()})),c,d]}).visible(i)},o=e("value",(0,r.pgettext)("block:text","If score equals"),"defined"!==this.mode&&"undefined"!==this.mode),i=e("to",(0,r.pgettext)("block:text","And"),"between"===this.mode||"not-between"===this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"value",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"to",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"".concat("@tripetto/block-text",":score"),version:"6.0.1",icon:a.default,get label(){return(0,r.pgettext)("block:text","Verify score")}})],e)}(r.ConditionBlock)},789:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var r=o(210),a=o(110),c=o(537);e.TextCondition=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowMarkdown=!0,e.mode="exact",e}return n(e,t),Object.defineProperty(e.prototype,"block",{get:function(){var t;return(null===(t=this.node)||void 0===t?void 0:t.block)instanceof a.Text&&this.node.block||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){var t,e,o=this;if(this.slot instanceof r.Slots.Text){var i=((0,r.isVariable)(this.match)?(null===(t=(0,r.lookupVariable)(this,this.match))||void 0===t?void 0:t.label)&&"@".concat(this.match):this.match&&((e=(0,r.makeMarkdownSafe)(this.match))&&("contains"===o.mode||"not-contains"===o.mode||"starts"===o.mode||"ends"===o.mode)&&"_".concat(e,"_")||e))||"\\_\\_";switch(this.mode){case"exact":case"not-exact":return"@".concat(this.slot.id," ").concat("not-exact"===this.mode?"≠":"="," ").concat(i);case"contains":case"not-contains":case"starts":case"ends":return"@".concat(this.slot.id," ").concat("not-contains"===this.mode?(0,r.pgettext)("block:text","does not contain"):"starts"===this.mode?(0,r.pgettext)("block:text","starts with"):"ends"===this.mode?(0,r.pgettext)("block:text","ends with"):(0,r.pgettext)("block:text","contains")," ").concat(i);case"defined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","not empty"));case"undefined":return"@".concat(this.slot.id," ").concat((0,r.pgettext)("block:text","empty"))}}return this.type.label},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t;return null===(t=this.node)||void 0===t?void 0:t.label},enumerable:!1,configurable:!0}),e.prototype.defineEditor=function(){var t,e,o=this;this.editor.form({title:(0,r.pgettext)("block:text","Compare mode"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text matches"),value:"exact"},{label:(0,r.pgettext)("block:text","Text does not match"),value:"not-exact"},{label:(0,r.pgettext)("block:text","Text contains"),value:"contains"},{label:(0,r.pgettext)("block:text","Text does not contain"),value:"not-contains"},{label:(0,r.pgettext)("block:text","Text starts with"),value:"starts"},{label:(0,r.pgettext)("block:text","Text ends with"),value:"ends"},{label:(0,r.pgettext)("block:text","Text is not empty"),value:"defined"},{label:(0,r.pgettext)("block:text","Text is empty"),value:"undefined"}],r.Forms.Radiobutton.bind(this,"mode","exact")).on((function(t){switch(c.visible("defined"!==t.value&&"undefined"!==t.value),t.value){case"exact":c.title=(0,r.pgettext)("block:text","If text matches");break;case"not-exact":c.title=(0,r.pgettext)("block:text","If text does not match");break;case"contains":c.title=(0,r.pgettext)("block:text","If text contains");break;case"not-contains":c.title=(0,r.pgettext)("block:text","If text does not contain");break;case"starts":c.title=(0,r.pgettext)("block:text","If text starts with");break;case"ends":c.title=(0,r.pgettext)("block:text","If text ends with")}l.isInteractable&&l.focus()}))]});var i=this.match&&(0,r.isVariable)(this.match)||!1,n=(0,r.populateVariables)(this,void 0,i?this.match:void 0,!1,null===(t=this.slot)||void 0===t?void 0:t.id),l=new r.Forms.Text("singleline",i?"":this.match).label((0,r.pgettext)("block:text","Use fixed text")).action("@",(0,r.insertVariable)(this,"exclude")).suggestions(null===(e=this.block)||void 0===e?void 0:e.suggestions.all).autoFocus().enter(this.editor.close).escape(this.editor.close).on((function(t){t.isFormVisible&&t.isVisible&&(o.match=t.value)})),a=new r.Forms.Dropdown(n,i?this.match:"").label((0,r.pgettext)("block:text","Use value of")).width("full").on((function(t){t.isFormVisible&&t.isObservable&&(o.match=t.value||void 0)})),c=this.editor.form({title:(0,r.pgettext)("block:text","If text matches"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Text"),value:"text"},{label:(0,r.pgettext)("block:text","Value"),value:"variable",disabled:0===n.length}],i?"variable":"text").on((function(t){l.visible("text"===t.value),a.visible("variable"===t.value),l.isInteractable&&l.focus()})),l,a,new r.Forms.Checkbox((0,r.pgettext)("block:text","Ignore case"),r.Forms.Checkbox.bind(this,"ignoreCase",void 0,!0))]}).visible("defined"!==this.mode&&"undefined"!==this.mode)},l([r.definition,(0,r.affects)("#name")],e.prototype,"mode",void 0),l([r.definition,(0,r.affects)("#name")],e.prototype,"match",void 0),l([r.definition],e.prototype,"ignoreCase",void 0),l([r.editor],e.prototype,"defineEditor",null),e=l([(0,r.tripetto)({type:"condition",legacyBlock:!0,context:"@tripetto/block-text",identifier:"@tripetto/block-text",version:"6.0.1",icon:c.default,get label(){return(0,r.pgettext)("block:text","Text match")}})],e)}(r.ConditionBlock)},110:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var r=o(210),a=o(789),c=o(476),s=o(287),d=o(701),u=o(939);e.Text=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.suggestions=r.Collection.of(c.TextSuggestion,e),e}return n(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.useSuggestions?(0,r.npgettext)("block:text","Text (%1 suggestion)","Text (%1 suggestions)",this.suggestions.count):this.type.label},enumerable:!1,configurable:!0}),e.prototype.defineSlot=function(){this.textSlot=this.slots.static({type:r.Slots.Text,reference:"value",label:(0,r.pgettext)("block:text","Text"),exchange:["required","alias","exportable","maxLength","transformation"]})},e.prototype.defineEditor=function(){var t=this;this.editor.name(),this.editor.description(),this.editor.placeholder(),this.editor.explanation(),this.editor.groups.settings();var e=new r.Forms.Numeric(r.Forms.Numeric.bind(this,"minLength",void 0)).min(1).max(this.textSlot.maxLength).visible((0,r.isNumber)(this.minLength)).indent(32).width(75).on((function(){o.min(t.minLength||1)})),o=new r.Forms.Numeric(r.Forms.Numeric.bind(this.textSlot,"maxLength",void 0)).min(this.minLength||1).visible((0,r.isNumber)(this.textSlot.maxLength)).indent(32).width(75).on((function(){e.max(t.textSlot.maxLength)}));this.editor.option({name:(0,r.pgettext)("block:text","Limits"),form:{title:(0,r.pgettext)("block:text","Limits"),controls:[new r.Forms.Checkbox((0,r.pgettext)("block:text","Minimum"),(0,r.isNumber)(this.minLength)).on((function(t){e.visible(t.isChecked)})),e,new r.Forms.Checkbox((0,r.pgettext)("block:text","Maximum"),(0,r.isNumber)(this.textSlot.maxLength)).on((function(t){o.visible(t.isChecked)})),o]},activated:(0,r.isNumber)(this.textSlot.maxLength)||(0,r.isNumber)(this.minLength)}),this.editor.option({name:(0,r.pgettext)("block:text","Autocomplete"),form:{title:(0,r.pgettext)("block:text","Autocomplete"),controls:[new r.Forms.Radiobutton([{label:(0,r.pgettext)("block:text","Name"),value:"name",description:(0,r.pgettext)("block:text","Person's full name.")},{label:(0,r.pgettext)("block:text","Organization"),value:"organization",description:(0,r.pgettext)("block:text","Company or organization name.")},{label:(0,r.pgettext)("block:text","Job/organization title"),value:"organization-title",description:(0,r.pgettext)("block:text","Job title, or the title a person has within an organization.")},{label:(0,r.pgettext)("block:text","Street address"),value:"street-address",description:(0,r.pgettext)("block:text","Location of the address within a city or town.")},{label:(0,r.pgettext)("block:text","Postal code"),value:"postal-code",description:(0,r.pgettext)("block:text","Postal code (in the United States, this is the ZIP code).")},{label:(0,r.pgettext)("block:text","City (address level 2)"),value:"address-level2",description:(0,r.pgettext)("block:text","City, town, village, or other locality in which the address is located.")},{label:(0,r.pgettext)("block:text","Province or state (address level 1)"),value:"address-level1",description:(0,r.pgettext)("block:text","Typically the province in which the address is located. In the United States, this would be the state. In Switzerland, the canton. In the United Kingdom, the post town.")},{label:(0,r.pgettext)("block:text","Country"),value:"country-name",description:(0,r.pgettext)("block:text","Name of the country.")},{label:(0,r.pgettext)("block:text","Telephone number"),value:"tel",description:(0,r.pgettext)("block:text","Full telephone number, including the country code.")},{label:(0,r.pgettext)("block:text","Gender identity"),value:"sex",description:(0,r.pgettext)("block:text","Gender identity as freeform text.")},{label:(0,r.pgettext)("block:text","Username"),value:"username",description:(0,r.pgettext)("block:text","Username or account name for the active domain.")}],r.Forms.Radiobutton.bind(this,"autoComplete",void 0)).label((0,r.pgettext)("block:text","Use the following autocomplete attribute for autocompletion:"))]},activated:(0,r.isString)(this.autoComplete)});var i=this.editor.option({name:(0,r.pgettext)("block:text","Suggestions"),collection:{collection:this.suggestions,title:(0,r.pgettext)("block:text","Suggestions"),placeholder:(0,r.pgettext)("block:text","Unnamed suggestion"),autoOpen:!0,editable:!0,allowImport:!0,allowExport:!0,allowDedupe:!0,showScores:!0,sorting:"manual",emptyMessage:(0,r.pgettext)("block:text","Click the + button to add an suggestion...")},activated:!0===this.useSuggestions}).onToggle((function(){t.useSuggestions=!!i.isActivated||void 0}));this.editor.transformations(this.textSlot),this.editor.groups.options(),this.editor.option({name:(0,r.pgettext)("block:text","Prefill"),form:{title:(0,r.pgettext)("block:text","Prefill"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"prefill",void 0)).label((0,r.pgettext)("block:text","Prefill with the following text:"))]},activated:(0,r.isString)(this.prefill)}),this.editor.required(this.textSlot),this.editor.visibility(),this.editor.scores({target:this,collection:i,description:(0,r.pgettext)("block:text","Generates a score based on the selected suggestion. Open the settings panel for each suggestion to set the score.")}),this.editor.alias(this.textSlot),this.editor.exportable(this.textSlot)},e.prototype.defineCondition=function(){var t=this;(0,r.each)([{mode:"exact",label:(0,r.pgettext)("block:text","Text matches")},{mode:"not-exact",label:(0,r.pgettext)("block:text","Text does not match")},{mode:"contains",label:(0,r.pgettext)("block:text","Text contains")},{mode:"not-contains",label:(0,r.pgettext)("block:text","Text does not contain")},{mode:"starts",label:(0,r.pgettext)("block:text","Text starts with")},{mode:"ends",label:(0,r.pgettext)("block:text","Text ends with")},{mode:"defined",label:(0,r.pgettext)("block:text","Text is not empty")},{mode:"undefined",label:(0,r.pgettext)("block:text","Text is empty")}],(function(e){t.conditions.template({condition:a.TextCondition,label:e.label,autoOpen:"defined"!==e.mode&&"undefined"!==e.mode,props:{slot:t.textSlot,mode:e.mode}})}));var e=this.slots.select("score","feature");if(e&&e.label){var o=this.conditions.group(e.label,u.default,!1,!0);(0,r.each)([{mode:"equal",label:(0,r.pgettext)("block:text","Score is equal to")},{mode:"not-equal",label:(0,r.pgettext)("block:text","Score is not equal to")},{mode:"below",label:(0,r.pgettext)("block:text","Score is lower than")},{mode:"above",label:(0,r.pgettext)("block:text","Score is higher than")},{mode:"between",label:(0,r.pgettext)("block:text","Score is between")},{mode:"not-between",label:(0,r.pgettext)("block:text","Score is not between")},{mode:"defined",label:(0,r.pgettext)("block:text","Score is calculated")},{mode:"undefined",label:(0,r.pgettext)("block:text","Score is not calculated")}],(function(t){o.template({condition:s.ScoreCondition,label:t.label,autoOpen:"defined"!==t.mode&&"undefined"!==t.mode,props:{slot:e,mode:t.mode,value:0,to:"between"===t.mode||"not-between"===t.mode?0:void 0}})}))}},l([r.definition],e.prototype,"autoComplete",void 0),l([r.definition,(0,r.affects)("#label")],e.prototype,"useSuggestions",void 0),l([(0,r.definition)("items"),(0,r.affects)("#label"),(0,r.supplies)("#slot","value",!1,"useSuggestions")],e.prototype,"suggestions",void 0),l([(0,r.definition)("string","optional")],e.prototype,"prefill",void 0),l([(0,r.definition)("number","optional")],e.prototype,"minLength",void 0),l([r.slots],e.prototype,"defineSlot",null),l([r.editor],e.prototype,"defineEditor",null),l([r.conditions],e.prototype,"defineCondition",null),e=l([(0,r.tripetto)({type:"node",legacyBlock:!0,identifier:"@tripetto/block-text",version:"6.0.1",icon:d.default,get label(){return(0,r.pgettext)("block:text","Text (single line)")}})],e)}(r.NodeBlock)},476:function(t,e,o){var i,n=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),l=this&&this.__decorate||function(t,e,o,i){var n,l=arguments.length,r=l<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(r=(l<3?n(r):l>3?n(e,o,r):n(e,o))||r);return l>3&&r&&Object.defineProperty(e,o,r),r};Object.defineProperty(e,"__esModule",{value:!0}),e.TextSuggestion=void 0;var r=o(210);e.TextSuggestion=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="",e}return n(e,t),e.prototype.defineEditor=function(){this.editor.option({name:(0,r.pgettext)("block:text","Suggestion"),form:{title:(0,r.pgettext)("block:text","Suggestion"),controls:[new r.Forms.Text("singleline",r.Forms.Text.bind(this,"name","")).autoFocus().autoSelect().enter(this.editor.close).escape(this.editor.close)]},locked:!0});var t=this.ref.slots.select("score","feature");this.editor.group((0,r.pgettext)("block:text","Options")),this.editor.option({name:(0,r.pgettext)("block:text","Score"),form:{title:(0,r.pgettext)("block:text","Score"),controls:[new r.Forms.Numeric(r.Forms.Numeric.bind(this,"score",void 0)).precision((null==t?void 0:t.precision)||0).digits((null==t?void 0:t.digits)||0).decimalSign((null==t?void 0:t.decimal)||"").thousands(!!(null==t?void 0:t.separator),(null==t?void 0:t.separator)||"").prefix((null==t?void 0:t.prefix)||"").prefixPlural((null==t?void 0:t.prefixPlural)||void 0).suffix((null==t?void 0:t.suffix)||"").suffixPlural((null==t?void 0:t.suffixPlural)||void 0)]},activated:!0,locked:!!t,disabled:!t})},l([(0,r.definition)("string"),r.name],e.prototype,"name",void 0),l([(0,r.definition)("number","optional"),r.score],e.prototype,"score",void 0),l([r.editor],e.prototype,"defineEditor",null),e}(r.Collection.Item)},537:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE3LjUgNWgtMTVhLjUuNSAwIDAgMSAwLTFoMTVhLjUuNSAwIDAgMSAwIDF6bS00IDNoLTExYS41LjUgMCAwIDEgMC0xaDExYS41LjUgMCAwIDEgMCAxem00IDNoLTE1YS41LjUgMCAwIDEgMC0xaDE1YS41LjUgMCAwIDEgMCAxem0tNCAzaC0xMWEuNS41IDAgMCAxIDAtMWgxMWEuNS41IDAgMCAxIDAgMXptNCAzaC0xNWEuNS41IDAgMCAxIDAtMWgxNWEuNS41IDAgMCAxIDAgMXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},939:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZD0iTTE4LjUgOEgxM1YzLjVhLjUuNSAwIDAgMC0uNS0uNWgtNmEuNS41IDAgMCAwLS41LjVWNkguNWEuNS41IDAgMCAwLS41LjV2MTBhLjUuNSAwIDAgMCAuNS41aDE4YS41LjUgMCAwIDAgLjUtLjV2LThhLjUuNSAwIDAgMC0uNS0uNXpNNyA0aDV2MTJIN1Y0ek0xIDdoNXY5SDFWN3ptMTcgOWgtNVY5aDV2N3oiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PHBhdGggZD0iTTkuNSAxMGEuNS41IDAgMCAxLS41LS41di00YS41LjUgMCAwIDEgMSAwdjRhLjUuNSAwIDAgMS0uNS41em0tNSAzaC0yYS41LjUgMCAwIDEtLjUtLjV2LTJhLjUuNSAwIDAgMSAuNS0uNUg0VjlIMi41YS41LjUgMCAwIDEgMC0xaDJhLjUuNSAwIDAgMSAuNS41djJhLjUuNSAwIDAgMS0uNS41SDN2MWgxLjVhLjUuNSAwIDAgMSAwIDF6bTEyLTNoLTJhLjUuNSAwIDAgMCAwIDFIMTZ2MWgtMS41YS41LjUgMCAwIDAgMCAxSDE2djFoLTEuNWEuNS41IDAgMCAwIDAgMWgyYS41LjUgMCAwIDAgLjUtLjV2LTRhLjUuNSAwIDAgMC0uNS0uNXoiIGNsYXNzPSJ0cmlwZXR0by1maWxsIi8+PC9zdmc+"},701:function(t,e,o){o.r(e),e.default="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1ODAiIGhlaWdodD0iNTgwIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgdGV4dC1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHZpZXdCb3g9IjAgMCA1ODAwIDU4MDAiPjxwYXRoIGNsYXNzPSJ0cmlwZXR0by1maWxsIiBkPSJNNTAwIDMzMDBoMjAwVjIzMDBINTAwdi0yMDBoNjAwdjIwMEg5MDB2MTAwMGgyMDB2MjAwSDUwMHYtMjAwem01MjAwLTE2MDB2MjIwMEgxMDBWMTcwMGg1NjAwem0tMjAwIDIwMEgzMDB2MTgwMGg1MjAwVjE5MDB6Ii8+PC9zdmc+"},210:function(e){e.exports=t}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var l=o[t]={exports:{}};return e[t].call(l.exports,l,l.exports,i),l.exports}return i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(110)}()})); |
{ | ||
"name": "@tripetto/block-text", | ||
"title": "Tripetto Text Block", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Text input (single-line) block for Tripetto.", | ||
@@ -104,5 +104,5 @@ "license": "MIT", | ||
"@rollup/plugin-typescript": "^11.0.0", | ||
"@tripetto/builder": "^5.0.14", | ||
"@tripetto/runner": "^7.0.4", | ||
"concurrently": "^7.6.0", | ||
"@tripetto/builder": "^5.0.22", | ||
"@tripetto/runner": "^7.0.7", | ||
"concurrently": "^8.0.1", | ||
"exit-on-dirty-git": "^1.0.1", | ||
@@ -113,4 +113,4 @@ "git-branch-is": "^4.0.0", | ||
"po2json": "^1.0.0-beta-3", | ||
"prettier": "^2.7.1", | ||
"rollup": "^3.19.1", | ||
"prettier": "^2.8.7", | ||
"rollup": "^3.20.2", | ||
"rollup-plugin-visualizer": "^5.9.0", | ||
@@ -121,5 +121,5 @@ "shx": "^0.3.4", | ||
"tslint": "^6.1.3", | ||
"typescript": "^4.9.5", | ||
"typescript": "^5.0.2", | ||
"url-loader": "^4.1.1", | ||
"webpack": "^5.76.1", | ||
"webpack": "^5.77.0", | ||
"webpack-bundle-analyzer": "^4.8.0", | ||
@@ -126,0 +126,0 @@ "webpack-cli": "^5.0.1", |
@@ -9,3 +9,3 @@ ## <a href="https://tripetto.com/sdk/"><img src="https://unpkg.com/@tripetto/builder/assets/header.svg" alt="Tripetto FormBuilder SDK"></a> | ||
🫶 Trusted and used by organizations **around the globe**, including [Fortune 500 companies](https://en.wikipedia.org/wiki/Fortune_500). | ||
🌎 Trusted and used by organizations **around the globe**, including [Fortune 500 companies](https://en.wikipedia.org/wiki/Fortune_500). | ||
@@ -44,3 +44,3 @@ --- | ||
## 🪪 License | ||
## 💳 License | ||
Have a blast. [MIT](https://opensource.org/licenses/MIT). | ||
@@ -47,0 +47,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Text Block 6.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var t={502:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var s=r(226),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,s.isString)(e)&&t instanceof s.Slots.Numeric){var r=this.variableFor(e);return r&&r.hasValue?t.toValue(r.value):void 0}return(0,s.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var r=this.getValue(t.slot,this.props.to);return(0,s.isNumberFinite)(e)&&(0,s.isNumberFinite)(r)&&(t.hasValue&&t.value>=s.Num.min(e,r)&&t.value<=s.Num.max(e,r))===("between"===this.props.mode);case"defined":return t.hasValue;case"undefined":return!t.hasValue}}return!1},i([s.condition],e.prototype,"verify",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-text",":score")})],e)}(s.ConditionBlock);e.ScoreCondition=u},400:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var s=r(226),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMatchString=function(){if((0,s.isVariable)(this.props.match)){var t=this.variableFor(this.props.match);return t&&t.hasValue?t.string:""}return this.parseVariables(this.props.match||"")},e.prototype.isEqual=function(){var t=this.valueOf();if(t){var e=this.props.ignoreCase?s.Str.lowercase(this.getMatchString()):this.getMatchString(),r=this.props.ignoreCase?s.Str.lowercase(t.string):t.string;switch(this.props.mode){case"exact":return r===e;case"not-exact":return r!==e;case"contains":return e&&-1!==r.indexOf(e)||!1;case"not-contains":return e&&-1===r.indexOf(e)||!1;case"starts":return e&&0===r.indexOf(e)||!1;case"ends":return e&&r.length>=e.length&&r.lastIndexOf(e)===r.length-e.length||!1;case"defined":return""!==r;case"undefined":return""===r}}return!1},i([s.condition],e.prototype,"isEqual",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"@tripetto/block-text"})],e)}(s.ConditionBlock);e.TextCondition=u},856:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var s=r(226);r(400),r(502);var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scoreSlot=e.valueOf("score","feature"),e.textSlot=(0,s.assert)(e.valueOf("value","static",{prefill:(0,s.isString)(e.props.prefill)&&{value:e.props.prefill}||void 0,modifier:function(t){var r;if(e.props.useSuggestions)return{value:t.value,reference:t.value&&(null===(r=(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value})))||void 0===r?void 0:r.id)||void 0}},onChange:function(t){if(e.scoreSlot){var r=e.props.useSuggestions&&(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value}))||void 0;e.scoreSlot.set(r&&((null==r?void 0:r.score)||0))}}})),e.required=e.textSlot.slot.required||!1,e.maxLength=e.textSlot.slot.maxLength,e.autoComplete=e.props.autoComplete,e}return n(e,t),Object.defineProperty(e.prototype,"suggestions",{get:function(){var t;return this.props.useSuggestions&&(null===(t=this.props.suggestions)||void 0===t?void 0:t.map((function(t){return t.name})))||void 0},enumerable:!1,configurable:!0}),e.prototype.validate=function(){return!this.props.minLength||!this.textSlot.value.length||this.textSlot.value.length>=this.props.minLength},i([s.validator],e.prototype,"validate",null),e}(s.NodeBlock);e.Text=u},226:function(t){t.exports=require("@tripetto/runner")}},e={};var r=function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}(856);module.exports=r}(); | ||
/*! Tripetto Text Block 6.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(){"use strict";var t={502:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var s=r(226);e.ScoreCondition=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,s.isString)(e)&&t instanceof s.Slots.Numeric){var r=this.variableFor(e);return r&&r.hasValue?t.toValue(r.value):void 0}return(0,s.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var r=this.getValue(t.slot,this.props.to);return(0,s.isNumberFinite)(e)&&(0,s.isNumberFinite)(r)&&(t.hasValue&&t.value>=s.Num.min(e,r)&&t.value<=s.Num.max(e,r))===("between"===this.props.mode);case"defined":return t.hasValue;case"undefined":return!t.hasValue}}return!1},i([s.condition],e.prototype,"verify",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-text",":score")})],e)}(s.ConditionBlock)},400:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var s=r(226);e.TextCondition=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMatchString=function(){if((0,s.isVariable)(this.props.match)){var t=this.variableFor(this.props.match);return t&&t.hasValue?t.string:""}return this.parseVariables(this.props.match||"")},e.prototype.isEqual=function(){var t=this.valueOf();if(t){var e=this.props.ignoreCase?s.Str.lowercase(this.getMatchString()):this.getMatchString(),r=this.props.ignoreCase?s.Str.lowercase(t.string):t.string;switch(this.props.mode){case"exact":return r===e;case"not-exact":return r!==e;case"contains":return e&&-1!==r.indexOf(e)||!1;case"not-contains":return e&&-1===r.indexOf(e)||!1;case"starts":return e&&0===r.indexOf(e)||!1;case"ends":return e&&r.length>=e.length&&r.lastIndexOf(e)===r.length-e.length||!1;case"defined":return""!==r;case"undefined":return""===r}}return!1},i([s.condition],e.prototype,"isEqual",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"@tripetto/block-text"})],e)}(s.ConditionBlock)},856:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var s=r(226);r(400),r(502);e.Text=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scoreSlot=e.valueOf("score","feature"),e.textSlot=(0,s.assert)(e.valueOf("value","static",{prefill:(0,s.isString)(e.props.prefill)&&{value:e.props.prefill}||void 0,modifier:function(t){var r;if(e.props.useSuggestions)return{value:t.value,reference:t.value&&(null===(r=(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value})))||void 0===r?void 0:r.id)||void 0}},onChange:function(t){if(e.scoreSlot){var r=e.props.useSuggestions&&(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value}))||void 0;e.scoreSlot.set(r&&((null==r?void 0:r.score)||0))}}})),e.required=e.textSlot.slot.required||!1,e.maxLength=e.textSlot.slot.maxLength,e.autoComplete=e.props.autoComplete,e}return n(e,t),Object.defineProperty(e.prototype,"suggestions",{get:function(){var t;return this.props.useSuggestions&&(null===(t=this.props.suggestions)||void 0===t?void 0:t.map((function(t){return t.name})))||void 0},enumerable:!1,configurable:!0}),e.prototype.validate=function(){return!this.props.minLength||!this.textSlot.value.length||this.textSlot.value.length>=this.props.minLength},i([s.validator],e.prototype,"validate",null),e}(s.NodeBlock)},226:function(t){t.exports=require("@tripetto/runner")}},e={};var r=function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}(856);module.exports=r}(); |
@@ -1,2 +0,2 @@ | ||
/*! Tripetto Text Block 6.0.0 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("TripettoRunner")):"function"==typeof define&&define.amd?define("TripettoBlockText",["TripettoRunner"],e):"object"==typeof exports?exports.TripettoBlockText=e(require("TripettoRunner")):t.TripettoBlockText=e(t.TripettoRunner)}(this,(function(t){return function(){"use strict";var e={502:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var s=r(294),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,s.isString)(e)&&t instanceof s.Slots.Numeric){var r=this.variableFor(e);return r&&r.hasValue?t.toValue(r.value):void 0}return(0,s.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var r=this.getValue(t.slot,this.props.to);return(0,s.isNumberFinite)(e)&&(0,s.isNumberFinite)(r)&&(t.hasValue&&t.value>=s.Num.min(e,r)&&t.value<=s.Num.max(e,r))===("between"===this.props.mode);case"defined":return t.hasValue;case"undefined":return!t.hasValue}}return!1},i([s.condition],e.prototype,"verify",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-text",":score")})],e)}(s.ConditionBlock);e.ScoreCondition=u},400:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var s=r(294),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMatchString=function(){if((0,s.isVariable)(this.props.match)){var t=this.variableFor(this.props.match);return t&&t.hasValue?t.string:""}return this.parseVariables(this.props.match||"")},e.prototype.isEqual=function(){var t=this.valueOf();if(t){var e=this.props.ignoreCase?s.Str.lowercase(this.getMatchString()):this.getMatchString(),r=this.props.ignoreCase?s.Str.lowercase(t.string):t.string;switch(this.props.mode){case"exact":return r===e;case"not-exact":return r!==e;case"contains":return e&&-1!==r.indexOf(e)||!1;case"not-contains":return e&&-1===r.indexOf(e)||!1;case"starts":return e&&0===r.indexOf(e)||!1;case"ends":return e&&r.length>=e.length&&r.lastIndexOf(e)===r.length-e.length||!1;case"defined":return""!==r;case"undefined":return""===r}}return!1},i([s.condition],e.prototype,"isEqual",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"@tripetto/block-text"})],e)}(s.ConditionBlock);e.TextCondition=u},856:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var s=r(294);r(400),r(502);var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scoreSlot=e.valueOf("score","feature"),e.textSlot=(0,s.assert)(e.valueOf("value","static",{prefill:(0,s.isString)(e.props.prefill)&&{value:e.props.prefill}||void 0,modifier:function(t){var r;if(e.props.useSuggestions)return{value:t.value,reference:t.value&&(null===(r=(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value})))||void 0===r?void 0:r.id)||void 0}},onChange:function(t){if(e.scoreSlot){var r=e.props.useSuggestions&&(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value}))||void 0;e.scoreSlot.set(r&&((null==r?void 0:r.score)||0))}}})),e.required=e.textSlot.slot.required||!1,e.maxLength=e.textSlot.slot.maxLength,e.autoComplete=e.props.autoComplete,e}return n(e,t),Object.defineProperty(e.prototype,"suggestions",{get:function(){var t;return this.props.useSuggestions&&(null===(t=this.props.suggestions)||void 0===t?void 0:t.map((function(t){return t.name})))||void 0},enumerable:!1,configurable:!0}),e.prototype.validate=function(){return!this.props.minLength||!this.textSlot.value.length||this.textSlot.value.length>=this.props.minLength},i([s.validator],e.prototype,"validate",null),e}(s.NodeBlock);e.Text=u},294:function(e){e.exports=t}},r={};var o=function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o].call(i.exports,i,i.exports,t),i.exports}(856);return o}()})); | ||
/*! Tripetto Text Block 6.0.1 - Copyright (C) 2023 Tripetto B.V. - All Rights Reserved */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("TripettoRunner")):"function"==typeof define&&define.amd?define("TripettoBlockText",["TripettoRunner"],e):"object"==typeof exports?exports.TripettoBlockText=e(require("TripettoRunner")):t.TripettoBlockText=e(t.TripettoRunner)}(this,(function(t){return function(){"use strict";var e={502:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreCondition=void 0;var s=r(294);e.ScoreCondition=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getValue=function(t,e){if((0,s.isString)(e)&&t instanceof s.Slots.Numeric){var r=this.variableFor(e);return r&&r.hasValue?t.toValue(r.value):void 0}return(0,s.isNumberFinite)(e)?e:void 0},e.prototype.verify=function(){var t=this.valueOf();if(t){var e=this.getValue(t.slot,this.props.value);switch(this.props.mode){case"equal":return(t.hasValue?t.value:void 0)===e;case"not-equal":return(t.hasValue?t.value:void 0)!==e;case"below":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value<e;case"above":return(0,s.isNumberFinite)(e)&&t.hasValue&&t.value>e;case"between":case"not-between":var r=this.getValue(t.slot,this.props.to);return(0,s.isNumberFinite)(e)&&(0,s.isNumberFinite)(r)&&(t.hasValue&&t.value>=s.Num.min(e,r)&&t.value<=s.Num.max(e,r))===("between"===this.props.mode);case"defined":return t.hasValue;case"undefined":return!t.hasValue}}return!1},i([s.condition],e.prototype,"verify",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"".concat("@tripetto/block-text",":score")})],e)}(s.ConditionBlock)},400:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.TextCondition=void 0;var s=r(294);e.TextCondition=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getMatchString=function(){if((0,s.isVariable)(this.props.match)){var t=this.variableFor(this.props.match);return t&&t.hasValue?t.string:""}return this.parseVariables(this.props.match||"")},e.prototype.isEqual=function(){var t=this.valueOf();if(t){var e=this.props.ignoreCase?s.Str.lowercase(this.getMatchString()):this.getMatchString(),r=this.props.ignoreCase?s.Str.lowercase(t.string):t.string;switch(this.props.mode){case"exact":return r===e;case"not-exact":return r!==e;case"contains":return e&&-1!==r.indexOf(e)||!1;case"not-contains":return e&&-1===r.indexOf(e)||!1;case"starts":return e&&0===r.indexOf(e)||!1;case"ends":return e&&r.length>=e.length&&r.lastIndexOf(e)===r.length-e.length||!1;case"defined":return""!==r;case"undefined":return""===r}}return!1},i([s.condition],e.prototype,"isEqual",null),e=i([(0,s.tripetto)({type:"condition",legacyBlock:!0,identifier:"@tripetto/block-text"})],e)}(s.ConditionBlock)},856:function(t,e,r){var o,n=this&&this.__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__decorate||function(t,e,r,o){var n,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(n=t[u])&&(s=(i<3?n(s):i>3?n(e,r,s):n(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0;var s=r(294);r(400),r(502);e.Text=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scoreSlot=e.valueOf("score","feature"),e.textSlot=(0,s.assert)(e.valueOf("value","static",{prefill:(0,s.isString)(e.props.prefill)&&{value:e.props.prefill}||void 0,modifier:function(t){var r;if(e.props.useSuggestions)return{value:t.value,reference:t.value&&(null===(r=(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value})))||void 0===r?void 0:r.id)||void 0}},onChange:function(t){if(e.scoreSlot){var r=e.props.useSuggestions&&(0,s.findFirst)(e.props.suggestions,(function(e){return e.name===t.value}))||void 0;e.scoreSlot.set(r&&((null==r?void 0:r.score)||0))}}})),e.required=e.textSlot.slot.required||!1,e.maxLength=e.textSlot.slot.maxLength,e.autoComplete=e.props.autoComplete,e}return n(e,t),Object.defineProperty(e.prototype,"suggestions",{get:function(){var t;return this.props.useSuggestions&&(null===(t=this.props.suggestions)||void 0===t?void 0:t.map((function(t){return t.name})))||void 0},enumerable:!1,configurable:!0}),e.prototype.validate=function(){return!this.props.minLength||!this.textSlot.value.length||this.textSlot.value.length>=this.props.minLength},i([s.validator],e.prototype,"validate",null),e}(s.NodeBlock)},294:function(e){e.exports=t}},r={};var o=function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o].call(i.exports,i,i.exports,t),i.exports}(856);return o}()})); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
404437