@pie-players/pie-section-player 0.3.75 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +845 -964
- package/custom-elements.json +3922 -0
- package/dist/browser/assets/{evaluation-worker-CORp9m0K.js → evaluation-worker-0xRDVTJx.js} +82215 -73234
- package/dist/browser/chunks/ToolCoordinator-0a6c4088.js +1 -0
- package/dist/browser/chunks/attribute-coercion-b93b482c.js +1 -0
- package/dist/browser/chunks/calculator-element-271c142f.js +8 -9
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -1
- package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -1
- package/dist/browser/chunks/classPrivateMethodInitSpec-563cd0a5.js +1 -0
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +1 -0
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/focus-trap-44913bf3.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +1 -1
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/runtime-YFqnU6ic-d5c0cb49.js +8605 -0
- package/dist/browser/chunks/{src-BcptuNS5-ed25d7fd.js → src-D_1goyPT-8cca0246.js} +81 -82
- package/dist/browser/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
- package/dist/browser/chunks/term-lookup-632cf6b1.js +1 -0
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +6 -6
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
- package/dist/browser/chunks/tool-graph-cb0338e8.js +6 -6
- package/dist/browser/chunks/tool-host-contract-fae1c415.js +1 -0
- package/dist/browser/chunks/tool-instance-id-76ac45e2.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +13 -16
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +12 -9
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +24 -30
- package/dist/browser/chunks/toolbar-registration-helpers-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
- package/dist/browser/pie-section-player.js +66 -65
- package/dist/chunks/nl-NL-364d61b9.js +34 -6
- package/dist/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
- package/dist/component-definitions.d.ts +0 -2
- package/dist/components/shared/card-media-region.d.ts +3 -4
- package/dist/components/shared/framework-error-latch.d.ts +4 -2
- package/dist/components/shared/missing-tool-providers.d.ts +0 -6
- package/dist/components/shared/player-preload.d.ts +4 -9
- package/dist/components/shared/section-player-card-context.d.ts +0 -3
- package/dist/components/shared/section-player-host-runtime.d.ts +0 -2
- package/dist/components/shared/section-player-view-state.d.ts +0 -1
- package/dist/controllers/SectionController.d.ts +20 -6
- package/dist/pie-section-player.js +11279 -11191
- package/package.json +11 -9
- package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +0 -1
- package/dist/browser/chunks/runtime-wcU7KOFU-ac86d7b8.js +0 -8536
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +0 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +0 -1
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +0 -194
- /package/dist/browser/chunks/{ItemToolBar-jx38w99s-58defccc.js → ItemToolBar-66hcwmfw-3bcb82a3.js} +0 -0
- /package/dist/chunks/{ItemToolBar-jx38w99s-1287ba31.js → ItemToolBar-66hcwmfw-1287ba31.js} +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import{r as _t,t as $t}from"./logger-8b07fb72.js";import{t as gt}from"./preload-helper-6ad28da3.js";import{t as At}from"./tool-instance-id-76ac45e2.js";import{t as St}from"./sre-locales-112320af.js";var F,R=globalThis,I=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dt=Symbol(),G=new WeakMap,wt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==dt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(I&&t===void 0){const r=e!==void 0&&e.length===1;r&&(t=G.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&G.set(e,t))}return t}toString(){return this.cssText}},Et=t=>new wt(typeof t=="string"?t:t+"",void 0,dt),xt=(t,e)=>{if(I)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(const r of e){const s=document.createElement("style"),i=R.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=r.cssText,t.appendChild(s)}},J=I?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(const s of e.cssRules)r+=s.cssText;return Et(r)})(t):t,{is:Ot,defineProperty:Tt,getOwnPropertyDescriptor:kt,getOwnPropertyNames:Pt,getOwnPropertySymbols:Ct,getPrototypeOf:Mt}=Object,w=globalThis,K=w.trustedTypes,Rt=K?K.emptyScript:"",Ut=w.reactiveElementPolyfillSupport,T=(t,e)=>t,U={toAttribute(t,e){switch(e){case Boolean:t=t?Rt:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},V=(t,e)=>!Ot(t,e),Z={attribute:!0,type:String,converter:U,reflect:!1,useDefault:!1,hasChanged:V};(F=Symbol).metadata??(F.metadata=Symbol("metadata")),w.litPropertyMetadata??(w.litPropertyMetadata=new WeakMap);var S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Z){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&Tt(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){const{get:s,set:i}=kt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){const o=s?.call(this);i?.call(this,n),this.requestUpdate(t,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Z}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=Mt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,r=[...Pt(e),...Ct(e)];for(const s of r)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const s of r)e.unshift(J(s))}else t!==void 0&&e.push(J(t));return e}static _$Eu(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return xt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){const i=(r.converter?.toAttribute!==void 0?r.converter:U).toAttribute(e,r.type);this._$Em=t,i==null?this.removeAttribute(s):this.setAttribute(s,i),this._$Em=null}}_$AK(t,e){const r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const i=r.getPropertyOptions(s),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:U;this._$Em=s;const o=n.fromAttribute(e,i.type);this[s]=o??this._$Ej?.get(s)??o,this._$Em=null}}requestUpdate(t,e,r){if(t!==void 0){const s=this.constructor,i=this[t];if(r??(r=s.getPropertyOptions(t)),!((r.hasChanged??V)(i,e)||r.useDefault&&r.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:s,wrapped:i},n){r&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,i]of this._$Ep)this[s]=i;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[s,i]of r){const{wrapped:n}=i,o=this[s];n!==!0||this._$AL.has(s)||o===void 0||this.C(s,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[T("elementProperties")]=new Map,S[T("finalized")]=new Map,Ut?.({ReactiveElement:S}),(w.reactiveElementVersions??(w.reactiveElementVersions=[])).push("2.1.1");var N=globalThis,D=N.trustedTypes,Q=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,ct="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+y,Nt=`<${ht}>`,A=document,P=()=>A.createComment(""),C=t=>t===null||typeof t!="object"&&typeof t!="function",B=Array.isArray,Dt=t=>B(t)||typeof t?.[Symbol.iterator]=="function",z=`[
|
|
2
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,X=/>/g,$=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,et=/"/g,pt=/^(?:script|style|textarea|title)$/i,Lt=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Ht=Lt(1),E=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),rt=new WeakMap,g=A.createTreeWalker(A,129);function ut(t,e){if(!B(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Q!==void 0?Q.createHTML(e):e}var zt=(t,e)=>{const r=t.length-1,s=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=O;for(let a=0;a<r;a++){const l=t[a];let b,c,d=-1,u=0;for(;u<l.length&&(o.lastIndex=u,c=o.exec(l),c!==null);)u=o.lastIndex,o===O?c[1]==="!--"?o=Y:c[1]!==void 0?o=X:c[2]!==void 0?(pt.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=$):c[3]!==void 0&&(o=$):o===$?c[0]===">"?(o=i??O,d=-1):c[1]===void 0?d=-2:(d=o.lastIndex-c[2].length,b=c[1],o=c[3]===void 0?$:c[3]==='"'?et:tt):o===et||o===tt?o=$:o===Y||o===X?o=O:(o=$,i=void 0);const m=o===$&&t[a+1].startsWith("/>")?" ":"";n+=o===O?l+Nt:d>=0?(s.push(b),l.slice(0,d)+ct+l.slice(d)+y+m):l+y+(d===-2?a:m)}return[ut(t,n+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]},j=class vt{constructor({strings:e,_$litType$:r},s){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[b,c]=zt(e,r);if(this.el=vt.createElement(b,s),g.currentNode=this.el.content,r===2||r===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=g.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const d of i.getAttributeNames())if(d.endsWith(ct)){const u=c[o++],m=i.getAttribute(d).split(y),M=/([.?@])?(.*)/.exec(u);l.push({type:1,index:n,name:M[2],strings:m,ctor:M[1]==="."?It:M[1]==="?"?Vt:M[1]==="@"?Bt:H}),i.removeAttribute(d)}else d.startsWith(y)&&(l.push({type:6,index:n}),i.removeAttribute(d));if(pt.test(i.tagName)){const d=i.textContent.split(y),u=d.length-1;if(u>0){i.textContent=D?D.emptyScript:"";for(let m=0;m<u;m++)i.append(d[m],P()),g.nextNode(),l.push({type:2,index:++n});i.append(d[u],P())}}}else if(i.nodeType===8)if(i.data===ht)l.push({type:2,index:n});else{let d=-1;for(;(d=i.data.indexOf(y,d+1))!==-1;)l.push({type:7,index:n}),d+=y.length-1}n++}}static createElement(e,r){const s=A.createElement("template");return s.innerHTML=e,s}};function x(t,e,r=t,s){if(e===E)return e;let i=s!==void 0?r._$Co?.[s]:r._$Cl;const n=C(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,r,s)),s!==void 0?(r._$Co??(r._$Co=[]))[s]=i:r._$Cl=i),i!==void 0&&(e=x(t,i._$AS(t,e.values),i,s)),e}var jt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??A).importNode(e,!0);g.currentNode=s;let i=g.nextNode(),n=0,o=0,a=r[0];for(;a!==void 0;){if(n===a.index){let l;a.type===2?l=new q(i,i.nextSibling,this,t):a.type===1?l=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(l=new qt(i,this,t)),this._$AV.push(l),a=r[++o]}n!==a?.index&&(i=g.nextNode(),n++)}return g.currentNode=A,s}p(t){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},q=class ft{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,s,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=x(this,e,r),C(e)?e===h||e==null||e===""?(this._$AH!==h&&this._$AR(),this._$AH=h):e!==this._$AH&&e!==E&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Dt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==h&&C(this._$AH)?this._$AA.nextSibling.data=e:this.T(A.createTextNode(e)),this._$AH=e}$(e){const{values:r,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=j.createElement(ut(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(r);else{const n=new jt(i,this),o=n.u(this.options);n.p(r),this.T(o),this._$AH=n}}_$AC(e){let r=rt.get(e.strings);return r===void 0&&rt.set(e.strings,r=new j(e)),r}k(e){B(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let s,i=0;for(const n of e)i===r.length?r.push(s=new ft(this.O(P()),this.O(P()),this,this.options)):s=r[i],s._$AI(n),i++;i<r.length&&(this._$AR(s&&s._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},H=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,i){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h}_$AI(t,e=this,r,s){const i=this.strings;let n=!1;if(i===void 0)t=x(this,t,e,0),n=!C(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const o=t;let a,l;for(t=i[0],a=0;a<i.length-1;a++)l=x(this,o[r+a],e,a),l===E&&(l=this._$AH[a]),n||(n=!C(l)||l!==this._$AH[a]),l===h?t=h:t!==h&&(t+=(l??"")+i[a+1]),this._$AH[a]=l}n&&!s&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},It=class extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},Vt=class extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}},Bt=class extends H{constructor(t,e,r,s,i){super(t,e,r,s,i),this.type=5}_$AI(t,e=this){if((t=x(this,t,e,0)??h)===E)return;const r=this._$AH,s=t===h&&r!==h||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,i=t!==h&&(r===h||s);s&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},qt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}},Wt=N.litHtmlPolyfillSupport;Wt?.(j,q),(N.litHtmlVersions??(N.litHtmlVersions=[])).push("3.3.1");var Ft=(t,e,r)=>{const s=r?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const n=r?.renderBefore??null;s._$litPart$=i=new q(e.insertBefore(P(),n),n,void 0,r??{})}return i._$AI(t),i},L=globalThis,k=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ft(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}};k._$litElement$=!0,k.finalized=!0,L.litElementHydrateSupport?.({LitElement:k});var Gt=L.litElementPolyfillSupport;Gt?.({LitElement:k});(L.litElementVersions??(L.litElementVersions=[])).push("4.2.1");var Jt=t=>(e,r)=>{r!==void 0?r.addInitializer((()=>{customElements.get(t)||customElements.define(t,e)})):customElements.get(t)||customElements.define(t,e)},Kt={attribute:!0,type:String,converter:U,reflect:!1,hasChanged:V},Zt=(t=Kt,e,r)=>{const{kind:s,metadata:i}=r;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(r.name,t),s==="accessor"){const{name:o}=r;return{set(a){const l=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,l,t)},init(a){return a!==void 0&&this.C(o,void 0,t,a),a}}}if(s==="setter"){const{name:o}=r;return function(a){const l=this[o];e.call(this,a),this.requestUpdate(o,l,t)}}throw Error("Unsupported decorator location: "+s)};function _(t){return(e,r)=>typeof r=="object"?Zt(t,e,r):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,r)}var Qt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,f=(t,e,r,s)=>{for(var i=s>1?void 0:s?Yt(e,r):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(s?o(e,r,i):o(i))||i);return s&&i&&Qt(e,r,i),i},p=class extends k{constructor(){super(...arguments),this.variant="primary",this.size="default",this.type="circle",this.state="default",this.iconName="home",this.disabled=!1,this.buttonAriaLabel="Icon button"}createRenderRoot(){return this}connectedCallback(){if(super.connectedCallback(),!document.querySelector('link[href*="Roboto"]')){const t=document.createElement("link");t.rel="stylesheet",t.href="https://ui.renaissance.com/fonts/Roboto/style.css",document.head.appendChild(t)}}set shape(t){this.type=t}get shape(){return this.type}get buttonClasses(){return["nds-icon-button",`nds-icon-button--${this.variant}`,`nds-icon-button--${this.size}`,`nds-icon-button--${this.type}`,this.state!=="default"?`nds-icon-button--${this.state}`:"",this.disabled?"nds-icon-button--disabled":""].filter(Boolean).join(" ")}handleClick(t){if(this.disabled){t.preventDefault(),t.stopPropagation();return}this.dispatchEvent(new CustomEvent("icon-button-click",{bubbles:!0,composed:!0,detail:{originalEvent:t}}))}render(){return Ht`
|
|
4
|
+
<style>
|
|
5
|
+
nds-icon-button {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.nds-icon-button {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
font-family: var(--font-family-roboto, "Roboto", sans-serif);
|
|
15
|
+
font-weight: var(--font-weight-regular, 400);
|
|
16
|
+
line-height: 1;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
background: none;
|
|
19
|
+
position: relative;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
border: none;
|
|
24
|
+
transition: background-color 0.2s ease-in-out,
|
|
25
|
+
color 0.2s ease-in-out,
|
|
26
|
+
box-shadow 0.2s ease-in-out;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ── Sizes ── */
|
|
30
|
+
.nds-icon-button--small {
|
|
31
|
+
width: var(--height-32, 32px);
|
|
32
|
+
height: var(--height-32, 32px);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.nds-icon-button--medium {
|
|
36
|
+
width: var(--height-36, 36px);
|
|
37
|
+
height: var(--height-36, 36px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.nds-icon-button--default {
|
|
41
|
+
width: var(--height-40, 40px);
|
|
42
|
+
height: var(--height-40, 40px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.nds-icon-button--large {
|
|
46
|
+
width: var(--height-48, 48px);
|
|
47
|
+
height: var(--height-48, 48px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ── Shapes ── */
|
|
51
|
+
.nds-icon-button--circle {
|
|
52
|
+
border-radius: var(--radius-circle, 50%);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.nds-icon-button--rounded {
|
|
56
|
+
border-radius: var(--radius-8, 8px);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ── Primary ── */
|
|
60
|
+
.nds-icon-button--primary {
|
|
61
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
62
|
+
color: var(--color-primary-white, #ffffff);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
66
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
70
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ── Secondary ── */
|
|
74
|
+
.nds-icon-button--secondary {
|
|
75
|
+
background-color: var(--color-primary-white, #ffffff);
|
|
76
|
+
color: var(--color-interactive-blue, #146eb3);
|
|
77
|
+
box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
81
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
82
|
+
color: var(--color-primary-white, #ffffff);
|
|
83
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
87
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
88
|
+
color: var(--color-primary-white, #ffffff);
|
|
89
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* ── Tertiary ── */
|
|
93
|
+
.nds-icon-button--tertiary {
|
|
94
|
+
background-color: var(--color-new-gray, #f3f5f7);
|
|
95
|
+
color: var(--color-interactive-blue, #146eb3);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
99
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
103
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* ── Ghost ── */
|
|
107
|
+
.nds-icon-button--ghost {
|
|
108
|
+
background-color: transparent;
|
|
109
|
+
color: var(--color-interactive-blue, #146eb3);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
113
|
+
background-color: var(--color-new-gray, #f3f5f7);
|
|
114
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
118
|
+
background-color: var(--color-new-gray, #f3f5f7);
|
|
119
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ── Dark (for dark backgrounds) ── */
|
|
123
|
+
.nds-icon-button--dark {
|
|
124
|
+
background-color: transparent;
|
|
125
|
+
color: var(--color-primary-white, #ffffff);
|
|
126
|
+
box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
|
|
130
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
131
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
|
|
135
|
+
background-color: var(--color-interactive-blue, #146eb3);
|
|
136
|
+
box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* ── Disabled ── */
|
|
140
|
+
.nds-icon-button--disabled,
|
|
141
|
+
.nds-icon-button:disabled {
|
|
142
|
+
opacity: 0.5;
|
|
143
|
+
cursor: not-allowed;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ── Icon sizing ── */
|
|
147
|
+
.nds-icon-button__icon {
|
|
148
|
+
line-height: 1;
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
color: inherit;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.nds-icon-button--small .nds-icon-button__icon {
|
|
156
|
+
font-size: var(--nds-icon-small, 12px);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.nds-icon-button--medium .nds-icon-button__icon {
|
|
160
|
+
font-size: var(--nds-icon-medium, 14px);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.nds-icon-button--default .nds-icon-button__icon {
|
|
164
|
+
font-size: var(--nds-icon-default, 16px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.nds-icon-button--large .nds-icon-button__icon {
|
|
168
|
+
font-size: var(--nds-icon-large, 20px);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* ── Focus ── */
|
|
172
|
+
.nds-icon-button:focus-visible {
|
|
173
|
+
outline: 2px solid var(--color-focus-blue, #2b87ff);
|
|
174
|
+
outline-offset: 2px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* ── Reduced motion ── */
|
|
178
|
+
@media (prefers-reduced-motion: reduce) {
|
|
179
|
+
.nds-icon-button {
|
|
180
|
+
transition: none;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
</style>
|
|
184
|
+
<button
|
|
185
|
+
type="button"
|
|
186
|
+
class="${this.buttonClasses}"
|
|
187
|
+
?disabled="${this.disabled}"
|
|
188
|
+
aria-disabled="${this.disabled?"true":"false"}"
|
|
189
|
+
aria-label="${this.buttonAriaLabel}"
|
|
190
|
+
@click="${this.handleClick}"
|
|
191
|
+
>
|
|
192
|
+
<i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
|
|
193
|
+
</button>
|
|
194
|
+
`}};f([_()],p.prototype,"variant",2);f([_()],p.prototype,"size",2);f([_()],p.prototype,"type",2);f([_()],p.prototype,"state",2);f([_({attribute:"icon-name"})],p.prototype,"iconName",2);f([_({type:Boolean})],p.prototype,"disabled",2);f([_({attribute:"button-aria-label"})],p.prototype,"buttonAriaLabel",2);f([_()],p.prototype,"shape",1);p=f([Jt("nds-icon-button")],p);var st=$t("tts-math-speech",_t),he=Promise.resolve(),Xt=t=>{let e=null,r=!1;return s=>{if(!e){St(s);const i=t();e=i,i.catch(n=>{if(e===i&&(e=null),r){st.debug("speech-rule-engine failed to load again",n);return}r=!0,st.warn("speech-rule-engine failed to load; math reads as its visible text until a later read loads it.",n)})}return e}},pe=Xt(()=>gt(async()=>{const{default:t}=await import("./sre-engine-ace23548.js");return{default:t}},[],import.meta.url).then(({default:t})=>{if(!t||typeof t.toSpeech!="function")throw new Error("speech-rule-engine did not expose toSpeech");return t})),it=t=>!!t&&typeof t=="object"&&!Array.isArray(t),ot=t=>typeof t=="string"&&t.trim()?t.trim():void 0,te=t=>{if(!it(t))return;const e=ot(t.domain),r=ot(t.style),s=it(t.engineOptions)?t.engineOptions:void 0;if(!(!e&&!r&&!s))return{...e?{domain:e}:{},...r?{style:r}:{},...s?{engineOptions:s}:{}}},ee=new Set(["reserved-row","expanding-row","floating-overlay","left-aligned"]),W=t=>t&&typeof t=="object"?t:{},v=(t,e)=>t===void 0?e:t,bt=t=>yt(t)==="server"&&t.serverProvider==="custom"?"custom":"pie",re=t=>typeof t=="string"&&ee.has(t)?t:"left-aligned",nt=Object.freeze([{rate:.8,label:"Slow",ariaLabel:"Slow speed"},{rate:1,label:"Normal",ariaLabel:"Normal speed",default:!0},{rate:1.25,label:"Fast",ariaLabel:"Fast speed"}]),at=t=>{if(!(typeof t!="number"||!Number.isFinite(t)||t<=0))return Math.round(t*100)/100},lt=t=>{if(typeof t!="string")return;const e=t.trim();return e.length?e:void 0},se=t=>`${t}x`,mt=(t,e)=>t.toLowerCase()==="normal"?"Normal speed":e?`Speed ${t}`:`${t} speed`,ie=(t,e,r)=>e?e.toLowerCase().includes(t.toLowerCase())?e:`${t} ${e}`:mt(t,r),oe=t=>{const e=Array.isArray(t)?t:[...nt];if(e.length===0)return[];const r=new Set,s=[];for(const o of e){const a=W(o),l=at(typeof o=="number"?o:a.rate);if(l===void 0||r.has(l))continue;r.add(l);const b=l===1?"Normal":se(l),c=typeof o=="number"?b:lt(a.label)||b,d=typeof o=="number"?l===1?"Normal speed":mt(c,!0):ie(c,lt(a.ariaLabel),c===b);s.push({rate:l,label:c,ariaLabel:d,isDefault:!1,requestedDefault:a.default===!0||a.isDefault===!0})}if(!s.length)return oe(nt);if(!r.has(1)){const o={rate:1,label:"Normal",ariaLabel:"Normal speed",isDefault:!1,requestedDefault:!1},a=s.findIndex(l=>l.rate>1);a>=0?s.splice(a,0,o):s.push(o)}const i=s.findIndex(o=>o.requestedDefault),n=i>=0?i:s.findIndex(o=>o.rate===1);return s.map(({requestedDefault:o,...a},l)=>({...a,isDefault:l===n}))},ue=Object.freeze([.8,1,1.25]),ne=t=>{const e={...t,layoutMode:re(t.layoutMode)};if(t.backend!=="server")return e;const r={...e,apiEndpoint:v(e.apiEndpoint,"/api/tts"),transportMode:v(e.transportMode,bt(t)),endpointValidationMode:v(e.endpointValidationMode,"voices"),includeAuthOnAssetFetch:v(e.includeAuthOnAssetFetch,!1),rate:v(e.rate,1),language:v(e.language,"en-US")};return t.serverProvider==="polly"?{...r,engine:v(r.engine,"neural"),format:v(r.format,"mp3"),speechMarksMode:v(r.speechMarksMode,"word+sentence")}:r},ve=t=>{const{enabled:e,provider:r,...s}=W(t);return ne(s)},yt=t=>t.backend||"browser",fe=t=>{const e=yt(t)==="server"?t.serverProvider:void 0,r=e==="polly",s=t.transportMode||bt(t),i=te(t.mathSpeech);return{voice:t.defaultVoice,rate:t.rate,pitch:t.pitch,providerOptions:{...W(t.providerOptions),...t.language?{locale:t.language}:{},...r&&t.engine?{engine:t.engine}:{},...r&&typeof t.sampleRate=="number"?{sampleRate:t.sampleRate}:{},...r&&t.format?{format:t.format}:{},...r?{speechMarkTypes:t.speechMarksMode==="word+sentence"?["word","sentence"]:["word"]}:{},...s==="custom"&&typeof t.cache=="boolean"?{cache:t.cache}:{},...s==="custom"&&t.speedRate?{speedRate:t.speedRate}:{},...s==="custom"&&t.lang_id?{lang_id:t.lang_id}:{},...i?{mathSpeech:i}:{}},apiEndpoint:t.apiEndpoint,provider:e,language:t.language,transportMode:s,endpointMode:t.endpointMode,endpointValidationMode:t.endpointValidationMode,includeAuthOnAssetFetch:t.includeAuthOnAssetFetch,assetOrigins:t.assetOrigins,credentials:t.credentials,headers:t.headers,...typeof t.mathTokenHighlighting=="boolean"?{mathTokenHighlighting:t.mathTokenHighlighting}:{}}},be=t=>{switch(t.layoutMode){case"reserved-row":return{controlsRow:{reserveSpace:!0,expandWhenToolActive:!1},headerOverlay:{expandWhenToolActive:!1}};case"expanding-row":return{controlsRow:{reserveSpace:!1,expandWhenToolActive:!0},headerOverlay:{expandWhenToolActive:!1}};case"floating-overlay":return{controlsRow:{reserveSpace:!1,expandWhenToolActive:!1},headerOverlay:{expandWhenToolActive:!1}};default:return{controlsRow:{reserveSpace:!1,expandWhenToolActive:!1},headerOverlay:{expandWhenToolActive:!0}}}},me="pie-tool-active-change";function ye(t,e){return{fullToolId:At(t,e.scope.level,e.scope.scopeId),isActive:()=>e.isToolVisible(t),subscribeActive:r=>e.subscribeVisibility?e.subscribeVisibility(()=>{r(e.isToolVisible(t))}):()=>{}}}function _e(t){const e=t.isActive();t.button.active=e,t.overlay.visible=e,t.onActiveChange?.(e)}function $e(t,e){t.setAttribute("data-pie-tool-surface",e)}export{fe as a,ve as c,_e as i,$e as n,oe as o,ye as r,be as s,me as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var l=/[^A-Za-z0-9\-._~@/]/gu,E=new Set([".",".."]),v=e=>{const r=e.replace(l,t=>encodeURIComponent(t)),n=r.split("/");return n.some(t=>E.has(t))?n.join("%2F"):r},P=e=>Array.from(e,v).join("+"),d=e=>{if(!e)throw new Error("Parameter is required: input");const r=e.charAt(0)==="@"?e.match(/^(@[^/]+\/[^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/):e.match(/^([^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/);if(!r)throw new Error(`[parse-package-name] "${e}" is not a valid string`);return{name:r[1],path:r[2]||"",version:r[3]||""}},A=e=>e.split("+").map(r=>d(r).name).join("+");function p(e,r=f()){const n=e?.elements;if(!r||!n||typeof n!="object")return e;let t=!1;const s={};for(const[o,a]of Object.entries(n)){const i=String(a),c=m(i,r);s[o]=c??i,c!==void 0&&c!==i&&(t=!0)}return t?{...e,elements:s}:e}function m(e,r){let n;try{n=d(e).name}catch{return}const t=r[n];return typeof t=="string"&&t.length>0?t:void 0}function f(){if(typeof window>"u")return;const e=window.PIE_PRELOADED_ELEMENTS;return e&&typeof e=="object"?e:void 0}var u="--version-",g="[0-9A-Za-z-]+",h=e=>e.trim().replace(/[.+]/g,"-").replace(/[^0-9A-Za-z-]/g,"-").replace(/-{2,}/g,"-");function T(e){const r=e.match(new RegExp(`${u}(${g})$`));return!r||r.index===void 0?{baseName:e}:{baseName:e.slice(0,r.index),existingEncodedVersion:r[1]}}function S(e,r,n={}){const{version:t}=d(r);if(!t.trim()&&n.preserveUnversionedTag)return e;const s=h(t),{baseName:o,existingEncodedVersion:a}=T(e);return a===s?e:`${o}${u}${s}`}function w(e,r){if(!r)return[e];let n;try{const{elements:t}=p({elements:{[e]:r}});n=S(e,t[e],{preserveUnversionedTag:!0})}catch{return[e]}return n===e?[e]:[n,e]}export{P as a,p as i,w as n,A as o,S as r,d as s,T as t};
|