@pie-element/graphing-solution-set 6.1.1 → 6.1.2-next.0
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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/configure.d.ts +26 -0
- package/dist/author/configure.js +190 -0
- package/dist/author/correct-response.d.ts +33 -0
- package/dist/author/correct-response.js +206 -0
- package/dist/author/defaults.d.ts +238 -0
- package/dist/author/defaults.js +339 -0
- package/dist/author/graphing-config.d.ts +33 -0
- package/dist/author/graphing-config.js +238 -0
- package/dist/author/index.d.ts +62 -0
- package/dist/author/index.js +87 -0
- package/dist/author/utils.d.ts +46 -0
- package/dist/author/utils.js +474 -0
- package/dist/browser/author/index.js +1942 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/browser-DpedO01u.js +1218 -0
- package/dist/browser/browser-DpedO01u.js.map +1 -0
- package/dist/browser/controller/index.js +220 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +782 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-SjeWPldT.js +61711 -0
- package/dist/browser/dist-SjeWPldT.js.map +1 -0
- package/dist/browser/graphing-solution-set.css +2 -0
- package/dist/controller/defaults.d.ts +64 -0
- package/dist/controller/defaults.js +54 -0
- package/dist/controller/index.d.ts +24 -0
- package/dist/controller/index.js +112 -0
- package/dist/controller/utils.d.ts +20 -0
- package/dist/controller/utils.js +42 -0
- package/dist/delivery/index.d.ts +22 -0
- package/dist/delivery/index.js +62 -0
- package/dist/delivery/main.d.ts +31 -0
- package/dist/delivery/main.js +198 -0
- package/dist/delivery/utils.d.ts +12 -0
- package/dist/delivery/utils.js +220 -0
- package/dist/graphing-solution-set.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +403 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +27 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +7 -0
- package/package.json +80 -21
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -850
- package/LICENSE.md +0 -5
- package/README.md +0 -20
- package/configure/CHANGELOG.json +0 -1
- package/configure/CHANGELOG.md +0 -810
- package/configure/lib/configure.js +0 -312
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/correct-response.js +0 -435
- package/configure/lib/correct-response.js.map +0 -1
- package/configure/lib/defaults.js +0 -357
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/graphing-config.js +0 -408
- package/configure/lib/graphing-config.js.map +0 -1
- package/configure/lib/index.js +0 -163
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -630
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -29
- package/controller/CHANGELOG.json +0 -1
- package/controller/CHANGELOG.md +0 -675
- package/controller/lib/defaults.js +0 -69
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -351
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -212
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -22
- package/demo-gss.gif +0 -0
- package/docs/config-schema.json +0 -1560
- package/docs/config-schema.json.md +0 -1114
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -54
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -1800
- package/docs/pie-schema.json.md +0 -952
- package/lib/index.js +0 -164
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -355
- package/lib/main.js.map +0 -1
- package/lib/utils.js +0 -515
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
line: (t) => t && e.point(t.from) && e.point(t.to),
|
|
3
|
+
point: (e) => e && Number.isFinite(e.x) && Number.isFinite(e.y)
|
|
4
|
+
}, t = (e, t) => Number(Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2).toFixed(3)), n = (e, n) => {
|
|
5
|
+
let r = e, i = !1, a = [...n];
|
|
6
|
+
a.push(n[0]);
|
|
7
|
+
for (let e = 0; e < a.length - 1; e++) {
|
|
8
|
+
let n = a[e], o = a[e + 1];
|
|
9
|
+
if (t(n, r) + t(r, o) === t(n, o)) {
|
|
10
|
+
i = !0;
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return i;
|
|
15
|
+
}, r = (e, t, n, r, i, a, o, s) => {
|
|
16
|
+
let c, l = (s - a) * (n - e) - (o - i) * (r - t);
|
|
17
|
+
return l === 0 ? null : (c = ((o - i) * (t - a) - (s - a) * (e - i)) / l, {
|
|
18
|
+
x: Number((e + c * (n - e)).toFixed(3)),
|
|
19
|
+
y: Number((t + c * (r - t)).toFixed(3))
|
|
20
|
+
});
|
|
21
|
+
}, i = (e, t, n) => e.x > t.min && e.x < t.max && e.y > n.min && e.y < n.max, a = (e, t, n) => e.x >= t.min && e.x <= t.max && e.y >= n.min && e.y <= n.max, o = (e, t, n) => {
|
|
22
|
+
let i = [], o = [
|
|
23
|
+
[
|
|
24
|
+
t.max,
|
|
25
|
+
n.max,
|
|
26
|
+
t.max,
|
|
27
|
+
n.min
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
t.min,
|
|
31
|
+
n.max,
|
|
32
|
+
t.min,
|
|
33
|
+
n.min
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
t.min,
|
|
37
|
+
n.max,
|
|
38
|
+
t.max,
|
|
39
|
+
n.max
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
t.min,
|
|
43
|
+
n.min,
|
|
44
|
+
t.max,
|
|
45
|
+
n.min
|
|
46
|
+
]
|
|
47
|
+
];
|
|
48
|
+
for (let s = 0; s < o.length; s++) {
|
|
49
|
+
let c = r(e.from.x, e.from.y, e.to.x, e.to.y, o[s][0], o[s][1], o[s][2], o[s][3]);
|
|
50
|
+
c && a(c, t, n) && i.push(c);
|
|
51
|
+
}
|
|
52
|
+
return i;
|
|
53
|
+
}, s = (e) => {
|
|
54
|
+
e.sort((e, t) => e.y - t.y);
|
|
55
|
+
let t = (e[0].y + e[e.length - 1].y) / 2;
|
|
56
|
+
e.sort((e, t) => t.x - e.x);
|
|
57
|
+
let n = {
|
|
58
|
+
x: (e[0].x + e[e.length - 1].x) / 2,
|
|
59
|
+
y: t
|
|
60
|
+
}, r;
|
|
61
|
+
e.forEach((e) => {
|
|
62
|
+
let t = Math.atan2(e.y - n.y, e.x - n.x);
|
|
63
|
+
r ? t < r && (t += Math.PI * 2) : r = t, e.angle = t;
|
|
64
|
+
}), e.sort((e, t) => e.angle - t.angle);
|
|
65
|
+
let i = e.reverse();
|
|
66
|
+
return i.unshift(i.pop()), i.map(({ angle: e, ...t }) => t);
|
|
67
|
+
}, c = (e, t) => e.x * t.x + e.y * t.y, l = (e) => Math.sqrt(e.x * e.x + e.y * e.y), u = (e, t) => {
|
|
68
|
+
let n = c(e, t), r = l(e), i = l(t);
|
|
69
|
+
return Math.acos(n / (r * i));
|
|
70
|
+
}, d = (e, t, n, r) => {
|
|
71
|
+
let i = {
|
|
72
|
+
x: t.x - e.x,
|
|
73
|
+
y: t.y - e.y
|
|
74
|
+
}, a = {
|
|
75
|
+
x: n.x - e.x,
|
|
76
|
+
y: n.y - e.y
|
|
77
|
+
}, o = {
|
|
78
|
+
x: r.x - e.x,
|
|
79
|
+
y: r.y - e.y
|
|
80
|
+
}, s = u(i, o) + u(a, o);
|
|
81
|
+
return Math.abs(s - u(i, a)) < 1e-4;
|
|
82
|
+
}, f = (e) => e.filter((t, n) => n === e.findIndex((e) => t.x === e.x && t.y === e.y)), p = (e) => {
|
|
83
|
+
for (let t = 0; t < e.length; t++) e[t] = e[t].filter((n, r) => r === e[t].findIndex((e) => n.x === e.x && n.y === e.y));
|
|
84
|
+
e = e.filter((e) => e.length > 2);
|
|
85
|
+
for (let t = 0; t < e.length; t++) e[t] = s(e[t]);
|
|
86
|
+
return e;
|
|
87
|
+
}, m = (e, t, n) => {
|
|
88
|
+
let r = [];
|
|
89
|
+
return r.push([].concat(e)), r.push([].concat(e)), e[0].x === t.max && e[1].y === n.max || e[1].x === t.max && e[0].y === n.max ? (r[0].push({
|
|
90
|
+
x: t.max,
|
|
91
|
+
y: n.max
|
|
92
|
+
}), r[1].push({
|
|
93
|
+
x: t.min,
|
|
94
|
+
y: n.max
|
|
95
|
+
}, {
|
|
96
|
+
x: t.min,
|
|
97
|
+
y: n.min
|
|
98
|
+
}, {
|
|
99
|
+
x: t.max,
|
|
100
|
+
y: n.min
|
|
101
|
+
})) : e[0].x === t.min && e[1].y === n.max || e[1].x === t.min && e[0].y === n.max ? (r[0].push({
|
|
102
|
+
x: t.min,
|
|
103
|
+
y: n.max
|
|
104
|
+
}), r[1].push({
|
|
105
|
+
x: t.max,
|
|
106
|
+
y: n.max
|
|
107
|
+
}, {
|
|
108
|
+
x: t.max,
|
|
109
|
+
y: n.min
|
|
110
|
+
}, {
|
|
111
|
+
x: t.min,
|
|
112
|
+
y: n.min
|
|
113
|
+
})) : e[0].x === t.min && e[1].y === n.min || e[1].x === t.min && e[0].y === n.min ? (r[0].push({
|
|
114
|
+
x: t.min,
|
|
115
|
+
y: n.min
|
|
116
|
+
}), r[1].push({
|
|
117
|
+
x: t.max,
|
|
118
|
+
y: n.min
|
|
119
|
+
}, {
|
|
120
|
+
x: t.max,
|
|
121
|
+
y: n.max
|
|
122
|
+
}, {
|
|
123
|
+
x: t.min,
|
|
124
|
+
y: n.max
|
|
125
|
+
})) : e[0].x === t.max && e[1].y === n.min || e[1].x === t.max && e[0].y === n.min ? (r[0].push({
|
|
126
|
+
x: t.max,
|
|
127
|
+
y: n.min
|
|
128
|
+
}), r[1].push({
|
|
129
|
+
x: t.min,
|
|
130
|
+
y: n.min
|
|
131
|
+
}, {
|
|
132
|
+
x: t.min,
|
|
133
|
+
y: n.max
|
|
134
|
+
}, {
|
|
135
|
+
x: t.max,
|
|
136
|
+
y: n.max
|
|
137
|
+
})) : e[0].x === t.min && e[1].x === t.max || e[0].x === t.max && e[1].x === t.min ? (r[0].push({
|
|
138
|
+
x: t.min,
|
|
139
|
+
y: n.max
|
|
140
|
+
}, {
|
|
141
|
+
x: t.max,
|
|
142
|
+
y: n.max
|
|
143
|
+
}), r[1].push({
|
|
144
|
+
x: t.min,
|
|
145
|
+
y: n.min
|
|
146
|
+
}, {
|
|
147
|
+
x: t.max,
|
|
148
|
+
y: n.min
|
|
149
|
+
})) : (e[0].y === n.min && e[1].y === n.max || e[0].y === n.max && e[1].y === n.min) && (r[0].push({
|
|
150
|
+
x: t.min,
|
|
151
|
+
y: n.min
|
|
152
|
+
}, {
|
|
153
|
+
x: t.min,
|
|
154
|
+
y: n.max
|
|
155
|
+
}), r[1].push({
|
|
156
|
+
x: t.max,
|
|
157
|
+
y: n.min
|
|
158
|
+
}, {
|
|
159
|
+
x: t.max,
|
|
160
|
+
y: n.max
|
|
161
|
+
})), p(r);
|
|
162
|
+
}, h = (e, t, a, s) => {
|
|
163
|
+
let c = t[0], l = t[1], u = [
|
|
164
|
+
{
|
|
165
|
+
x: a.min,
|
|
166
|
+
y: s.min
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
x: a.min,
|
|
170
|
+
y: s.max
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
x: a.max,
|
|
174
|
+
y: s.min
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
x: a.max,
|
|
178
|
+
y: s.max
|
|
179
|
+
}
|
|
180
|
+
], h = r(c.from.x, c.from.y, c.to.x, c.to.y, l.from.x, l.from.y, l.to.x, l.to.y), g = [], _ = o(c, a, s);
|
|
181
|
+
_ = f(_);
|
|
182
|
+
let v = o(l, a, s);
|
|
183
|
+
if (v = f(v), h && i(h, a, s)) for (let e = 0; e < _.length; e++) for (let t = 0; t < v.length; t++) {
|
|
184
|
+
let n = [], r = [];
|
|
185
|
+
n.push(h), n.push(_[e]), n.push(v[t]);
|
|
186
|
+
for (let i = 0; i < u.length; i++) d(h, _[e], v[t], u[i]) ? n.push(u[i]) : r.push(u[i]);
|
|
187
|
+
u = r, g.push(n);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
let e = m(_, a, s), t = m(v, a, s);
|
|
191
|
+
for (let t = 0; t < e.length; t++) n(v[0], e[t]) && n(v[1], e[t]) || g.push(e[t]);
|
|
192
|
+
for (let e = 0; e < t.length; e++) n(_[0], t[e]) && n(_[1], t[e]) || g.push(t[e]);
|
|
193
|
+
for (let e = 0; e < g.length; e++) u = u.filter(function(t) {
|
|
194
|
+
return !g[e].some(function(e) {
|
|
195
|
+
return t.x === e.x && t.y === e.y;
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
let r = u.concat(_, v);
|
|
199
|
+
g.push(r);
|
|
200
|
+
}
|
|
201
|
+
return p(g);
|
|
202
|
+
}, g = (e, t, n, r) => (e.numberOfLines === 1 ? e.sections = m(o(t[0], n, r), n, r) : e.sections = h(e, t, n, r), e), _ = (e, t) => {
|
|
203
|
+
let n = t.length, r = e.x, i = e.y, a = !1, o = t[0], s;
|
|
204
|
+
for (let e = 1; e <= n; e++) {
|
|
205
|
+
if (s = t[e % n], i > Math.min(o.y, s.y) && i <= Math.max(o.y, s.y) && r <= Math.max(o.x, s.x)) {
|
|
206
|
+
let e = (i - o.y) * (s.x - o.x) / (s.y - o.y) + o.x;
|
|
207
|
+
(o.x === s.x || r <= e) && (a = !a);
|
|
208
|
+
}
|
|
209
|
+
o = s;
|
|
210
|
+
}
|
|
211
|
+
return a;
|
|
212
|
+
}, v = (e, t) => {
|
|
213
|
+
if (t.length === 0) return !1;
|
|
214
|
+
if (e.numberOfLines === 1) {
|
|
215
|
+
if (t.length === 1) return !t[0].building;
|
|
216
|
+
} else if (t.length !== 2) return !1;
|
|
217
|
+
else return !t[1].building;
|
|
218
|
+
}, y = (t) => t ? (t || []).filter(({ type: t, ...n }) => e[t] ? e[t](n) : !1) : [];
|
|
219
|
+
//#endregion
|
|
220
|
+
export { v as checkIfLinesAreAdded, g as findSectionsInSolutionSet, _ as pointInsidePolygon, y as removeInvalidAnswers };
|